I want to read & parse Volumesnapshot object (or any K8s object) in go. I tried to take reference from https://github.com/kubernetes/client-go .
I am trying to add custom annotations in VolumeSnapshot CRD metadata as
apiVersion: snapshot.storage.k8s.io/v1beta1
kind: VolumeSnapshot
metadata:
name: new-snapshot-test
**annotation:**
**test:Tushar**
spec:
volumeSnapshotClassName: csi-hostpath-snapclass
source:
persistentVolumeClaimName: pvc-test
I also have a custom CSI driver. I need my CSI driver to look for that volumneSnapshot in K8s api server and parse this custom annotation and then process accordingly.