Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for reconciling and restoring infra EndpointSlices #336

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kvaps
Copy link
Member

@kvaps kvaps commented Dec 6, 2024

This PR introduces the following key changes to the kubevirteps controller:

  • Added infra EndpointSlice Informer: The controller now watches for EndpointSlice events (add, update, delete) in the infra cluster.
  • Reconciliation on EndpointSlice deletion: The controller detects when an infra EndpointSlice is deleted and automatically re-queues the associated Service for reconciliation.
  • Refactored reconcile logic: Improved the getInfraServiceForEPS function to map EndpointSlices back to their associated infra Services using labels.
  • Enhanced tests:
    • Verified restoration of infra EndpointSlice after manual deletion.
    • Ensured correct handling of Services with multiple unique ports.
    • Covered scenarios for updating EndpointSlices when associated Services are modified.

These improvements enhance the controller's resilience and ensure that infra EndpointSlices are consistently in sync with the desired state.

@kubevirt-bot kubevirt-bot added the dco-signoff: yes Indicates the PR's author has DCO signed all their commits. label Dec 6, 2024
@kubevirt-bot
Copy link
Contributor

[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 davidvossel for approval. For more information see the Kubernetes Code Review Process.

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

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

@kvaps kvaps force-pushed the reconcole-infra-eps branch from 295b50c to 480cb31 Compare December 6, 2024 14:32
@kvaps
Copy link
Member Author

kvaps commented Dec 6, 2024

/assign @qinqon

kvaps added a commit to aenix-io/cozystack that referenced this pull request Dec 9, 2024
Upstream fixes:

- kubevirt/cloud-provider-kubevirt#335
- kubevirt/cloud-provider-kubevirt#336

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

## Release Notes

- **New Features**
  - Incremented Kubernetes chart version to 0.14.1.
- Introduced a new cloud provider controller for managing EndpointSlices
in KubeVirt, enhancing responsiveness to service changes.

- **Improvements**
- Updated Docker image tag for kubevirt-cloud-provider to use the latest
version.
- Enhanced handling of EndpointSlices for LoadBalancer services,
improving service management.

- **Bug Fixes**
- Improved error handling and logging for service retrieval and
EndpointSlice management.

- **Documentation**
- Updated version mappings in the versions map file for clarity and
tracking.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: Andrei Kvapil <[email protected]>
@kubevirt-bot
Copy link
Contributor

@klinch0: changing LGTM is restricted to collaborators

In response to this:

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dco-signoff: yes Indicates the PR's author has DCO signed all their commits. size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants