-
Notifications
You must be signed in to change notification settings - Fork 222
Description
/kind bug
Both the GCPClusterSpec and GCPMachineSpec have AdditionalLabels fields to add user-defined labels to the resources
// AdditionalLabels is an optional set of tags to add to GCP resources managed by the GCP provider, in addition to the
// ones added by default.
// +optional
AdditionalLabels Labels `json:"additionalLabels,omitempty"
We can see these labels being added to an instance here:
https://github.com/bfournie/cluster-api-provider-gcp/blob/main/cloud/scope/machine.go#L398
However other resources also take the Labels and this field is not being set, for example Disks, ForwardingRules, Addresses etc. (see https://raw.githubusercontent.com/googleapis/google-api-go-client/main/compute/v1/compute-gen.go)
What did you expect to happen:
The Labels field should be populated from AdditionalLabels for resources that have this field.
Anything else you would like to add:
Doing a openshift install using the capg-provider with the AdditionalLabels input set in the GCPCluster
Results in the instances getting the label
$ gcloud compute instances describe <instance-name>
...
labels:
foo: bar
But no other resources get this label.
Environment:
Openshift 4.16 using capg provider.