-
Notifications
You must be signed in to change notification settings - Fork 959
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
Daemonset wait_for_rollout does not appear to have any impact. #2092
Comments
I noticed the same problem. My current workaround is to use a manifest instead and define the wait block with The problem with that approach is that you need permissions to list custom resource definitions. I hope either the necessity for CRDs in the manifest or the bug with the wait_for_rollout get fixed soon. For reference of the manaifest CRD permissions: |
Hello, thank you for opening this issue @matthi-g. Could you provide us with a tfconfig that reproduces this issue? |
Hi @BBBmau, The second version does the same thing but instead makes use of the manifest resource: Creation of the daemonset_v1 finishes after 0s but observing the state of the created pods on the k8s node indicates that the pods are not up and in running state. The creation of manifest finishes after 28 s (depends on the used images and bandwidth) and this seems to line up with the state of the pods. |
@BBBmau I don't have an example on hand, but as noted above daemonsets complete instantly and don't wait for the nodes to be ready. Without diving into the code to see how the check is supposed to be happening, my guess is that the Daemonset check is not validating that the number pod pods running is equal to the number of current nodes rather than checking if the cluster is simply ready to deploy the pods to any node that comes online. |
@BBBmau I confirm, the issue is valid and still present. Here is a short reproducer:
Initial apply is instant:
Any further change is applied instantly, without waiting for the DS to rollout new pods.
|
I have identified the issue and trying to prepare a fix #2419 - need to test the fix yet. |
This fix ensures the resource correctly waits for the DaemonSet rollout by using similar logic than the kubernetes_deployment. Additionally, waitForDaemonSetReplicasFunc is renamed to waitForDaemonSetPodsFunc to correctly describe the operation (there are no replicas in a DaemonSet).
This fix ensures the resource correctly waits for the DaemonSet rollout by using similar logic than the kubernetes_deployment. Additionally, waitForDaemonSetReplicasFunc is renamed to waitForDaemonSetPodsFunc to correctly describe the operation (there are no replicas in a DaemonSet).
This fix ensures the resource correctly waits for the DaemonSet rollout by using similar logic than the kubernetes_deployment. Additionally, waitForDaemonSetReplicasFunc is renamed to waitForDaemonSetPodsFunc to correctly describe the operation (there are no replicas in a DaemonSet).
This fix ensures the resource correctly waits for the DaemonSet rollout by using similar logic than the kubernetes_deployment. Additionally, waitForDaemonSetReplicasFunc is renamed to waitForDaemonSetPodsFunc to correctly describe the operation (there are no replicas in a DaemonSet).
This fix ensures the resource correctly waits for the DaemonSet rollout by using similar logic than the kubernetes_deployment. Additionally, waitForDaemonSetReplicasFunc is renamed to waitForDaemonSetPodsFunc to correctly describe the operation (there are no replicas in a DaemonSet).
This fix ensures the resource correctly waits for the DaemonSet rollout by using similar logic than the kubernetes_deployment. Additionally, waitForDaemonSetReplicasFunc is renamed to waitForDaemonSetPodsFunc to correctly describe the operation (there are no replicas in a DaemonSet).
I have meanwhile tested the PR, updated acceptance tests and the PR is from my POV ready. Could you please have a look @BBBmau? Though, the fix is going to break many existing TF configs as the ineffective |
This fix ensures the resource correctly waits for the DaemonSet rollout by using similar logic than the kubernetes_deployment. Additionally, waitForDaemonSetReplicasFunc is renamed to waitForDaemonSetPodsFunc to correctly describe the operation (there are no replicas in a DaemonSet).
This fix ensures the resource correctly waits for the DaemonSet rollout by using similar logic than the kubernetes_deployment. Additionally, waitForDaemonSetReplicasFunc is renamed to waitForDaemonSetPodsFunc to correctly describe the operation (there are no replicas in a DaemonSet).
Terraform Version, Provider Version and Kubernetes Version
Affected Resource(s)
Steps to Reproduce
terraform apply
Expected Behavior
What should have happened?
A kubernetes_daemonset should wait on creation/update until the pods are ready before allowing terraform to procede
Actual Behavior
What actually happened?
Create/Update is instant and terraform moves on to any dependent resources without waiting.
Important Factoids
References
These issues:
#919
#1053
And this documentation:
https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/daemonset#wait_for_rollout
All indicate that kubernetes_daemonset wait_for_rollout should do something.
Community Note
The text was updated successfully, but these errors were encountered: