From 36529fc6eb335f25f467a333abd99da5d2176fc7 Mon Sep 17 00:00:00 2001 From: Archisman Date: Wed, 4 Sep 2024 18:17:09 +0530 Subject: [PATCH] Adding support for user specified labels for a MachinePool Signed-off-by: Archisman --- .../capi-cluster/charts/aws/templates/MachinePool.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/argocd-helm-charts/capi-cluster/charts/aws/templates/MachinePool.yaml b/argocd-helm-charts/capi-cluster/charts/aws/templates/MachinePool.yaml index 949d01d57..8ec89dc35 100644 --- a/argocd-helm-charts/capi-cluster/charts/aws/templates/MachinePool.yaml +++ b/argocd-helm-charts/capi-cluster/charts/aws/templates/MachinePool.yaml @@ -9,6 +9,12 @@ spec: clusterName: {{ $.Values.global.clusterName }} replicas: {{ $machinePool.replicas }} template: + metadata: + labels: + machine-pool: {{ printf "%s-%s" $.Values.global.clusterName $machinePool.name }} + {{- if $machinePool.labels }} + {{- toYaml $machinePool.labels | nindent 8 }} + {{- end }} spec: bootstrap: configRef: