diff --git a/argocd-helm-charts/capi-cluster/charts/aws/templates/KubeadmConfig.yaml b/argocd-helm-charts/capi-cluster/charts/aws/templates/KubeadmConfig.yaml index b6edc9f4f..ca7e9964b 100644 --- a/argocd-helm-charts/capi-cluster/charts/aws/templates/KubeadmConfig.yaml +++ b/argocd-helm-charts/capi-cluster/charts/aws/templates/KubeadmConfig.yaml @@ -1,8 +1,10 @@ {{- if (.Values.global.capa).autoScaler }} +{{- range $index, $machinePool := $.Values.machinePools }} +--- apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 kind: KubeadmConfig metadata: - name: {{ .Values.global.clusterName }} + name: {{ printf "%s-%s" $.Values.global.clusterName $machinePool.name }} spec: joinConfiguration: nodeRegistration: @@ -10,3 +12,4 @@ spec: cloud-provider: external name: '{{"{{"}} ds.meta_data.local_hostname {{"}}"}}' {{- end }} +{{- end }} 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 8ec89dc35..cd080fe34 100644 --- a/argocd-helm-charts/capi-cluster/charts/aws/templates/MachinePool.yaml +++ b/argocd-helm-charts/capi-cluster/charts/aws/templates/MachinePool.yaml @@ -20,7 +20,7 @@ spec: configRef: apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 kind: KubeadmConfig - name: {{ $.Values.global.clusterName }} + name: {{ printf "%s-%s" $.Values.global.clusterName $machinePool.name }} clusterName: {{ $.Values.global.clusterName }} infrastructureRef: apiVersion: infrastructure.cluster.x-k8s.io/v1beta2