You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Overriding the default tolerationSeconds value for the pods of any given Deployment is totally valid necessity
and should be a supported scenario by this provider IMO.
By not properly supporting this we get into this "perpetual diff" situation for a resource/object configuration that's completely acceptable within Kubernetes.
Terraform Version, Provider Version and Kubernetes Version
Add a toleration inside spec.template.spec on your kubernetes_deployment resource. Using as key one of k8s "node.kubernetes.io/*" taints (e.g: "node.kubernetes.io/unreachable").
terraform apply
terraform plan (after the successful apply)
Expected Behavior
What should have happened?
The terraform plan should not show any changes to be performed after a successful apply has executed.
Actual Behavior
What actually happened?
The terraform plan keeps showing tolerations as required to be added to the deployment:
A similar issue was raised in the past (1) and got a fix (2), but it only addressed node.kubernetes.io prefixed toleration keys that are not part of the well-known node taints.
I believe it should be supported to properly manage any toleration key at the Deployment resource (I understand Pod may need to be left as is).
Actually, a fair point about this was already made here: #955 (comment).
Also, (3) seems to propose a fair attempt at sorting this, but appears to have become stale and eventually (auto-)closed. I think we should recover this.
Thank you for raising this issue. I think it makes sense to strip well-known tolerations only when we flatten a pod object spec, in all other cases, when it is a template, we could keep them. The same approach we use for labels and annotations. You are right, it looks like #1012 introduced a similar fix but for whatever reason didn't get much attention. I will raise this proposal during our next triage session and let you know about the decision here.
Overriding the default
tolerationSeconds
value for the pods of any given Deployment is totally valid necessityand should be a supported scenario by this provider IMO.
By not properly supporting this we get into this "perpetual diff" situation for a resource/object configuration that's completely acceptable within Kubernetes.
Terraform Version, Provider Version and Kubernetes Version
Affected Resource(s)
Steps to Reproduce
spec.template.spec
on yourkubernetes_deployment
resource. Using as key one of k8s"node.kubernetes.io/*"
taints (e.g:"node.kubernetes.io/unreachable"
).Expected Behavior
What should have happened?
The terraform plan should not show any changes to be performed after a successful apply has executed.
Actual Behavior
What actually happened?
The terraform plan keeps showing tolerations as required to be added to the deployment:
Important Factoids
A similar issue was raised in the past (1) and got a fix (2), but it only addressed
node.kubernetes.io
prefixed toleration keys that are not part of the well-known node taints.I believe it should be supported to properly manage any toleration key at the Deployment resource (I understand Pod may need to be left as is).
Actually, a fair point about this was already made here: #955 (comment).
Also, (3) seems to propose a fair attempt at sorting this, but appears to have become stale and eventually (auto-)closed. I think we should recover this.
References
Community Note
The text was updated successfully, but these errors were encountered: