From 37171b94b7894b213c6141d0534227f4c4608786 Mon Sep 17 00:00:00 2001 From: Jacob Weinstock Date: Wed, 26 Jun 2024 21:12:11 -0600 Subject: [PATCH] Fix kustomize patch for HardwareAffinity: 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 --- capt/templates/kustomization.tmpl | 28 +++++----------------------- 1 file changed, 5 insertions(+), 23 deletions(-) diff --git a/capt/templates/kustomization.tmpl b/capt/templates/kustomization.tmpl index da20bae..0931107 100644 --- a/capt/templates/kustomization.tmpl +++ b/capt/templates/kustomization.tmpl @@ -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 @@ -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