Skip to content

Commit

Permalink
Add CAPI labels to Hardware CRD:
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
jacobweinstock committed Jan 4, 2025
1 parent 3a7c2cb commit b1807a4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions api/v1alpha1/hardware_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 3 additions & 0 deletions config/crd/bases/tinkerbell.org_hardware.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b1807a4

Please sign in to comment.