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
🤖 Generated by the Daily AI Engineer (Codex instance)
Summary
Add a production-only, default-off inline Kustomize patch gate that can later opt Headlamp into Kubernetes user namespaces without changing the current deployment. This is the first independently shippable step for the next stateful pilot under parent #1807.
The pinned Headlamp chart 0.43.0 explicitly renders Deployment.spec.template.spec.hostUsers: true by default. The existing Kyverno rule uses a conditional +(hostUsers): false anchor, so a namespace label cannot override that authored chart value.
Setting the chart value hostUsers: false renders the required pod setting without changing the existing 256Mi ReadWriteOnce plugins PVC, post-rendered plugins-dir volume, or chart-owned UID/GID/fsGroup values.
An unreferenced partial HelmRelease patch file is unsafe in this repository because KSail can validate standalone YAML outside active Kustomize patch references. The default-off gate therefore belongs as a fully commented JSON6902 block inside the existing Hetzner apps kustomization.
Platform operators need a reversible, reviewable switch before changing a stateful dashboard. If an exact-target JSON6902 block is documented but fully commented, current local and production renders remain unchanged; a synthetic enabled render should set only Headlamp spec.values.hostUsers to false and preserve its plugin/PVC wiring.
Proposed solution
Add one fully commented JSON6902 patch block beside the existing user-namespace rollout patches in k8s/providers/hetzner/apps/kustomization.yaml.
Target only helm.toolkit.fluxcd.io/v2 HelmRelease headlamp in namespace headlamp and add /spec/values/hostUsers = false.
Document the activation/recovery lifecycle and why a namespace-label patch cannot work. Do not activate the block in this delivery.
Do not add an orphan patch file or change the base namespace, Kyverno policy, local overlay, PVC, plugin manager, or post-renderer.
Current local and production renders are byte-for-behavior unchanged because the new block remains fully commented.
A synthetic enabled render sets Headlamp HelmRelease spec.values.hostUsers to false while local remains unchanged.
Helm template validation for chart 0.43.0 proves default true versus enabled false at Deployment.spec.template.spec.hostUsers.
Headlamp pluginsManager remains enabled; the main and plugin containers retain plugins-dir mounts; the post-renderer still maps plugins-dir to PVC claim headlamp; the PVC remains 256Mi ReadWriteOnce.
Naming, embedded JSON, both Kustomize overlays, KSail local/prod validation, the configured NSA security scan, and diff checks remain green.
The comment names the lifecycle: uncomment exactly one block to enable; re-comment/revert it to recover; never delete the PVC.
Success signal and guardrail
Success is a validated default-off switch whose synthetic enabled state changes only the intended Headlamp user-namespace value. The guardrail is zero runtime change in this PR and no mutation of the local provider, shared base, plugins, security context, or persistent storage.
Summary
Add a production-only, default-off inline Kustomize patch gate that can later opt Headlamp into Kubernetes user namespaces without changing the current deployment. This is the first independently shippable step for the next stateful pilot under parent #1807.
Evidence and motivation
Audience and hypothesis
Platform operators need a reversible, reviewable switch before changing a stateful dashboard. If an exact-target JSON6902 block is documented but fully commented, current local and production renders remain unchanged; a synthetic enabled render should set only Headlamp spec.values.hostUsers to false and preserve its plugin/PVC wiring.
Proposed solution
Acceptance criteria
Success signal and guardrail
Success is a validated default-off switch whose synthetic enabled state changes only the intended Headlamp user-namespace value. The guardrail is zero runtime change in this PR and no mutation of the local provider, shared base, plugins, security context, or persistent storage.
Part of #1807.