kptdev / kpt

Automate Kubernetes Configuration Editing
https://kpt.dev
Apache License 2.0
1.67k stars 226 forks source link

New function: set-gcp-location #2658

Open morgante opened 2 years ago

morgante commented 2 years ago

Describe your problem

Provide a function for setting GCP regions/zones across all known KCC resources.

bgrant0607 commented 2 years ago

Example: https://github.com/GoogleCloudPlatform/blueprints/blob/main/catalog/anthos-cluster/gke/cluster/cluster.yaml#L53

We might be able to get away with duck typing (path within resource) or field name convention ("location"), but if not we may need to enumerate the fields similar to kustomize (e.g., https://github.com/kubernetes-sigs/kustomize/blob/master/api/konfig/builtinpluginconsts/images.go) until we can properly annotate the OpenAPI resource schemas with identifying field tags.