-
Notifications
You must be signed in to change notification settings - Fork 46
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
some annotations are being re-applied on every terraform run #72
Comments
I've run into this with an AWS LoadBalancer service and the annotation that makes it an internal load balancer. Narrowed it down to a function that filters out any keys that contain kubernetes/structures.go:165-175 func isInternalKey(annotationKey string) bool {
u, err := url.Parse("//" + annotationKey)
if err == nil && strings.Contains(u.Hostname(), "kubernetes.io") {
log.Printf("[DEBUG] %s is internal key", annotationKey)
return true
} else if strings.Contains(annotationKey, "deprecated.daemonset.template.generation") {
return true
}
return false
} The path I took to get to that function:
The annotation I'm experiencing this with is: annotations {
"service.beta.kubernetes.io/aws-load-balancer-internal" = "0.0.0.0/0"
} My plan output:
Output of metadata:
annotations:
service.beta.kubernetes.io/aws-load-balancer-internal: 0.0.0.0/0 and finally the line from the TRACE:
|
The official provider has a "workaround" for this. It would require manually editing the provider and rebuilding it. |
Kubernetes also recommends a standard set of labels, all of which container |
Thank you! |
Thanks for releasing this provider! It has saved me a lot of effort, being able to use these newer resources with terraform.
Terraform Version
Run
terraform -v
to show the version. If you are not running the latest version of Terraform, please upgrade because your issue may have already been fixed.Terraform v0.11.9
My kubernetes clusters are running in GKE:
Affected Resource(s)
Please list the resources as a list, for example:
Terraform Configuration Files
I have several terraform modules, each of which defines a
kubernetes_stateful_set
with a few annotations, like so:Debug Output
With TF_LOG=DEBUG, I can see the annotations included here:
Expected Behavior
What should have happened?
An empty plan (because all three annotations already exist on the target resource)
Actual Behavior
What actually happened?
Even if I apply the (noop) change, it still appears the next time I run terraform. Note that the
prometheus.io/
annotations seem to work as expected, but thekubernetes.io/egress-bandwidth
annotations all have this issue.Steps to Reproduce
terraform plan
The text was updated successfully, but these errors were encountered: