-
Notifications
You must be signed in to change notification settings - Fork 182
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
Common library for CNS CSI driver #47
Common library for CNS CSI driver #47
Conversation
Welcome @divyenpatel! |
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.
I tried to review this with a view towards package structure and consistency with other VMW out-of-tree K8s projects. I do not attempt to validate any code/functionality directly related to CNS. This PR is already coming from the experts in that area.
I have an overarching concern that the common libraries from the CPI project were not used, and appear to be copied into this project with this PR. That will only lead to long-term divergence between the CPI and CSI, and those two projects are inextricably linked. We need a common experience across all projects and products, and that can only be done when things like config file parsing and vCenter session management are shared between the two. I would very much like to see any needed enhancements to the common libraries made in the CPI repo, rather than having that functionality duplicated here.
If an enhancement is made to the CPI code, we want CSI to get it as well w/o having to copy the code.
I'm also concerned that there are zero _test.go
files in this PR. Even files that were copied from the CPI repo (and then enhanced) did not bring the unit tests with them.
limitations under the License. | ||
*/ | ||
|
||
package kubernetes |
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 package seems like it was based off of https://github.com/kubernetes/cloud-provider-vsphere/tree/master/pkg/common/kubernetes.
Why not enhance that common package?
/assign |
I know this is just the first part of a huge amount of effort that went into this. Very exciting to see! One question I had along those lines that may be relevant to the future PRs. Is there any possibility of preserving more git authorship history? I ask because right now all the credit goes to @divyenpatel for this 3000+ lines of code. I know many contributed, and some of those people may like to find their way into the |
namesToUUIDs map[string]string | ||
} | ||
|
||
func normalizeUUID(nodeUUID string) string { |
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.
Just as an FYI, there are some Linux operating systems that don't use the normalized UUID. Photon v2 as an example. You need to protect yourself against both. That why in the CPI we have a function called "shakeOutNodeIDLookup".
Since the CPI already does this same functionality and we already have a ListNodes capability in which it retrieves all the nodes in that k8s cluster that you can call through gRPC, would it be helpful to just call that instead of duplicating the effort considering CSI is already dependent on the CPI because of the node labels and zones functionality?
Posted my feedback and I didn't want to duplicate what @codenrhoden posted in his review, but I would definitely have to echo the comments made in it. |
Thank you @dvonthenen @codenrhoden for detailed review. Let me address your review comments. |
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.
Adding a few more comments on top of @codenrhoden's
addressed some of the review comments as part of this commit - d1d96a4 I will mark them as resolved and will work on rest of the comments. |
@codenrhoden yes that is the plan. After we are done with merging common code required for CNS controller, metadata syncer and full sync. Authors will generate PRs for their own components. We have assigned tasks to each contributors to address this authorship issue. I will be generating PR for controller. CC: Manoj Sundararajan - @manojvs157 |
Thanks for bringing that up @codenrhoden. Yes, we have a plan for individuals that contributed to various areas in CSI to generate future PRs largely inline with where their contributions have been. @divyenpatel has contributed towards most of what is part of this PR. |
From https://github.com/kubernetes-sigs/vsphere-csi-driver/pull/47/files#r318841162
I think this is the main conversation that needs to be resolved. It may be true that PBM code is not used in the CPI, and should live here instead. I think that should be resolved with @frapposelli But I strongly believe the I think we need to work out what can/should be shared between CPI and CSI. In my mind the biggest two are /cc @frapposelli @andrewsykim @dvonthenen |
I think of the 3, most importantly we want the config types to be shared since those are user facing APIs that we really can't break. Managing the types in two places seems error prone. I think anything else - extracting creds and session management should be shared ideally but we can iterate on that in follow-up PRs. Thoughts? |
yes, I think iterating here is okay, but that the |
agreed |
@divyenpatel I see three things to take care of before merging this.
|
/lgtm |
/approve I'll be opening issues to track some of the future improvements and de-duplication that can be done. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: codenrhoden, divyenpatel The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Thanks @codenrhoden @dvonthenen @andrewsykim Regarding the config file, the only addition is the Kubernetes Also for de-duplication of common code, I will revisit this code and make sure we don't have duplicated common code here in this repository. |
…ncy-openshift-4.12-vmware-vsphere-syncer Updating vmware-vsphere-syncer images to be consistent with ART
What this PR does / why we need it:
As part of vSAN 67u3, we have released APIs for Cloud Native Storage.
We have a vSphere CNS CSI driver which uses these new APIs.
In this PR, we are adding a common library required for new CNS CSI driver.
Common library mainly contains
In the follow up PRs we will be publishing code for CNS CSI driver.
Special notes for your reviewer:
go.mod
file.Release note: