Please list the resources as a list, for example:
Terraform v0.12.8
+ provider.aws v2.35.0
+ provider.kubernetes v1.10.0
What should have happened?
There was a kubernetes_deployment resource applied on 1.9.0 of the provider. It had been using the default namespace for the deployment pod template. When reapplying the resource on 1.10.0, there should have been an update on the resource to remove this namespace value.
What actually happened?
The resource (kubernetes deployment) had to be destroyed and recreated entirely.
Please list the steps required to reproduce the issue, for example:
default value in the Terraform plan.Are there any other GitHub issues (open or closed) or Pull Requests that should be linked here? For example:
- namespace = "default" -> null # forces replacement
for plans using 1.10.0 on resources that had been applied on 1.9.0 that did not set a namespace for the template.
Yeah, sorry about that.
It was already reported in a comment on the PR: https://github.com/terraform-providers/terraform-provider-kubernetes/pull/275#issuecomment-552588625
Thanks for opening the issue to track this.
You should be able to work it around by specifying the default namespace in the configuration.
Edit: fixed the typo on namespace.
You should be able to work it around by specifying the
defautnamespace in the configuration.
That's default in case it's not clear to somebody.
As mentioned in the PR, another way to work around this is to remove the default namespace by editing your deployments with kubectl. For example:
kubectl -n your-namespace edit deployment yourdeployment
and simply remove the line in spec.template.metadata which says namespace: default.
WARNING: This will replace the pods for each of the edited deployments
If that's unacceptable for you, then follow the previous workaround.
just to verify, we experienced this recently because we had some leftover 1.9.0's in caches. Once everything is on 1.10.0, and all of the deployments have that namespace removed, things are clean.
I'm going to lock this issue because it has been closed for _30 days_ ⏳. This helps our maintainers find and focus on the active issues.
If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!