sigs.k8s.io/cluster-api@v1.7.1/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 // HasRemediateMachineAnnotationReason is the reason that get's set at the MachineHealthCheckSucceededCondition when a machine 156 // has the RemediateMachineAnnotation set. 157 HasRemediateMachineAnnotationReason = "HasRemediateMachineAnnotation" 158 159 // NodeStartupTimeoutReason is the reason used when a machine's node does not appear within the specified timeout. 160 NodeStartupTimeoutReason = "NodeStartupTimeout" 161 162 // UnhealthyNodeConditionReason is the reason used when a machine's node has one of the MachineHealthCheck's unhealthy conditions. 163 UnhealthyNodeConditionReason = "UnhealthyNode" 164 ) 165 166 const ( 167 // MachineOwnerRemediatedCondition is set on machines that have failed a healthcheck by the MachineHealthCheck controller. 168 // MachineOwnerRemediatedCondition is set to False after a health check fails, but should be changed to True by the owning controller after remediation succeeds. 169 MachineOwnerRemediatedCondition ConditionType = "OwnerRemediated" 170 171 // WaitingForRemediationReason is the reason used when a machine fails a health check and remediation is needed. 172 WaitingForRemediationReason = "WaitingForRemediation" 173 174 // RemediationFailedReason is the reason used when a remediation owner fails to remediate an unhealthy machine. 175 RemediationFailedReason = "RemediationFailed" 176 177 // RemediationInProgressReason is the reason used when an unhealthy machine is being remediated by the remediation owner. 178 RemediationInProgressReason = "RemediationInProgress" 179 180 // ExternalRemediationTemplateAvailableCondition is set on machinehealthchecks when MachineHealthCheck controller uses external remediation. 181 // ExternalRemediationTemplateAvailableCondition is set to false if external remediation template is not found. 182 ExternalRemediationTemplateAvailableCondition ConditionType = "ExternalRemediationTemplateAvailable" 183 184 // ExternalRemediationTemplateNotFoundReason is the reason used when a machine health check fails to find external remediation template. 185 ExternalRemediationTemplateNotFoundReason = "ExternalRemediationTemplateNotFound" 186 187 // ExternalRemediationRequestAvailableCondition is set on machinehealthchecks when MachineHealthCheck controller uses external remediation. 188 // ExternalRemediationRequestAvailableCondition is set to false if creating external remediation request fails. 189 ExternalRemediationRequestAvailableCondition ConditionType = "ExternalRemediationRequestAvailable" 190 191 // ExternalRemediationRequestCreationFailedReason is the reason used when a machine health check fails to create external remediation request. 192 ExternalRemediationRequestCreationFailedReason = "ExternalRemediationRequestCreationFailed" 193 ) 194 195 // Conditions and condition Reasons for the Machine's Node object. 196 const ( 197 // MachineNodeHealthyCondition provides info about the operational state of the Kubernetes node hosted on the machine by summarizing node conditions. 198 // 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. 199 MachineNodeHealthyCondition ConditionType = "NodeHealthy" 200 201 // WaitingForNodeRefReason (Severity=Info) documents a machine.spec.providerId is not assigned yet. 202 WaitingForNodeRefReason = "WaitingForNodeRef" 203 204 // NodeProvisioningReason (Severity=Info) documents machine in the process of provisioning a node. 205 // NB. provisioning --> NodeRef == "". 206 NodeProvisioningReason = "NodeProvisioning" 207 208 // NodeNotFoundReason (Severity=Error) documents a machine's node has previously been observed but is now gone. 209 // NB. provisioned --> NodeRef != "". 210 NodeNotFoundReason = "NodeNotFound" 211 212 // NodeConditionsFailedReason (Severity=Warning) documents a node is not in a healthy state due to the failed state of at least 1 Kubelet condition. 213 NodeConditionsFailedReason = "NodeConditionsFailed" 214 215 // NodeInspectionFailedReason documents a failure in inspecting the node. 216 // This reason is used when the Machine controller is unable to list Nodes to find 217 // the corresponding Node for a Machine by ProviderID. 218 NodeInspectionFailedReason = "NodeInspectionFailed" 219 ) 220 221 // Conditions and condition Reasons for the MachineHealthCheck object. 222 223 const ( 224 // RemediationAllowedCondition is set on MachineHealthChecks to show the status of whether the MachineHealthCheck is 225 // allowed to remediate any Machines or whether it is blocked from remediating any further. 226 RemediationAllowedCondition ConditionType = "RemediationAllowed" 227 228 // TooManyUnhealthyReason is the reason used when too many Machines are unhealthy and the MachineHealthCheck is blocked 229 // from making any further remediations. 230 TooManyUnhealthyReason = "TooManyUnhealthy" 231 ) 232 233 // Conditions and condition Reasons for MachineDeployments. 234 235 const ( 236 // MachineDeploymentAvailableCondition means the MachineDeployment is available, that is, at least the minimum available 237 // machines required (i.e. Spec.Replicas-MaxUnavailable when MachineDeploymentStrategyType = RollingUpdate) are up and running for at least minReadySeconds. 238 MachineDeploymentAvailableCondition ConditionType = "Available" 239 240 // MachineSetReadyCondition reports a summary of current status of the MachineSet owned by the MachineDeployment. 241 MachineSetReadyCondition ConditionType = "MachineSetReady" 242 243 // WaitingForMachineSetFallbackReason (Severity=Info) documents a MachineDeployment waiting for the underlying MachineSet 244 // to be available. 245 // NOTE: This reason is used only as a fallback when the MachineSet object is not reporting its own ready condition. 246 WaitingForMachineSetFallbackReason = "WaitingForMachineSet" 247 248 // WaitingForAvailableMachinesReason (Severity=Warning) reflects the fact that the required minimum number of machines for a machinedeployment are not available. 249 WaitingForAvailableMachinesReason = "WaitingForAvailableMachines" 250 ) 251 252 // Conditions and condition Reasons for MachineSets. 253 254 const ( 255 // MachinesCreatedCondition documents that the machines controlled by the MachineSet are created. 256 // When this condition is false, it indicates that there was an error when cloning the infrastructure/bootstrap template or 257 // when generating the machine object. 258 MachinesCreatedCondition ConditionType = "MachinesCreated" 259 260 // MachinesReadyCondition reports an aggregate of current status of the machines controlled by the MachineSet. 261 MachinesReadyCondition ConditionType = "MachinesReady" 262 263 // PreflightCheckFailedReason (Severity=Error) documents a MachineSet failing preflight checks 264 // to create machine(s). 265 PreflightCheckFailedReason = "PreflightCheckFailed" 266 267 // BootstrapTemplateCloningFailedReason (Severity=Error) documents a MachineSet failing to 268 // clone the bootstrap template. 269 BootstrapTemplateCloningFailedReason = "BootstrapTemplateCloningFailed" 270 271 // InfrastructureTemplateCloningFailedReason (Severity=Error) documents a MachineSet failing to 272 // clone the infrastructure template. 273 InfrastructureTemplateCloningFailedReason = "InfrastructureTemplateCloningFailed" 274 275 // MachineCreationFailedReason (Severity=Error) documents a MachineSet failing to 276 // generate a machine object. 277 MachineCreationFailedReason = "MachineCreationFailed" 278 279 // ResizedCondition documents a MachineSet is resizing the set of controlled machines. 280 ResizedCondition ConditionType = "Resized" 281 282 // ScalingUpReason (Severity=Info) documents a MachineSet is increasing the number of replicas. 283 ScalingUpReason = "ScalingUp" 284 285 // ScalingDownReason (Severity=Info) documents a MachineSet is decreasing the number of replicas. 286 ScalingDownReason = "ScalingDown" 287 ) 288 289 // Conditions and condition reasons for Clusters with a managed Topology. 290 const ( 291 // TopologyReconciledCondition provides evidence about the reconciliation of a Cluster topology into 292 // the managed objects of the Cluster. 293 // Status false means that for any reason, the values defined in Cluster.spec.topology are not yet applied to 294 // managed objects on the Cluster; status true means that Cluster.spec.topology have been applied to 295 // the objects in the Cluster (but this does not imply those objects are already reconciled to the spec provided). 296 TopologyReconciledCondition ConditionType = "TopologyReconciled" 297 298 // TopologyReconcileFailedReason (Severity=Error) documents the reconciliation of a Cluster topology 299 // failing due to an error. 300 TopologyReconcileFailedReason = "TopologyReconcileFailed" 301 302 // TopologyReconciledControlPlaneUpgradePendingReason (Severity=Info) documents reconciliation of a Cluster topology 303 // not yet completed because Control Plane is not yet updated to match the desired topology spec. 304 TopologyReconciledControlPlaneUpgradePendingReason = "ControlPlaneUpgradePending" 305 306 // TopologyReconciledMachineDeploymentsCreatePendingReason (Severity=Info) documents reconciliation of a Cluster topology 307 // not yet completed because at least one of the MachineDeployments is yet to be created. 308 // This generally happens because new MachineDeployment creations are held off while the ControlPlane is not stable. 309 TopologyReconciledMachineDeploymentsCreatePendingReason = "MachineDeploymentsCreatePending" 310 311 // TopologyReconciledMachineDeploymentsUpgradePendingReason (Severity=Info) documents reconciliation of a Cluster topology 312 // not yet completed because at least one of the MachineDeployments is not yet updated to match the desired topology spec. 313 TopologyReconciledMachineDeploymentsUpgradePendingReason = "MachineDeploymentsUpgradePending" 314 315 // TopologyReconciledMachineDeploymentsUpgradeDeferredReason (Severity=Info) documents reconciliation of a Cluster topology 316 // not yet completed because the upgrade for at least one of the MachineDeployments has been deferred. 317 TopologyReconciledMachineDeploymentsUpgradeDeferredReason = "MachineDeploymentsUpgradeDeferred" 318 319 // TopologyReconciledMachinePoolsUpgradePendingReason (Severity=Info) documents reconciliation of a Cluster topology 320 // not yet completed because at least one of the MachinePools is not yet updated to match the desired topology spec. 321 TopologyReconciledMachinePoolsUpgradePendingReason = "MachinePoolsUpgradePending" 322 323 // TopologyReconciledMachinePoolsCreatePendingReason (Severity=Info) documents reconciliation of a Cluster topology 324 // not yet completed because at least one of the MachinePools is yet to be created. 325 // This generally happens because new MachinePool creations are held off while the ControlPlane is not stable. 326 TopologyReconciledMachinePoolsCreatePendingReason = "MachinePoolsCreatePending" 327 328 // TopologyReconciledMachinePoolsUpgradeDeferredReason (Severity=Info) documents reconciliation of a Cluster topology 329 // not yet completed because the upgrade for at least one of the MachinePools has been deferred. 330 TopologyReconciledMachinePoolsUpgradeDeferredReason = "MachinePoolsUpgradeDeferred" 331 332 // TopologyReconciledHookBlockingReason (Severity=Info) documents reconciliation of a Cluster topology 333 // not yet completed because at least one of the lifecycle hooks is blocking. 334 TopologyReconciledHookBlockingReason = "LifecycleHookBlocking" 335 336 // TopologyReconciledClusterClassNotReconciledReason (Severity=Info) documents reconciliation of a Cluster topology not 337 // yet completed because the ClusterClass has not reconciled yet. If this condition persists there may be an issue 338 // with the ClusterClass surfaced in the ClusterClass status or controller logs. 339 TopologyReconciledClusterClassNotReconciledReason = "ClusterClassNotReconciled" 340 ) 341 342 // Conditions and condition reasons for ClusterClass. 343 const ( 344 // ClusterClassRefVersionsUpToDateCondition documents if the references in the ClusterClass are 345 // up-to-date (i.e. they are using the latest apiVersion of the current Cluster API contract from 346 // the corresponding CRD). 347 ClusterClassRefVersionsUpToDateCondition ConditionType = "RefVersionsUpToDate" 348 349 // ClusterClassOutdatedRefVersionsReason (Severity=Warning) that the references in the ClusterClass are not 350 // up-to-date (i.e. they are not using the latest apiVersion of the current Cluster API contract from 351 // the corresponding CRD). 352 ClusterClassOutdatedRefVersionsReason = "OutdatedRefVersions" 353 )