-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
condition_consts.go
129 lines (98 loc) · 6.38 KB
/
condition_consts.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
/*
Copyright 2020 The Kubernetes Authors.
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 v1alpha3
// ANCHOR: CommonConditions
// Common ConditionTypes used by Cluster API objects.
const (
// ReadyCondition defines the Ready condition type that summarizes the operational state of a Cluster API object.
ReadyCondition ConditionType = "Ready"
)
// Common ConditionReason used by Cluster API objects.
const (
// DeletingReason (Severity=Info) documents an condition not in Status=True because the underlying object it is currently being deleted.
DeletingReason = "Deleting"
// DeletionFailedReason (Severity=Warning) documents an condition not in Status=True because the underlying object
// encountered problems during deletion. This is a warning because the reconciler will retry deletion.
DeletionFailedReason = "DeletionFailed"
// DeletedReason (Severity=Info) documents an condition not in Status=True because the underlying object was deleted.
DeletedReason = "Deleted"
)
const (
// InfrastructureReadyCondition reports a summary of current status of the infrastructure object defined for this cluster/machine/machinepool.
// This condition is mirrored from the Ready condition in the infrastructure ref object, and
// the absence of this condition might signal problems in the reconcile external loops or the fact that
// the infrastructure provider does not implement the Ready condition yet.
InfrastructureReadyCondition ConditionType = "InfrastructureReady"
// WaitingForInfrastructureFallbackReason (Severity=Info) documents a cluster/machine/machinepool waiting for the underlying infrastructure
// to be available.
// NOTE: This reason is used only as a fallback when the infrastructure object is not reporting its own ready condition.
WaitingForInfrastructureFallbackReason = "WaitingForInfrastructure"
)
// ANCHOR_END: CommonConditions
// Conditions and condition Reasons for the Cluster object
const (
// ControlPlaneReady reports the ready condition from the control plane object defined for this cluster.
// This condition is mirrored from the Ready condition in the control plane ref object, and
// the absence of this condition might signal problems in the reconcile external loops or the fact that
// the control plane provider does not not implements the Ready condition yet.
ControlPlaneReadyCondition ConditionType = "ControlPlaneReady"
// WaitingForControlPlaneFallbackReason (Severity=Info) documents a cluster waiting for the control plane
// to be available.
// NOTE: This reason is used only as a fallback when the control plane object is not reporting its own ready condition.
WaitingForControlPlaneFallbackReason = "WaitingForControlPlane"
)
// Conditions and condition Reasons for the Machine object
const (
// BootstrapReadyCondition reports a summary of current status of the bootstrap object defined for this machine.
// This condition is mirrored from the Ready condition in the bootstrap ref object, and
// the absence of this condition might signal problems in the reconcile external loops or the fact that
// the bootstrap provider does not implement the Ready condition yet.
BootstrapReadyCondition ConditionType = "BootstrapReady"
// WaitingForDataSecretFallbackReason (Severity=Info) documents a machine waiting for the bootstrap data secret
// to be available.
// NOTE: This reason is used only as a fallback when the bootstrap object is not reporting its own ready condition.
WaitingForDataSecretFallbackReason = "WaitingForDataSecret"
// DrainingSucceededCondition provide evidence of the status of the node drain operation which happens during the machine
// deletion process.
DrainingSucceededCondition ConditionType = "DrainingSucceeded"
// DrainingReason (Severity=Info) documents a machine node being drained.
DrainingReason = "Draining"
// DrainingFailedReason (Severity=Warning) documents a machine node drain operation failed.
DrainingFailedReason = "DrainingFailed"
// PreDrainDeleteHookSucceededCondition reports a machine waiting for a PreDrainDeleteHook before being delete.
PreDrainDeleteHookSucceededCondition ConditionType = "PreDrainDeleteHookSucceeded"
// PreTerminateDeleteHookSucceededCondition reports a machine waiting for a PreDrainDeleteHook before being delete.
PreTerminateDeleteHookSucceededCondition ConditionType = "PreTerminateDeleteHookSucceeded"
// WaitingExternalHookReason (Severity=Info) provide evidence that we are waiting for an external hook to complete.
WaitingExternalHookReason = "WaitingExternalHook"
)
const (
// MachineHealthCheckSuccededCondition is set on machines that have passed a healthcheck by the MachineHealthCheck controller.
// In the event that the health check fails it will be set to False.
MachineHealthCheckSuccededCondition ConditionType = "HealthCheckSucceeded"
// MachineHasFailureReason is the reason used when a machine has either a FailureReason or a FailureMessage set on its status.
MachineHasFailureReason = "MachineHasFailure"
// NodeNotFoundReason is the reason used when a machine's node has previously been observed but is now gone.
NodeNotFoundReason = "NodeNotFound"
// NodeStartupTimeoutReason is the reason used when a machine's node does not appear within the specified timeout.
NodeStartupTimeoutReason = "NodeStartupTimeout"
// UnhealthyNodeConditionReason is the reason used when a machine's node has one of the MachineHealthCheck's unhealthy conditions.
UnhealthyNodeConditionReason = "UnhealthyNode"
)
const (
// MachineOwnerRemediatedCondition is set on machines that have failed a healthcheck by the MachineHealthCheck controller.
// MachineOwnerRemediatedCondition is set to False after a health check fails, but should be changed to True by the owning controller after remediation succeeds.
MachineOwnerRemediatedCondition ConditionType = "OwnerRemediated"
// WaitingForRemediationReason is the reason used when a machine fails a health check and remediation is needed.
WaitingForRemediationReason = "WaitingForRemediation"
)