/
consts.go
196 lines (179 loc) · 10.5 KB
/
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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
/*
Copyright 2021 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 v1beta1
import clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1"
// AzureCluster Conditions and Reasons.
const (
// NetworkInfrastructureReadyCondition reports of current status of cluster infrastructure.
NetworkInfrastructureReadyCondition clusterv1.ConditionType = "NetworkInfrastructureReady"
// NamespaceNotAllowedByIdentity used to indicate cluster in a namespace not allowed by identity.
NamespaceNotAllowedByIdentity = "NamespaceNotAllowedByIdentity"
)
// AzureMachine Conditions and Reasons.
const (
// VMRunningCondition reports on current status of the Azure VM.
VMRunningCondition clusterv1.ConditionType = "VMRunning"
// VMIdentitiesReadyCondition reports on the readiness of the Azure VM identities.
VMIdentitiesReadyCondition clusterv1.ConditionType = "VMIdentitiesReady"
// VMCreatingReason used when the vm creation is in progress.
VMCreatingReason = "VMCreating"
// VMUpdatingReason used when the vm updating is in progress.
VMUpdatingReason = "VMUpdating"
// VMDeletingReason used when the vm is in a deleting state.
VMDeletingReason = "VMDeleting"
// VMProvisionFailedReason used for failures during vm provisioning.
VMProvisionFailedReason = "VMProvisionFailed"
// UserAssignedIdentityMissingReason used for failures when a user-assigned identity is missing.
UserAssignedIdentityMissingReason = "UserAssignedIdentityMissing"
// WaitingForClusterInfrastructureReason used when machine is waiting for cluster infrastructure to be ready before proceeding.
WaitingForClusterInfrastructureReason = "WaitingForClusterInfrastructure"
// WaitingForBootstrapDataReason used when machine is waiting for bootstrap data to be ready before proceeding.
WaitingForBootstrapDataReason = "WaitingForBootstrapData"
// BootstrapSucceededCondition reports the result of the execution of the bootstrap data on the machine.
BootstrapSucceededCondition clusterv1.ConditionType = "BootstrapSucceeded"
// BootstrapInProgressReason is used to indicate the bootstrap data has not finished executing.
BootstrapInProgressReason = "BootstrapInProgress"
// BootstrapFailedReason is used to indicate the bootstrap process ran into an error.
BootstrapFailedReason = "BootstrapFailed"
)
// AzureMachinePool Conditions and Reasons.
const (
// ScaleSetRunningCondition reports on current status of the Azure Scale Set.
ScaleSetRunningCondition clusterv1.ConditionType = "ScaleSetRunning"
// ScaleSetCreatingReason used when the scale set creation is in progress.
ScaleSetCreatingReason = "ScaleSetCreating"
// ScaleSetUpdatingReason used when the scale set updating is in progress.
ScaleSetUpdatingReason = "ScaleSetUpdating"
// ScaleSetDeletingReason used when the scale set is in a deleting state.
ScaleSetDeletingReason = "ScaleSetDeleting"
// ScaleSetProvisionFailedReason used for failures during scale set provisioning.
ScaleSetProvisionFailedReason = "ScaleSetProvisionFailed"
// ScaleSetDesiredReplicasCondition reports on the scaling state of the machine pool.
ScaleSetDesiredReplicasCondition clusterv1.ConditionType = "ScaleSetDesiredReplicas"
// ScaleSetScaleUpReason describes the machine pool scaling up.
ScaleSetScaleUpReason = "ScaleSetScalingUp"
// ScaleSetScaleDownReason describes the machine pool scaling down.
ScaleSetScaleDownReason = "ScaleSetScalingDown"
// ScaleSetModelUpdatedCondition reports on the model state of the pool.
ScaleSetModelUpdatedCondition clusterv1.ConditionType = "ScaleSetModelUpdated"
// ScaleSetModelOutOfDateReason describes the machine pool model being out of date.
ScaleSetModelOutOfDateReason = "ScaleSetModelOutOfDate"
)
// AzureManagedCluster Conditions and Reasons.
const (
// ManagedClusterRunningCondition means the AKS cluster exists and is in a running state.
ManagedClusterRunningCondition clusterv1.ConditionType = "ManagedClusterRunning"
// AgentPoolsReadyCondition means the AKS agent pools exist and are ready to be used.
AgentPoolsReadyCondition clusterv1.ConditionType = "AgentPoolsReady"
// AzureResourceAvailableCondition means the AKS cluster is healthy according to Azure's Resource Health API.
AzureResourceAvailableCondition clusterv1.ConditionType = "AzureResourceAvailable"
)
// Azure Services Conditions and Reasons.
const (
// ResourceGroupReadyCondition means the resource group exists and is ready to be used.
ResourceGroupReadyCondition clusterv1.ConditionType = "ResourceGroupReady"
// VNetReadyCondition means the virtual network exists and is ready to be used.
VNetReadyCondition clusterv1.ConditionType = "VNetReady"
// VnetPeeringReadyCondition means the virtual network peerings exist and are ready to be used.
VnetPeeringReadyCondition clusterv1.ConditionType = "VnetPeeringReady"
// SecurityGroupsReadyCondition means the security groups exist and are ready to be used.
SecurityGroupsReadyCondition clusterv1.ConditionType = "SecurityGroupsReady"
// RouteTablesReadyCondition means the route tables exist and are ready to be used.
RouteTablesReadyCondition clusterv1.ConditionType = "RouteTablesReady"
// PublicIPsReadyCondition means the public IPs exist and are ready to be used.
PublicIPsReadyCondition clusterv1.ConditionType = "PublicIPsReady"
// NATGatewaysReadyCondition means the NAT gateways exist and are ready to be used.
NATGatewaysReadyCondition clusterv1.ConditionType = "NATGatewaysReady"
// SubnetsReadyCondition means the subnets exist and are ready to be used.
SubnetsReadyCondition clusterv1.ConditionType = "SubnetsReady"
// LoadBalancersReadyCondition means the load balancers exist and are ready to be used.
LoadBalancersReadyCondition clusterv1.ConditionType = "LoadBalancersReady"
// PrivateDNSZoneReadyCondition means the private DNS zone exists and is ready to be used.
PrivateDNSZoneReadyCondition clusterv1.ConditionType = "PrivateDNSZoneReady"
// PrivateDNSLinkReadyCondition means the private DNS links exist and are ready to be used.
PrivateDNSLinkReadyCondition clusterv1.ConditionType = "PrivateDNSLinkReady"
// PrivateDNSRecordReadyCondition means the private DNS records exist and are ready to be used.
PrivateDNSRecordReadyCondition clusterv1.ConditionType = "PrivateDNSRecordReady"
// BastionHostReadyCondition means the bastion host exists and is ready to be used.
BastionHostReadyCondition clusterv1.ConditionType = "BastionHostReady"
// InboundNATRulesReadyCondition means the inbound NAT rules exist and are ready to be used.
InboundNATRulesReadyCondition clusterv1.ConditionType = "InboundNATRulesReady"
// AvailabilitySetReadyCondition means the availability set exists and is ready to be used.
AvailabilitySetReadyCondition clusterv1.ConditionType = "AvailabilitySetReady"
// RoleAssignmentReadyCondition means the role assignment exists and is ready to be used.
RoleAssignmentReadyCondition clusterv1.ConditionType = "RoleAssignmentReady"
// DisksReadyCondition means the disks exist and are ready to be used.
DisksReadyCondition clusterv1.ConditionType = "DisksReady"
// NetworkInterfaceReadyCondition means the network interfaces exist and are ready to be used.
NetworkInterfaceReadyCondition clusterv1.ConditionType = "NetworkInterfacesReady"
// PrivateEndpointsReadyCondition means the private endpoints exist and are ready to be used.
PrivateEndpointsReadyCondition clusterv1.ConditionType = "PrivateEndpointsReady"
// FleetReadyCondition means the Fleet exists and is ready to be used.
FleetReadyCondition clusterv1.ConditionType = "FleetReady"
// AKSExtensionsReadyCondition means the AKS Extensions exist and are ready to be used.
AKSExtensionsReadyCondition clusterv1.ConditionType = "AKSExtensionsReady"
// CreatingReason means the resource is being created.
CreatingReason = "Creating"
// FailedReason means the resource failed to be created.
FailedReason = "Failed"
// DeletingReason means the resource is being deleted.
DeletingReason = "Deleting"
// DeletedReason means the resource was deleted.
DeletedReason = "Deleted"
// DeletionFailedReason means the resource failed to be deleted.
DeletionFailedReason = "DeletionFailed"
// UpdatingReason means the resource is being updated.
UpdatingReason = "Updating"
)
const (
// LinuxOS is Linux OS value for OSDisk.OSType.
LinuxOS = "Linux"
// WindowsOS is Windows OS value for OSDisk.OSType.
WindowsOS = "Windows"
)
const (
// OwnedByClusterLabelKey communicates CAPZ's ownership of an ASO resource
// independently of its ownership of the underlying Azure resource. The
// value for the label is the CAPI Cluster Name.
//
// Deprecated: OwnerReferences now determine ownership.
OwnedByClusterLabelKey = NameAzureProviderPrefix + string(ResourceLifecycleOwned)
)
const (
// AzureNetworkPluginName is the name of the Azure network plugin.
AzureNetworkPluginName = "azure"
)
const (
// AzureClusterKind indicates the kind of an AzureCluster.
AzureClusterKind = "AzureCluster"
// AzureClusterTemplateKind indicates the kind of an AzureClusterTemplate.
AzureClusterTemplateKind = "AzureClusterTemplate"
// AzureMachineKind indicates the kind of an AzureMachine.
AzureMachineKind = "AzureMachine"
// AzureMachineTemplateKind indicates the kind of an AzureMachineTemplate.
AzureMachineTemplateKind = "AzureMachineTemplate"
// AzureMachinePoolKind indicates the kind of an AzureMachinePool.
AzureMachinePoolKind = "AzureMachinePool"
// AzureManagedMachinePoolKind indicates the kind of an AzureManagedMachinePool.
AzureManagedMachinePoolKind = "AzureManagedMachinePool"
// AzureManagedClusterKind indicates the kind of an AzureManagedCluster.
AzureManagedClusterKind = "AzureManagedCluster"
// AzureManagedControlPlaneKind indicates the kind of an AzureManagedControlPlane.
AzureManagedControlPlaneKind = "AzureManagedControlPlane"
// AzureManagedControlPlaneTemplateKind indicates the kind of an AzureManagedControlPlaneTemplate.
AzureManagedControlPlaneTemplateKind = "AzureManagedControlPlaneTemplate"
// AzureManagedMachinePoolTemplateKind indicates the kind of an AzureManagedMachinePoolTemplate.
AzureManagedMachinePoolTemplateKind = "AzureManagedMachinePoolTemplate"
// AzureClusterIdentityKind indicates the kind of an AzureClusterIdentity.
AzureClusterIdentityKind = "AzureClusterIdentity"
)