Documentation
¶
Index ¶
- func BridgeInterfaceIP(name string) (string, error)
- func CopyInfrastructure(cfg *config.Config, backendName, stackID string) error
- func DetectedBackendName(cfg *config.Config) string
- func DockerBridgeGatewayIP() (string, error)
- func DockerDesktopGatewayIP() string
- func InfrastructureReplacements(backendName, stackID string) (map[string]string, error)
- func OllamaHostForBackend(backendName string) string
- func OllamaHostIPForBackend(backendName string) (string, error)
- func RefreshInfrastructureIfChanged(cfg *config.Config, backendName, stackID string) (bool, error)
- func ResolveHostGatewayViaDocker() (string, error)
- func StackID(cfg *config.Config) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BridgeInterfaceIP ¶
BridgeInterfaceIP returns the IPv4 address of a named network interface.
func CopyInfrastructure ¶
CopyInfrastructure renders the embedded infrastructure defaults for the current stack and records the stamp that produced the copied tree.
func DetectedBackendName ¶
DetectedBackendName reads the persisted backend choice, defaulting to k3d for legacy stacks that predate .stack-backend.
func DockerBridgeGatewayIP ¶
DockerBridgeGatewayIP returns the IPv4 address of an active Docker bridge interface.
func DockerDesktopGatewayIP ¶
func DockerDesktopGatewayIP() string
DockerDesktopGatewayIP returns the Docker Desktop VM gateway IP.
This is a hardcoded magic value valid only for Docker Desktop on macOS. Colima and Rancher Desktop use different bridge IPs (e.g. 192.168.5.2 for Colima's default profile), so prefer ResolveHostGatewayViaDocker which works across all macOS Docker runtimes.
func InfrastructureReplacements ¶
InfrastructureReplacements returns the placeholder values used when copying embedded infrastructure defaults.
func OllamaHostForBackend ¶
OllamaHostForBackend returns the hostname/IP that reaches the host Ollama instance from inside the cluster.
func OllamaHostIPForBackend ¶
OllamaHostIPForBackend resolves the Ollama host to an IP address. ClusterIP+Endpoints requires an IP, not a hostname.
Resolution order on darwin+k3d:
- Resolve host.docker.internal from inside a transient Docker container (works for Docker Desktop, Colima, Rancher Desktop — each exposes a different host gateway IP, but all expose host.docker.internal inside containers).
- Fall back to the Docker Desktop magic gateway IP (192.168.65.254) so Docker Desktop users without a working `docker` CLI still work.
func RefreshInfrastructureIfChanged ¶
RefreshInfrastructureIfChanged refreshes the generated defaults tree when the embedded infrastructure assets, backend, or stack ID changed.
func ResolveHostGatewayViaDocker ¶ added in v0.10.0
ResolveHostGatewayViaDocker asks the local Docker daemon to resolve the host gateway by running a tiny container that prints the IP of host.docker.internal. This works on Docker Desktop, Colima, and Rancher Desktop because all three expose host.docker.internal inside containers and map it to whatever bridge gateway their VM is using.
Falls back to --add-host=host.docker.internal:host-gateway when the bare hostname is not pre-populated by the runtime.
Types ¶
This section is empty.