From cc9c5bcc7039c8e2b2b75ad71779df807a793a10 Mon Sep 17 00:00:00 2001 From: Stefan Bueringer Date: Wed, 15 Sep 2021 14:28:52 +0200 Subject: [PATCH] add missing constants of v1alpha3 package from release-0.3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stefan Büringer buringerst@vmware.com --- api/v1alpha3/common_types.go | 22 ++++++++++++++++++++++ api/v1alpha3/condition_consts.go | 7 +++++++ 2 files changed, 29 insertions(+) diff --git a/api/v1alpha3/common_types.go b/api/v1alpha3/common_types.go index 5f9c0f581841..58ef4a74e2cf 100644 --- a/api/v1alpha3/common_types.go +++ b/api/v1alpha3/common_types.go @@ -31,6 +31,21 @@ const ( // tool uses this label for implementing provider's lifecycle operations. ProviderLabelName = "cluster.x-k8s.io/provider" + // ClusterNameAnnotation is the annotation set on nodes identifying the name of the cluster the node belongs to. + ClusterNameAnnotation = "cluster.x-k8s.io/cluster-name" + + // ClusterNamespaceAnnotation is the annotation set on nodes identifying the namespace of the cluster the node belongs to. + ClusterNamespaceAnnotation = "cluster.x-k8s.io/cluster-namespace" + + // MachineAnnotation is the annotation set on nodes identifying the machine the node belongs to. + MachineAnnotation = "cluster.x-k8s.io/machine" + + // OwnerKindAnnotation is the annotation set on nodes identifying the owner kind. + OwnerKindAnnotation = "cluster.x-k8s.io/owner-kind" + + // OwnerNameAnnotation is the annotation set on nodes identifying the owner name. + OwnerNameAnnotation = "cluster.x-k8s.io/owner-name" + // PausedAnnotation is an annotation that can be applied to any Cluster API // object to prevent a controller from processing a resource. // @@ -38,6 +53,10 @@ const ( // on the reconciled object. PausedAnnotation = "cluster.x-k8s.io/paused" + // DeleteMachineAnnotation marks control plane and worker nodes that will be given priority for deletion + // when KCP or a machineset scales down. This annotation is given top priority on all delete policies. + DeleteMachineAnnotation = "cluster.x-k8s.io/delete-machine" + // TemplateClonedFromNameAnnotation is the infrastructure machine annotation that stores the name of the infrastructure template resource // that was cloned for the machine. This annotation is set only during cloning a template. Older/adopted machines will not have this annotation. TemplateClonedFromNameAnnotation = "cluster.x-k8s.io/cloned-from-name" @@ -46,6 +65,9 @@ const ( // that was cloned for the machine. This annotation is set only during cloning a template. Older/adopted machines will not have this annotation. TemplateClonedFromGroupKindAnnotation = "cluster.x-k8s.io/cloned-from-groupkind" + // MachineSkipRemediationAnnotation is the annotation used to mark the machines that should not be considered for remediation by MachineHealthCheck reconciler. + MachineSkipRemediationAnnotation = "cluster.x-k8s.io/skip-remediation" + // ClusterSecretType defines the type of secret created by core components. ClusterSecretType corev1.SecretType = "cluster.x-k8s.io/secret" //nolint:gosec ) diff --git a/api/v1alpha3/condition_consts.go b/api/v1alpha3/condition_consts.go index 65393255f430..da19868e3ae0 100644 --- a/api/v1alpha3/condition_consts.go +++ b/api/v1alpha3/condition_consts.go @@ -65,6 +65,13 @@ const ( // 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" + + // WaitingForControlPlaneAvailableReason (Severity=Info) documents a Cluster API object + // waiting for the control plane machine to be available. + // + // NOTE: Having the control plane machine available is a pre-condition for joining additional control planes + // or workers nodes. + WaitingForControlPlaneAvailableReason = "WaitingForControlPlaneAvailable" ) // Conditions and condition Reasons for the Machine object