Skip to content
This repository was archived by the owner on Dec 2, 2025. It is now read-only.

Commit 05340d8

Browse files
Merge pull request #283 from jacobweinstock/add-labels
Add CAPI labels to Machine CRD: ## Description <!--- Please describe what this PR is going to change --> These labels allow CAPI to move the Machine CR's during a clusterctl move command. This won't affect non CAPI use. ## Why is this needed <!--- Link to issue you have raised --> Fixes: # ## How Has This Been Tested? <!--- Please describe in detail how you tested your changes. --> <!--- Include details of your testing environment, and the tests you ran to --> <!--- see how your change affects other areas of the code, etc. --> ## How are existing users impacted? What migration steps/scripts do we need? <!--- Fixes a bug, unblocks installation, removes a component of the stack etc --> <!--- Requires a DB migration script, etc. --> ## Checklist: I have: - [ ] updated the documentation and/or roadmap (if required) - [ ] added unit or e2e tests - [ ] provided instructions on how to upgrade
2 parents 16523ac + eabd61f commit 05340d8

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

api/v1alpha1/machine.go

Lines changed: 2 additions & 0 deletions
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

Lines changed: 3 additions & 0 deletions
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)