-
Notifications
You must be signed in to change notification settings - Fork 246
CCM-MT Poc #935
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
base: master
Are you sure you want to change the base?
CCM-MT Poc #935
Conversation
|
This issue is currently awaiting triage. If the repository mantainers determine this is a relevant issue, they will accept it by applying the The 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. |
|
Welcome @priyapande! |
|
Hi @priyapande. Thanks for your PR. I'm waiting for a github.com member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
| package providerconfig | ||
|
|
||
| var ( | ||
| GroupName = "cloud.gke.io" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/hold
this should not be in this repo, see https://github.com/GoogleCloudPlatform/gke-networking-api per example
and then it can be consumed here from the external repo #725
|
/assign |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: priyapande 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 |
|
Can we split off the vendor change in a separate commit? Right now it's 300 files, but I'm assuming most of it is in vendor/ |
| return startGkeMultiNodeControllerWrapper(initContext, completedConfig, cloud, nodeIpamController.nodeIPAMControllerOptions) | ||
| }, | ||
| } | ||
| // app.ControllersDisabledByDefault.Insert(names.CloudNodeController) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this multiNodeControllerName has to be disabled by default , and better to have all things aggregated in Line 108-110 so we do not have risk of drifting the code by using these conventions
| Copyright 2025 The Kubernetes Authors. | ||
| */ | ||
|
|
||
| package nodemanager |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if this is gke only let's prefix the folder so we make it clear , pkg/controller/gkenodemanager or something
|
|
||
| "io" | ||
|
|
||
| "github.com/go-ini/ini" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this dependency really needed?
let's try to avoid bringing cosmetic dependencies if possible
| // FilteredSharedInformerFactory wraps the standard factory. | ||
| // It embeds the interface so all non-overridden methods (Start, WaitForCacheSync) | ||
| // pass through to the underlying factory automatically. | ||
| type FilteredSharedInformerFactory struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this has to be unexported if its planned to be used here, so or lowercase or under an /internal/ folder https://go.dev/doc/modules/layout#package-or-command-with-supporting-packages so it can not be consumed outside of this repo
| "k8s.io/client-go/tools/cache" | ||
| ) | ||
|
|
||
| type FilteredInformer struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto 3c0ad5f#r2607012378
| klog.Infof("[%s] Creating OSS Cloud Node Controller...", pcKey) | ||
| nodeController, err := node.NewCloudNodeController( | ||
| filteredFactory.Core().V1().Nodes(), | ||
| m.kubeClient, | ||
| scopedCloud, | ||
| m.config.ComponentConfig.NodeStatusUpdateFrequency.Duration, | ||
| m.config.ComponentConfig.NodeController.ConcurrentNodeSyncs, | ||
| ) | ||
| if err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there has to be two independent launchers, and users should opt-in via the standards flags to enable one or other controllers, check this for prior art https://github.com/kubernetes/cloud-provider-gcp/pull/895/files
The litmus test is that the addition of this new controller/folder will have zero impact, and the behavior is governed by the flags
| controllerInitializers[multiNodeControllerName] = app.ControllerInitFuncConstructor{ | ||
| InitContext: app.ControllerInitContext{ | ||
| ClientName: multiNodeControllerClientName, | ||
| }, | ||
| Constructor: func(initContext app.ControllerInitContext, completedConfig *cloudcontrollerconfig.CompletedConfig, cloud cloudprovider.Interface) app.InitFunc { | ||
| return startGkeMultiNodeControllerWrapper(initContext, completedConfig, cloud, nodeIpamController.nodeIPAMControllerOptions) | ||
| }, | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
commented in 3c0ad5f#r2607023536 , this can be added as an opt-in new controller, that runs independently of the other controller, so users can use the flags to enable or disable one or other controller ...
No description provided.