Fix: add dry-run AzureCluster create to ensure CA bundle availability#6221
Fix: add dry-run AzureCluster create to ensure CA bundle availability#6221mboersma wants to merge 2 commits intokubernetes-sigs:mainfrom
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6221 +/- ##
==========================================
+ Coverage 43.66% 43.74% +0.08%
==========================================
Files 289 289
Lines 25495 25475 -20
==========================================
+ Hits 11132 11145 +13
+ Misses 13561 13527 -34
- Partials 802 803 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
A validation error (Invalid/Forbidden) from the webhook proves TLS is working end-to-end, which is all the probe needs to verify. Only retry on errors that indicate TLS is not yet ready.
|
/label tide/merge-method-squash |
|
/test pull-cluster-api-provider-azure-e2e This bug isn't deterministic, so we can't easily know if this fixes it. I'll run tests a few times and we can make a judgement call. |
|
/test pull-cluster-api-provider-azure-e2e No failures yet... 🤞🏻 |
What type of PR is this?
/kind flake
What this PR does / why we need it:
Fixes a flaky e2e test failure where the kube-apiserver hasn't yet picked up updated webhook CA bundles from its informer cache, even though cert-manager's cainjector has already populated them on the webhook configurations: the well-known "x509 error."
After the existing check that waits for CA bundle injection into all ValidatingWebhookConfigurations and MutatingWebhookConfigurations, this adds a dry-run
AzureClustercreate to verify the CAPZ mutating webhook is actually reachable end-to-end with valid TLS. This closes the race window between the CA bundle being written and the apiserver serving requests through the webhook with the new certificate.Which issue(s) this PR fixes:
Fixes #5690 (hopefully)
See also #6144, which apparently didn't work. :-(
Special notes for your reviewer:
TODOs:
Release note: