-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
🌱 Add conditions to the KubeadmControlPlane object #3139
🌱 Add conditions to the KubeadmControlPlane object #3139
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: fabriziopandini 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 |
99892c6
to
e0a8e4e
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.
It might be good to also add a condition for ControlPlaneAvailable
or APIServerAvailable
that could be determined in a couple of different ways:
- Is there a control plane endpoint defined, if so, does /healthz/ready look good
- Do we have enough Machines that are stating they are Ready to provide quorum for etcd
I'm also wondering if it would make sense to track other subsets of health as conditions:
- external etcd (future)
- is it available?
- possibly some type of naive health check (is it writeable, maybe)
- stacked etcd:
- is it available
- does it have quorum
- is it degraded in any way (missing members, individual members belong to the same cluster, etc)
- api server health
- controllers health
- other resources we manage
- coredns deployed at correct version
- kubeproxy deployed at correct version
- ???
ecd7ac3
to
910f46d
Compare
/lgtm /hold |
/milestone v0.3.7 |
@@ -69,6 +70,7 @@ func (r *KubeadmControlPlaneReconciler) updateStatus(ctx context.Context, kcp *c | |||
// This only gets initialized once and does not change if the kubeadm config map goes away. | |||
if status.HasKubeadmConfig { | |||
kcp.Status.Initialized = true | |||
conditions.MarkTrue(kcp, controlplanev1.AvailableCondition) |
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.
I'm not sure we should tie AvailableCondition
to whether there is a kubeadmconfig. Should this check the /healthz/ready
endpoint for the apiserver instead?
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.
Both? :)
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.
Both definitely doesn't hurt :)
Wrong vince, @fabriziopandini . I think I get keep getting summoned here and I'd really prefer you stop it. |
@fabriziopandini linter doesn't appear happy, otherwise lgtm, especially since I can't think of better naming for the Resized condition. |
/test pull-cluster-api-test |
/lgtm |
shashed |
3733aeb
to
74f2b4f
Compare
/lgtm |
Unholding in a bit, wanted to get #3210 merged first, which should reduce the overall test running time |
/hold cancel |
@fabriziopandini: The following tests failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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. I understand the commands that are listed here. |
/test pull-cluster-api-test |
What this PR does / why we need it:
This PR adds conditions to the KubeadmControlPlane object
Which issue(s) this PR fixes:
Fixes #3137