mirror of
https://github.com/NVIDIA/OpenShell.git
synced 2026-10-27 07:03:17 +08:00
fix(gateway): add host openshell alias
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user