You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Review diff for correctness/security/best-practice issues
Apply ponytail-review pass for over-engineering
Post final review
✅ No blocking issues — safe to merge.
Reviewed the full diff (git diff origin/main...HEAD) across all 18 changed files.
What the PR does: adds opt-in securityContext (container) and podSecurityContext (pod) fields to every workload in the chart (stac/raster/vector/multidim/browser/doc-server/testing deployments, knative jobs/cloudevents-sink, and all pgstacBootstrap Jobs/CronJobs), all defaulting to {} so existing deployments are unaffected.
Correctness/security checks performed:
Verified the two places that previously had hardcodedsecurityContext (the wait-for-pgstac-jobs init container in _helpers/services.tpl and knative-init.yaml) now source their values from values.yaml defaults that reproduce the exact same values (runAsNonRoot: true, runAsUser: 65534, runAsGroup: 65534) — no regression in default hardening.
Verified cloudevents-sink.yaml and the other deployment templates had no prior hardcoded securityContext, so defaulting to {} there is correctly non-breaking, not a hardening regression.
Spot-checked nindent levels in stac/deployment.yaml, doc-server.yaml, job.yaml, knative-init.yaml — container-level blocks align with sibling resources:/env: keys, pod-level blocks align with sibling serviceAccountName:/affinity: keys. Indentation is correct throughout.
Confirmed values.schema.json additions structurally mirror the existing schema entries (valid type/description objects, correctly nested under the right service definitions).
Confirmed values.yaml value paths referenced in templates (e.g. knative.jobs.init.podSecurityContext, testing.mockOidcServer.securityContext, pgstacBootstrap.settings.initContainerSecurityContext) all resolve to real, correctly-nested keys.
security_context_tests.yaml (311 lines, helm-unittest) covers default-absence and override behavior for every touched template, including the two default-hardened cases — good regression coverage.
README documents the new fields and the two historical-default exceptions accurately.
Pattern is applied consistently (same {{- with .Values.X.securityContext }}...{{- end }} idiom already used elsewhere in this chart for resources/affinity/tolerations), so no new template conventions were introduced.
Simplify (ponytail): none — the repeated {{- with }} security-context blocks match this chart's existing boilerplate style for optional pod/container fields (same as resources, affinity, tolerations); introducing a shared helper would add nindent-parameterization complexity for no real gain at this call-site count.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Closes #608