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

Open
AFDudley wants to merge 3 commits from caddy-pvc-persistence into main
Owner

Caddy ingress was using emptyDir for /data storage, causing TLS
certificates to be lost on pod restarts or cluster recreations.
This led to Let's Encrypt rate limit issues from repeatedly
requesting new certificates.

Add a PersistentVolumeClaim for Caddy's data directory to persist
ACME certificates across redeployments.

Co-Authored-By: Claude Opus 4.5 noreply@anthropic.com

Caddy ingress was using emptyDir for /data storage, causing TLS certificates to be lost on pod restarts or cluster recreations. This led to Let's Encrypt rate limit issues from repeatedly requesting new certificates. Add a PersistentVolumeClaim for Caddy's data directory to persist ACME certificates across redeployments. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
AFDudley added 1 commit 2026-01-25 05:30:33 +00:00
fix(k8s): persist Caddy TLS certificates with PVC
All checks were successful
Lint Checks / Run linter (push) Successful in 4m37s
Lint Checks / Run linter (pull_request) Successful in 3m59s
Deploy Test / Run deploy test suite (pull_request) Successful in 9m43s
K8s Deploy Test / Run deploy test suite on kind/k8s (pull_request) Successful in 14m31s
K8s Deployment Control Test / Run deployment control suite on kind/k8s (pull_request) Successful in 16m18s
Webapp Test / Run webapp test suite (pull_request) Successful in 20m33s
Smoke Test / Run basic test suite (pull_request) Successful in 19m50s
d5e1a6652c
Caddy ingress was using emptyDir for /data storage, causing TLS
certificates to be lost on pod restarts or cluster recreations.
This led to Let's Encrypt rate limit issues from repeatedly
requesting new certificates.

Add a PersistentVolumeClaim for Caddy's data directory to persist
ACME certificates across redeployments.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
AFDudley added 1 commit 2026-01-25 22:19:52 +00:00
feat(k8s): enable relative volume paths for kind deployments
Some checks failed
Lint Checks / Run linter (push) Successful in 4m32s
Lint Checks / Run linter (pull_request) Successful in 8m0s
Deploy Test / Run deploy test suite (pull_request) Successful in 14m0s
K8s Deploy Test / Run deploy test suite on kind/k8s (pull_request) Failing after 16m26s
Webapp Test / Run webapp test suite (pull_request) Successful in 25m29s
K8s Deployment Control Test / Run deployment control suite on kind/k8s (pull_request) Failing after 26m43s
Smoke Test / Run basic test suite (pull_request) Successful in 26m2s
79b7870a6a
Makes kind deployments use the same volume pattern as Docker Compose:
./data/{volume-name} relative to deployment directory.

Changes:
- Allow relative paths for kind (single host, like Docker Compose)
- Default kind volumes to ./data/ instead of provisioner-managed PVCs
- Update Caddy manifest to use hostPath /mnt/caddy-data
- Add caddy-data infrastructure volume support in kind mounts

This enables Caddy certificate persistence across cluster recreation
without requiring system-level directories like /opt/caddy-data.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
AFDudley added 1 commit 2026-01-25 22:28:07 +00:00
fix(deploy): merge volumes from stack init() instead of overwriting
Some checks failed
Lint Checks / Run linter (push) Has been cancelled
Lint Checks / Run linter (pull_request) Successful in 24m14s
Deploy Test / Run deploy test suite (pull_request) Successful in 29m14s
K8s Deploy Test / Run deploy test suite on kind/k8s (pull_request) Failing after 33m1s
K8s Deployment Control Test / Run deployment control suite on kind/k8s (pull_request) Failing after 34m3s
Webapp Test / Run webapp test suite (pull_request) Successful in 33m23s
Smoke Test / Run basic test suite (pull_request) Successful in 33m49s
6ff3da76ee
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>
AFDudley added 1 commit 2026-01-25 22:36:16 +00:00
feat(k8s): support acme-email config for Caddy ingress
Some checks failed
Lint Checks / Run linter (push) Waiting to run
Lint Checks / Run linter (pull_request) Successful in 28m42s
Deploy Test / Run deploy test suite (pull_request) Successful in 27m28s
K8s Deploy Test / Run deploy test suite on kind/k8s (pull_request) Failing after 27m38s
Webapp Test / Run webapp test suite (pull_request) Successful in 29m34s
K8s Deployment Control Test / Run deployment control suite on kind/k8s (pull_request) Failing after 30m54s
Smoke Test / Run basic test suite (pull_request) Successful in 29m34s
1eed7987e2
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>
AFDudley added 1 commit 2026-01-25 22:40:26 +00:00
fix(k8s): allow relative paths for kind deployment PVs
Some checks failed
Lint Checks / Run linter (push) Waiting to run
Lint Checks / Run linter (pull_request) Successful in 29m15s
Deploy Test / Run deploy test suite (pull_request) Successful in 29m39s
K8s Deploy Test / Run deploy test suite on kind/k8s (pull_request) Failing after 31m1s
K8s Deployment Control Test / Run deployment control suite on kind/k8s (pull_request) Successful in 24m30s
Webapp Test / Run webapp test suite (pull_request) Successful in 27m16s
Smoke Test / Run basic test suite (pull_request) Successful in 28m42s
b04ce627f1
Kind deployments can use relative paths because the extraMounts config
resolves them to absolute paths on the host. The PV creation should not
skip relative paths for kind deployments since the PV will use the
/mnt/<volume> path inside the kind node.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
AFDudley added 1 commit 2026-01-25 22:44:37 +00:00
fix(deploy): create ConfigMaps for kind deployments
Some checks failed
Lint Checks / Run linter (push) Has been cancelled
Lint Checks / Run linter (pull_request) Successful in 28m58s
Deploy Test / Run deploy test suite (pull_request) Successful in 28m3s
K8s Deploy Test / Run deploy test suite on kind/k8s (pull_request) Failing after 27m47s
K8s Deployment Control Test / Run deployment control suite on kind/k8s (pull_request) Successful in 29m18s
Webapp Test / Run webapp test suite (pull_request) Successful in 30m48s
Smoke Test / Run basic test suite (pull_request) Successful in 29m45s
9f732c2226
Volumes with "config" in the name should be ConfigMaps for all k8s
deployment types, including k8s-kind. Previously only full k8s
deployments would create ConfigMaps for these volumes.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
AFDudley added 1 commit 2026-01-26 00:13:03 +00:00
Add etcd + PKI extraMounts for offline data recovery
Some checks failed
Lint Checks / Run linter (push) Successful in 25m5s
Lint Checks / Run linter (pull_request) Successful in 24m45s
Deploy Test / Run deploy test suite (pull_request) Successful in 28m23s
K8s Deploy Test / Run deploy test suite on kind/k8s (pull_request) Failing after 30m41s
K8s Deployment Control Test / Run deployment control suite on kind/k8s (pull_request) Successful in 30m17s
Webapp Test / Run webapp test suite (pull_request) Successful in 32m6s
Smoke Test / Run basic test suite (pull_request) Successful in 32m41s
3ff4ac6185
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>
AFDudley force-pushed caddy-pvc-persistence from 3ff4ac6185 to 1b9204da98 2026-01-27 03:04:00 +00:00 Compare
Some checks failed
Lint Checks / Run linter (push) Successful in 4m35s
Lint Checks / Run linter (pull_request) Successful in 7m46s
Deploy Test / Run deploy test suite (pull_request) Successful in 13m51s
K8s Deploy Test / Run deploy test suite on kind/k8s (pull_request) Failing after 18m29s
K8s Deployment Control Test / Run deployment control suite on kind/k8s (pull_request) Successful in 21m22s
Webapp Test / Run webapp test suite (pull_request) Successful in 24m48s
Smoke Test / Run basic test suite (pull_request) Successful in 25m23s
This pull request doesn't have enough approvals yet. 0 of 1 approvals granted.
You are not authorized to merge this pull request.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin caddy-pvc-persistence:caddy-pvc-persistence
git checkout caddy-pvc-persistence
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cerc-io/stack-orchestrator#981
No description provided.