From b1807a473c232e284f90bcf3638949f03ee886cd Mon Sep 17 00:00:00 2001 From: Jacob Weinstock <jakobweinstock@gmail.com> Date: Sat, 4 Jan 2025 15:59:01 -0700 Subject: [PATCH] Add CAPI labels to Hardware CRD: These labels allow CAPI to move the Hardware CR's during a clusterctl move command. This won't affect non CAPI use. Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com> --- api/v1alpha1/hardware_types.go | 2 ++ config/crd/bases/tinkerbell.org_hardware.yaml | 3 +++ 2 files changed, 5 insertions(+) diff --git a/api/v1alpha1/hardware_types.go b/api/v1alpha1/hardware_types.go index 83c24a19e..d0c721ac9 100644 --- a/api/v1alpha1/hardware_types.go +++ b/api/v1alpha1/hardware_types.go @@ -31,6 +31,8 @@ type HardwareList struct { // +kubebuilder:resource:path=hardware,scope=Namespaced,categories=tinkerbell,singular=hardware,shortName=hw // +kubebuilder:storageversion // +kubebuilder:printcolumn:JSONPath=".status.state",name=State,type=string +// +kubebuilder:metadata:labels=clusterctl.cluster.x-k8s.io= +// +kubebuilder:metadata:labels=clusterctl.cluster.x-k8s.io/move= // Hardware is the Schema for the Hardware API. type Hardware struct { diff --git a/config/crd/bases/tinkerbell.org_hardware.yaml b/config/crd/bases/tinkerbell.org_hardware.yaml index a32dcfbf0..348f3bb38 100644 --- a/config/crd/bases/tinkerbell.org_hardware.yaml +++ b/config/crd/bases/tinkerbell.org_hardware.yaml @@ -3,6 +3,9 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.16.3 + labels: + clusterctl.cluster.x-k8s.io: "" + clusterctl.cluster.x-k8s.io/move: "" name: hardware.tinkerbell.org spec: group: tinkerbell.org