From 257c5c5b1ceeb1f49b20c39459f75a244d6a3787 Mon Sep 17 00:00:00 2001 From: Tobias Fleischer Date: Fri, 30 Jun 2023 16:24:34 +0200 Subject: [PATCH] Add possibility to set SecurityContext on container level --- charts/trino/templates/deployment-coordinator.yaml | 4 ++++ charts/trino/templates/deployment-worker.yaml | 4 ++++ charts/trino/values.yaml | 1 + 3 files changed, 9 insertions(+) diff --git a/charts/trino/templates/deployment-coordinator.yaml b/charts/trino/templates/deployment-coordinator.yaml index d88da803..22b5b9b1 100644 --- a/charts/trino/templates/deployment-coordinator.yaml +++ b/charts/trino/templates/deployment-coordinator.yaml @@ -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: diff --git a/charts/trino/templates/deployment-worker.yaml b/charts/trino/templates/deployment-worker.yaml index 70eb2abc..f294a0f5 100644 --- a/charts/trino/templates/deployment-worker.yaml +++ b/charts/trino/templates/deployment-worker.yaml @@ -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: diff --git a/charts/trino/values.yaml b/charts/trino/values.yaml index 7c0024f2..4986f180 100644 --- a/charts/trino/values.yaml +++ b/charts/trino/values.yaml @@ -127,6 +127,7 @@ initContainers: {} securityContext: runAsUser: 1000 runAsGroup: 1000 + containers: {} service: type: ClusterIP