Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add securityContext #779

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions chart/keel/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ spec:
{{ toYaml . | indent 8 }}
{{- end }}
spec:
securityContext: {{ .Values.securityContext | toYaml | nindent 8 }}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not very familiar with the chart templating engine, but should this not be something like:

{{- with .Values.securityContext}}
      securityContext:
{{- toYaml . | nindent 8 }}
{{- end }}

serviceAccountName: {{ template "serviceAccount.name" . }}
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
Expand Down
3 changes: 3 additions & 0 deletions chart/keel/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,9 @@ affinity: {}

tolerations: {}

# https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
securityContext: {}

# base64 encoded json of GCP service account
# more info available here: https://cloud.google.com/kubernetes-engine/docs/tutorials/authenticating-to-cloud-platform
# e.g. --set googleApplicationCredentials=$(cat <JSON_KEY_FIEL> | base64)
Expand Down