-
Notifications
You must be signed in to change notification settings - Fork 160
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
Tests are run prematurely, before services start working. #873
Comments
I would think such an implementation would need to be added on the chart side, as part of the actual testing logic. As this problem is not unique to the controller itself, but would also happen when you run a |
As I read on the Chart Tests website, I must wait for all pods to become active before run tests. In a situation where we are talking about declarative application of Helm Charts then the controller should do the waiting. I read the help for the
Sounds promising, and so I add these parameter to the $ helm install podinfo oci://ghcr.io/stefanprodan/charts/podinfo --version 6.5.4 --set probes.startup.enable=true --wait --wait-for-jobs && helm test podinfo
Pulled: ghcr.io/stefanprodan/charts/podinfo:6.5.4
Digest: sha256:a961643aa644f24d66ad05af2cdc8dcf2e349947921c3791fc3b7883f6b1777f
NAME: podinfo
LAST DEPLOYED: Wed Jan 24 19:56:28 2024
NAMESPACE: default
STATUS: deployed
REVISION: 1
NOTES:
1. Get the application URL by running these commands:
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl -n default port-forward deploy/podinfo 8080:9898
NAME: podinfo
LAST DEPLOYED: Wed Jan 24 19:56:28 2024
NAMESPACE: default
STATUS: deployed
REVISION: 1
TEST SUITE: podinfo-grpc-test-ibama
Last Started: Wed Jan 24 19:56:29 2024
Last Completed: Wed Jan 24 19:56:33 2024
Phase: Failed
NOTES:
1. Get the application URL by running these commands:
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl -n default port-forward deploy/podinfo 8080:9898
Error: 1 error occurred:
* pod podinfo-grpc-test-ibama failed Well, and unfortunately the effect is the same. The tests were run before the application Pods reported ready to receive traffic. I think it is simply a problem with the |
You need to set replicas 2, Helm has bug where it doesn’t wait for a single pod to be ready. |
@stefanprodan This bug you write about is reported somewhere? Is anyone fixing it? Actually increasing the replicas to 2 caused Helm to wait until Pod was ready. Thanks! Thus, the |
It's somewhere in the Helm repo, reported several years ago. |
Hello,
Consider the following k8s manifests, please:
Unfortunately, the installation of podinfo in such a configuration is not successful, because the tests run even before Pod reports that it is ready to handle requests.
In the helm controller logs you can read:
The state of Pods in the namespace is:
Logs from Pod
podinfo-grpc-test-7mwyr
:Could you put in place an implementation such that it only starts testing when all services report that they are ready to handle traffic?
Regards
Piotr Minkina
The text was updated successfully, but these errors were encountered: