-
Notifications
You must be signed in to change notification settings - Fork 201
Enhance storageclass validation for linkedclone volume creation #3791
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
Enhance storageclass validation for linkedclone volume creation #3791
Conversation
|
SUCCESS --- Jenkins Build #665 |
|
Triggering CSI-WCP Pre-checkin Pipeline for this PR... Job takes approximately an hour to complete |
|
FAILED --- Jenkins Build #722 |
|
SUCCESS --- Jenkins Build #725 |
02ddc1c to
ff69aae
Compare
|
/approve |
1 similar comment
|
/approve |
6eb4d01 to
851613b
Compare
chethanv28
left a comment
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.
/approve
Good to merge after fixing the linter errors
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: chethanv28, deepakkinni, nikhilbarge, xing-yang 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 |
Signed-off-by: Deepak Kinni <[email protected]>
851613b to
e60270d
Compare
|
/test pull-vsphere-csi-driver-verify-golangci-lint |
|
/lgtm |
What this PR does / why we need it:
Enhances LinkedClone PVC validation in guest clusters to compare supervisor storage class references instead of guest storage class names. This allows LinkedClone volumes to reference different guest storage classes as long as they point to the same supervisor storage class, providing more flexibility in storage class management.
Which issue this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)format, will close that issue when PR gets merged): fixes #Testing done:
Precheckins:
WCP(PASS): https://jenkins-vcf-csifvt.devops.broadcom.net/job/wcp-instapp-e2e-pre-checkin/725/
VKS(PASS): https://jenkins-vcf-csifvt.devops.broadcom.net/job/vks-instapp-e2e-pre-checkin/665/
Modified the validation logic in
validateGuestPVCOperationto fetch StorageClass objects and compare theirparameters.svStorageClassvalues. Updated validation comments and error messages to reflect this change.Added comprehensive unit tests covering five scenarios:
Test results:
Special notes for your reviewer:
The validation now retrieves StorageClass objects via the Kubernetes API to access their parameters. Error messages include both StorageClass names and their svStorageClass parameter values for better troubleshooting. The change is backward compatible and only affects LinkedClone PVC validation in guest clusters.
RBAC changes needed - this is covered in standard package
Release note:
NONE