-
Notifications
You must be signed in to change notification settings - Fork 115
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
StatefulSet update doesn't wait for pods to initialize #3329
Comments
@daniel-wtfoxtrot can you please try the latest v4.18.3 release to see if the problem still exists there? If that doesn't fix it, please try adding a The default await logic for |
Thanks for your reply!I tried both and it unfortunately didn't help. I think we'll try to migrate to k8s Deployments instead as a workaround. |
I can confirm this issue is reproducible, indicating a bug in our Here’s where the custom logic is always applied, regardless of the annotation (specifically line 457): pulumi-kubernetes/provider/pkg/await/await.go Lines 444 to 458 in d440f53
This GH issue highlights two key work items:
|
Currently when creating or updating, custom await annotations (including `waitFor` and `skipAwait`) will be ignored for resources which have built-in await logic. This corrects the behavior by returning a boolean from `metadata.ReadyCondition` indicating whether the user specified some behavior via an annotation. If that's true then we don't use the built-in logic. We preserve the existing precedence when `PULUMI_K8S_AWAIT_ALL` is `true`. That is, we will continue to use built-in await logic (if the resource has it) by default, even when generic await is enabled. During testing I also realized we have a bug where if a JSONPath is specified pointing to a non-primitive type (like `.metadata`) it will never resolve. I fixed this to match correctly. Refs #3329 Fixes #3345
### Changed - [nodejs] Resolves `punycode` deprecation warnings by using native `fetch` instead of `node-fetch`. (#3301) ### Fixed - `pulumi.com/waitFor` and other await annotations now correctly take precedence over default await logic. (#3329) - JSONPath expressions used with the `pulumi.com/waitFor` annotation will no longer hang indefinitely if they match non-primitive fields. (#3345) - [java] CRDs that contain any `x-kubernetes-*` fields can now be succesfully created and managed by Pulumi. (#3325)
@daniel-wtfoxtrot We just released v4.18.4 of the Pulumi Kubernetes provider which fixes the logic that prevents you from using the |
What happened?
I experience strange behaviour in our Deployments, when updating StatefulSets. The initial
pulumi up
behaves as expected, everything is deployed and running fine. However when I run a subsequentpulumi up
to change the StatefulSets Pod's Image, the change of the StatefulSet is immediately considered successful, without waiting for any of the new updated Pods to start.At this point new Pods are still pending or haven't even been started, but the StatefulSet update is already considered successful.
Example
pulumi up
Output of
pulumi about
CLI
Version 3.110.0
Go Version go1.22.1
Go Compiler gc
Plugins
NAME VERSION
kubernetes 4.13.1
nodejs unknown
postgresql 3.11.1
Host
OS debian
Version 12.5
Arch x86_64
This project is written in nodejs: executable='/usr/local/bin/node' version='v20.11.0'
Current Stack: mr-fix-9004-ops-deployment-sollte-rot-sein-wenn-nicht-alle-p
Found no resources associated with mr-fix-9004-ops-deployment-sollte-rot-sein-wenn-nicht-alle-p
Found no pending operations associated with mr-fix-9004-ops-deployment-sollte-rot-sein-wenn-nicht-alle-p
Backend
Name runner-bar-project-foo-concurrent-0
URL s3://wtf-app-foo-nonprod
User root
Organizations
Token type personal
Dependencies:
NAME VERSION
@gitbeaker/node 35.8.1
@pulumi/kubernetes 4.13.1
@pulumi/postgresql 3.11.1
@pulumi/pulumi 3.121.0
ajv 8.12.0
ajv-formats 2.1.1
git-semver-tags 7.0.1
node-fetch 2.7.0
semver 7.6.2
yaml 2.4.5
zod 3.23.8
@typescript-eslint/eslint-plugin 7.0.1
@typescript-eslint/parser 7.0.1
casual 1.6.2
eslint 8.56.0
eslint-plugin-jest 28.9.0
eslint-plugin-prettier 5.1.3
fetch-mock 9.11.0
jest 29.7.0
p-limit 5.0.0
p-locate 6.0.0
prettier 3.2.5
typescript 5.3.3
Pulumi locates its logs in /tmp by default
Additional context
This behavior started after switching to pulumi-kubernetes v4. So I thought it had something to do with Server-Side apply. As a result I tried to disable SSA, but the behaviour didn't change.
I also tried adding a
startupProbe
and tried differentupdateStrategy
/minReadySeconds
configurations, but nothing helped so far.Contributing
Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).
The text was updated successfully, but these errors were encountered: