Repository navigation
Closed as not planned
Closed as not planned
Copy link
Labels
effort/mediumEffort Mediumpriority/p2-mediumPriority P2: standard workscope/k8sKubernetes commands, Helm charts, pods, services, and policiessource/agentFiled by an agenttype/featureType feature: a new functionvalue/mediumValue Medium
Description
Problem
Checked at devops-cli main 3f8f7a9.
- The site dan-petty/danielpetty.com includes Pixelfed (owner decision 2026-11-21). It runs on the cluster after the event-stream, at
pixelfed-danielpetty-com.<domain>, one label under the zone. - The Pixelfed image
ghcr.io/jippi/docker-pixelfedcannot meet Pod Securityrestricted. At tagv0.15.2-docker0, its runtime stages end withUSER root(docker/Dockerfile); the entrypoint changes file owners (docker/rootfs/shared/docker/entrypoint.d/01-permissions.sh), renders templates into/etcand changes the user withsu(docker/rootfs/shared/docker/helpers.sh:62-95); Apache listens on port 80. - Namespace
danielpetty-comenforcesrestricted(feat(k8s): add the danielpetty-com namespace, project and Secret row #6642) and must keep it for the event-stream. Pod Security is a namespace setting. - Pixelfed needs
APP_KEYand a Valkey password. Laravel takes a 32-character raw key for AES-256-CBC.SecretGenerator(encoding="urlsafe", nbytes=24)gives 32 characters (src/devops_cli/k8s/cluster_secrets.py:131-142), so the generator needs no change. A newAPP_KEYmakes the stored encrypted data unreadable, so the value must never change after the first push. - The CloudNativePG operator makes the database Secret
pixelfed-db-appitself (k8s/README.md:120), so the database needs no row. The operator also writes ConfigMapcnpg-default-monitoring, which projecthomelabignores as an orphan (k8s/argocd/apps/projects.yaml:101). push-secretsskips each row whose namespace does not exist (src/devops_cli/k8s/secret_push.py:453-470), anddeploy-stackpushes a detached stack only where a namespace with the name of the stack exists (src/devops_cli/commands/k8s/stack_lifecycle.py:892-905). So the Pixelfed rows go in their own stack, named after their namespace.- Alloy reaches only the namespaces and ports of
monitoring-default-perimeter(k8s/monitoring/networkpolicy.yaml).
Proposed remedy
k8s/namespaces.yaml: namespacedanielpetty-com-pixelfedwith Pod Security enforcebaseline, warn and auditrestricted, andPrune=false,Delete=false. A comment gives the reason and the upstream files above.- AppProject
danielpetty-com(feat(k8s): add the danielpetty-com namespace, project and Secret row #6642): destinationdanielpetty-com-pixelfed, and orphan ignore entries for Secretspixelfed-app-keyandpixelfed-valkeyand ConfigMapcnpg-default-monitoring. cluster_secrets.py: adddanielpetty-com-pixelfedtoDETACHED_STACKS. Rows in that stack:danielpetty-com-pixelfed/pixelfed-app-key, keyAPP_KEY: keyringdanielpetty_com_pixelfed_app_key, required, generatorurlsafewith 24 bytes.change_notesays that a new value makes the stored encrypted data unreadable. Restartspixelfed-web,pixelfed-horizonandpixelfed-scheduler;danielpetty-com-pixelfed/pixelfed-valkey, keypassword: required, generatorhexwith 32 bytes. Restartspixelfed-valkeyand the three Pixelfed Deployments.
k8s/monitoring/networkpolicy.yaml: egress to namespacedanielpetty-com-pixelfedon TCP 9187 (CloudNativePG) and 9121 (redis_exporter).k8s/README.md: the 2 rows in the Cluster Secrets table.- Change each test first.
Premise check: as in #6642 (#5134 plan step 12).
Acceptance criteria
-
uv run devops ci --check --only k8s,kube-linter,domainpasses. - A unit test shows that the
APP_KEYrow makes a 32-character value when the keyring has no value. -
uv run devops k8s push-secrets --stack danielpetty-com-pixelfed --dry-runlistsAPP_KEYandpasswordand no value. -
kubectl kustomize k8s | yq 'select(.kind == "Namespace" and .metadata.name == "danielpetty-com-pixelfed") | .metadata.labels'shows enforcebaseline, and warn and auditrestricted. - After the merge and the sync of Application
base:kubectl get ns danielpetty-com-pixelfed -L pod-security.kubernetes.io/enforceshowsbaseline.
Person steps
- In the review of this pull request, approve the
baselinelevel of namespacedanielpetty-com-pixelfed. Only the owner can lower a security level (AGENTS.md rule 5). - After the merge and the sync of
base:uv run devops k8s push-secrets --stack danielpetty-com-pixelfed --plan, then the same command without--plan. - Keep a copy of
APP_KEYoffline. A restore of the Pixelfed database needs it.
Dependencies
- feat(k8s): add the danielpetty-com namespace, project and Secret row #6642: AppProject
danielpetty-com.
Alternatives check of 2026-11-21: none.
Tool: none found.
Reason: Searches found only small Pixelfed Helm charts (holysoles/pixelfed-chart, last push Jan 2025, fork image) and a test-cluster chart set; none supplies this repository's namespace, keyring-backed secret rows or Pod Security level.
Lacks:
- Helm chart cannot replace the repository's kustomize manifests and Argo CD Application
- No keyring-backed APP_KEY row that keeps one value forever
- Fork image keeps the root entrypoint and port 80, so still no restricted Pod Security
- No namespace Pod Security labels, orphan ignores or Alloy egress policy
Metadata
Metadata
Assignees
Labels
effort/mediumEffort Mediumpriority/p2-mediumPriority P2: standard workscope/k8sKubernetes commands, Helm charts, pods, services, and policiessource/agentFiled by an agenttype/featureType feature: a new functionvalue/mediumValue Medium
Activity
dan-petty commentedon Nov 21, 2026
Both add namespaces for the danielpetty.com site, but #6642 creates the base namespace and AppProject while the candidate adds the pixelfed sibling namespace and its APP_KEY and valkey secret rows.devops-cli-service commentedon Nov 21, 2026
The result in the alternatives block of the issue body changed. Before this check: no check. A person decides what the new result means for the item.
Searches (10)
Tools considered:
Searches run:
Sources:
dan-petty commentedon Nov 21, 2026
Closed as not planned. Namespace
danielpetty-com-pixelfedwith Pod Securitybaselinecomes from the services entry of the site in dan-petty/homelab (dan-petty/homelab#85), and the owner approvedbaselineon 2026-11-21.APP_KEYand the Valkey password come from External Secrets Operator in the site repository: aPasswordgenerator and aPushSecretwithupdatePolicy: IfNotExistskeep each value stable, at a remote key that starts with the namespace (#6675, dan-petty/infra#12, dan-petty/homelab#82, dan-petty/danielpetty.com#30 and #31). The offline copy ofAPP_KEYstays an owner step in dan-petty/danielpetty.com#31. The operator-made CloudNativePG Secret and the ESO Secrets have owner references, so they need no orphan ignore.