-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Initial prototype for pod health check hook up #4223
Conversation
For me when I have the wrong image in the pod spec "waiting to start, image can't be pulled" is not appearing just "creating container xyz":
And then it times out. |
Sorry, just saw this now. I was able to see the error you mentioned, Let me rebase this branch from master and report back. |
Codecov Report
|
@balopat the commit 139bef9 ensures deployments status changed when pod statuses change.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gave it a try with the cloud-code-samples, and although I think we can tweak some things, it's looking good!
Waiting for deployments to stabilize...
- deployment/java-guestbook-backend: waiting for rollout to finish: 0 of 1 updated replicas are available...
- pod/java-guestbook-backend-5df8f495b-tcql8: container init-db-ready in error:
- deployment/java-guestbook-frontend: waiting for rollout to finish: 0 of 1 updated replicas are available...
- pod/java-guestbook-frontend-ffd5d6495-fkmq9: creating container frontend
- deployment/java-guestbook-mongodb: waiting for rollout to finish: 0 of 1 updated replicas are available...
- pod/java-guestbook-mongodb-868948f9bb-gbbzp: creating container mongo
- deployment/java-guestbook-frontend is ready. [2/3 deployment(s) still pending]
- deployment/java-guestbook-mongodb is ready. [1/3 deployment(s) still pending]
- deployment/java-guestbook-backend: waiting for rollout to finish: 0 of 1 updated replicas are available...
- pod/java-guestbook-backend-5df8f495b-tcql8: container init-db-ready terminated with exit code 0
- deployment/java-guestbook-backend is ready.
Deployments stabilized in 31.796627999s
@@ -105,12 +105,12 @@ func (d *Deployment) CheckStatus(ctx context.Context, runCtx *runcontext.RunCont | |||
} | |||
|
|||
details := d.cleanupStatus(string(b)) | |||
d.UpdateStatus(details, err) | |||
|
|||
err = parseKubectlRolloutError(err) | |||
if err == errKubectlKilled { | |||
err = fmt.Errorf("received Ctrl-C or deployments could not stabilize within %v: %w", d.deadline, err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice to be able to separate these conditions.
Fixes: #nnn
Related: Relevant tracking issues, for context
Merge before/after: Dependent or prerequisite PRs
Description
This is first iteration of hooking up pod health check with skaffold. With this change,
depoyment.CheckStatus
will query for pods using the label defined indeployment.Template.Labels
.deployment.LastReportedStatus
will now print deployment and pod statuses.Some of these changes are already broken in smaller PR
diag
improvements #4219Still a couple of opportunities to make this smaller. ( will follow up)
Please review them the output.
User facing changes (remove if N/A)
yes.
Add event stream!
Follow-up Work (remove if N/A)