Skip to content

Commit 52a157d

Browse files
committed
updated the value.yaml example to include podSecurityContext field and updated comments for usage
1 parent 30fde37 commit 52a157d

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

helm/coder/values.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,38 @@ coder:
142142
# root. It is recommended to leave this setting disabled in production.
143143
allowPrivilegeEscalation: false
144144

145+
# coder.podSecurityContext -- Pod-level security context settings that apply
146+
# to all containers in the pod. This is useful for setting volume ownership
147+
# (fsGroup) when mounting secrets like TLS certificates. These settings are
148+
# applied at the pod level, while coder.securityContext applies at the
149+
# container level. Container-level settings take precedence over pod-level
150+
# settings for overlapping fields. This is opt-in and not set by default.
151+
# Common use case: Set fsGroup to ensure mounted secret volumes have correct
152+
# group ownership for the coder user to read certificate files.
153+
podSecurityContext: {}
154+
# Example configuration for certificate mounting:
155+
# podSecurityContext:
156+
# # Sets group ownership of mounted volumes (e.g., for certificate secrets)
157+
# fsGroup: 1000
158+
# # Additional pod-level security settings (optional)
159+
# runAsUser: 1000
160+
# runAsGroup: 1000
161+
# runAsNonRoot: true
162+
# supplementalGroups: [4000]
163+
# seccompProfile:
164+
# type: RuntimeDefault
165+
# # Note: Avoid conflicts with container-level securityContext settings
166+
# # Container-level settings take precedence over pod-level settings
167+
#
168+
# IMPORTANT: OpenShift Compatibility
169+
# On OpenShift, Security Context Constraints (SCCs) may restrict or override
170+
# these values. If you encounter pod creation failures:
171+
# 1. Check your namespace's assigned SCC with: oc describe scc
172+
# 2. Ensure runAsUser/fsGroup values are within allowed UID/GID ranges
173+
# 3. Consider using 'anyuid' SCC for more flexibility, or
174+
# 4. Omit runAsUser/runAsGroup and only set fsGroup for volume ownership
175+
# 5. OpenShift may automatically assign compatible values if left unset
176+
145177
# coder.volumes -- A list of extra volumes to add to the Coder pod.
146178
volumes: []
147179
# - name: "my-volume"
@@ -159,6 +191,10 @@ coder:
159191
# Helm deployment and should be of type "kubernetes.io/tls". The secrets
160192
# will be automatically mounted into the pod if specified, and the correct
161193
# "CODER_TLS_*" environment variables will be set for you.
194+
195+
# Note: If you encounter permission issues reading mounted certificates,
196+
# consider setting coder.podSecurityContext.fsGroup to match your container
197+
# user (typically 1000) to ensure proper file ownership.
162198
secretNames: []
163199

164200
# coder.replicaCount -- The number of Kubernetes deployment replicas. This

0 commit comments

Comments
 (0)