diff --git a/deployments/kubernetes/chart/forecastle/templates/deployment.yaml b/deployments/kubernetes/chart/forecastle/templates/deployment.yaml index 803cc814..7982423e 100644 --- a/deployments/kubernetes/chart/forecastle/templates/deployment.yaml +++ b/deployments/kubernetes/chart/forecastle/templates/deployment.yaml @@ -31,14 +31,14 @@ spec: {{- toYaml . | nindent 8 }} {{- end }} containers: - - securityContext: {{- toYaml .Values.forecastle.container.securityContext | nindent 12 }} + - name: {{ template "forecastle.name" . }} + securityContext: {{- toYaml .Values.forecastle.container.securityContext | nindent 12 }} env: - name: KUBERNETES_NAMESPACE valueFrom: fieldRef: fieldPath: metadata.namespace image: "{{ .Values.forecastle.image.name }}:{{ .Values.forecastle.image.tag }}" - name: {{ template "forecastle.name" . }} {{- if .Values.forecastle.deployment.resources }} resources: {{ toYaml .Values.forecastle.deployment.resources | indent 10 }} @@ -46,10 +46,6 @@ spec: volumeMounts: - name: {{ template "forecastle.name" . }}-config mountPath: /etc/forecastle - {{- with .Values.forecastle.deployment.securityContext }} - securityContext: - {{- toYaml . | nindent 10 }} - {{- end }} {{- if .Values.forecastle.openshiftOauthProxy.enabled }} - name: oauth-proxy image: "{{ default "stakater/oauth-proxy:v0.0.2" .Values.forecastle.openshiftOauthProxy.image }}" @@ -77,6 +73,10 @@ spec: {{ toYaml .Values.forecastle.openshiftOauthProxy.resources | indent 10 }} {{- end }} {{- end }} + {{- if .Values.forecastle.deployment.securityContext }} + securityContext: + {{- toYaml . | nindent 10 }} + {{- end }} volumes: - name: {{ template "forecastle.name" . }}-config configMap: @@ -87,10 +87,6 @@ spec: secretName: openshift-oauth-proxy-tls {{- end }} serviceAccountName: {{ template "forecastle.name" . }} - {{- with .Values.forecastle.deployment.podSecurityContext }} - securityContext: - {{- toYaml . | nindent 8 }} - {{- end }} {{- with .Values.forecastle.deployment.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} diff --git a/deployments/kubernetes/manifests/deployment.yaml b/deployments/kubernetes/manifests/deployment.yaml index 8c02d128..40514bb1 100644 --- a/deployments/kubernetes/manifests/deployment.yaml +++ b/deployments/kubernetes/manifests/deployment.yaml @@ -31,15 +31,13 @@ spec: checksum/api-config: b4082837631aaa2678a872e391d8e09ed35c590f39203dd25526abeb874885e1 spec: containers: - - securityContext: - {} + - name: forecastle env: - name: KUBERNETES_NAMESPACE valueFrom: fieldRef: fieldPath: metadata.namespace image: "stakater/forecastle:v1.0.127" - name: forecastle volumeMounts: - name: forecastle-config mountPath: /etc/forecastle