kubernetes-sigs/gcp-compute-persistent-disk-csi-driver

Support to add ResoureManagerTags to GCP Compute Disk, Image, Snapshot resources

bharath-b-rh opened this issue · 6 comments

/kind feature

GCP Tags are key-value pairs that are bind to the GCP resources. Unlike currently supported labels, tags are not part of the resource metadata but resource in itself. Tag Keys, Values, Bindings are all discreet resources. Tags are used for defining IAM policy conditions, Organization conditionals policies and integrating with Cloud billing for cost management, which are not supported by labels.

Describe the solution you'd like
Able to define the list of resource tags to add to the compute persistent disk resources created by the driver.

Anything else you would like to add:
Currently tag resources tag keys and tag values can only be created at Organization and Project level with the required permissions. Tag keys and Tag Values will be created by the user and only the Tag bindings to the compute pd resources to be created by the driver and would require(propose) below changes

  1. Driver to accept new argument(--extra-tags) for the list of tags, where tags would be provided as CSV of the form <parent_id>/<key1>/<value1>,...,<parent_id>/<keyN>/<valueN>, where
    parent_id : Organization or the Project ID where tag key and tag value resource exists.
    key : Tag key short name
    value : Tag value short name
    N : A maximum of 50 tags bindings is allowed for a resource.

  2. Below resources created by the driver requires to be updated with tags

  • Compute Disks
  • Compute Images
  • Compute Snapshots

Reference Links:

@arkadeepsen @bharath-b-rh
/cc @msau42

Do we think that adding driver command line flags is the right way to go? Those tend to be hard to configure as they're typically set with cluster setup. Would storage class parameters work better, as we also have for labels?

We've found that the command line flags are harder to maintain as well as they're not used in GKE.

@arkadeepsen @bharath-b-rh /cc @msau42

Do we think that adding driver command line flags is the right way to go? Those tend to be hard to configure as they're typically set with cluster setup. Would storage class parameters work better, as we also have for labels?

We've found that the command line flags are harder to maintain as well as they're not used in GKE.

@mattcary Yes, the implementation will have the provision for user to configure the required tags both as command line argument and as a parameter in StorageClass, same as labels. Command line option is helpful in the scenario, where the framework installing the driver has a common set of tags provided by the user for all the resources created by it and user can also add any specific or additional tags for GCP storage resources created by driver using the StorageClass resource object.
Please let me know your thoughts.

@mattcary Could you please help me with the PR reviews.

@mattcary Could you please help me with a tentative date when this and kubernetes-sigs/gcp-filestore-csi-driver#567, kubernetes-sigs/gcp-filestore-csi-driver#639 issues can be reviewed. Thank you!

cc: @msau42 @saad-ali