-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
fix: quit minikube service when there is no available pods #15079
Conversation
Hi @ComradeProgrammer. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Can one of the admins verify this patch? |
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.
@ComradeProgrammer
When there is a deployment has created these Pods
, restartPolicy
of the Deployment
set to Always
so the pod.Status.Phase
would return Running
, even in the case of there is a problem with Pod
and it would still give URL and try to open web-browser.
So maybe checking the ContainerStatuses
and readiness state might be helpful?
for _, containerStatus := range pod.Status.ContainerStatuses {
if containerStatus.Ready == true {
return nil
}
}
b8a86dc
to
fb7698d
Compare
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.
thanks for the PR, do u mind putting the before/after this PR in the description ?
before/after has been added |
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.
Could a test be added to ensure this is working
fb7698d
to
f5cf3ba
Compare
Thanks for the review, a test has been added, and I've run locally. it works |
/ok-to-test |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@ComradeProgrammer It looks like the tests are failing |
f5cf3ba
to
75636b9
Compare
I think this time it will work. Sorry, silly bug. I forgot to write code to start minikube at the beginning of the test. Last time when I ran test locally before, I had a running cluster, that's why nothing wrong happened locally but test failed on the runner. |
@ComradeProgrammer Could you run |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
69d1127
to
19a7f4e
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
19a7f4e
to
7a263c1
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
7a263c1
to
479fc51
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
479fc51
to
7808b1c
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Co-authored-by: Steven Powell <44844360+spowelljr@users.noreply.github.com>
kvm2 driver with docker runtime
Times for minikube ingress: 30.5s 29.4s 30.3s 29.0s 29.5s Times for minikube start: 53.4s 54.1s 53.5s 54.7s 53.7s docker driver with docker runtime
Times for minikube start: 27.5s 23.2s 26.9s 26.2s 25.9s Times for minikube ingress: 21.0s 21.0s 21.0s 21.0s 21.0s docker driver with containerd runtime
Times for minikube ingress: 47.5s 20.0s 31.0s 31.0s 30.5s Times for minikube (PR 15079) start: 25.4s 23.6s 21.7s 24.9s 25.1s |
These are the flake rates of all failed tests.
To see the flake rates of all tests by environment, click here. |
Co-authored-by: Steven Powell <44844360+spowelljr@users.noreply.github.com>
Co-authored-by: Steven Powell <44844360+spowelljr@users.noreply.github.com>
Co-authored-by: Steven Powell <44844360+spowelljr@users.noreply.github.com>
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.
PR looks good, thanks!
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ComradeProgrammer, spowelljr The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
fixes #14592
When we try to run a deployment who is using a container which crashes immediately(thus no pods will be available), and then try to use minikube service to open a tunnel for it
Before:
service will be exposed, although it cannot be visited.
After
Now if the service has no running pods, output will be like this