Skip to content

Commit 5989e2c

Browse files
SimonWoidiggzigzigzeo
authored andcommitted
Pass SecurityContext for container from values
1 parent b5128fe commit 5989e2c

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

imgproxy/templates/deployment.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,9 @@ spec:
122122
name: metrics
123123
protocol: TCP
124124
{{- end }}
125+
{{- if .Values.resources.deployment.containerSecurityContext }}
126+
securityContext: {{ $.Values.resources.deployment.containerSecurityContext | toYaml | nindent 12 }}
127+
{{- end }}
125128
readinessProbe:
126129
httpGet:
127130
path: {{ .Values.env.IMGPROXY_PATH_PREFIX }}/health

imgproxy/values.yaml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,13 +176,24 @@ resources:
176176
# It is set to 0 by default.
177177
minReadySeconds: ~
178178

179-
# A security context defines privilege and access control settings for the deployment.
179+
# A security context defines privilege and access control settings for the deployment pod.
180180
# Check available settings in the documentation by link:
181181
# https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
182182
securityContext:
183183
{}
184184
# allowPrivilegeEscalation: false
185185
# runAsNonRoot: true
186+
187+
# A container security context defines privilege and access control settings for the deployment container.
188+
# Check available settings in the documentation by link:
189+
# https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
190+
containerSecurityContext: {}
191+
# capabilities:
192+
# drop:
193+
# - ALL
194+
# readOnlyRootFilesystem: true
195+
# allowPrivilegeEscalation: false
196+
# runAsNonRoot: true
186197

187198
# A custom amount of time (in seconds) to terminate the app after pre-stop hook is called,
188199
# or a TERM signal is received.

0 commit comments

Comments
 (0)