ate-setup delete ate-system + deploy ate-system regenerates the pod-identity CA and breaks mTLS for existing client pods until their leaf certs rotate (~23h), and leaks cluster-scoped resources on --kind / --setup-csi
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 54/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- go, kubernetes
- Domain
- backend, infrastructure, security
Research direction
Read cmd/ate-setup/internal/steps/delete.go alongside prereqs.go, deploy.go, and csi.go to trace what deploy installs and delete removes; compare the --kind kustomization with sandboxconfig-validation.yaml. Start by reproducing the CA replacement and checking which resources survive deletion. Done means existing clients retain valid mTLS during redeploy and delete removes the cluster scoped admission and CSI resources it installs.
Written by the indexing model from the issue text.
Description
Summary & Root Cause
mTLS break. DeleteAteSystem deletes and waits on the podcertificate-controller-system namespace, which destroys Secret/pod-identity-ca-pool. On the next deploy ate-system, EnsurePodCertificateCAs finds the Secret missing and generates a new CA, and the controller publishes a new ClusterTrustBundle. Kubelet refreshes projected clusterTrustBundle volumes promptly, so a pre-existing client pod trusts the new router cert. It only reissues a projected podCertificate leaf near its refreshBefore time, though (about 23h into the 24h lifetime). Until then, the client presents a leaf signed by the deleted CA, and atenet-router rejects it with unknown ca.
Kind / CSI leaks (static). On --kind, DeleteAteSystem deletes only the rendered kind kustomization plus pod-certificate-controller.yaml. DeployAteSystem also applies sandboxconfig-validation.yaml through DeploySandboxConfig, and that file is not in the kind kustomization. So the cluster-scoped ValidatingAdmissionPolicy/sandboxconfig-assets and ValidatingAdmissionPolicyBinding/sandboxconfig-assets are never deleted. Nothing in DeleteAteSystem removes what SetupCSI installs (--setup-csi=hostpath,nfs).
Affected Code Locations
cmd/ate-setup/internal/steps/delete.go:44-94(DeleteAteSystem)cmd/ate-setup/internal/steps/delete.go:90(waits for namespacepodcertificate-controller-systemto be deleted, which removes the CA Secrets in it)cmd/ate-setup/internal/steps/delete.go:51-63(--kindbranch: deletes only thekindkustomization andpod-certificate-controller.yaml)cmd/ate-setup/internal/steps/delete.go:64(non-kind branch: deletes the whole manifest directory)cmd/ate-setup/internal/steps/prereqs.go:90-101(EnsurePodCertificateCAs: creates new CA pools whenpod-identity-ca-poolis missing)cmd/ate-setup/internal/steps/create.go:40(SecretPodIdentityCA = "pod-identity-ca-pool"),cmd/ate-setup/internal/steps/env.go:63(NamespacePodCert = "podcertificate-controller-system")cmd/ate-setup/internal/steps/deploy.go:119, 593-609(DeploySandboxConfigappliessandboxconfig-validation.yaml)manifests/ate-install/sandboxconfig-validation.yaml:21-23, 53-57(ValidatingAdmissionPolicyandValidatingAdmissionPolicyBindingsandboxconfig-assets)manifests/ate-install/kind/kustomization.yaml:29-39(does not listsandboxconfig-validation.yaml)cmd/ate-setup/internal/steps/csi.go:116(SetupCSI;delete.gohas no CSI cleanup)
Detailed Reproduction Guide
-
Have a client pod (
test-client) with a projectedpodCertificate(signerName: podidentity.podcert.ate.dev/identity) and aclusterTrustBundlevolume, and confirm it reaches an actor throughatenet-router. -
Record the CA and the client's leaf issuer:
kubectl get secret -n podcertificate-controller-system pod-identity-ca-pool -o jsonpath='{.metadata.uid} {.metadata.creationTimestamp}' kubectl exec -n test-client test-client -- sh -c 'openssl x509 -noout -issuer -enddate < /run/podidentity/credential-bundle.pem' -
Reinstall and recreate an actor:
go run ./cmd/ate-setup delete ate-system go run ./cmd/ate-setup deploy ate-system go run ./cmd/ate-setup deploy demo counter kubectl ate create actor s6-b -a ate-demo-counter --template counter -
Curl from the old pod and from a new pod with an identical spec:
kubectl exec -n test-client test-client -- curl -sS -w "\nHTTP_STATUS=%{http_code}\n" \ --cacert /run/servicedns-ca/trust-bundle.pem \ --cert /run/podidentity/credential-bundle.pem \ --key /run/podidentity/credential-bundle.pem \ -H "ate-target-actor: ate-demo-counter/s6-b" \ https://atenet-router.ate-system.svc/ -
Kind only (static, not run on GKE):
go run ./cmd/ate-setup deploy ate-system --kind go run ./cmd/ate-setup delete ate-system --kind kubectl get validatingadmissionpolicy,validatingadmissionpolicybinding | grep sandboxconfig-assets
Expected vs. Actual Behavior
- Expected: Redeploying
ate-systemdoes not silently break mTLS for existing clients. Either the pod-identity CA is preserved acrossdelete/deploy, the new trust bundle carries both CAs during a rollover, or the operator is told to recreate client pods.delete ate-systemremoves every cluster-scoped object thatdeploy ate-systemcreated. - Actual: The old client pod fails with
curl: (56) ... tlsv1 alert unknown ca, while a fresh pod with the same spec succeeds. The outage lasts until the old leaf is refreshed (inferred ~23h) or the pod is recreated. On--kind, the twosandboxconfig-assetsadmission objects are left behind (static).
Observed Output & Logs
# pre-existing test-client (uid 0d2155a7):
curl: (56) OpenSSL SSL_read: ... tlsv1 alert unknown ca
# new test-client2 with identical spec:
HTTP_STATUS=200
- Dominant language
- Go
- Stars
- 5.9k
- Forks
- 637
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 523
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from agent-substrate/substrate
-
Clean up the ko retry testsPossibly taken A pull request linked to this issue is open or already merged. Openarea/dev-infra area/reliability area/tests kind/cleanup
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
agent-substrate/substrate#3461 ·
Maintainers usually reply within 1 day
-
egress: drop the empty-provider check in providerCredentialPossibly taken @cloudonly claimed this 2 days ago. Openarea/network kind/cleanup
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
agent-substrate/substrate#3428 ·
Maintainers usually reply within 1 day
-
kubectl-ate create actor-template -f <file> fails with useless errorPossibly taken @cloudonly claimed this 4 days ago. Openarea/cli kind/bug
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
agent-substrate/substrate#3406 ·
Maintainers usually reply within 1 day
-
k8s-credential-provider manifest is missing ate-otel-config envFrom, failing OTLP metric exports to [::1]:4317 / 127.0.0.1:4317 every 60sPossibly taken @ericcurtin claimed this 5 days ago. Openarea/dev-infra area/observability area/security kind/bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
agent-substrate/substrate#3282 ·
Maintainers usually reply within 1 day
-
filecachegc.runPass suppresses eviction logs when FreedBytes < target and consecutiveShortfalls > 3Possibly taken @ericcurtin claimed this 4 days ago. Openarea/node area/observability area/storage kind/bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
agent-substrate/substrate#3281 ·
Maintainers usually reply within 1 day
All issues in agent-substrate/substrate
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
apache/arrow-swift#209 ·
Maintainers usually reply within 1 day
-
orchestrator: NFS-cache "cache path is not set" WARN logged on every build/launch instead of oncePossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 2 days
-
Difficulty 1/5 1-3 hours Newbie friendliness 65/100
influxdata/telegraf#20031 ·
Maintainers usually reply within 1 day
-
pkg/registry/file no longer builds for GOOS=windows: unguarded syscall.Stat_t in qualified_resource_migration.goPossibly taken @AnshulPatil2005 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
OneBusAway/maglev#1914 ·
Maintainers usually reply within 2 days