fix(gateway): add host openshell alias

This commit is contained in:
Piotr Mlocek
2026-03-15 18:15:08 -07:00
parent b8f997b839
commit 2125b7a177
2 changed files with 14 additions and 3 deletions
+7 -3
View File
@@ -526,9 +526,13 @@ pub async fn ensure_container(
port_bindings: Some(port_bindings),
binds: Some(vec![format!("{}:/var/lib/rancher/k3s", volume_name(name))]),
network_mode: Some(network_name(name)),
// Add host.docker.internal mapping for DNS resolution
// This allows the entrypoint script to configure CoreDNS to use the host gateway
extra_hosts: Some(vec!["host.docker.internal:host-gateway".to_string()]),
// Add host gateway aliases for DNS resolution.
// This allows both the entrypoint script and the running gateway
// process to reach services on the Docker host.
extra_hosts: Some(vec![
"host.docker.internal:host-gateway".to_string(),
"host.openshell.internal:host-gateway".to_string(),
]),
..Default::default()
};
@@ -31,6 +31,13 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "openshell.serviceAccountName" . }}
{{- if .Values.server.hostGatewayIP }}
hostAliases:
- ip: {{ .Values.server.hostGatewayIP | quote }}
hostnames:
- host.docker.internal
- host.openshell.internal
{{- end }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers: