From 4f3c48a08990cfa1732f2e6bc634f41887335909 Mon Sep 17 00:00:00 2001 From: Pete Birley Date: Thu, 6 Jul 2017 14:44:14 -0500 Subject: [PATCH] Nova: novnc proxy cleanup This PS updates the novnc proxy manifest to use the labels and anti-affinity functions introduced to OS-H while it was in review. It also drops some unrequired privs from the pod. Change-Id: I24dce2079ac8aed2e05ce03832cefe0e8ca7f595 --- nova/templates/deployment-novncproxy.yaml | 9 ++++----- nova/templates/service-novncproxy.yaml | 3 ++- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/nova/templates/deployment-novncproxy.yaml b/nova/templates/deployment-novncproxy.yaml index 452364dfe0..2cfa23c7c1 100644 --- a/nova/templates/deployment-novncproxy.yaml +++ b/nova/templates/deployment-novncproxy.yaml @@ -12,8 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -{{ if eq .Values.console.console_kind "novnc" }} {{- $envAll := . }} +{{ if eq .Values.console.console_kind "novnc" }} {{- $dependencies := .Values.dependencies.novncproxy }} {{- $mounts_nova_novncproxy := .Values.mounts.nova_novncproxy.nova_novncproxy }} {{- $mounts_nova_novncproxy_init := .Values.mounts.nova_novncproxy.init_novncproxy }} @@ -28,17 +28,16 @@ spec: template: metadata: labels: - app: nova-novncproxy +{{ tuple $envAll "nova" "novnc-proxy" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }} annotations: configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }} configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }} spec: + affinity: +{{ 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 }} - securityContext: - runAsUser: 0 hostNetwork: true - hostPID: true dnsPolicy: ClusterFirst initContainers: {{ tuple $envAll $dependencies $mounts_nova_novncproxy_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} diff --git a/nova/templates/service-novncproxy.yaml b/nova/templates/service-novncproxy.yaml index 2c9c9725ec..6f47d28c59 100644 --- a/nova/templates/service-novncproxy.yaml +++ b/nova/templates/service-novncproxy.yaml @@ -12,6 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +{{- $envAll := . }} {{ if eq .Values.console.console_kind "novnc" }} --- apiVersion: v1 @@ -28,7 +29,7 @@ spec: nodePort: {{ .Values.network.novncproxy.node_port.port }} {{ end }} selector: - app: nova-novncproxy +{{ tuple $envAll "nova" "novnc-proxy" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }} {{ if .Values.network.novncproxy.node_port.enabled }} type: NodePort {{ end }}