fix(k8s): persist Caddy TLS certificates with PVC #981

Closed
AFDudley wants to merge 4 commits from caddy-pvc-persistence into main

4 Commits

Author SHA1 Message Date
A. F. Dudley
1473c5ec4d Revert local k8s helpers changes
Some checks failed
Lint Checks / Run linter (pull_request) Successful in 16s
Lint Checks / Run linter (push) Successful in 16s
K8s Deployment Control Test / Run deployment control suite on kind/k8s (pull_request) Failing after 42s
K8s Deploy Test / Run deploy test suite on kind/k8s (pull_request) Failing after 1m43s
Deploy Test / Run deploy test suite (pull_request) Successful in 2m14s
External Stack Test / Run external stack test suite (push) Failing after 2m16s
Database Test / Run database hosting test on kind/k8s (push) Failing after 3m6s
Webapp Test / Run webapp test suite (pull_request) Successful in 3m45s
Smoke Test / Run basic test suite (pull_request) Successful in 3m45s
The hostPath support fix was merged via Roy's PR #984.
Reverting local changes to sync with upstream main.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 17:58:04 -05:00
A. F. Dudley
d31f76eb5a Add etcd + PKI extraMounts for offline data recovery
Mount /var/lib/etcd and /etc/kubernetes/pki to host filesystem
so cluster state is preserved for offline recovery. Each deployment
gets its own backup directory keyed by deployment ID.

Directory structure:
  data/cluster-backups/{deployment_id}/etcd/
  data/cluster-backups/{deployment_id}/pki/

This enables extracting secrets from etcd backups using etcdctl
with the preserved PKI certificates.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 17:50:51 -05:00
A. F. Dudley
21d0975e71 feat(k8s): support acme-email config for Caddy ingress
Adds support for configuring ACME email for Let's Encrypt certificates
in kind deployments. The email can be specified in the spec under
network.acme-email and will be used to configure the Caddy ingress
controller ConfigMap.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 17:50:10 -05:00
A. F. Dudley
411e777980 fix(deploy): merge volumes from stack init() instead of overwriting
Previously, volumes defined in a stack's commands.py init() function
were being overwritten by volumes discovered from compose files.
This prevented stacks from adding infrastructure volumes like caddy-data
that aren't defined in the compose files.

Now volumes are merged, with init() volumes taking precedence over
compose-discovered defaults.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 17:50:09 -05:00