kubernetes-sigs / vsphere-csi-driver

vSphere storage Container Storage Interface (CSI) plugin
https://docs.vmware.com/en/VMware-vSphere-Container-Storage-Plug-in/index.html
Apache License 2.0
293 stars 177 forks source link

Add Version to CnsClient and vim25 Client #2966

Closed nikhilbarge closed 1 month ago

nikhilbarge commented 1 month ago

What this PR does / why we need it: Add Version "dev.version" to CnsClient and vim25 Client. 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: Manual Testing performed

root@420e33d19796412054b9c95a707aef4f [ ~ ]# kubectl get volumesnapshot example-vanilla-rwo-filesystem-snapshot4 -n storage-policy-test
NAME                                       READYTOUSE   SOURCEPVC                 SOURCESNAPSHOTCONTENT   RESTORESIZE   SNAPSHOTCLASS                SNAPSHOTCONTENT                                    CREATIONTIME   AGE
example-vanilla-rwo-filesystem-snapshot4   true         example-vanilla-rwo-pvc                           1Gi           volumesnapshotclass-delete   snapcontent-61046bb5-2ba0-41c0-9350-106a9921507b   8m50s          7m28s
root@420e33d19796412054b9c95a707aef4f [ ~ ]#  kubectl get cnsvolumeoperationrequests.cns.vmware.com -n  vmware-system-csi  snapshot-61046bb5-2ba0-41c0-9350-106a9921507b-626443ec-791f-4c9e-a8fd-d0539539dcf9 
NAME                                                                                 AGE
snapshot-61046bb5-2ba0-41c0-9350-106a9921507b-626443ec-791f-4c9e-a8fd-d0539539dcf9   7m34s
root@420e33d19796412054b9c95a707aef4f [ ~ ]#  kubectl get cnsvolumeoperationrequests.cns.vmware.com -n  vmware-system-csi  snapshot-61046bb5-2ba0-41c0-9350-106a9921507b-626443ec-791f-4c9e-a8fd-d0539539dcf9 -o yaml
apiVersion: cns.vmware.com/v1alpha1
kind: CnsVolumeOperationRequest
metadata:
  creationTimestamp: "2024-07-22T20:37:00Z"
  generation: 2
  name: snapshot-61046bb5-2ba0-41c0-9350-106a9921507b-626443ec-791f-4c9e-a8fd-d0539539dcf9
  namespace: vmware-system-csi
  resourceVersion: "12161750"
  uid: c91d8773-caa2-4ab5-bdd9-4c1cfa1ff8e7
spec:
  name: snapshot-61046bb5-2ba0-41c0-9350-106a9921507b-626443ec-791f-4c9e-a8fd-d0539539dcf9
status:
  firstOperationDetails:
    opId: c3f4103d
    taskId: task-7483
    taskInvocationTimestamp: "2024-07-22T20:37:00Z"
    taskStatus: Success
  latestOperationDetails:
  - opId: c3f4103d
    taskId: task-7483
    taskInvocationTimestamp: "2024-07-22T20:37:00Z"
    taskStatus: Success
  quotaDetails:
    aggregatedsnapshotsize: "103"
    namespace: storage-policy-test
    reserved: 1Gi
    snapshotlatestoperationcompletetime: "2024-07-22T20:35:37Z"
    storageClassName: wcp-profile-c6rt9t0cli
    storagePolicyId: 43333687-ec93-4e67-a5bc-5fa84c4f3f9b
  snapshotID: f505c93c-227c-4613-84c4-52df67ac82d8
  volumeID: 626443ec-791f-4c9e-a8fd-d0539539dcf9
root@420e33d19796412054b9c95a707aef4f [ ~ ]# kubectl get cnsvolumeinfo 626443ec-791f-4c9e-a8fd-d0539539dcf9  -n vmware-system-csi -o yaml
apiVersion: cns.vmware.com/v1alpha1
kind: CNSVolumeInfo
metadata:
  creationTimestamp: "2024-07-11T19:34:59Z"
  generation: 18
  name: 626443ec-791f-4c9e-a8fd-d0539539dcf9
  namespace: vmware-system-csi
  resourceVersion: "12161751"
  uid: 7dc38861-16c1-4f90-b422-3370a15d6af6
spec:
  aggregatedsnapshotsize: 103
  capacity: 1Gi
  namespace: storage-policy-test
  snapshotlatestoperationcompletetime: "2024-07-22T20:35:37Z"
  storageClassName: wcp-profile-c6rt9t0cli
  storagePolicyID: 43333687-ec93-4e67-a5bc-5fa84c4f3f9b
  vCenterServer: sc1-10-78-163-98.eng.vmware.com
  validaggregatedsnapshotsize: true
  volumeID: 626443ec-791f-4c9e-a8fd-d0539539dcf9

Create and Delete Snapshot log: create_snapshot_with_cns_version.log

Special notes for your reviewer:

Release note:

Add Version "dev.version" to CnsClient and vim25 Client.
k8s-ci-robot commented 1 month ago

Hi @nikhilbarge. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
deepakkinni commented 1 month ago

/ok-to-test

deepakkinni commented 1 month ago

/approve

xing-yang commented 1 month ago

/lgtm /approve

k8s-ci-robot commented 1 month ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 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: - ~~[OWNERS](https://github.com/kubernetes-sigs/vsphere-csi-driver/blob/master/OWNERS)~~ [deepakkinni,xing-yang] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment