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

Trigger NEG syncers to sync on Node Topology CRD changes. #2677

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

sawsa307
Copy link
Contributor

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Sep 17, 2024
@k8s-ci-robot k8s-ci-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Sep 17, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: sawsa307
Once this PR has been reviewed and has the lgtm label, please ask for approval from gauravkghildiyal. 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

@sawsa307 sawsa307 force-pushed the trigger-sync-on-crd branch 2 times, most recently from a7658e5 to 8f0a499 Compare September 18, 2024 07:22
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Sep 18, 2024
@sawsa307
Copy link
Contributor Author

/retest

Copy link
Member

@gauravkghildiyal gauravkghildiyal left a comment

Choose a reason for hiding this comment

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

Have left a few comments and have one additional one:

Have we considered starting a filtered informer for NodeTopology which only informs changes to a specific resource? You can make the name of that resource pluggable through a flag to get some flexibility.

I can see why choosing the option of having an un-filtered informer might offer more flexibility for future use cases, where things might work naturally if you ever have multiple NodeTopology resources. But on the other hand, I also feel that if such a case actually arises, it would warrant some additional thought and verification (like maybe not syncing all syncers for each NodeTopology resource? or something like that)

This specific aspect may benefit from getting an additional opinion (@swetharepakula)

pkg/neg/controller.go Show resolved Hide resolved
pkg/neg/controller.go Show resolved Hide resolved
pkg/neg/controller.go Outdated Show resolved Hide resolved
* Add NodeInformer to NewController, and add fake informer to test
  cases.
@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Oct 1, 2024
@sawsa307 sawsa307 force-pushed the trigger-sync-on-crd branch 2 times, most recently from b95d8ae to 6ea54f6 Compare October 1, 2024 19:57
@sawsa307
Copy link
Contributor Author

sawsa307 commented Oct 1, 2024

Have we considered starting a filtered informer for NodeTopology which only informs changes to a specific resource? You can make the name of that resource pluggable through a flag to get some flexibility.

Discussed offline, and created #2694. We only care about update on the CR named default.

 * When zones or subnets of a cluster changes, all syncers react to this
   change by either creating additional NEGs in new zone/subnet, or mark
   NEGs as Inactive/To-be-deleted.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants