Skip to content

Commit eabd61f

Browse files
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 <[email protected]>
1 parent 16523ac commit eabd61f

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

api/v1alpha1/machine.go

+2
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,8 @@ func WithMachineConditionMessage(m string) MachineSetConditionOption {
182182
//+kubebuilder:object:root=true
183183
//+kubebuilder:subresource:status
184184
//+kubebuilder:resource:path=machines,scope=Namespaced,categories=tinkerbell,singular=machine
185+
// +kubebuilder:metadata:labels=clusterctl.cluster.x-k8s.io=
186+
// +kubebuilder:metadata:labels=clusterctl.cluster.x-k8s.io/move=
185187

186188
// Machine is the Schema for the machines API.
187189
type Machine struct {

config/crd/bases/bmc.tinkerbell.org_machines.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ kind: CustomResourceDefinition
44
metadata:
55
annotations:
66
controller-gen.kubebuilder.io/version: v0.16.4
7+
labels:
8+
clusterctl.cluster.x-k8s.io: ""
9+
clusterctl.cluster.x-k8s.io/move: ""
710
name: machines.bmc.tinkerbell.org
811
spec:
912
group: bmc.tinkerbell.org

0 commit comments

Comments
 (0)