Skip to content

Commit f78b754

Browse files
committed
Pass SecurityContext for container from values
1 parent 152c107 commit f78b754

2 files changed

Lines changed: 15 additions & 1 deletion

File tree

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
@@ -151,12 +151,23 @@ resources:
151151
# It is set to 0 by default.
152152
minReadySeconds: ~
153153

154-
# A security context defines privilege and access control settings for the deployment.
154+
# A security context defines privilege and access control settings for the deployment pod.
155155
# Check available settings in the documentation by link:
156156
# https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
157157
securityContext: {}
158158
# allowPrivilegeEscalation: false
159159
# runAsNonRoot: true
160+
161+
# A container security context defines privilege and access control settings for the deployment container.
162+
# Check available settings in the documentation by link:
163+
# https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
164+
containerSecurityContext: {}
165+
# capabilities:
166+
# drop:
167+
# - ALL
168+
# readOnlyRootFilesystem: true
169+
# allowPrivilegeEscalation: false
170+
# runAsNonRoot: true
160171

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

0 commit comments

Comments
 (0)