From eabd61f882a6e9c0ceeaf7441e8284050a6daf6d Mon Sep 17 00:00:00 2001 From: Jacob Weinstock Date: Sat, 4 Jan 2025 16:02:17 -0700 Subject: [PATCH] Add CAPI labels to Machine CRD: These labels allow CAPI to move the Machine CR's during a clusterctl move command. This won't affect non CAPI use. Signed-off-by: Jacob Weinstock --- api/v1alpha1/machine.go | 2 ++ config/crd/bases/bmc.tinkerbell.org_machines.yaml | 3 +++ 2 files changed, 5 insertions(+) diff --git a/api/v1alpha1/machine.go b/api/v1alpha1/machine.go index d1db2d9..b79286c 100644 --- a/api/v1alpha1/machine.go +++ b/api/v1alpha1/machine.go @@ -182,6 +182,8 @@ func WithMachineConditionMessage(m string) MachineSetConditionOption { //+kubebuilder:object:root=true //+kubebuilder:subresource:status //+kubebuilder:resource:path=machines,scope=Namespaced,categories=tinkerbell,singular=machine +// +kubebuilder:metadata:labels=clusterctl.cluster.x-k8s.io= +// +kubebuilder:metadata:labels=clusterctl.cluster.x-k8s.io/move= // Machine is the Schema for the machines API. type Machine struct { diff --git a/config/crd/bases/bmc.tinkerbell.org_machines.yaml b/config/crd/bases/bmc.tinkerbell.org_machines.yaml index 3e49c84..ed00b0a 100644 --- a/config/crd/bases/bmc.tinkerbell.org_machines.yaml +++ b/config/crd/bases/bmc.tinkerbell.org_machines.yaml @@ -4,6 +4,9 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.16.4 + labels: + clusterctl.cluster.x-k8s.io: "" + clusterctl.cluster.x-k8s.io/move: "" name: machines.bmc.tinkerbell.org spec: group: bmc.tinkerbell.org