Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Beta clusters don't automatically enable Workload Identity #490

Closed
schostin opened this issue Apr 16, 2020 · 4 comments · Fixed by #512
Closed

Beta clusters don't automatically enable Workload Identity #490

schostin opened this issue Apr 16, 2020 · 4 comments · Fixed by #512
Labels
bug Something isn't working P2 high priority issues triaged Scoped and ready for work

Comments

@schostin
Copy link
Contributor

When using a beta private cluster in version 8.1.0 identity namespace gets enabled by default, but not workload identity.

We delete the default node-pool after creation and use a node pool with the following basic settings:

node_pools = [
    {
      name         = "main"
      node_count   = 2
      image_type   = "COS_CONTAINERD"
      min_count    = 2
      max_count    = 4
      machine_type = "n1-standard-8"
    }
  ]

When looking at the GCloud UI, we can see, that identity namespace for the cluster is set. Looking at the node pool we can see, that Security -> Enable GKE Metadata Server is not enabled (which is required for Workload Identity).

Looking at the code it seems like we have to set node_metadata = "GKE_METADATA_SERVER" on the module on our own to enable that feature.

Since beta cluster should enable Identity Workload as default, this should also be the default for node_metadata. Also happing to issue a PR if you guys say that this is really a bug that I encounter :)

@morgante
Copy link
Contributor

Good point. I think we can change the node pool default to GKE_METADATA_SERVER if workload identity is enabled.

@morgante morgante added bug Something isn't working P2 high priority issues triaged Scoped and ready for work labels Apr 16, 2020
@bharathkkb
Copy link
Member

@sebastianneb Happy to review the PR if you are working on this.

@schostin
Copy link
Contributor Author

schostin commented Apr 29, 2020

Just got the tests working on my machine and will quickly adapt those tomorrow and issue a PR here.

morgante pushed a commit that referenced this issue May 6, 2020
…usters (#490) (#512)

BREAKING CHANGE: Beta clusters have changed the default to use the GKE_METADATA_SERVER, to use the old option set `node_metadata = "SECURE"`.
@TrevorRashid
Copy link

Great remark

CPL-markus pushed a commit to WALTER-GROUP/terraform-google-kubernetes-engine that referenced this issue Jul 15, 2024
…usters (terraform-google-modules#490) (terraform-google-modules#512)

BREAKING CHANGE: Beta clusters have changed the default to use the GKE_METADATA_SERVER, to use the old option set `node_metadata = "SECURE"`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P2 high priority issues triaged Scoped and ready for work
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants