Support for NSX-T based Load Balancers#292
Conversation
|
Welcome @mandelsoft! |
|
Hi @mandelsoft. Thanks for your PR. I'm waiting for a kubernetes 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. DetailsInstructions 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/test-infra repository. |
|
/assign |
andrewsykim
left a comment
There was a problem hiding this comment.
Did a first pass, just left some minor comments will go through it again soon
|
/assign @yastij |
|
@andrewsykim the dedicated lock per service might be useful to avoid the global reorg go routine to block all service reconcilations |
|
/unassign @yastij |
|
/assign |
andrewsykim
left a comment
There was a problem hiding this comment.
Some more comments, thanks again for driving this
dee4264 to
7678bbf
Compare
andrewsykim
left a comment
There was a problem hiding this comment.
Overall I think this is looking good, I still don't understand the use-case around ReorgServices, can you expand on that please?
andrewsykim
left a comment
There was a problem hiding this comment.
/ok-to-test
A few more comments, the most important is getting the feature gate there. Otherwise I'm okay to merge and iterate on the other comments as a follow-up
| pflag.CommandLine.VisitAll(func(flag *pflag.Flag) { | ||
| if flag.Name == "version" { | ||
| switch flag.Name { | ||
| case "cluster-name": |
There was a problem hiding this comment.
nit: I actually prefer this to be cluster-id to match with the cluster ID flag in the CSI driver
There was a problem hiding this comment.
this is a predefined flag from Kubernetes and cannot be changed.
see https://github.com/kubernetes/kubernetes/blob/2652e176e0a24ed9a5d90cc9b3d670c0d4ed8720/cmd/controller-manager/app/options/kubecloudshared.go#L60
There was a problem hiding this comment.
I prefer we don't use this flag, it has some implications that aren't so obvious (the flag description is already telling).
I think what would be best is adding a cluster-id field to the global config https://github.com/kubernetes/cloud-provider-vsphere/blob/master/pkg/common/config/types.go#L21 and then using that value for "cluster name" for LBs.
There was a problem hiding this comment.
introduced new flag cluster-id
There was a problem hiding this comment.
The reference docu for the cloud-controller maneger (https://kubernetes.io/docs/reference/command-line-tools-reference/cloud-controller-manager/) explains the option cluster-namewith
--cluster-name string Default: "kubernetes"
The instance prefix for the cluster.
which is exactly the use case we want to use. Therefore it really seems to be the right choice. It is also already passed by the load balancer interface of the cloud controller manager. That's another clear indicator that we are using it as intended.
1aa736a to
f5e0493
Compare
andrewsykim
left a comment
There was a problem hiding this comment.
Just a few more comments, almost there :) Appreciate your patience.
898630f to
4b557e4
Compare
andrewsykim
left a comment
There was a problem hiding this comment.
/approve
One more minor comment, lgtm otherwise!
pkg/cloudprovider/vsphere/cloud.go
Outdated
| if lb == nil { | ||
| klog.Infof("NSX-T load balancer support disabled") | ||
| } else { | ||
| klog.Infof("NSX-T load balancer support enabled") |
There was a problem hiding this comment.
Can we add a warning log here saying something like "this feature is alpha, use in production at your own risk"
There was a problem hiding this comment.
I second this as well. Also since this is an alpha feature, I would also recommend adding something to the effect of "since this is an alpha feature, this implementation is a work in progress and the underlying implementation details can change."
There was a problem hiding this comment.
Changed logging to klog.Infof("NSX-T load balancer support enabled. This feature is alpha, use in production at your own risk."). Also added the sentence "since this is an alpha feature... can change." to the README.md.
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: andrewsykim The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
also if you can squash commits that'd be great! |
31e2720 to
dca6a2f
Compare
|
Can we update this PR to be a normal PR and not a draft? I don't think it'll merge otherwise |
|
I left a comment as well, but looks good to me as an initial commit! Nice job! |
|
/lgtm |
|
This will merge automatically once it's no longer a draft |
What this PR does / why we need it:
This PR adds support for the NSX-T loadbalancers to the vsphere cloud-controller-manager.
It must explicitly be enabled by additional configuration options in the configuration file.
Which issue this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)format, will close that issue when PR gets merged): fixes #Special notes for your reviewer:
Release note: