fix(kubevela): harden admission-webhook bootstrap against the vela-core chicken-egg #918
All Vouch review confidence checks passed
Residual risk 0.26 = Change Risk (0.65) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.65 · 332 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.347
Shallow Review Depth
shallow_review_depth
0.289
Sensitive Paths
sensitive_paths
0.065
Real PR Conversation Timeline
1 comments
"Review active on #918"
general
weight: 0.35
shapirov103
Problem
On a fresh cluster, the vela-core admission webhooks are registered before the vela-core Deployment is Ready. With the upstream default
failurePolicy=Fail, the webhooks then reject every create/update they intercept — including the objects ArgoCD needs to finish its own sync — so the ArgoCD op wedges on the cert/admission hooks andvela-systemstays empty. Classic chicken-egg; observed intermittently onspoke-devwhilehub/prodwon the race.What was already in place (verified, left as-is)
kubevelaApplication already hassyncPolicy.retry.limit=-1with exponential backoff (5s→10m). A wedged op is already retried; no change needed.cert-manageris wave 2,kubevelais wave 3 (verified live on all three clusters), so cert-manager is Ready before kubevela. No change needed.Fix (registry
valuesObject.vela-core.admissionWebhooks)failurePolicy: Ignore— a not-yet-ready webhook can no longer block object creation, so the bootstrap completes. Trade-off: OAM validation is best-effort while vela-core is briefly unavailable (acceptable vs. a hard bootstrap deadlock). Already covered by the Application'signoreDifferences(.webhooks[].failurePolicy) so the apiserver/vela-core cannot flap it into permanent drift.certManager.enabled: true— issue the webhook serving cert via cert-manager (a managed addon on every cluster, already Ready at wave 2) instead of the fragile PreSynckube-webhook-certgenJob. Removes the hook Job and its scheduling races without adding a new ordering dependency.Verification (
helm template, repo's local kubevela chart + these registry values)| Check | Default | With this change |
|---|---|---|
|
failurePolicy: Ignorewebhooks | 0 | 7 ||
failurePolicy: Failresidual | (Fail) | 0 || cert-manager
Certificate/Issuer| 0 / 0 | 2 / 2 ||
admission-webhooks/job-patchcert-gen Jobs | present | 0 (removed) |Sub-chart hook Jobs already carry
helm.sh/hook-delete-policy: before-hook-creation,hook-succeededupstream, so no extra cleanup annotation was added.Rollout note (impact on live clusters)
All three clusters are currently healthy on the old config (
failurePolicy=Fail, cert via Job). Syncing this switches the admission-webhook cert mechanism to cert-manager on live clusters — an admission-control change. Recommend syncingkubevela-*one cluster at a time (start withspoke-dev) and confirmingvela-corestays 2/2 and the webhooks get a cert-manager-issued caBundle before rolling to hub/prod. Not auto-synced by this PR.