Skip to content

Commit

Permalink
Fix kustomize patch for HardwareAffinity:
Browse files Browse the repository at this point in the history
The patch for HardwareAffinity was being
overridden by the patch for the templateOverride.
This caused no HardwareAffinity to be in place
and all node being used for any role.

Signed-off-by: Jacob Weinstock <[email protected]>
  • Loading branch information
jacobweinstock committed Jun 27, 2024
1 parent 5ea86d1 commit 37171b9
Showing 1 changed file with 5 additions and 23 deletions.
28 changes: 5 additions & 23 deletions capt/templates/kustomization.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -18,29 +18,6 @@ patches:
- labelSelector:
matchLabels:
tinkerbell.org/role: control-plane
- target:
group: infrastructure.cluster.x-k8s.io
kind: TinkerbellMachineTemplate
name: ".*worker.*"
version: v1beta1
patch: |-
- op: add
path: /spec/template/spec
value:
hardwareAffinity:
required:
- labelSelector:
matchLabels:
tinkerbell.org/role: worker
- target:
group: infrastructure.cluster.x-k8s.io
kind: TinkerbellMachineTemplate
name: ".*control-plane.*"
version: v1beta1
patch: |-
- op: add
path: /spec/template/spec
value:
templateOverride: |
version: "0.1"
name: playground-template
Expand Down Expand Up @@ -118,6 +95,11 @@ patches:
- op: add
path: /spec/template/spec
value:
hardwareAffinity:
required:
- labelSelector:
matchLabels:
tinkerbell.org/role: worker
templateOverride: |
version: "0.1"
name: playground-template
Expand Down

0 comments on commit 37171b9

Please sign in to comment.