Open chrismaes87 opened 6 months ago
Hi @chrismaes87, you can try setting the field_manager
to being the containers' value, for example field_manager = each.value.container
. While this may work for this specific issue, there are some limitations here that would cause it not to work in every case. Please keep in mind that modifying resources that are outside of terraform is not encouraged and should be used only as a last resort.
I tried this, and also set force=true
but to no avail. He is managing to change the field value in some way, but not for all containers at once.
I'm also seeing the same issue. Can we get fix for this it appears that either container or init_container are mandatory
Terraform Version, Provider Version and Kubernetes Version
Affected Resource(s)
Terraform Configuration Files
Debug Output
Panic Output
Steps to Reproduce
terraform apply
works fine without errorExpected Behavior
kubectl -n kube-system get daemonset aws-node -o yaml | grep -C 1 AWS_VPC_K8S_CNI_CUSTOM_NETWORK_CFG
should give something like (value true three times)
Actual Behavior
the value is never true on all three resources. I will get something like
kubectl -n kube-system get daemonset aws-node -o yaml | grep -C 1 AWS_VPC_K8S_CNI_CUSTOM_NETWORK_CFG
it seems like kubernetes_env applies the environment variable to one container, and it gets removed from the others. I want the environment variable to be set on all containers of the daemonset.
Important Factoids
The problem is not linked to me parametrizing the three kubernetes_env resources. I have tested with three separate resources with everything hardcoded and this gave the exact same behaviour.
References
Community Note