sigs.k8s.io/cluster-api@v1.7.1/internal/apis/core/v1alpha4/condition_consts.go (about) 1 /* 2 Copyright 2020 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 v1alpha4 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 an condition not in Status=True because the underlying object it is currently being deleted. 30 DeletingReason = "Deleting" 31 32 // DeletionFailedReason (Severity=Warning) documents an 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 an 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 Cluster object. 59 60 const ( 61 // ControlPlaneInitializedCondition reports if the cluster's control plane has been initialized such that the 62 // cluster's apiserver is reachable and at least one control plane Machine has a node reference. Once this 63 // condition is marked true, its value is never changed. See the ControlPlaneReady condition for an indication of 64 // the current readiness of the cluster's control plane. 65 ControlPlaneInitializedCondition ConditionType = "ControlPlaneInitialized" 66 67 // MissingNodeRefReason (Severity=Info) documents a cluster waiting for at least one control plane Machine to have 68 // its node reference populated. 69 MissingNodeRefReason = "MissingNodeRef" 70 71 // WaitingForControlPlaneProviderInitializedReason (Severity=Info) documents a cluster waiting for the control plane 72 // provider to report successful control plane initialization. 73 WaitingForControlPlaneProviderInitializedReason = "WaitingForControlPlaneProviderInitialized" 74 75 // ControlPlaneReadyCondition reports the ready condition from the control plane object defined for this cluster. 76 // This condition is mirrored from the Ready condition in the control plane ref object, and 77 // the absence of this condition might signal problems in the reconcile external loops or the fact that 78 // the control plane provider does not implement the Ready condition yet. 79 ControlPlaneReadyCondition ConditionType = "ControlPlaneReady" 80 81 // WaitingForControlPlaneFallbackReason (Severity=Info) documents a cluster waiting for the control plane 82 // to be available. 83 // NOTE: This reason is used only as a fallback when the control plane object is not reporting its own ready condition. 84 WaitingForControlPlaneFallbackReason = "WaitingForControlPlane" 85 86 // WaitingForControlPlaneAvailableReason (Severity=Info) documents a Cluster API object 87 // waiting for the control plane machine to be available. 88 // 89 // NOTE: Having the control plane machine available is a pre-condition for joining additional control planes 90 // or workers nodes. 91 WaitingForControlPlaneAvailableReason = "WaitingForControlPlaneAvailable" 92 ) 93 94 // Conditions and condition Reasons for the Machine object. 95 96 const ( 97 // BootstrapReadyCondition reports a summary of current status of the bootstrap object defined for this machine. 98 // This condition is mirrored from the Ready condition in the bootstrap ref object, and 99 // the absence of this condition might signal problems in the reconcile external loops or the fact that 100 // the bootstrap provider does not implement the Ready condition yet. 101 BootstrapReadyCondition ConditionType = "BootstrapReady" 102 103 // WaitingForDataSecretFallbackReason (Severity=Info) documents a machine waiting for the bootstrap data secret 104 // to be available. 105 // NOTE: This reason is used only as a fallback when the bootstrap object is not reporting its own ready condition. 106 WaitingForDataSecretFallbackReason = "WaitingForDataSecret" 107 108 // DrainingSucceededCondition provide evidence of the status of the node drain operation which happens during the machine 109 // deletion process. 110 DrainingSucceededCondition ConditionType = "DrainingSucceeded" 111 112 // DrainingReason (Severity=Info) documents a machine node being drained. 113 DrainingReason = "Draining" 114 115 // DrainingFailedReason (Severity=Warning) documents a machine node drain operation failed. 116 DrainingFailedReason = "DrainingFailed" 117 118 // PreDrainDeleteHookSucceededCondition reports a machine waiting for a PreDrainDeleteHook before being delete. 119 PreDrainDeleteHookSucceededCondition ConditionType = "PreDrainDeleteHookSucceeded" 120 121 // PreTerminateDeleteHookSucceededCondition reports a machine waiting for a PreDrainDeleteHook before being delete. 122 PreTerminateDeleteHookSucceededCondition ConditionType = "PreTerminateDeleteHookSucceeded" 123 124 // WaitingExternalHookReason (Severity=Info) provide evidence that we are waiting for an external hook to complete. 125 WaitingExternalHookReason = "WaitingExternalHook" 126 127 // VolumeDetachSucceededCondition reports a machine waiting for volumes to be detached. 128 VolumeDetachSucceededCondition ConditionType = "VolumeDetachSucceeded" 129 130 // WaitingForVolumeDetachReason (Severity=Info) provide evidence that a machine node waiting for volumes to be attached. 131 WaitingForVolumeDetachReason = "WaitingForVolumeDetach" 132 ) 133 134 const ( 135 // MachineHealthCheckSuccededCondition is set on machines that have passed a healthcheck by the MachineHealthCheck controller. 136 // In the event that the health check fails it will be set to False. 137 MachineHealthCheckSuccededCondition ConditionType = "HealthCheckSucceeded" 138 139 // MachineHasFailureReason is the reason used when a machine has either a FailureReason or a FailureMessage set on its status. 140 MachineHasFailureReason = "MachineHasFailure" 141 142 // NodeStartupTimeoutReason is the reason used when a machine's node does not appear within the specified timeout. 143 NodeStartupTimeoutReason = "NodeStartupTimeout" 144 145 // UnhealthyNodeConditionReason is the reason used when a machine's node has one of the MachineHealthCheck's unhealthy conditions. 146 UnhealthyNodeConditionReason = "UnhealthyNode" 147 ) 148 149 const ( 150 // MachineOwnerRemediatedCondition is set on machines that have failed a healthcheck by the MachineHealthCheck controller. 151 // MachineOwnerRemediatedCondition is set to False after a health check fails, but should be changed to True by the owning controller after remediation succeeds. 152 MachineOwnerRemediatedCondition ConditionType = "OwnerRemediated" 153 154 // WaitingForRemediationReason is the reason used when a machine fails a health check and remediation is needed. 155 WaitingForRemediationReason = "WaitingForRemediation" 156 157 // RemediationFailedReason is the reason used when a remediation owner fails to remediate an unhealthy machine. 158 RemediationFailedReason = "RemediationFailed" 159 160 // RemediationInProgressReason is the reason used when an unhealthy machine is being remediated by the remediation owner. 161 RemediationInProgressReason = "RemediationInProgress" 162 163 // ExternalRemediationTemplateAvailable is set on machinehealthchecks when MachineHealthCheck controller uses external remediation. 164 // ExternalRemediationTemplateAvailable is set to false if external remediation template is not found. 165 ExternalRemediationTemplateAvailable ConditionType = "ExternalRemediationTemplateAvailable" 166 167 // ExternalRemediationTemplateNotFound is the reason used when a machine health check fails to find external remediation template. 168 ExternalRemediationTemplateNotFound = "ExternalRemediationTemplateNotFound" 169 170 // ExternalRemediationRequestAvailable is set on machinehealthchecks when MachineHealthCheck controller uses external remediation. 171 // ExternalRemediationRequestAvailable is set to false if creating external remediation request fails. 172 ExternalRemediationRequestAvailable ConditionType = "ExternalRemediationRequestAvailable" 173 174 // ExternalRemediationRequestCreationFailed is the reason used when a machine health check fails to create external remediation request. 175 ExternalRemediationRequestCreationFailed = "ExternalRemediationRequestCreationFailed" 176 ) 177 178 // Conditions and condition Reasons for the Machine's Node object. 179 const ( 180 // MachineNodeHealthyCondition provides info about the operational state of the Kubernetes node hosted on the machine by summarizing node conditions. 181 // 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. 182 MachineNodeHealthyCondition ConditionType = "NodeHealthy" 183 184 // WaitingForNodeRefReason (Severity=Info) documents a machine.spec.providerId is not assigned yet. 185 WaitingForNodeRefReason = "WaitingForNodeRef" 186 187 // NodeProvisioningReason (Severity=Info) documents machine in the process of provisioning a node. 188 // NB. provisioning --> NodeRef == "". 189 NodeProvisioningReason = "NodeProvisioning" 190 191 // NodeNotFoundReason (Severity=Error) documents a machine's node has previously been observed but is now gone. 192 // NB. provisioned --> NodeRef != "". 193 NodeNotFoundReason = "NodeNotFound" 194 195 // NodeConditionsFailedReason (Severity=Warning) documents a node is not in a healthy state due to the failed state of at least 1 Kubelet condition. 196 NodeConditionsFailedReason = "NodeConditionsFailed" 197 ) 198 199 // Conditions and condition Reasons for the MachineHealthCheck object. 200 201 const ( 202 // RemediationAllowedCondition is set on MachineHealthChecks to show the status of whether the MachineHealthCheck is 203 // allowed to remediate any Machines or whether it is blocked from remediating any further. 204 RemediationAllowedCondition ConditionType = "RemediationAllowed" 205 206 // TooManyUnhealthyReason is the reason used when too many Machines are unhealthy and the MachineHealthCheck is blocked 207 // from making any further remediations. 208 TooManyUnhealthyReason = "TooManyUnhealthy" 209 ) 210 211 // Conditions and condition Reasons for MachineDeployments. 212 213 const ( 214 // MachineDeploymentAvailableCondition means the MachineDeployment is available, that is, at least the minimum available 215 // machines required (i.e. Spec.Replicas-MaxUnavailable when MachineDeploymentStrategyType = RollingUpdate) are up and running for at least minReadySeconds. 216 MachineDeploymentAvailableCondition ConditionType = "Available" 217 218 // WaitingForAvailableMachinesReason (Severity=Warning) reflects the fact that the required minimum number of machines for a machinedeployment are not available. 219 WaitingForAvailableMachinesReason = "WaitingForAvailableMachines" 220 ) 221 222 // Conditions and condition Reasons for MachineSets. 223 224 const ( 225 // MachinesCreatedCondition documents that the machines controlled by the MachineSet are created. 226 // When this condition is false, it indicates that there was an error when cloning the infrastructure/bootstrap template or 227 // when generating the machine object. 228 MachinesCreatedCondition ConditionType = "MachinesCreated" 229 230 // MachinesReadyCondition reports an aggregate of current status of the machines controlled by the MachineSet. 231 MachinesReadyCondition ConditionType = "MachinesReady" 232 233 // BootstrapTemplateCloningFailedReason (Severity=Error) documents a MachineSet failing to 234 // clone the bootstrap template. 235 BootstrapTemplateCloningFailedReason = "BootstrapTemplateCloningFailed" 236 237 // InfrastructureTemplateCloningFailedReason (Severity=Error) documents a MachineSet failing to 238 // clone the infrastructure template. 239 InfrastructureTemplateCloningFailedReason = "InfrastructureTemplateCloningFailed" 240 241 // MachineCreationFailedReason (Severity=Error) documents a MachineSet failing to 242 // generate a machine object. 243 MachineCreationFailedReason = "MachineCreationFailed" 244 245 // ResizedCondition documents a MachineSet is resizing the set of controlled machines. 246 ResizedCondition ConditionType = "Resized" 247 248 // ScalingUpReason (Severity=Info) documents a MachineSet is increasing the number of replicas. 249 ScalingUpReason = "ScalingUp" 250 251 // ScalingDownReason (Severity=Info) documents a MachineSet is decreasing the number of replicas. 252 ScalingDownReason = "ScalingDown" 253 )