From 641ee2d9a7389eb1bf17a616294d2686cfa38b19 Mon Sep 17 00:00:00 2001 From: Danny Bessems Date: Wed, 5 Apr 2023 09:46:05 +0200 Subject: [PATCH] Rename nodepools --- .../kustomization.cluster-template.j2 | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/ansible/roles/firstboot/files/ansible_payload/bootstrap/templates/kustomization.cluster-template.j2 b/ansible/roles/firstboot/files/ansible_payload/bootstrap/templates/kustomization.cluster-template.j2 index e116fd7..c0aeb3e 100644 --- a/ansible/roles/firstboot/files/ansible_payload/bootstrap/templates/kustomization.cluster-template.j2 +++ b/ansible/roles/firstboot/files/ansible_payload/bootstrap/templates/kustomization.cluster-template.j2 @@ -175,3 +175,47 @@ patchesJson6902: path: /spec/kubeadmConfigSpec/preKubeadmCommands/- value: {{ cmd }} {% endfor %} + + - target: + group: cluster.x-k8s.io + version: v1beta1 + kind: MachineDeployment + name: \${CLUSTER_NAME}-md-0 + patch: |- + - op: replace + path: /metadata/name + value: ${CLUSTER_NAME}-worker + - op: replace + path: /spec/template/spec/bootstrap/configRef/name + value: ${CLUSTER_NAME}-worker + - target: + group: bootstrap.cluster.x-k8s.io + version: v1beta1 + kind: KubeadmConfigTemplate + name: \${CLUSTER_NAME}-md-0 + patch: |- + - op: replace + path: /metadata/name + value: ${CLUSTER_NAME}-worker + + - target: + group: infrastructure.cluster.x-k8s.io + version: v1beta1 + kind: VSphereMachineTemplate + name: \${CLUSTER_NAME} + patch: |- + - op: replace + path: /metadata/name + value: ${CLUSTER_NAME}-master + - target: + group: controlplane.cluster.x-k8s.io + version: v1beta1 + kind: KubeadmControlPlane + name: \${CLUSTER_NAME} + patch: |- + - op: replace + path: /metadata/name + value: ${CLUSTER_NAME}-master + - op: replace + path: /spec/machineTemplate/infrastructureRef/name + value: ${CLUSTER_NAME}-master