diff --git a/charts/trino/README.md b/charts/trino/README.md index f6bf7857..b3cc1a25 100644 --- a/charts/trino/README.md +++ b/charts/trino/README.md @@ -293,8 +293,9 @@ Fast distributed SQL query engine for big data analytics that helps you explore imagePullPolicy: IfNotPresent command: ['sleep', '1'] ``` -* `securityContext.runAsUser` - int, default: `1000` -* `securityContext.runAsGroup` - int, default: `1000` +* `securityContext` - object, default: `{"runAsGroup":1000,"runAsUser":1000}` + + [Container security context](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod) configuration. * `containerSecurityContext` - object, default: `{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]}}` [Container security context](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container) configuration. diff --git a/charts/trino/templates/deployment-coordinator.yaml b/charts/trino/templates/deployment-coordinator.yaml index 14bbeee6..ffa0e090 100644 --- a/charts/trino/templates/deployment-coordinator.yaml +++ b/charts/trino/templates/deployment-coordinator.yaml @@ -31,11 +31,8 @@ spec: {{- end }} spec: serviceAccountName: {{ include "trino.serviceAccountName" . }} - {{- with .Values.securityContext }} securityContext: - runAsUser: {{ .runAsUser }} - runAsGroup: {{ .runAsGroup }} - {{- end }} + {{- toYaml .Values.securityContext | nindent 8 }} {{- if .Values.shareProcessNamespace.coordinator }} shareProcessNamespace: {{ .Values.shareProcessNamespace.coordinator }} {{- end }} diff --git a/charts/trino/templates/deployment-worker.yaml b/charts/trino/templates/deployment-worker.yaml index 6868a9ea..efc8e74e 100644 --- a/charts/trino/templates/deployment-worker.yaml +++ b/charts/trino/templates/deployment-worker.yaml @@ -33,11 +33,8 @@ spec: {{- end }} spec: serviceAccountName: {{ include "trino.serviceAccountName" . }} - {{- with .Values.securityContext }} securityContext: - runAsUser: {{ .runAsUser }} - runAsGroup: {{ .runAsGroup }} - {{- end }} + {{- toYaml .Values.securityContext | nindent 8 }} {{- if .Values.shareProcessNamespace.worker }} shareProcessNamespace: {{ .Values.shareProcessNamespace.worker }} {{- end }} diff --git a/charts/trino/values.yaml b/charts/trino/values.yaml index 20ddff15..7392d712 100644 --- a/charts/trino/values.yaml +++ b/charts/trino/values.yaml @@ -327,6 +327,7 @@ sidecarContainers: {} # command: ['sleep', '1'] # ``` +# -- [Container security context](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod) configuration. securityContext: runAsUser: 1000 runAsGroup: 1000