Preserve RKE2 preflight errors when OpenBao cleanup fails #109
No reviewers
Labels
No labels
app-migration
bug
ci-cd
cluster
Documentation
duplicate
enhancement
gpu
invalid
networking
question
security
Storage
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Homelab/workflows!109
Loading…
Reference in a new issue
No description provided.
Delete branch "kiyi/rke2-session-cleanup"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Private platform bootstrap deployment run 4974 verified the signed release, obtained the expected Kubernetes credential and passed five permission probes, then stopped before deployment. Its RKE2 policy omitted self-revocation while the login omitted the default policy. The resulting cleanup HTTP 403 replaced the original preflight error.
Preserve the original operation/issuance error or interruption when self-revocation also fails. Always attempt cleanup, label that stage explicitly, print only a fixed secondary diagnostic, and continue failing an otherwise successful operation if cleanup fails. Keep the public RKE2 policy export aligned with the companion Terraform correction: only exact account issuance plus update on auth/token/revoke-self. Default-policy exclusion, claims, TTLs, Kubernetes RBAC/admission, signed archive verification and all workflow/job/status names remain unchanged.
Validation at
48df1de73b: all 74 RKE2 delivery/admission-download and Terraform identity/delivery regressions pass. New regressions fail against the old implementation and cover all three component policies, primary failures before/after credential validation, interruption, cleanup-only failure, private kubeconfig removal and suppression of synthetic private cleanup details. Native staged Gitleaks 8.30.1 and diff checks passed. All APIs were mocked; no credentials or live deployment were used. Hosted checks remain required.Review/merge this and the companion Terraform policy correction, then publish/promote one workflow release. Obtain a fresh owning Terraform plan and separately approved apply before a fresh bootstrap deployment attempt. The unchanged signed bootstrap release rke2-bootstrap-bundle-v0.1.0-r7501 can be reused. The original preflight failure is still unresolved until a fresh run reports it; this PR does not claim live bootstrap or upgrade acceptance.
Reviewed the exact-head credential context manager, OpenBao policy export, targeted regressions, and delivery documentation. The issuance/operation failure (including interruption) is retained when revocation raises a normal exception; cleanup remains attempted, successful operations still fail on cleanup error, and the kubeconfig temporary directory is removed before revocation. The exported policies add only update on auth/token/revoke-self alongside exact-account credential issuance, without expanding UDS routing, deployment resources, RBAC/admission, or bypassing signed-release/security gates. The tests exercise all three identities and failure/cleanup cases with mocked APIs. Source approval only: Workflow acceptance, Repository security, and Library checks are still pending at this head; no live OpenBao policy, Terraform apply, release promotion, or deployment acceptance is verified. Do not merge until required head-bound checks and companion deployment prerequisites pass.
CI at submission: pending. This is a source-review approval, not a scan verdict; required checks still block merge.