Skip to content

Commit

Permalink
make securityContext optional
Browse files Browse the repository at this point in the history
Signed-off-by: David J. M. Karlsen <david@davidkarlsen.com>
  • Loading branch information
davidkarlsen committed Dec 12, 2019
1 parent d283eb7 commit 59e91a4
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions charts/argo-cd/templates/argocd-repo-server/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
2 changes: 2 additions & 0 deletions charts/argo-cd/templates/argocd-server/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
2 changes: 2 additions & 0 deletions charts/argo-cd/templates/redis/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions charts/argo-cd/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ global:
tag: v1.3.4
imagePullPolicy: IfNotPresent
securityContext:
enabled: true
runAsUser: 999
runAsGroup: 999
fsGroup: 999
Expand Down

0 comments on commit 59e91a4

Please sign in to comment.