feat: --copy-labels and GCP support
This PR introduces two new features:
- Support for Google Cloud Platform (GCP). Set with
-cloud gcp. AWS (-cloud aws) is the default if not specified. - New
-copy-labelsflag. When used, this flag will copy the specified labels (optionally all labels with'*') from the PVC to the cloud disk volume.
GCP labels have a different set of constraints than k8s labels and AWS tags. The biggest difference is that . and / are not allowed, so a k8s label like app.kubernetes.io/name will be converted to app-kubernetes-io_name when applied to a GCP PD volume.
Also some small refactors:
- Converted provisioner magic strings like
ebs.csi.aws.comto constants likeAWS_EBS_CSI - opportunistically converted some if/else blocks to switch statements
Thanks for the contribution! I'm swamped this afternoon but I'll take a look this weekend.
@mtougeron no problem at all. We realize it might be kind of a lot in a single PR.
still todo: I will try to update the readme soon with more info on the GCP iam that is needed.
EDIT: added GCP IAM info to readme and ./examples dir
sorry, had some family issues come up over the weekend, nothing major, but it did keep me from being able to review this.
@mtougeron I think I covered everything. LMK if there's more to address! tnx
I cut the new image release but I got pulled into things today. I'll try and get the chart updates done during my lunch break as well but it might not be until tomorrow morning.