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
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 54/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- go, kubernetes
- Ambito
- backend, infrastructure, security
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- Go
- Stelle
- 6.1k
- Fork
- 676
- Merge medio
- 2g 41m
- PR unite (30g)
- 500
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di agent-substrate/substrate
-
network-egress.md describes actor certificate checks the egress gateway doesn't makeForse già presa @ericcurtin l’ha presa oggi. Apertaarea/network area/security kind/docs
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
agent-substrate/substrate#3709 ·
I maintainer di solito rispondono entro 1 giorno
-
Clean up the ko retry testsForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertaarea/dev-infra area/reliability area/tests kind/cleanup
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
agent-substrate/substrate#3461 ·
I maintainer di solito rispondono entro 1 giorno
-
egress: drop the empty-provider check in providerCredentialForse già presa @cloudonly l’ha presa 7 giorni fa. Apertaarea/network kind/cleanup
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
agent-substrate/substrate#3428 ·
I maintainer di solito rispondono entro 1 giorno
-
kubectl-ate create actor-template -f <file> fails with useless errorForse già presa @cloudonly l’ha presa 9 giorni fa. Apertaarea/cli kind/bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
agent-substrate/substrate#3406 ·
I maintainer di solito rispondono entro 1 giorno
-
k8s-credential-provider manifest is missing ate-otel-config envFrom, failing OTLP metric exports to [::1]:4317 / 127.0.0.1:4317 every 60sForse già presa @ericcurtin l’ha presa 9 giorni fa. Apertaarea/dev-infra area/observability area/security kind/bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
agent-substrate/substrate#3282 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di agent-substrate/substrate
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
adrianbrad/queue#92 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
agent-ready area:skills
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
jmbarzee/temporal-architect#444 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement needs:sonnet ready-for-agent
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno