sigs.k8s.io/cluster-api@v1.6.3/api/v1beta1/condition_consts.go (about)

     1  /*
     2  Copyright 2021 The Kubernetes Authors.
     3  
     4  Licensed under the Apache License, Version 2.0 (the "License");
     5  you may not use this file except in compliance with the License.
     6  You may obtain a copy of the License at
     7  
     8      http://www.apache.org/licenses/LICENSE-2.0
     9  
    10  Unless required by applicable law or agreed to in writing, software
    11  distributed under the License is distributed on an "AS IS" BASIS,
    12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13  See the License for the specific language governing permissions and
    14  limitations under the License.
    15  */
    16  
    17  package v1beta1
    18  
    19  // ANCHOR: CommonConditions
    20  
    21  // Common ConditionTypes used by Cluster API objects.
    22  const (
    23  	// ReadyCondition defines the Ready condition type that summarizes the operational state of a Cluster API object.
    24  	ReadyCondition ConditionType = "Ready"
    25  )
    26  
    27  // Common ConditionReason used by Cluster API objects.
    28  const (
    29  	// DeletingReason (Severity=Info) documents a condition not in Status=True because the underlying object it is currently being deleted.
    30  	DeletingReason = "Deleting"
    31  
    32  	// DeletionFailedReason (Severity=Warning) documents a condition not in Status=True because the underlying object
    33  	// encountered problems during deletion. This is a warning because the reconciler will retry deletion.
    34  	DeletionFailedReason = "DeletionFailed"
    35  
    36  	// DeletedReason (Severity=Info) documents a condition not in Status=True because the underlying object was deleted.
    37  	DeletedReason = "Deleted"
    38  
    39  	// IncorrectExternalRefReason (Severity=Error) documents a CAPI object with an incorrect external object reference.
    40  	IncorrectExternalRefReason = "IncorrectExternalRef"
    41  )
    42  
    43  const (
    44  	// InfrastructureReadyCondition reports a summary of current status of the infrastructure object defined for this cluster/machine/machinepool.
    45  	// This condition is mirrored from the Ready condition in the infrastructure ref object, and
    46  	// the absence of this condition might signal problems in the reconcile external loops or the fact that
    47  	// the infrastructure provider does not implement the Ready condition yet.
    48  	InfrastructureReadyCondition ConditionType = "InfrastructureReady"
    49  
    50  	// WaitingForInfrastructureFallbackReason (Severity=Info) documents a cluster/machine/machinepool waiting for the underlying infrastructure
    51  	// to be available.
    52  	// NOTE: This reason is used only as a fallback when the infrastructure object is not reporting its own ready condition.
    53  	WaitingForInfrastructureFallbackReason = "WaitingForInfrastructure"
    54  )
    55  
    56  // ANCHOR_END: CommonConditions
    57  
    58  // Conditions and condition Reasons for the ClusterClass object.
    59  const (
    60  	// ClusterClassVariablesReconciledCondition reports if the ClusterClass variables, including both inline and external
    61  	// variables, have been successfully reconciled.
    62  	// This signals that the ClusterClass is ready to be used to default and validate variables on Clusters using
    63  	// this ClusterClass.
    64  	ClusterClassVariablesReconciledCondition ConditionType = "VariablesReconciled"
    65  
    66  	// VariableDiscoveryFailedReason (Severity=Error) documents a ClusterClass with VariableDiscovery extensions that
    67  	// failed.
    68  	VariableDiscoveryFailedReason = "VariableDiscoveryFailed"
    69  )
    70  
    71  // Conditions and condition Reasons for the Cluster object.
    72  
    73  const (
    74  	// ControlPlaneInitializedCondition reports if the cluster's control plane has been initialized such that the
    75  	// cluster's apiserver is reachable. If no Control Plane provider is in use this condition reports that at least one
    76  	// control plane Machine has a node reference. Once this Condition is marked true, its value is never changed. See
    77  	// the ControlPlaneReady condition for an indication of the current readiness of the cluster's control plane.
    78  	ControlPlaneInitializedCondition ConditionType = "ControlPlaneInitialized"
    79  
    80  	// MissingNodeRefReason (Severity=Info) documents a cluster waiting for at least one control plane Machine to have
    81  	// its node reference populated.
    82  	MissingNodeRefReason = "MissingNodeRef"
    83  
    84  	// WaitingForControlPlaneProviderInitializedReason (Severity=Info) documents a cluster waiting for the control plane
    85  	// provider to report successful control plane initialization.
    86  	WaitingForControlPlaneProviderInitializedReason = "WaitingForControlPlaneProviderInitialized"
    87  
    88  	// ControlPlaneReadyCondition reports the ready condition from the control plane object defined for this cluster.
    89  	// This condition is mirrored from the Ready condition in the control plane ref object, and
    90  	// the absence of this condition might signal problems in the reconcile external loops or the fact that
    91  	// the control plane provider does not implement the Ready condition yet.
    92  	ControlPlaneReadyCondition ConditionType = "ControlPlaneReady"
    93  
    94  	// WaitingForControlPlaneFallbackReason (Severity=Info) documents a cluster waiting for the control plane
    95  	// to be available.
    96  	// NOTE: This reason is used only as a fallback when the control plane object is not reporting its own ready condition.
    97  	WaitingForControlPlaneFallbackReason = "WaitingForControlPlane"
    98  
    99  	// WaitingForControlPlaneAvailableReason (Severity=Info) documents a Cluster API object
   100  	// waiting for the control plane machine to be available.
   101  	//
   102  	// NOTE: Having the control plane machine available is a pre-condition for joining additional control planes
   103  	// or workers nodes.
   104  	WaitingForControlPlaneAvailableReason = "WaitingForControlPlaneAvailable"
   105  )
   106  
   107  // Conditions and condition Reasons for the Machine object.
   108  
   109  const (
   110  	// BootstrapReadyCondition reports a summary of current status of the bootstrap object defined for this machine.
   111  	// This condition is mirrored from the Ready condition in the bootstrap ref object, and
   112  	// the absence of this condition might signal problems in the reconcile external loops or the fact that
   113  	// the bootstrap provider does not implement the Ready condition yet.
   114  	BootstrapReadyCondition ConditionType = "BootstrapReady"
   115  
   116  	// WaitingForDataSecretFallbackReason (Severity=Info) documents a machine waiting for the bootstrap data secret
   117  	// to be available.
   118  	// NOTE: This reason is used only as a fallback when the bootstrap object is not reporting its own ready condition.
   119  	WaitingForDataSecretFallbackReason = "WaitingForDataSecret"
   120  
   121  	// DrainingSucceededCondition provide evidence of the status of the node drain operation which happens during the machine
   122  	// deletion process.
   123  	DrainingSucceededCondition ConditionType = "DrainingSucceeded"
   124  
   125  	// DrainingReason (Severity=Info) documents a machine node being drained.
   126  	DrainingReason = "Draining"
   127  
   128  	// DrainingFailedReason (Severity=Warning) documents a machine node drain operation failed.
   129  	DrainingFailedReason = "DrainingFailed"
   130  
   131  	// PreDrainDeleteHookSucceededCondition reports a machine waiting for a PreDrainDeleteHook before being delete.
   132  	PreDrainDeleteHookSucceededCondition ConditionType = "PreDrainDeleteHookSucceeded"
   133  
   134  	// PreTerminateDeleteHookSucceededCondition reports a machine waiting for a PreDrainDeleteHook before being delete.
   135  	PreTerminateDeleteHookSucceededCondition ConditionType = "PreTerminateDeleteHookSucceeded"
   136  
   137  	// WaitingExternalHookReason (Severity=Info) provide evidence that we are waiting for an external hook to complete.
   138  	WaitingExternalHookReason = "WaitingExternalHook"
   139  
   140  	// VolumeDetachSucceededCondition reports a machine waiting for volumes to be detached.
   141  	VolumeDetachSucceededCondition ConditionType = "VolumeDetachSucceeded"
   142  
   143  	// WaitingForVolumeDetachReason (Severity=Info) provide evidence that a machine node waiting for volumes to be attached.
   144  	WaitingForVolumeDetachReason = "WaitingForVolumeDetach"
   145  )
   146  
   147  const (
   148  	// MachineHealthCheckSucceededCondition is set on machines that have passed a healthcheck by the MachineHealthCheck controller.
   149  	// In the event that the health check fails it will be set to False.
   150  	MachineHealthCheckSucceededCondition ConditionType = "HealthCheckSucceeded"
   151  
   152  	// MachineHasFailureReason is the reason used when a machine has either a FailureReason or a FailureMessage set on its status.
   153  	MachineHasFailureReason = "MachineHasFailure"
   154  
   155  	// NodeStartupTimeoutReason is the reason used when a machine's node does not appear within the specified timeout.
   156  	NodeStartupTimeoutReason = "NodeStartupTimeout"
   157  
   158  	// UnhealthyNodeConditionReason is the reason used when a machine's node has one of the MachineHealthCheck's unhealthy conditions.
   159  	UnhealthyNodeConditionReason = "UnhealthyNode"
   160  )
   161  
   162  const (
   163  	// MachineOwnerRemediatedCondition is set on machines that have failed a healthcheck by the MachineHealthCheck controller.
   164  	// MachineOwnerRemediatedCondition is set to False after a health check fails, but should be changed to True by the owning controller after remediation succeeds.
   165  	MachineOwnerRemediatedCondition ConditionType = "OwnerRemediated"
   166  
   167  	// WaitingForRemediationReason is the reason used when a machine fails a health check and remediation is needed.
   168  	WaitingForRemediationReason = "WaitingForRemediation"
   169  
   170  	// RemediationFailedReason is the reason used when a remediation owner fails to remediate an unhealthy machine.
   171  	RemediationFailedReason = "RemediationFailed"
   172  
   173  	// RemediationInProgressReason is the reason used when an unhealthy machine is being remediated by the remediation owner.
   174  	RemediationInProgressReason = "RemediationInProgress"
   175  
   176  	// ExternalRemediationTemplateAvailableCondition is set on machinehealthchecks when MachineHealthCheck controller uses external remediation.
   177  	// ExternalRemediationTemplateAvailableCondition is set to false if external remediation template is not found.
   178  	ExternalRemediationTemplateAvailableCondition ConditionType = "ExternalRemediationTemplateAvailable"
   179  
   180  	// ExternalRemediationTemplateNotFoundReason is the reason used when a machine health check fails to find external remediation template.
   181  	ExternalRemediationTemplateNotFoundReason = "ExternalRemediationTemplateNotFound"
   182  
   183  	// ExternalRemediationRequestAvailableCondition is set on machinehealthchecks when MachineHealthCheck controller uses external remediation.
   184  	// ExternalRemediationRequestAvailableCondition is set to false if creating external remediation request fails.
   185  	ExternalRemediationRequestAvailableCondition ConditionType = "ExternalRemediationRequestAvailable"
   186  
   187  	// ExternalRemediationRequestCreationFailedReason is the reason used when a machine health check fails to create external remediation request.
   188  	ExternalRemediationRequestCreationFailedReason = "ExternalRemediationRequestCreationFailed"
   189  )
   190  
   191  // Conditions and condition Reasons for the Machine's Node object.
   192  const (
   193  	// MachineNodeHealthyCondition provides info about the operational state of the Kubernetes node hosted on the machine by summarizing  node conditions.
   194  	// If the conditions defined in a Kubernetes node (i.e., NodeReady, NodeMemoryPressure, NodeDiskPressure, NodePIDPressure, and NodeNetworkUnavailable) are in a healthy state, it will be set to True.
   195  	MachineNodeHealthyCondition ConditionType = "NodeHealthy"
   196  
   197  	// WaitingForNodeRefReason (Severity=Info) documents a machine.spec.providerId is not assigned yet.
   198  	WaitingForNodeRefReason = "WaitingForNodeRef"
   199  
   200  	// NodeProvisioningReason (Severity=Info) documents machine in the process of provisioning a node.
   201  	// NB. provisioning --> NodeRef == "".
   202  	NodeProvisioningReason = "NodeProvisioning"
   203  
   204  	// NodeNotFoundReason (Severity=Error) documents a machine's node has previously been observed but is now gone.
   205  	// NB. provisioned --> NodeRef != "".
   206  	NodeNotFoundReason = "NodeNotFound"
   207  
   208  	// NodeConditionsFailedReason (Severity=Warning) documents a node is not in a healthy state due to the failed state of at least 1 Kubelet condition.
   209  	NodeConditionsFailedReason = "NodeConditionsFailed"
   210  )
   211  
   212  // Conditions and condition Reasons for the MachineHealthCheck object.
   213  
   214  const (
   215  	// RemediationAllowedCondition is set on MachineHealthChecks to show the status of whether the MachineHealthCheck is
   216  	// allowed to remediate any Machines or whether it is blocked from remediating any further.
   217  	RemediationAllowedCondition ConditionType = "RemediationAllowed"
   218  
   219  	// TooManyUnhealthyReason is the reason used when too many Machines are unhealthy and the MachineHealthCheck is blocked
   220  	// from making any further remediations.
   221  	TooManyUnhealthyReason = "TooManyUnhealthy"
   222  )
   223  
   224  // Conditions and condition Reasons for  MachineDeployments.
   225  
   226  const (
   227  	// MachineDeploymentAvailableCondition means the MachineDeployment is available, that is, at least the minimum available
   228  	// machines required (i.e. Spec.Replicas-MaxUnavailable when MachineDeploymentStrategyType = RollingUpdate) are up and running for at least minReadySeconds.
   229  	MachineDeploymentAvailableCondition ConditionType = "Available"
   230  
   231  	// WaitingForAvailableMachinesReason (Severity=Warning) reflects the fact that the required minimum number of machines for a machinedeployment are not available.
   232  	WaitingForAvailableMachinesReason = "WaitingForAvailableMachines"
   233  )
   234  
   235  // Conditions and condition Reasons for  MachineSets.
   236  
   237  const (
   238  	// MachinesCreatedCondition documents that the machines controlled by the MachineSet are created.
   239  	// When this condition is false, it indicates that there was an error when cloning the infrastructure/bootstrap template or
   240  	// when generating the machine object.
   241  	MachinesCreatedCondition ConditionType = "MachinesCreated"
   242  
   243  	// MachinesReadyCondition reports an aggregate of current status of the machines controlled by the MachineSet.
   244  	MachinesReadyCondition ConditionType = "MachinesReady"
   245  
   246  	// PreflightCheckFailedReason (Severity=Error) documents a MachineSet failing preflight checks
   247  	// to create machine(s).
   248  	PreflightCheckFailedReason = "PreflightCheckFailed"
   249  
   250  	// BootstrapTemplateCloningFailedReason (Severity=Error) documents a MachineSet failing to
   251  	// clone the bootstrap template.
   252  	BootstrapTemplateCloningFailedReason = "BootstrapTemplateCloningFailed"
   253  
   254  	// InfrastructureTemplateCloningFailedReason (Severity=Error) documents a MachineSet failing to
   255  	// clone the infrastructure template.
   256  	InfrastructureTemplateCloningFailedReason = "InfrastructureTemplateCloningFailed"
   257  
   258  	// MachineCreationFailedReason (Severity=Error) documents a MachineSet failing to
   259  	// generate a machine object.
   260  	MachineCreationFailedReason = "MachineCreationFailed"
   261  
   262  	// ResizedCondition documents a MachineSet is resizing the set of controlled machines.
   263  	ResizedCondition ConditionType = "Resized"
   264  
   265  	// ScalingUpReason (Severity=Info) documents a MachineSet is increasing the number of replicas.
   266  	ScalingUpReason = "ScalingUp"
   267  
   268  	// ScalingDownReason (Severity=Info) documents a MachineSet is decreasing the number of replicas.
   269  	ScalingDownReason = "ScalingDown"
   270  )
   271  
   272  // Conditions and condition reasons for Clusters with a managed Topology.
   273  const (
   274  	// TopologyReconciledCondition provides evidence about the reconciliation of a Cluster topology into
   275  	// the managed objects of the Cluster.
   276  	// Status false means that for any reason, the values defined in Cluster.spec.topology are not yet applied to
   277  	// managed objects on the Cluster; status true means that Cluster.spec.topology have been applied to
   278  	// the objects in the Cluster (but this does not imply those objects are already reconciled to the spec provided).
   279  	TopologyReconciledCondition ConditionType = "TopologyReconciled"
   280  
   281  	// TopologyReconcileFailedReason (Severity=Error) documents the reconciliation of a Cluster topology
   282  	// failing due to an error.
   283  	TopologyReconcileFailedReason = "TopologyReconcileFailed"
   284  
   285  	// TopologyReconciledControlPlaneUpgradePendingReason (Severity=Info) documents reconciliation of a Cluster topology
   286  	// not yet completed because Control Plane is not yet updated to match the desired topology spec.
   287  	TopologyReconciledControlPlaneUpgradePendingReason = "ControlPlaneUpgradePending"
   288  
   289  	// TopologyReconciledMachineDeploymentsCreatePendingReason (Severity=Info) documents reconciliation of a Cluster topology
   290  	// not yet completed because at least one of the MachineDeployments is yet to be created.
   291  	// This generally happens because new MachineDeployment creations are held off while the ControlPlane is not stable.
   292  	TopologyReconciledMachineDeploymentsCreatePendingReason = "MachineDeploymentsCreatePending"
   293  
   294  	// TopologyReconciledMachineDeploymentsUpgradePendingReason (Severity=Info) documents reconciliation of a Cluster topology
   295  	// not yet completed because at least one of the MachineDeployments is not yet updated to match the desired topology spec.
   296  	TopologyReconciledMachineDeploymentsUpgradePendingReason = "MachineDeploymentsUpgradePending"
   297  
   298  	// TopologyReconciledMachineDeploymentsUpgradeDeferredReason (Severity=Info) documents reconciliation of a Cluster topology
   299  	// not yet completed because the upgrade for at least one of the MachineDeployments has been deferred.
   300  	TopologyReconciledMachineDeploymentsUpgradeDeferredReason = "MachineDeploymentsUpgradeDeferred"
   301  
   302  	// TopologyReconciledMachinePoolsUpgradePendingReason (Severity=Info) documents reconciliation of a Cluster topology
   303  	// not yet completed because at least one of the MachinePools is not yet updated to match the desired topology spec.
   304  	TopologyReconciledMachinePoolsUpgradePendingReason = "MachinePoolsUpgradePending"
   305  
   306  	// TopologyReconciledMachinePoolsCreatePendingReason (Severity=Info) documents reconciliation of a Cluster topology
   307  	// not yet completed because at least one of the MachinePools is yet to be created.
   308  	// This generally happens because new MachinePool creations are held off while the ControlPlane is not stable.
   309  	TopologyReconciledMachinePoolsCreatePendingReason = "MachinePoolsCreatePending"
   310  
   311  	// TopologyReconciledMachinePoolsUpgradeDeferredReason (Severity=Info) documents reconciliation of a Cluster topology
   312  	// not yet completed because the upgrade for at least one of the MachinePools has been deferred.
   313  	TopologyReconciledMachinePoolsUpgradeDeferredReason = "MachinePoolsUpgradeDeferred"
   314  
   315  	// TopologyReconciledHookBlockingReason (Severity=Info) documents reconciliation of a Cluster topology
   316  	// not yet completed because at least one of the lifecycle hooks is blocking.
   317  	TopologyReconciledHookBlockingReason = "LifecycleHookBlocking"
   318  
   319  	// TopologyReconciledClusterClassNotReconciledReason (Severity=Info) documents reconciliation of a Cluster topology not
   320  	// yet completed because the ClusterClass has not reconciled yet. If this condition persists there may be an issue
   321  	// with the ClusterClass surfaced in the ClusterClass status or controller logs.
   322  	TopologyReconciledClusterClassNotReconciledReason = "ClusterClassNotReconciled"
   323  )
   324  
   325  // Conditions and condition reasons for ClusterClass.
   326  const (
   327  	// ClusterClassRefVersionsUpToDateCondition documents if the references in the ClusterClass are
   328  	// up-to-date (i.e. they are using the latest apiVersion of the current Cluster API contract from
   329  	// the corresponding CRD).
   330  	ClusterClassRefVersionsUpToDateCondition ConditionType = "RefVersionsUpToDate"
   331  
   332  	// ClusterClassOutdatedRefVersionsReason (Severity=Warning) that the references in the ClusterClass are not
   333  	// up-to-date (i.e. they are not using the latest apiVersion of the current Cluster API contract from
   334  	// the corresponding CRD).
   335  	ClusterClassOutdatedRefVersionsReason = "OutdatedRefVersions"
   336  )