Skip to content

docs(k8s): mirror the deployed pod hardening in the reference manifest - #32

Open
blarghmatey wants to merge 1 commit into
mainfrom
fix/k8s-reference-manifest-hardening
Open

docs(k8s): mirror the deployed pod hardening in the reference manifest#32
blarghmatey wants to merge 1 commit into
mainfrom
fix/k8s-reference-manifest-hardening

Conversation

@blarghmatey

Copy link
Copy Markdown
Member

What

Adds the pod/container securityContext and the /tmp emptyDir to k8s/deployment.yaml.

Why

k8s/README.md is explicit that these manifests are the local dry-run / reference copy of what Pulumi actually deploys — which only earns its keep while it matches. mitodl/ol-infrastructure#5410 adds:

  • a pod securityContext (runAsNonRoot, uid/gid 1000, fsGroup: 1000, seccomp RuntimeDefault),
  • a container securityContext (allowPrivilegeEscalation: false, readOnlyRootFilesystem: true, capabilities.drop: [ALL]),
  • a 64Mi /tmp emptyDir, the one writable path the read-only root still needs.

This brings the reference copy in line. No behavior change in this repo — nothing here is deployed from these manifests.

How tested

kubectl apply --dry-run=client -f k8s/deployment.yaml — accepted. prek run --files k8s/deployment.yaml — all hooks pass.

🤖 Generated with Claude Code

https://claude.ai/code/session_01QC8Vb9vZiGMPeHd97Fy4Gj

k8s/README.md says these manifests are the dry-run/reference copy of
what Pulumi actually deploys, so they only earn their keep while they
match. ol-infrastructure now sets a pod securityContext (runAsNonRoot,
uid/gid 1000, fsGroup, seccomp RuntimeDefault), a container
securityContext (no privilege escalation, read-only root, all
capabilities dropped) and the /tmp emptyDir that the read-only root
requires; this brings the reference copy in line.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QC8Vb9vZiGMPeHd97Fy4Gj
@blarghmatey
blarghmatey force-pushed the fix/k8s-reference-manifest-hardening branch from 463a3a6 to 38419ba Compare August 14, 2026 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant