Skip to content

additionalLabels on GCPManagedCluster not applied to GKE cluster ResourceLabels #1645

@jonathanrainer

Description

@jonathanrainer

/kind bug

What steps did you take and what happened:
GCPManagedClusterSpec.AdditionalLabels is documented as setting labels on GCP resources managed by the provider, but for GKE clusters the field is silently ignored. Neither the cluster creation path nor any reconciliation loop reads this value.

Steps:

  1. Set up a GCPManagedCluster CR and set AdditionalLabels to a map where env: prod is set
  2. Let Cluster API create the Cluster

What did you expect to happen:
The label env:prod should be attached to the cluster in GCP.

Anything else you would like to add:
This was partially addressed by #1275, which wired additionalLabels to disks and forwarding rules. However that fix was scoped to the non-managed (compute) path. The managed Kubernetes path (cloud/services/container/clusters/) was not updated.

Environment:

  • Cluster-api version: Operator (0.26.0)
  • Minikube/KIND version: N/A
  • Kubernetes version: (use kubectl version): 1.35.1
  • OS (e.g. from /etc/os-release): CoreOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions