I am trying to update a pvc label using go library's patch option from this interface.
Is there any example on how to use this? Also if the label is not there will patch also add the label?
I am looking to update/add my_label in below object:
kind: PersistentVolumeClaim
metadata:
annotations:
pv.kubernetes.io/bind-completed: "yes"
pv.kubernetes.io/bound-by-controller: "yes"
volume.beta.kubernetes.io/storage-class: ""
creationTimestamp: "2021-01-25T18:53:02Z"
finalizers:
- kubernetes.io/pvc-protection
labels:
my_label: my_value