@@ -142,6 +142,38 @@ coder:
142
142
# root. It is recommended to leave this setting disabled in production.
143
143
allowPrivilegeEscalation : false
144
144
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
+
145
177
# coder.volumes -- A list of extra volumes to add to the Coder pod.
146
178
volumes : []
147
179
# - name: "my-volume"
@@ -159,6 +191,10 @@ coder:
159
191
# Helm deployment and should be of type "kubernetes.io/tls". The secrets
160
192
# will be automatically mounted into the pod if specified, and the correct
161
193
# "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.
162
198
secretNames : []
163
199
164
200
# coder.replicaCount -- The number of Kubernetes deployment replicas. This
0 commit comments