-
Notifications
You must be signed in to change notification settings - Fork 4.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
Validate more static pods on masters #9049
Validate more static pods on masters #9049
Conversation
var masterStaticPods = []string{ | ||
"kube-apiserver", | ||
"kube-controller-manager", | ||
"kube-scheduler", |
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.
Just curious, do etcd-manager-*
startic pods get checked also?
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.
No. If the cluster uses the legacy etcd provider there won't be any etcd-manager-*
pods. Checking the cluster's spec would add a lot of complexity. I suspect the kube-apiserver pods won't be able to go into ready state without etcd pods.
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.
OK, probably not worth the trouble for now. Thanks.
/lgtm |
delete(masterWithoutManager, nodeByAddress[pod.Status.HostIP]) | ||
app := pod.GetLabels()["k8s-app"] | ||
if pod.Namespace == "kube-system" && masterWithoutPod[nodeByAddress[pod.Status.HostIP]][app] { | ||
delete(masterWithoutPod[nodeByAddress[pod.Status.HostIP]], app) |
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.
This does assume that all the pods are static pods; that's true I believe. I do wonder why we did it this way, it looks like spec.nodeName is populated on the pods when I checked.
Thanks @johngmyers - looks great. Not sure why we're not using spec.nodeName - maybe that is only populated in recent k8s versions? (Do you remember?) /approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: johngmyers, justinsb 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 |
This should cut down on cluster validation flapping.
Not testing the etcd pods as their
k8s-app
annotation depends on whether or not the cluster is configured to use etcd-manager. (It's also unlikely kube-apiserver would be ready without them.) Not testing kube-proxy pods because whether or not they're supposed to be there depends on the cluster spec.Suppressing the static pod checks on non-ready nodes to cut down on redundant failure messages.
/area rolling-update