8000 setup-secrets: kubeSecretDestination restarts workloads when the Secret changes by andsens · Pull Request #47 · nixos-homelab/shared · GitHub
[go: up one dir, main page]

Skip to content

setup-secrets: kubeSecretDestination restarts workloads when the Secret changes - #47

Merged
andsens merged 1 commit into
mainfrom
claude/kube-secret-restart
Nov 22, 2026
Merged

andsens merged 1 commit into
mainfrom
claude/kube-secret-restart

Conversation

@andsens
@andsens andsens commented Nov 22, 2026
Copy link
Copy Markdown
Collaborator

A pod that takes a Secret with optional: true starts without it and reads env from it only at start, so a Secret written later never reaches it. kubeSecretDestination takes restart, workloads in the Secret namespace (deployment/grafana), and runs kubectl rollout restart on them after a write that changed the Secret (kubectl apply printing anything but unchanged). A workload that doesn't exist yet is skipped, since it starts with the Secret.

First user: Grafana, whose alerting environment Secrets become optional in nixos-homelab/monitoring PR 53.

The k3s VM test makes a Deployment, checks it has no restartedAt annotation, deletes the Secret, and expects the store to restart the Deployment. The first store, before the Deployment exists, covers the skip. checks.k3s and checks.deadnix pass locally.

🤖 Generated with Claude Code

…et changes

For pods that take a Secret with optional: true and read it only at start.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@andsens
andsens enabled auto-merge (squash) November 22, 2026 20:33
@andsens
andsens merged commit 60f079d into main Nov 22, 2026
2 checks passed
@andsens
andsens deleted the claude/kube-secret-restart branch November 22, 2026 20:50
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

0