feat(helm): add pod securityContext and enhanced probe configuration #19013
+79
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds two critical security and operational enhancements to the Coder Helm chart:
1. Pod-level securityContext Support
Adds
coder.podSecurityContext
configuration to enable pod-level security settings, particularlyfsGroup
for proper file permissions when mounting TLS certificates.Use Case: Essential for mTLS PostgreSQL deployments where the Coder container (running as user 1000) needs to read mounted TLS certificates.
Example Configuration:
2. Enhanced Probe Configuration
Extends readiness and liveness probe configuration beyond just
initialDelaySeconds
to include all standard Kubernetes probe options:periodSeconds
: How often to perform the probetimeoutSeconds
: Probe timeout durationsuccessThreshold
: Required consecutive successesfailureThreshold
: Allowed consecutive failuresExample Configuration:
Changes Made
podSecurityContext
configuration with comprehensive documentation and mTLS examplesBackward Compatibility
✅ Fully backward compatible - all new configurations are optional and use Helm's
with
conditionals.Testing
This addresses the specific security requirements mentioned for mTLS PostgreSQL deployments where:
defaultMode: 0640
fsGroup: 1000
is required for the coder user to read the certificatesRelated Issues
Fixes security requirements for mTLS PostgreSQL deployments and enhanced probe configuration requests.
Requested by: @Michael-Patterson for CoreWeave managed PostgreSQL mTLS deployment
Priority: High - blocking secure database connections