Automatic GKE K8s cloud name is invalid and unable to be used

Bug #1983434 reported by Ben Hoyt
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Canonical Juju
Triaged
Medium
Unassigned

Bug Description

When setting up a GKE cluster for use with Juju, it appears with an invalid cloud name that's unable to be used. For example, the automatic cloud name for a cluster I just set up is:

gke_gothic-list-89514_us-central1-c_cluster-1

And the error you get when bootstrapping is:

ERROR registering juju admin service account for cloud "gke_gothic-list-89514_us-central1-c_cluster-1": ensuring service account "juju-credential-gke_gothic-list-89514_us-central1-c_cluster-1" in namespace "kube-system": ServiceAccount "juju-credential-gke_gothic-list-89514_us-central1-c_cluster-1" is invalid: metadata.name: Invalid value: "juju-credential-gke_gothic-list-89514_us-central1-c_cluster-1": a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')

So I believe the problem with the automatic name is that is has underscores in it.

It's not hard to work around this by adding a new cloud connected to the same cluster with add-k8s (eg: "juju add-k8s --gke mygke"), but it would be nice if the automatic cloud name was actually usable.

Changed in juju:
milestone: none → 2.9.34
status: New → Triaged
importance: Undecided → Medium
Changed in juju:
milestone: 2.9.34 → 2.9.35
Changed in juju:
milestone: 2.9.35 → 2.9.36
Changed in juju:
milestone: 2.9.36 → 2.9.37
Changed in juju:
milestone: 2.9.37 → 2.9.38
Changed in juju:
milestone: 2.9.38 → 2.9.39
Changed in juju:
milestone: 2.9.39 → 2.9.40
Changed in juju:
milestone: 2.9.40 → 2.9.41
Changed in juju:
milestone: 2.9.41 → 2.9.42
Changed in juju:
milestone: 2.9.42 → 2.9.43
Changed in juju:
milestone: 2.9.43 → 2.9.44
Changed in juju:
milestone: 2.9.44 → 2.9.45
Changed in juju:
milestone: 2.9.45 → 2.9.46
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.