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

Remove leader election for the operator #849

Merged
merged 1 commit into from
Feb 25, 2025

Conversation

SchSeba
Copy link
Collaborator

@SchSeba SchSeba commented Feb 19, 2025

for the operator we don't need a leader election.
to avoid multiple instances running we change the upgrade policy to Recreate.

We always deploy the sriov operator with replica 1 so no need really to have leader election

Copy link

Thanks for your PR,
To run vendors CIs, Maintainers can use one of:

  • /test-all: To run all tests for all vendors.
  • /test-e2e-all: To run all E2E tests for all vendors.
  • /test-e2e-nvidia-all: To run all E2E tests for NVIDIA vendor.

To skip the vendors CIs, Maintainers can use one of:

  • /skip-all: To skip all tests for all vendors.
  • /skip-e2e-all: To skip all E2E tests for all vendors.
  • /skip-e2e-nvidia-all: To skip all E2E tests for NVIDIA vendor.
    Best regards.

@@ -48,9 +48,6 @@ import (
sriovnetworkv1 "github.com/k8snetworkplumbingwg/sriov-network-operator/api/v1"
"github.com/k8snetworkplumbingwg/sriov-network-operator/controllers"
"github.com/k8snetworkplumbingwg/sriov-network-operator/pkg/featuregate"
"github.com/k8snetworkplumbingwg/sriov-network-operator/pkg/leaderelection"
Copy link
Member

Choose a reason for hiding this comment

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

I think we can delete this package completely

And this will increase our code coverage 🚀

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

nice catch thanks!

for the operator we don't need a leader election.
to avoid multiple instances running we change the upgrade
policy to Recreate.

We always deploy the sriov operator with replica 1 so no need really to
have leader election

Signed-off-by: Sebastian Sch <[email protected]>
@SchSeba SchSeba force-pushed the remove_leader_election branch from cbf118a to ca3bee2 Compare February 24, 2025 10:20
Copy link
Collaborator

@adrianchiris adrianchiris left a comment

Choose a reason for hiding this comment

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

lgtm

@zeeke zeeke merged commit d7c9458 into k8snetworkplumbingwg:master Feb 25, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants