Skip to content

[kustomize_deploy] Fix MetalLB CR creation race with webhook readiness#3901

Open
rebtoor wants to merge 1 commit intoopenstack-k8s-operators:mainfrom
rebtoor:metallb-fixes
Open

[kustomize_deploy] Fix MetalLB CR creation race with webhook readiness#3901
rebtoor wants to merge 1 commit intoopenstack-k8s-operators:mainfrom
rebtoor:metallb-fixes

Conversation

@rebtoor
Copy link
Copy Markdown
Contributor

@rebtoor rebtoor commented May 6, 2026

The MetalLB validating webhook can reject CR creation with "no endpoints available" when the operator's webhook services aren't fully ready yet. The existing deployment availability checks pass before the backing Endpoints objects have addresses populated, creating a window where CR creation fails.

Add an explicit wait for all four MetalLB webhook endpoint services (metallb-operator-controller-manager-service,
metallb-operator-webhook-server-service,
metallb-operator-webhook-service, webhook-service) to have at least one ready address before applying MetalLB CRs. Also add retry logic (retries: 10, delay: 15) to the CR apply step itself as a safety net for any remaining transient webhook failures.

The MetalLB validating webhook can reject CR creation with "no endpoints
available" when the operator's webhook services aren't fully ready yet.
The existing deployment availability checks pass before the backing
Endpoints objects have addresses populated, creating a window where
CR creation fails.

Add an explicit wait for all four MetalLB webhook endpoint services
(metallb-operator-controller-manager-service,
metallb-operator-webhook-server-service,
metallb-operator-webhook-service, webhook-service) to have at least
one ready address before applying MetalLB CRs. Also add retry logic
(retries: 10, delay: 15) to the CR apply step itself as a safety net
for any remaining transient webhook failures.

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Roberto Alfieri <ralfieri@redhat.com>
@rebtoor rebtoor requested a review from a team May 6, 2026 08:11
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 6, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign eshulman2 for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link
Copy Markdown
Contributor

@evallesp evallesp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants