cluster-api-provider-rke2/controlplane/api/v1beta1/condition_consts.go

113 lines
5.4 KiB
Go

/*
Copyright 2024 SUSE LLC.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v1beta1
import clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1"
// Conditions and condition Reasons for the RKE2ControlPlane object.
const (
// MachinesReadyCondition reports an aggregate of current status of the machines controlled by the RKE2ControlPlane.
MachinesReadyCondition clusterv1.ConditionType = "MachinesReady"
)
const (
// AvailableCondition documents that the first control plane instance has completed the RKE2 initialization
// and so the control plane is available and an API server instance is ready for processing requests.
AvailableCondition clusterv1.ConditionType = "Available"
// WaitingForRKE2ServerReason (Severity=Info) documents a RKE2ControlPlane object waiting for the first
// control plane instance to complete the RKE2 Server initialization.
WaitingForRKE2ServerReason = "WaitingForRKE2Server"
)
const (
// ControlPlaneComponentsHealthyCondition reports the overall status of control plane components
// implemented as static pods generated by RKE2 including kube-api-server, kube-controller manager,
// kube-scheduler and etcd if managed.
ControlPlaneComponentsHealthyCondition clusterv1.ConditionType = "ControlPlaneComponentsHealthy"
// ControlPlaneComponentsUnhealthyReason (Severity=Error) documents a control plane component not healthy.
ControlPlaneComponentsUnhealthyReason = "ControlPlaneComponentsUnhealthy"
// ControlPlaneComponentsUnknownReason reports a control plane component in unknown status.
ControlPlaneComponentsUnknownReason = "ControlPlaneComponentsUnknown"
// ControlPlaneComponentsInspectionFailedReason documents a failure in inspecting the control plane component status.
ControlPlaneComponentsInspectionFailedReason = "ControlPlaneComponentsInspectionFailed"
// MachinesSpecUpToDateCondition documents that the spec of the machines controlled by the RKE2ControlPlane
// is up to date. Whe this condition is false, the RKE2ControlPlane is executing a rolling upgrade.
MachinesSpecUpToDateCondition clusterv1.ConditionType = "MachinesSpecUpToDate"
// NodeMetadataUpToDate documents that the metadata of the nodes controlled by the RKE2 machines
// is up to date. When this condition is false, or missing the node metadata is not propagated.
NodeMetadataUpToDate clusterv1.ConditionType = "NodeMetadataUpToDate"
// MachineAgentHealthyCondition reports a machine's rke2 agent's operational status.
MachineAgentHealthyCondition clusterv1.ConditionType = "AgentHealthy"
// NodePatchFailedReason (Severity=Error) documents reason why Node object could not be patched.
NodePatchFailedReason = "NodePatchFailed"
// PodInspectionFailedReason documents a failure in inspecting the pod status.
PodInspectionFailedReason = "PodInspectionFailed"
// PodMissingReason (Severity=Error) documents a pod does not exist.
PodMissingReason = "PodMissing" // RollingUpdateInProgressReason (Severity=Warning) documents a RKE2ControlPlane object executing a
// PodFailedReason (Severity=Error) documents if a pod failed during provisioning i.e., e.g CrashLoopbackOff, ImagePullBackOff
// or if all the containers in a pod have terminated.
PodFailedReason = "PodFailed"
// RollingUpdateInProgressReason (Severity=Warning) documents a RKE2ControlPlane object executing a
// rolling upgrade for aligning the machines spec to the desired state.
RollingUpdateInProgressReason = "RollingUpdateInProgress"
)
const (
// EtcdClusterHealthyCondition documents the overall etcd cluster's health.
EtcdClusterHealthyCondition clusterv1.ConditionType = "EtcdClusterHealthyCondition"
// EtcdClusterInspectionFailedReason documents a failure in inspecting the etcd cluster status.
EtcdClusterInspectionFailedReason = "EtcdClusterInspectionFailed"
// MachineEtcdMemberHealthyCondition report the machine's etcd member's health status.
// NOTE: This conditions exists only if a stacked etcd cluster is used.
MachineEtcdMemberHealthyCondition clusterv1.ConditionType = "EtcdMemberHealthy"
// EtcdMemberInspectionFailedReason documents a failure in inspecting the etcd member status.
EtcdMemberInspectionFailedReason = "MemberInspectionFailed"
// ResizedCondition documents a RKE2ControlPlane that is resizing the set of controlled machines.
ResizedCondition clusterv1.ConditionType = "Resized"
// ScalingUpReason (Severity=Info) documents a RKE2ControlPlane that is increasing the number of replicas.
ScalingUpReason = "ScalingUp"
// ScalingDownReason (Severity=Info) documents a RKE2ControlPlane that is decreasing the number of replicas.
ScalingDownReason = "ScalingDown"
)
const (
// CertificatesAvailableCondition documents the overall status of the certificates generated by the RKE2ControlPlane.
CertificatesAvailableCondition clusterv1.ConditionType = "CertificatesAvailable"
// CertificatesGenerationFailedReason documents a failure in generating the certificates.
CertificatesGenerationFailedReason string = "CertificateGenerationFailed"
)