v1beta2: Improve kmc status report by adding conditions#1365
Open
apedriza wants to merge 3 commits intok0sproject:v1beta2-api-versionfrom
Open
v1beta2: Improve kmc status report by adding conditions#1365apedriza wants to merge 3 commits intok0sproject:v1beta2-api-versionfrom
apedriza wants to merge 3 commits intok0sproject:v1beta2-api-versionfrom
Conversation
1bbcec8 to
9e672ba
Compare
9e672ba to
596592c
Compare
96078d0 to
8c75d2d
Compare
b694e6b to
d1db9d8
Compare
d8b1823 to
bff3973
Compare
53d87bd to
ec5af7c
Compare
56b31c8 to
ebdf2ec
Compare
ebdf2ec to
1e79430
Compare
7b8da8a to
2725e5a
Compare
* v1beta2. wip Signed-off-by: Alexey Makhov <amakhov@mirantis.com> Signed-off-by: makhov <amakhov@mirantis.com> * v1beta2. controlplane api. wip Signed-off-by: Alexey Makhov <amakhov@mirantis.com> Signed-off-by: makhov <amakhov@mirantis.com> * v1beta2. controlplane api. wip Signed-off-by: Alexey Makhov <amakhov@mirantis.com> Signed-off-by: makhov <amakhov@mirantis.com> * v1beta2. linter fixes Signed-off-by: Alexey Makhov <amakhov@mirantis.com> Signed-off-by: makhov <amakhov@mirantis.com> * v1beta2 contracts Signed-off-by: Alexey Makhov <amakhov@mirantis.com> Signed-off-by: makhov <amakhov@mirantis.com> * v1beta2 contracts. printcolumns Signed-off-by: Alexey Makhov <amakhov@mirantis.com> Signed-off-by: makhov <amakhov@mirantis.com> * v1beta2 contracts. review fixes Signed-off-by: Alexey Makhov <amakhov@mirantis.com> Signed-off-by: makhov <amakhov@mirantis.com> * v1beta2 contracts. pointers everywhere Signed-off-by: Alexey Makhov <amakhov@mirantis.com> Signed-off-by: makhov <amakhov@mirantis.com> --------- Signed-off-by: Alexey Makhov <amakhov@mirantis.com> Signed-off-by: makhov <amakhov@mirantis.com>
Signed-off-by: Alexey Makhov <amakhov@mirantis.com> Signed-off-by: makhov <amakhov@mirantis.com>
1e79430 to
8cd8e82
Compare
…s fields Signed-off-by: apedriza <adripedriza@gmail.com>
8cd8e82 to
1fed617
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposal for improve k0smotron Cluster status report
Currently, k0smotron Cluster controller does not have a clear report of the reconciliation status using standards kubernetes method like the use of conditions. This changes introduce a clearer status reportir using kubernetes conventions described here
The goal is to give the user the needed report without the need to check inner resources supporting the controlplane like the secrets, configmaps or statefulsets involved.
New conditions
This PR introduces conditions for reporting the current state of the k0smotron cluster. As kubernetes conventions states: Controllers should apply their conditions to a resource the first time they visit the resource. Following that, no matter the state of the k0smotron cluster reconciliation, the conditions will be reported.
Availabletrue:ControlPlaneFunctional,KubeconfigSecretAvailableandControlPlaneExposedDeletingCertificatesAvailableControlPlaneFunctionalkube-systemnamespace exists in the workload clusterKubeconfigSecretAvailableControlPlaneExposedControlPlaneUpToDateControlPlaneScalingNew fields
readyReplicas: can be used to check how many pods have aReadycondition (same as thereadyReplicasfield for the inner stateful set. This value, together with theAvailabilitycondition, can let the user know how many controlplane instance the load will be balanced across.updatedReplicas: same asupdatedReplicasfor the inner statefulset. Can led the user know how many replicas runs with the desired state.Deprecated fields
On the other hand, in favor of new methods for status reporting,
Readycondition and.status.ReconcileStatuswill be removed in next releases. Currently deprecated and mantained for a while in order to allow back and forth conversions.Readystatus presents ambiguity, given it is calculated from the checkexpected replicas == current ready control plane replicas. The readiness probe is calculated by runningk0s status, but that does not guarantee the workload Cluster is fully functional. For that reason, and for more clarity of what the status field represents,Readycondition is substituted byAvaialblecondition, which is calculated taking into account conditions that SHOULD guarantee cluster is ready..status.ReconcileStatusis removed. It is currently used to store logs from the controller. We should be able to report the state of the k0smotron Cluster controller reconciliation by using conditions, which is the standard in kubernetes for reporting resource state.