external-provisioner icon indicating copy to clipboard operation
external-provisioner copied to clipboard

Add option --extra-create-metadata-prefix

Open nagius opened this issue 1 year ago • 12 comments

What type of PR is this? /kind feature

What this PR does / why we need it: This PR add the flag --extra-create-metadata-prefix <string> to the command line. This flag allows to select PVC annotations starting with and add them as parameter to the create request. This way we can set arbitrary information in a StatefulSet volumeClaimTemplate that will be available to the driver for each associated PV.

Example, with the flag set to --extra-create-metadata-prefix="csi.my.company.com" :

apiVersion: apps/v1
kind: StatefulSet
spec:
[...]
  volumeClaimTemplates:
  - metadata:
      name: myVolume
      annotations:
        csi.my.company.com/some_id: "1234"
        csi.my.company.com/context: "some data"

Both annotations starting with csi.my.company.com will be added as parameter to the volume request and can be use by the driver.

Which issue(s) this PR fixes:

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

Add flag --extra-create-metadata-prefix

nagius avatar Jul 05 '24 14:07 nagius