make securityContext optional

Signed-off-by: David J. M. Karlsen <david@davidkarlsen.com>
This commit is contained in:
David J. M. Karlsen 2019-12-12 09:39:58 +01:00
parent d283eb76ef
commit 59e91a411c
No known key found for this signature in database
GPG key ID: F54982D216088EE1
5 changed files with 9 additions and 0 deletions

View file

@ -35,7 +35,9 @@ spec:
{{- toYaml .Values.controller.podLabels | nindent 8 }}
{{- end }}
spec:
{{- if .Values.securityContext.enabled }}
securityContext: {{- toYaml .Values.global.securityContext | nindent 8 }}
{{- end }}
containers:
- command:
- argocd-application-controller

View file

@ -35,7 +35,9 @@ spec:
{{- toYaml .Values.controller.podLabels | nindent 8 }}
{{- end }}
spec:
{{- if .Values.securityContext.enabled }}
securityContext: {{- toYaml .Values.global.securityContext | nindent 8 }}
{{- end }}
containers:
- name: {{ .Values.repoServer.name }}
image: {{ default .Values.global.image.repository .Values.repoServer.image.repository }}:{{ default .Values.global.image.tag .Values.repoServer.image.tag }}

View file

@ -35,7 +35,9 @@ spec:
{{- toYaml .Values.controller.podLabels | nindent 8 }}
{{- end }}
spec:
{{- if .Values.securityContext.enabled }}
securityContext: {{- toYaml .Values.global.securityContext | nindent 8 }}
{{- end }}
containers:
- name: {{ .Values.server.name }}
image: {{ default .Values.global.image.repository .Values.server.image.repository }}:{{ default .Values.global.image.tag .Values.server.image.tag }}

View file

@ -25,7 +25,9 @@ spec:
app.kubernetes.io/component: {{ .Values.redis.name }}
spec:
automountServiceAccountToken: false
{{- if .Values.securityContext.enabled }}
securityContext: {{- toYaml .Values.global.securityContext | nindent 8 }}
{{- end }}
containers:
- name: {{ template "argo-cd.redis.fullname" . }}
args:

View file

@ -13,6 +13,7 @@ global:
tag: v1.3.4
imagePullPolicy: IfNotPresent
securityContext:
enabled: true
runAsUser: 999
runAsGroup: 999
fsGroup: 999