-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
workload identity existing sa iam.gke.io/gcp-service-account overwrite #555
Comments
If you remove annotations from the Terraform config will it attempt to overwrite them? I'm inclined to go with option #1 as one of the primary use-cases for /cc @bharathkkb |
Do you mean remove annotations from the resource "kubernetes_service_account" block? If I don't provide annotations, it will run fine, there is nothing to overwrite so it will just insert, but will result in lifecycle changes in subsequent runs where it will delete the annotation added by annotate-sa. I guess for Option #1 it could work without manually adding lifecycle ignore if the |
I am also leaning towards option #1. The WI module is responsible for creating the GSA ( Also @morgante we don't seem to be using the |
Yeah we should probably use it. |
cool, will submit a PR |
Following the documented approach to use existing sa would result in an error
Output: error: --overwrite is false but found the following declared annotation(s): 'iam.gke.io/gcp-service-account' already has a value
I can see two options to fix this:
I would prefer 2. approach to keep user defined terraform files clean
kubectl version: v1.18.2
cluster version: v1.16.8-gke.15
The text was updated successfully, but these errors were encountered: