From 494212423a0df44670e56e748d10cbea68c8cf93 Mon Sep 17 00:00:00 2001 From: zhipengl Date: Wed, 4 Sep 2019 19:36:31 +0800 Subject: [PATCH] Add a config item for novncproxy In deployment-novncproxy.yaml, it set hostNetwork = true. In some cases, we may want to let it use cluster network instead of hostNetwork. We'd better add a config item, so that client can override it to use cluster network based on an operators preferences. Story: 2006490 Task: 36439 Change-Id: Ia235d4e9542bd9242f9d2713ad1e67870f3016e2 Signed-off-by: zhipengl --- nova/templates/deployment-novncproxy.yaml | 2 ++ nova/values.yaml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/nova/templates/deployment-novncproxy.yaml b/nova/templates/deployment-novncproxy.yaml index f3b95b6f73..42a52af42a 100644 --- a/nova/templates/deployment-novncproxy.yaml +++ b/nova/templates/deployment-novncproxy.yaml @@ -52,8 +52,10 @@ spec: {{ tuple $envAll "nova" "novnc-proxy" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }} nodeSelector: {{ .Values.labels.novncproxy.node_selector_key }}: {{ .Values.labels.novncproxy.node_selector_value }} +{{- if .Values.pod.useHostNetwork.novncproxy }} hostNetwork: true dnsPolicy: ClusterFirstWithHostNet +{{- end }} initContainers: {{ tuple $envAll "novncproxy" $mounts_nova_novncproxy_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} - name: nova-novncproxy-init diff --git a/nova/values.yaml b/nova/values.yaml index 061ed8afb9..29512caaac 100644 --- a/nova/values.yaml +++ b/nova/values.yaml @@ -2277,6 +2277,8 @@ pod: nova_db_sync: volumeMounts: volumes: + useHostNetwork: + novncproxy: true replicas: api_metadata: 1 compute_ironic: 1