diff --git a/templates/cluster/aws-hosted-cp/templates/k0smotroncontrolplane.yaml b/templates/cluster/aws-hosted-cp/templates/k0smotroncontrolplane.yaml index 3460717d..7f19f1ea 100644 --- a/templates/cluster/aws-hosted-cp/templates/k0smotroncontrolplane.yaml +++ b/templates/cluster/aws-hosted-cp/templates/k0smotroncontrolplane.yaml @@ -26,11 +26,11 @@ spec: extensions: helm: repositories: - - name: aws-cloud-controller-manager + - name: mirantis {{- if .Values.extensions.chartRepository }} url: {{ .Values.extensions.chartRepository }} {{- else }} - url: https://kubernetes.github.io/cloud-provider-aws + url: https://charts.mirantis.com {{- end }} - name: aws-ebs-csi-driver {{- if .Values.extensions.chartRepository }} @@ -41,8 +41,8 @@ spec: charts: - name: aws-cloud-controller-manager namespace: kube-system - chartname: aws-cloud-controller-manager/aws-cloud-controller-manager - version: "0.0.8" + chartname: mirantis/aws-cloud-controller-manager + version: "0.0.9" values: | image: {{- if .Values.extensions.imageRepository }} @@ -55,6 +55,10 @@ spec: - --cluster-cidr={{ first .Values.clusterNetwork.pods.cidrBlocks }} - --allocate-node-cidrs=true - --cluster-name={{ include "cluster.name" . }} + cloudConfig: + enabled: {{ ne .Values.managementClusterName "" }} + global: + KubernetesClusterID: {{ .Values.managementClusterName }} # Removing the default `node-role.kubernetes.io/control-plane` node selector # TODO: it does not work nodeSelector: diff --git a/templates/cluster/aws-hosted-cp/values.schema.json b/templates/cluster/aws-hosted-cp/values.schema.json index 4a1786d9..74a6a427 100644 --- a/templates/cluster/aws-hosted-cp/values.schema.json +++ b/templates/cluster/aws-hosted-cp/values.schema.json @@ -13,6 +13,10 @@ "clusterIdentity" ], "properties": { + "managementClusterName" : { + "description": "The name of the management cluster that this template is being deployed on", + "type": "string" + }, "workersNumber": { "description": "The number of the worker machines", "type": "integer", diff --git a/templates/cluster/aws-hosted-cp/values.yaml b/templates/cluster/aws-hosted-cp/values.yaml index c018fe1f..c147402c 100644 --- a/templates/cluster/aws-hosted-cp/values.yaml +++ b/templates/cluster/aws-hosted-cp/values.yaml @@ -52,4 +52,7 @@ k0s: # k0s extensions. extensions: chartRepository: "" - imageRepository: "" \ No newline at end of file + imageRepository: "" + +# Name of the management cluster that this template is being deployed on +managementClusterName: "" \ No newline at end of file