You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit f94c80a
Browse filesBrowse the repository at this point in the historyBrowse files
Wait for webhook certificates before checking endpoints
Operators with ENABLE_WEBHOOKS=true mount certificate secrets as
volumes. If these secrets don't exist when the pod starts (cert-manager
creates them asynchronously), the pod fails with FailedMount and
crash-loops. This was surfaced by the new OLM-based CI flow which
deploys operators and immediately proceeds to deploy
OpenStackControlPlane, not giving cert-manager enough time to create
the certificate secrets.
Rather than checking the Secret directly (which would require a new
cluster-wide RBAC grant for secrets: get/list/watch, raised as a
concern on an earlier version of this change), check the backing
cert-manager Certificate's Ready condition instead. The operator
already has cluster-wide RBAC for cert-manager.io/certificates, so this
needs no new RBAC at all, and Ready only flips true once cert-manager
has synced valid data into the Secret, which also covers certificate
regeneration/rotation.
The disabled-operator check duplicated between checkWebhookCertificates
and checkServiceEndpoints is unified into a shared
isWebhookOperatorDisabled() helper built on the existing
operator.HasOverrides().
Also fixes a related gap: cmd/operator/main.go's manager scheme never
registered cert-manager's Certificate type, which would have made
every Get on a Certificate fail with a scheme error rather than a
usable NotFound. Added a scheme smoke test to guard against this
regressing silently.
Known follow-ups, left unaddressed as narrow edge cases:
- cert-manager does not set an owner reference from the Secret to the
Certificate by default, so a Certificate deleted/renamed out-of-band
while its Secret survives would block readiness indefinitely even
though the Secret is still mountable.
- If cert-manager's temporary-certificate issuance were ever enabled
for these Certificates, the Secret could become mountable before
Ready flips true. Nothing in the current manifests uses it.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Signed-off-by: Martin Schuppert <mschuppert@redhat.com>
0 commit comments