generated from siderolabs/project-template-kubernetes-controller
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: catch up with Kubeadm in terms of conditions
This is the first set of conditions support: - `ResizedCondition`. - `ControlPlaneComponentsHealthy` - `EtcdClusterHealthy` - `Available` - `MachinesReady` - `MachinesCreated` Signed-off-by: Artem Chernyshev <[email protected]>
- Loading branch information
Showing
12 changed files
with
544 additions
and
153 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
// This Source Code Form is subject to the terms of the Mozilla Public | ||
// License, v. 2.0. If a copy of the MPL was not distributed with this | ||
// file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
|
||
// +kubebuilder:object:generate=true | ||
// +groupName=controlplane.cluster.x-k8s.io | ||
package v1alpha3 | ||
|
||
import clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" | ||
|
||
// Conditions and condition Reasons for the TalosControlPlane object | ||
|
||
const ( | ||
// MachinesReadyCondition reports an aggregate of current status of the machines controlled by the TalosControlPlane. | ||
MachinesReadyCondition clusterv1.ConditionType = "MachinesReady" | ||
) | ||
|
||
const ( | ||
// AvailableCondition documents that the first control plane instance has completed Talos boot sequence | ||
// and so the control plane is available and an API server instance is ready for processing requests. | ||
AvailableCondition clusterv1.ConditionType = "Available" | ||
|
||
// WaitingForTalosBootReason (Severity=Info) documents a TalosControlPlane object waiting for the first | ||
// control plane instance to complete Talos boot sequence. | ||
WaitingForTalosBootReason = "WaitingForTalosBoot" | ||
) | ||
|
||
const ( | ||
// ResizedCondition documents a TalosControlPlane that is resizing the set of controlled machines. | ||
ResizedCondition clusterv1.ConditionType = "Resized" | ||
|
||
// ScalingUpReason (Severity=Info) documents a TalosControlPlane that is increasing the number of replicas. | ||
ScalingUpReason = "ScalingUp" | ||
|
||
// ScalingDownReason (Severity=Info) documents a TalosControlPlane that is decreasing the number of replicas. | ||
ScalingDownReason = "ScalingDown" | ||
) | ||
|
||
const ( | ||
// ControlPlaneComponentsHealthyCondition reports the overall status of control plane components | ||
// implemented as static pods generated by Talos including kube-api-server, kube-controller manager, | ||
// kube-scheduler and etcd. | ||
ControlPlaneComponentsHealthyCondition clusterv1.ConditionType = "ControlPlaneComponentsHealthy" | ||
|
||
// ControlPlaneComponentsUnhealthyReason (Severity=Error) documents a control plane component not healthy. | ||
ControlPlaneComponentsUnhealthyReason = "ControlPlaneComponentsUnhealthy" | ||
|
||
// ControlPlaneComponentsInspectionFailedReason documents a failure in inspecting the control plane component status. | ||
ControlPlaneComponentsInspectionFailedReason = "ControlPlaneComponentsInspectionFailed" | ||
) | ||
|
||
const ( | ||
// EtcdClusterHealthyCondition documents the overall etcd cluster's health. | ||
EtcdClusterHealthyCondition clusterv1.ConditionType = "EtcdClusterHealthyCondition" | ||
|
||
// EtcdClusterUnhealthyReason (Severity=Error) is set when the etcd cluster is unhealthy. | ||
EtcdClusterUnhealthyReason = "EtcdClusterUnhealthy" | ||
) | ||
|
||
const ( | ||
// MachinesCreatedCondition documents that the machines controlled by the TalosControlPlane are created. | ||
// When this condition is false, it indicates that there was an error when cloning the infrastructure/bootstrap template or | ||
// when generating the machine object. | ||
MachinesCreatedCondition clusterv1.ConditionType = "MachinesCreated" | ||
|
||
// InfrastructureTemplateCloningFailedReason (Severity=Error) documents a TalosControlPlane failing to | ||
// clone the infrastructure template. | ||
InfrastructureTemplateCloningFailedReason = "InfrastructureTemplateCloningFailed" | ||
|
||
// BootstrapTemplateCloningFailedReason (Severity=Error) documents a TalosControlPlane failing to | ||
// clone the bootstrap template. | ||
BootstrapTemplateCloningFailedReason = "BootstrapTemplateCloningFailed" | ||
|
||
// MachineGenerationFailedReason (Severity=Error) documents a TalosControlPlane failing to | ||
// generate a machine object. | ||
MachineGenerationFailedReason = "MachineGenerationFailed" | ||
) |
This file contains 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.