Skip to content

Commit

Permalink
Add possibility to set SecurityContext on container level
Browse files Browse the repository at this point in the history
  • Loading branch information
FleischerT committed Jun 30, 2023
1 parent d46ff8b commit 257c5c5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions charts/trino/templates/deployment-coordinator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ spec:
- name: {{ .Chart.Name }}-coordinator
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if .Values.securityContext.containers }}
securityContext:
{{ toYaml .Values.securityContext.containers | nindent 12 }}
{{- end }}
env:
{{- toYaml .Values.env | nindent 12 }}
envFrom:
Expand Down
4 changes: 4 additions & 0 deletions charts/trino/templates/deployment-worker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ spec:
- name: {{ .Chart.Name }}-worker
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if .Values.securityContext.containers }}
securityContext:
{{ toYaml .Values.securityContext.containers | nindent 12 }}
{{- end }}
env:
{{- toYaml .Values.env | nindent 12 }}
envFrom:
Expand Down
1 change: 1 addition & 0 deletions charts/trino/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ initContainers: {}
securityContext:
runAsUser: 1000
runAsGroup: 1000
containers: {}

service:
type: ClusterIP
Expand Down

0 comments on commit 257c5c5

Please sign in to comment.