Skip to content

Commit

Permalink
Merge pull request #283 from jacobweinstock/add-labels
Browse files Browse the repository at this point in the history
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
  • Loading branch information
jacobweinstock authored Jan 4, 2025
2 parents 16523ac + eabd61f commit 05340d8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions api/v1alpha1/machine.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 3 additions & 0 deletions config/crd/bases/bmc.tinkerbell.org_machines.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 05340d8

Please sign in to comment.