diff --git a/cloud-provider.env b/cloud-provider.env new file mode 100644 index 000000000000..d60e71b8b23d --- /dev/null +++ b/cloud-provider.env @@ -0,0 +1,19 @@ +export REGISTRY=jont828 +export AZWI=false + +export TEST_CCM="true" +export CONTROL_PLANE_MACHINE_COUNT="1" +export KUBERNETES_VERSION=latest +export CLUSTER_TEMPLATE=https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/tests/k8s-azure/manifest/cluster-api/cluster-template-prow-ci-version-oot-credential-provider.yaml +export AZURE_LOADBALANCER_SKU=Standard +export CLUSTER_PROVISIONING_TOOL=capz +export TEST_WINDOWS="true" +export TEST_ACR_CREDENTIAL_PROVIDER="true" +export LABEL_FILTER=OOT-Credential +export LOCAL_ONLY="false" +export USE_LOCAL_KIND_REGISTRY="false" +# export AZURE_CREDENTIALS=/etc/azure-cred/credentials +export DOCKER_IN_DOCKER_ENABLED="true" +export GOPROXY=https://proxy.golang.org +export AZURE_STORAGE_ACCOUNT="jonathane2estorage" +export AZURE_STORAGE_KEY="6RYfGWb08kgcafWqXF1qruRpoh6LLgytkMT7eM7FTYkGCS8gF+6JrH8PFVi3T6FW1FQl1/hHQukn+ASt1a7n0w==" \ No newline at end of file diff --git a/templates/addons/cluster-api-helm/cloud-provider-azure-ci.yaml b/templates/addons/cluster-api-helm/cloud-provider-azure-ci.yaml new file mode 100644 index 000000000000..274dc0266222 --- /dev/null +++ b/templates/addons/cluster-api-helm/cloud-provider-azure-ci.yaml @@ -0,0 +1,24 @@ +apiVersion: addons.cluster.x-k8s.io/v1alpha1 +kind: HelmChartProxy +metadata: + name: cloud-provider-azure-chart-ci +spec: + clusterSelector: + matchLabels: + cloud-provider: "azure-ci" + repoURL: https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo + chartName: cloud-provider-azure + releaseName: cloud-provider-azure + valuesTemplate: | + infra: + clusterName: {{ .Cluster.metadata.name }} + cloudControllerManager: + clusterCIDR: {{ .Cluster.spec.clusterNetwork.pods.cidrBlocks | join "," }} + imageName: ${CCM_IMAGE_NAME} + imageRepository: ${CCM_IMAGE_REGISTRY} + imageTag: ${IMAGE_TAG_CCM} + logVerbosity: 4 + cloudNodeManager: + imageName: ${CNM_IMAGE_NAME} + imageRepository: ${CNM_IMAGE_REGISTRY} + imageTag: ${IMAGE_TAG_CCM} \ No newline at end of file diff --git a/templates/addons/cluster-api-helm/cloud-provider-azure.yaml b/templates/addons/cluster-api-helm/cloud-provider-azure.yaml new file mode 100644 index 000000000000..fe4e249dd8ab --- /dev/null +++ b/templates/addons/cluster-api-helm/cloud-provider-azure.yaml @@ -0,0 +1,17 @@ +apiVersion: addons.cluster.x-k8s.io/v1alpha1 +kind: HelmChartProxy +metadata: + name: cloud-provider-azure-chart +spec: + clusterSelector: + matchLabels: + cloud-provider: "azure" + repoURL: https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo + chartName: cloud-provider-azure + releaseName: cloud-provider-azure + valuesTemplate: | + infra: + clusterName: {{ .Cluster.metadata.name }} + cloudControllerManager: + clusterCIDR: {{ .Cluster.spec.clusterNetwork.pods.cidrBlocks | join "," }} + logVerbosity: 4 \ No newline at end of file diff --git a/templates/test/ci/cluster-template-prow-azure-cni-v1.yaml b/templates/test/ci/cluster-template-prow-azure-cni-v1.yaml index 37a49bad620b..4cb478cf0ed9 100644 --- a/templates/test/ci/cluster-template-prow-azure-cni-v1.yaml +++ b/templates/test/ci/cluster-template-prow-azure-cni-v1.yaml @@ -3,6 +3,7 @@ kind: Cluster metadata: labels: azuredisk-csi: "true" + cloud-provider: ${CLOUD_PROVIDER_AZURE_LABEL} name: ${CLUSTER_NAME} namespace: default spec: @@ -243,3 +244,48 @@ spec: windows: useHostProcessContainers: {{ hasKey .Cluster.metadata.labels "cni-windows" }} version: ${AZUREDISK_CSI_DRIVER_VERSION} +--- +apiVersion: addons.cluster.x-k8s.io/v1alpha1 +kind: HelmChartProxy +metadata: + name: cloud-provider-azure-chart + namespace: default +spec: + chartName: cloud-provider-azure + clusterSelector: + matchLabels: + cloud-provider: azure + releaseName: cloud-provider-azure + repoURL: https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo + valuesTemplate: |- + infra: + clusterName: {{ .Cluster.metadata.name }} + cloudControllerManager: + clusterCIDR: {{ .Cluster.spec.clusterNetwork.pods.cidrBlocks | join "," }} + logVerbosity: 4 +--- +apiVersion: addons.cluster.x-k8s.io/v1alpha1 +kind: HelmChartProxy +metadata: + name: cloud-provider-azure-chart-ci + namespace: default +spec: + chartName: cloud-provider-azure + clusterSelector: + matchLabels: + cloud-provider: azure-ci + releaseName: cloud-provider-azure + repoURL: https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo + valuesTemplate: |- + infra: + clusterName: {{ .Cluster.metadata.name }} + cloudControllerManager: + clusterCIDR: {{ .Cluster.spec.clusterNetwork.pods.cidrBlocks | join "," }} + imageName: ${CCM_IMAGE_NAME} + imageRepository: ${CCM_IMAGE_REGISTRY} + imageTag: ${IMAGE_TAG_CCM} + logVerbosity: 4 + cloudNodeManager: + imageName: ${CNM_IMAGE_NAME} + imageRepository: ${CNM_IMAGE_REGISTRY} + imageTag: ${IMAGE_TAG_CCM} diff --git a/templates/test/ci/cluster-template-prow-ci-version-dual-stack.yaml b/templates/test/ci/cluster-template-prow-ci-version-dual-stack.yaml index 534abf713546..4f04f9c979a8 100644 --- a/templates/test/ci/cluster-template-prow-ci-version-dual-stack.yaml +++ b/templates/test/ci/cluster-template-prow-ci-version-dual-stack.yaml @@ -3,6 +3,7 @@ kind: Cluster metadata: labels: azuredisk-csi: "true" + cloud-provider: ${CLOUD_PROVIDER_AZURE_LABEL} cni: calico-dual-stack cni-windows: ${CLUSTER_NAME}-calico containerd-logger: disabled @@ -516,6 +517,51 @@ spec: useHostProcessContainers: {{ hasKey .Cluster.metadata.labels "cni-windows" }} version: ${AZUREDISK_CSI_DRIVER_VERSION} --- +apiVersion: addons.cluster.x-k8s.io/v1alpha1 +kind: HelmChartProxy +metadata: + name: cloud-provider-azure-chart + namespace: default +spec: + chartName: cloud-provider-azure + clusterSelector: + matchLabels: + cloud-provider: azure + releaseName: cloud-provider-azure + repoURL: https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo + valuesTemplate: |- + infra: + clusterName: {{ .Cluster.metadata.name }} + cloudControllerManager: + clusterCIDR: {{ .Cluster.spec.clusterNetwork.pods.cidrBlocks | join "," }} + logVerbosity: 4 +--- +apiVersion: addons.cluster.x-k8s.io/v1alpha1 +kind: HelmChartProxy +metadata: + name: cloud-provider-azure-chart-ci + namespace: default +spec: + chartName: cloud-provider-azure + clusterSelector: + matchLabels: + cloud-provider: azure-ci + releaseName: cloud-provider-azure + repoURL: https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo + valuesTemplate: |- + infra: + clusterName: {{ .Cluster.metadata.name }} + cloudControllerManager: + clusterCIDR: {{ .Cluster.spec.clusterNetwork.pods.cidrBlocks | join "," }} + imageName: ${CCM_IMAGE_NAME} + imageRepository: ${CCM_IMAGE_REGISTRY} + imageTag: ${IMAGE_TAG_CCM} + logVerbosity: 4 + cloudNodeManager: + imageName: ${CNM_IMAGE_NAME} + imageRepository: ${CNM_IMAGE_REGISTRY} + imageTag: ${IMAGE_TAG_CCM} +--- apiVersion: v1 data: csi-proxy: | diff --git a/templates/test/ci/cluster-template-prow-ci-version-ipv6.yaml b/templates/test/ci/cluster-template-prow-ci-version-ipv6.yaml index 218cfa9055e1..23395f72bb09 100644 --- a/templates/test/ci/cluster-template-prow-ci-version-ipv6.yaml +++ b/templates/test/ci/cluster-template-prow-ci-version-ipv6.yaml @@ -3,6 +3,7 @@ kind: Cluster metadata: labels: azuredisk-csi: "true" + cloud-provider: ${CLOUD_PROVIDER_AZURE_LABEL} cni: calico-ipv6 cni-windows: ${CLUSTER_NAME}-calico containerd-logger: disabled @@ -534,6 +535,51 @@ spec: useHostProcessContainers: {{ hasKey .Cluster.metadata.labels "cni-windows" }} version: ${AZUREDISK_CSI_DRIVER_VERSION} --- +apiVersion: addons.cluster.x-k8s.io/v1alpha1 +kind: HelmChartProxy +metadata: + name: cloud-provider-azure-chart + namespace: default +spec: + chartName: cloud-provider-azure + clusterSelector: + matchLabels: + cloud-provider: azure + releaseName: cloud-provider-azure + repoURL: https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo + valuesTemplate: |- + infra: + clusterName: {{ .Cluster.metadata.name }} + cloudControllerManager: + clusterCIDR: {{ .Cluster.spec.clusterNetwork.pods.cidrBlocks | join "," }} + logVerbosity: 4 +--- +apiVersion: addons.cluster.x-k8s.io/v1alpha1 +kind: HelmChartProxy +metadata: + name: cloud-provider-azure-chart-ci + namespace: default +spec: + chartName: cloud-provider-azure + clusterSelector: + matchLabels: + cloud-provider: azure-ci + releaseName: cloud-provider-azure + repoURL: https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo + valuesTemplate: |- + infra: + clusterName: {{ .Cluster.metadata.name }} + cloudControllerManager: + clusterCIDR: {{ .Cluster.spec.clusterNetwork.pods.cidrBlocks | join "," }} + imageName: ${CCM_IMAGE_NAME} + imageRepository: ${CCM_IMAGE_REGISTRY} + imageTag: ${IMAGE_TAG_CCM} + logVerbosity: 4 + cloudNodeManager: + imageName: ${CNM_IMAGE_NAME} + imageRepository: ${CNM_IMAGE_REGISTRY} + imageTag: ${IMAGE_TAG_CCM} +--- apiVersion: v1 data: csi-proxy: | diff --git a/templates/test/ci/cluster-template-prow-ci-version.yaml b/templates/test/ci/cluster-template-prow-ci-version.yaml index 234b86840cfa..410c4a5d9b68 100644 --- a/templates/test/ci/cluster-template-prow-ci-version.yaml +++ b/templates/test/ci/cluster-template-prow-ci-version.yaml @@ -3,6 +3,7 @@ kind: Cluster metadata: labels: azuredisk-csi: "true" + cloud-provider: ${CLOUD_PROVIDER_AZURE_LABEL} cni: calico cni-windows: ${CLUSTER_NAME}-calico containerd-logger: enabled @@ -705,6 +706,51 @@ spec: useHostProcessContainers: {{ hasKey .Cluster.metadata.labels "cni-windows" }} version: ${AZUREDISK_CSI_DRIVER_VERSION} --- +apiVersion: addons.cluster.x-k8s.io/v1alpha1 +kind: HelmChartProxy +metadata: + name: cloud-provider-azure-chart + namespace: default +spec: + chartName: cloud-provider-azure + clusterSelector: + matchLabels: + cloud-provider: azure + releaseName: cloud-provider-azure + repoURL: https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo + valuesTemplate: |- + infra: + clusterName: {{ .Cluster.metadata.name }} + cloudControllerManager: + clusterCIDR: {{ .Cluster.spec.clusterNetwork.pods.cidrBlocks | join "," }} + logVerbosity: 4 +--- +apiVersion: addons.cluster.x-k8s.io/v1alpha1 +kind: HelmChartProxy +metadata: + name: cloud-provider-azure-chart-ci + namespace: default +spec: + chartName: cloud-provider-azure + clusterSelector: + matchLabels: + cloud-provider: azure-ci + releaseName: cloud-provider-azure + repoURL: https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo + valuesTemplate: |- + infra: + clusterName: {{ .Cluster.metadata.name }} + cloudControllerManager: + clusterCIDR: {{ .Cluster.spec.clusterNetwork.pods.cidrBlocks | join "," }} + imageName: ${CCM_IMAGE_NAME} + imageRepository: ${CCM_IMAGE_REGISTRY} + imageTag: ${IMAGE_TAG_CCM} + logVerbosity: 4 + cloudNodeManager: + imageName: ${CNM_IMAGE_NAME} + imageRepository: ${CNM_IMAGE_REGISTRY} + imageTag: ${IMAGE_TAG_CCM} +--- apiVersion: v1 data: kube-proxy-patch: |- diff --git a/templates/test/ci/cluster-template-prow-custom-vnet.yaml b/templates/test/ci/cluster-template-prow-custom-vnet.yaml index c451a0040637..7063d1761d0b 100644 --- a/templates/test/ci/cluster-template-prow-custom-vnet.yaml +++ b/templates/test/ci/cluster-template-prow-custom-vnet.yaml @@ -3,6 +3,7 @@ kind: Cluster metadata: labels: azuredisk-csi: "true" + cloud-provider: ${CLOUD_PROVIDER_AZURE_LABEL} cni: calico name: ${CLUSTER_NAME} namespace: default @@ -299,3 +300,48 @@ spec: windows: useHostProcessContainers: {{ hasKey .Cluster.metadata.labels "cni-windows" }} version: ${AZUREDISK_CSI_DRIVER_VERSION} +--- +apiVersion: addons.cluster.x-k8s.io/v1alpha1 +kind: HelmChartProxy +metadata: + name: cloud-provider-azure-chart + namespace: default +spec: + chartName: cloud-provider-azure + clusterSelector: + matchLabels: + cloud-provider: azure + releaseName: cloud-provider-azure + repoURL: https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo + valuesTemplate: |- + infra: + clusterName: {{ .Cluster.metadata.name }} + cloudControllerManager: + clusterCIDR: {{ .Cluster.spec.clusterNetwork.pods.cidrBlocks | join "," }} + logVerbosity: 4 +--- +apiVersion: addons.cluster.x-k8s.io/v1alpha1 +kind: HelmChartProxy +metadata: + name: cloud-provider-azure-chart-ci + namespace: default +spec: + chartName: cloud-provider-azure + clusterSelector: + matchLabels: + cloud-provider: azure-ci + releaseName: cloud-provider-azure + repoURL: https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo + valuesTemplate: |- + infra: + clusterName: {{ .Cluster.metadata.name }} + cloudControllerManager: + clusterCIDR: {{ .Cluster.spec.clusterNetwork.pods.cidrBlocks | join "," }} + imageName: ${CCM_IMAGE_NAME} + imageRepository: ${CCM_IMAGE_REGISTRY} + imageTag: ${IMAGE_TAG_CCM} + logVerbosity: 4 + cloudNodeManager: + imageName: ${CNM_IMAGE_NAME} + imageRepository: ${CNM_IMAGE_REGISTRY} + imageTag: ${IMAGE_TAG_CCM} diff --git a/templates/test/ci/cluster-template-prow-dual-stack.yaml b/templates/test/ci/cluster-template-prow-dual-stack.yaml index 6fc92a8c5b8b..c7f1ccf94003 100644 --- a/templates/test/ci/cluster-template-prow-dual-stack.yaml +++ b/templates/test/ci/cluster-template-prow-dual-stack.yaml @@ -3,6 +3,7 @@ kind: Cluster metadata: labels: azuredisk-csi: "true" + cloud-provider: ${CLOUD_PROVIDER_AZURE_LABEL} cni: calico-dual-stack name: ${CLUSTER_NAME} namespace: default @@ -388,3 +389,48 @@ spec: windows: useHostProcessContainers: {{ hasKey .Cluster.metadata.labels "cni-windows" }} version: ${AZUREDISK_CSI_DRIVER_VERSION} +--- +apiVersion: addons.cluster.x-k8s.io/v1alpha1 +kind: HelmChartProxy +metadata: + name: cloud-provider-azure-chart + namespace: default +spec: + chartName: cloud-provider-azure + clusterSelector: + matchLabels: + cloud-provider: azure + releaseName: cloud-provider-azure + repoURL: https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo + valuesTemplate: |- + infra: + clusterName: {{ .Cluster.metadata.name }} + cloudControllerManager: + clusterCIDR: {{ .Cluster.spec.clusterNetwork.pods.cidrBlocks | join "," }} + logVerbosity: 4 +--- +apiVersion: addons.cluster.x-k8s.io/v1alpha1 +kind: HelmChartProxy +metadata: + name: cloud-provider-azure-chart-ci + namespace: default +spec: + chartName: cloud-provider-azure + clusterSelector: + matchLabels: + cloud-provider: azure-ci + releaseName: cloud-provider-azure + repoURL: https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo + valuesTemplate: |- + infra: + clusterName: {{ .Cluster.metadata.name }} + cloudControllerManager: + clusterCIDR: {{ .Cluster.spec.clusterNetwork.pods.cidrBlocks | join "," }} + imageName: ${CCM_IMAGE_NAME} + imageRepository: ${CCM_IMAGE_REGISTRY} + imageTag: ${IMAGE_TAG_CCM} + logVerbosity: 4 + cloudNodeManager: + imageName: ${CNM_IMAGE_NAME} + imageRepository: ${CNM_IMAGE_REGISTRY} + imageTag: ${IMAGE_TAG_CCM} diff --git a/templates/test/ci/cluster-template-prow-edgezone.yaml b/templates/test/ci/cluster-template-prow-edgezone.yaml index c2bb7641b719..e25d02178c18 100644 --- a/templates/test/ci/cluster-template-prow-edgezone.yaml +++ b/templates/test/ci/cluster-template-prow-edgezone.yaml @@ -3,6 +3,7 @@ kind: Cluster metadata: labels: azuredisk-csi: "true" + cloud-provider: ${CLOUD_PROVIDER_AZURE_LABEL} cni: calico name: ${CLUSTER_NAME} namespace: default @@ -283,3 +284,48 @@ spec: windows: useHostProcessContainers: {{ hasKey .Cluster.metadata.labels "cni-windows" }} version: ${AZUREDISK_CSI_DRIVER_VERSION} +--- +apiVersion: addons.cluster.x-k8s.io/v1alpha1 +kind: HelmChartProxy +metadata: + name: cloud-provider-azure-chart + namespace: default +spec: + chartName: cloud-provider-azure + clusterSelector: + matchLabels: + cloud-provider: azure + releaseName: cloud-provider-azure + repoURL: https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo + valuesTemplate: |- + infra: + clusterName: {{ .Cluster.metadata.name }} + cloudControllerManager: + clusterCIDR: {{ .Cluster.spec.clusterNetwork.pods.cidrBlocks | join "," }} + logVerbosity: 4 +--- +apiVersion: addons.cluster.x-k8s.io/v1alpha1 +kind: HelmChartProxy +metadata: + name: cloud-provider-azure-chart-ci + namespace: default +spec: + chartName: cloud-provider-azure + clusterSelector: + matchLabels: + cloud-provider: azure-ci + releaseName: cloud-provider-azure + repoURL: https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo + valuesTemplate: |- + infra: + clusterName: {{ .Cluster.metadata.name }} + cloudControllerManager: + clusterCIDR: {{ .Cluster.spec.clusterNetwork.pods.cidrBlocks | join "," }} + imageName: ${CCM_IMAGE_NAME} + imageRepository: ${CCM_IMAGE_REGISTRY} + imageTag: ${IMAGE_TAG_CCM} + logVerbosity: 4 + cloudNodeManager: + imageName: ${CNM_IMAGE_NAME} + imageRepository: ${CNM_IMAGE_REGISTRY} + imageTag: ${IMAGE_TAG_CCM} diff --git a/templates/test/ci/cluster-template-prow-flatcar.yaml b/templates/test/ci/cluster-template-prow-flatcar.yaml index 531ca8811d84..93a624afb57f 100644 --- a/templates/test/ci/cluster-template-prow-flatcar.yaml +++ b/templates/test/ci/cluster-template-prow-flatcar.yaml @@ -3,6 +3,7 @@ kind: Cluster metadata: labels: azuredisk-csi: "true" + cloud-provider: ${CLOUD_PROVIDER_AZURE_LABEL} cni: calico name: ${CLUSTER_NAME} namespace: default @@ -310,3 +311,48 @@ spec: windows: useHostProcessContainers: {{ hasKey .Cluster.metadata.labels "cni-windows" }} version: ${AZUREDISK_CSI_DRIVER_VERSION} +--- +apiVersion: addons.cluster.x-k8s.io/v1alpha1 +kind: HelmChartProxy +metadata: + name: cloud-provider-azure-chart + namespace: default +spec: + chartName: cloud-provider-azure + clusterSelector: + matchLabels: + cloud-provider: azure + releaseName: cloud-provider-azure + repoURL: https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo + valuesTemplate: |- + infra: + clusterName: {{ .Cluster.metadata.name }} + cloudControllerManager: + clusterCIDR: {{ .Cluster.spec.clusterNetwork.pods.cidrBlocks | join "," }} + logVerbosity: 4 +--- +apiVersion: addons.cluster.x-k8s.io/v1alpha1 +kind: HelmChartProxy +metadata: + name: cloud-provider-azure-chart-ci + namespace: default +spec: + chartName: cloud-provider-azure + clusterSelector: + matchLabels: + cloud-provider: azure-ci + releaseName: cloud-provider-azure + repoURL: https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo + valuesTemplate: |- + infra: + clusterName: {{ .Cluster.metadata.name }} + cloudControllerManager: + clusterCIDR: {{ .Cluster.spec.clusterNetwork.pods.cidrBlocks | join "," }} + imageName: ${CCM_IMAGE_NAME} + imageRepository: ${CCM_IMAGE_REGISTRY} + imageTag: ${IMAGE_TAG_CCM} + logVerbosity: 4 + cloudNodeManager: + imageName: ${CNM_IMAGE_NAME} + imageRepository: ${CNM_IMAGE_REGISTRY} + imageTag: ${IMAGE_TAG_CCM} diff --git a/templates/test/ci/cluster-template-prow-intree-cloud-provider-machine-pool.yaml b/templates/test/ci/cluster-template-prow-intree-cloud-provider-machine-pool.yaml index bb28f25dd5fc..4a3461c2fbb2 100644 --- a/templates/test/ci/cluster-template-prow-intree-cloud-provider-machine-pool.yaml +++ b/templates/test/ci/cluster-template-prow-intree-cloud-provider-machine-pool.yaml @@ -3,6 +3,7 @@ kind: Cluster metadata: labels: azuredisk-csi: "true" + cloud-provider: ${CLOUD_PROVIDER_AZURE_LABEL} cni: calico cni-windows: ${CLUSTER_NAME}-calico containerd-logger: enabled @@ -420,6 +421,51 @@ spec: useHostProcessContainers: {{ hasKey .Cluster.metadata.labels "cni-windows" }} version: ${AZUREDISK_CSI_DRIVER_VERSION} --- +apiVersion: addons.cluster.x-k8s.io/v1alpha1 +kind: HelmChartProxy +metadata: + name: cloud-provider-azure-chart + namespace: default +spec: + chartName: cloud-provider-azure + clusterSelector: + matchLabels: + cloud-provider: azure + releaseName: cloud-provider-azure + repoURL: https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo + valuesTemplate: |- + infra: + clusterName: {{ .Cluster.metadata.name }} + cloudControllerManager: + clusterCIDR: {{ .Cluster.spec.clusterNetwork.pods.cidrBlocks | join "," }} + logVerbosity: 4 +--- +apiVersion: addons.cluster.x-k8s.io/v1alpha1 +kind: HelmChartProxy +metadata: + name: cloud-provider-azure-chart-ci + namespace: default +spec: + chartName: cloud-provider-azure + clusterSelector: + matchLabels: + cloud-provider: azure-ci + releaseName: cloud-provider-azure + repoURL: https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo + valuesTemplate: |- + infra: + clusterName: {{ .Cluster.metadata.name }} + cloudControllerManager: + clusterCIDR: {{ .Cluster.spec.clusterNetwork.pods.cidrBlocks | join "," }} + imageName: ${CCM_IMAGE_NAME} + imageRepository: ${CCM_IMAGE_REGISTRY} + imageTag: ${IMAGE_TAG_CCM} + logVerbosity: 4 + cloudNodeManager: + imageName: ${CNM_IMAGE_NAME} + imageRepository: ${CNM_IMAGE_REGISTRY} + imageTag: ${IMAGE_TAG_CCM} +--- apiVersion: v1 data: proxy: | diff --git a/templates/test/ci/cluster-template-prow-intree-cloud-provider.yaml b/templates/test/ci/cluster-template-prow-intree-cloud-provider.yaml index 3b878b6fc30b..f07e7b7f72e0 100644 --- a/templates/test/ci/cluster-template-prow-intree-cloud-provider.yaml +++ b/templates/test/ci/cluster-template-prow-intree-cloud-provider.yaml @@ -3,6 +3,7 @@ kind: Cluster metadata: labels: azuredisk-csi: "true" + cloud-provider: ${CLOUD_PROVIDER_AZURE_LABEL} cni: calico cni-windows: ${CLUSTER_NAME}-calico containerd-logger: enabled @@ -484,6 +485,51 @@ spec: useHostProcessContainers: {{ hasKey .Cluster.metadata.labels "cni-windows" }} version: ${AZUREDISK_CSI_DRIVER_VERSION} --- +apiVersion: addons.cluster.x-k8s.io/v1alpha1 +kind: HelmChartProxy +metadata: + name: cloud-provider-azure-chart + namespace: default +spec: + chartName: cloud-provider-azure + clusterSelector: + matchLabels: + cloud-provider: azure + releaseName: cloud-provider-azure + repoURL: https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo + valuesTemplate: |- + infra: + clusterName: {{ .Cluster.metadata.name }} + cloudControllerManager: + clusterCIDR: {{ .Cluster.spec.clusterNetwork.pods.cidrBlocks | join "," }} + logVerbosity: 4 +--- +apiVersion: addons.cluster.x-k8s.io/v1alpha1 +kind: HelmChartProxy +metadata: + name: cloud-provider-azure-chart-ci + namespace: default +spec: + chartName: cloud-provider-azure + clusterSelector: + matchLabels: + cloud-provider: azure-ci + releaseName: cloud-provider-azure + repoURL: https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo + valuesTemplate: |- + infra: + clusterName: {{ .Cluster.metadata.name }} + cloudControllerManager: + clusterCIDR: {{ .Cluster.spec.clusterNetwork.pods.cidrBlocks | join "," }} + imageName: ${CCM_IMAGE_NAME} + imageRepository: ${CCM_IMAGE_REGISTRY} + imageTag: ${IMAGE_TAG_CCM} + logVerbosity: 4 + cloudNodeManager: + imageName: ${CNM_IMAGE_NAME} + imageRepository: ${CNM_IMAGE_REGISTRY} + imageTag: ${IMAGE_TAG_CCM} +--- apiVersion: v1 data: proxy: | diff --git a/templates/test/ci/cluster-template-prow-ipv6.yaml b/templates/test/ci/cluster-template-prow-ipv6.yaml index b605d5bca163..1951b3dccbd5 100644 --- a/templates/test/ci/cluster-template-prow-ipv6.yaml +++ b/templates/test/ci/cluster-template-prow-ipv6.yaml @@ -3,6 +3,7 @@ kind: Cluster metadata: labels: azuredisk-csi: "true" + cloud-provider: ${CLOUD_PROVIDER_AZURE_LABEL} cni: calico-ipv6 name: ${CLUSTER_NAME} namespace: default @@ -405,3 +406,48 @@ spec: windows: useHostProcessContainers: {{ hasKey .Cluster.metadata.labels "cni-windows" }} version: ${AZUREDISK_CSI_DRIVER_VERSION} +--- +apiVersion: addons.cluster.x-k8s.io/v1alpha1 +kind: HelmChartProxy +metadata: + name: cloud-provider-azure-chart + namespace: default +spec: + chartName: cloud-provider-azure + clusterSelector: + matchLabels: + cloud-provider: azure + releaseName: cloud-provider-azure + repoURL: https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo + valuesTemplate: |- + infra: + clusterName: {{ .Cluster.metadata.name }} + cloudControllerManager: + clusterCIDR: {{ .Cluster.spec.clusterNetwork.pods.cidrBlocks | join "," }} + logVerbosity: 4 +--- +apiVersion: addons.cluster.x-k8s.io/v1alpha1 +kind: HelmChartProxy +metadata: + name: cloud-provider-azure-chart-ci + namespace: default +spec: + chartName: cloud-provider-azure + clusterSelector: + matchLabels: + cloud-provider: azure-ci + releaseName: cloud-provider-azure + repoURL: https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo + valuesTemplate: |- + infra: + clusterName: {{ .Cluster.metadata.name }} + cloudControllerManager: + clusterCIDR: {{ .Cluster.spec.clusterNetwork.pods.cidrBlocks | join "," }} + imageName: ${CCM_IMAGE_NAME} + imageRepository: ${CCM_IMAGE_REGISTRY} + imageTag: ${IMAGE_TAG_CCM} + logVerbosity: 4 + cloudNodeManager: + imageName: ${CNM_IMAGE_NAME} + imageRepository: ${CNM_IMAGE_REGISTRY} + imageTag: ${IMAGE_TAG_CCM} diff --git a/templates/test/ci/cluster-template-prow-machine-pool-ci-version.yaml b/templates/test/ci/cluster-template-prow-machine-pool-ci-version.yaml index b056d06e038e..39d6b379839a 100644 --- a/templates/test/ci/cluster-template-prow-machine-pool-ci-version.yaml +++ b/templates/test/ci/cluster-template-prow-machine-pool-ci-version.yaml @@ -3,6 +3,7 @@ kind: Cluster metadata: labels: azuredisk-csi: "true" + cloud-provider: ${CLOUD_PROVIDER_AZURE_LABEL} cni: calico cni-windows: ${CLUSTER_NAME}-calico containerd-logger: enabled @@ -639,6 +640,51 @@ spec: useHostProcessContainers: {{ hasKey .Cluster.metadata.labels "cni-windows" }} version: ${AZUREDISK_CSI_DRIVER_VERSION} --- +apiVersion: addons.cluster.x-k8s.io/v1alpha1 +kind: HelmChartProxy +metadata: + name: cloud-provider-azure-chart + namespace: default +spec: + chartName: cloud-provider-azure + clusterSelector: + matchLabels: + cloud-provider: azure + releaseName: cloud-provider-azure + repoURL: https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo + valuesTemplate: |- + infra: + clusterName: {{ .Cluster.metadata.name }} + cloudControllerManager: + clusterCIDR: {{ .Cluster.spec.clusterNetwork.pods.cidrBlocks | join "," }} + logVerbosity: 4 +--- +apiVersion: addons.cluster.x-k8s.io/v1alpha1 +kind: HelmChartProxy +metadata: + name: cloud-provider-azure-chart-ci + namespace: default +spec: + chartName: cloud-provider-azure + clusterSelector: + matchLabels: + cloud-provider: azure-ci + releaseName: cloud-provider-azure + repoURL: https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo + valuesTemplate: |- + infra: + clusterName: {{ .Cluster.metadata.name }} + cloudControllerManager: + clusterCIDR: {{ .Cluster.spec.clusterNetwork.pods.cidrBlocks | join "," }} + imageName: ${CCM_IMAGE_NAME} + imageRepository: ${CCM_IMAGE_REGISTRY} + imageTag: ${IMAGE_TAG_CCM} + logVerbosity: 4 + cloudNodeManager: + imageName: ${CNM_IMAGE_NAME} + imageRepository: ${CNM_IMAGE_REGISTRY} + imageTag: ${IMAGE_TAG_CCM} +--- apiVersion: v1 data: kube-proxy-patch: |- diff --git a/templates/test/ci/cluster-template-prow-machine-pool-flex.yaml b/templates/test/ci/cluster-template-prow-machine-pool-flex.yaml index f89925d6cf1c..4c51bb02bdda 100644 --- a/templates/test/ci/cluster-template-prow-machine-pool-flex.yaml +++ b/templates/test/ci/cluster-template-prow-machine-pool-flex.yaml @@ -3,6 +3,7 @@ kind: Cluster metadata: labels: azuredisk-csi: "true" + cloud-provider: ${CLOUD_PROVIDER_AZURE_LABEL} cni: calico cni-windows: ${CLUSTER_NAME}-calico containerd-logger: enabled @@ -410,6 +411,51 @@ spec: useHostProcessContainers: {{ hasKey .Cluster.metadata.labels "cni-windows" }} version: ${AZUREDISK_CSI_DRIVER_VERSION} --- +apiVersion: addons.cluster.x-k8s.io/v1alpha1 +kind: HelmChartProxy +metadata: + name: cloud-provider-azure-chart + namespace: default +spec: + chartName: cloud-provider-azure + clusterSelector: + matchLabels: + cloud-provider: azure + releaseName: cloud-provider-azure + repoURL: https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo + valuesTemplate: |- + infra: + clusterName: {{ .Cluster.metadata.name }} + cloudControllerManager: + clusterCIDR: {{ .Cluster.spec.clusterNetwork.pods.cidrBlocks | join "," }} + logVerbosity: 4 +--- +apiVersion: addons.cluster.x-k8s.io/v1alpha1 +kind: HelmChartProxy +metadata: + name: cloud-provider-azure-chart-ci + namespace: default +spec: + chartName: cloud-provider-azure + clusterSelector: + matchLabels: + cloud-provider: azure-ci + releaseName: cloud-provider-azure + repoURL: https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo + valuesTemplate: |- + infra: + clusterName: {{ .Cluster.metadata.name }} + cloudControllerManager: + clusterCIDR: {{ .Cluster.spec.clusterNetwork.pods.cidrBlocks | join "," }} + imageName: ${CCM_IMAGE_NAME} + imageRepository: ${CCM_IMAGE_REGISTRY} + imageTag: ${IMAGE_TAG_CCM} + logVerbosity: 4 + cloudNodeManager: + imageName: ${CNM_IMAGE_NAME} + imageRepository: ${CNM_IMAGE_REGISTRY} + imageTag: ${IMAGE_TAG_CCM} +--- apiVersion: v1 data: proxy: | diff --git a/templates/test/ci/cluster-template-prow-machine-pool.yaml b/templates/test/ci/cluster-template-prow-machine-pool.yaml index a307f1116936..e1385ad44b62 100644 --- a/templates/test/ci/cluster-template-prow-machine-pool.yaml +++ b/templates/test/ci/cluster-template-prow-machine-pool.yaml @@ -3,6 +3,7 @@ kind: Cluster metadata: labels: azuredisk-csi: "true" + cloud-provider: ${CLOUD_PROVIDER_AZURE_LABEL} cni: calico cni-windows: ${CLUSTER_NAME}-calico containerd-logger: enabled @@ -404,6 +405,51 @@ spec: useHostProcessContainers: {{ hasKey .Cluster.metadata.labels "cni-windows" }} version: ${AZUREDISK_CSI_DRIVER_VERSION} --- +apiVersion: addons.cluster.x-k8s.io/v1alpha1 +kind: HelmChartProxy +metadata: + name: cloud-provider-azure-chart + namespace: default +spec: + chartName: cloud-provider-azure + clusterSelector: + matchLabels: + cloud-provider: azure + releaseName: cloud-provider-azure + repoURL: https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo + valuesTemplate: |- + infra: + clusterName: {{ .Cluster.metadata.name }} + cloudControllerManager: + clusterCIDR: {{ .Cluster.spec.clusterNetwork.pods.cidrBlocks | join "," }} + logVerbosity: 4 +--- +apiVersion: addons.cluster.x-k8s.io/v1alpha1 +kind: HelmChartProxy +metadata: + name: cloud-provider-azure-chart-ci + namespace: default +spec: + chartName: cloud-provider-azure + clusterSelector: + matchLabels: + cloud-provider: azure-ci + releaseName: cloud-provider-azure + repoURL: https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo + valuesTemplate: |- + infra: + clusterName: {{ .Cluster.metadata.name }} + cloudControllerManager: + clusterCIDR: {{ .Cluster.spec.clusterNetwork.pods.cidrBlocks | join "," }} + imageName: ${CCM_IMAGE_NAME} + imageRepository: ${CCM_IMAGE_REGISTRY} + imageTag: ${IMAGE_TAG_CCM} + logVerbosity: 4 + cloudNodeManager: + imageName: ${CNM_IMAGE_NAME} + imageRepository: ${CNM_IMAGE_REGISTRY} + imageTag: ${IMAGE_TAG_CCM} +--- apiVersion: v1 data: proxy: | diff --git a/templates/test/ci/cluster-template-prow-nvidia-gpu.yaml b/templates/test/ci/cluster-template-prow-nvidia-gpu.yaml index e847170f181d..f03dbeac54dc 100644 --- a/templates/test/ci/cluster-template-prow-nvidia-gpu.yaml +++ b/templates/test/ci/cluster-template-prow-nvidia-gpu.yaml @@ -3,6 +3,7 @@ kind: Cluster metadata: labels: azuredisk-csi: "true" + cloud-provider: ${CLOUD_PROVIDER_AZURE_LABEL} cni: calico name: ${CLUSTER_NAME} namespace: default @@ -269,3 +270,48 @@ spec: windows: useHostProcessContainers: {{ hasKey .Cluster.metadata.labels "cni-windows" }} version: ${AZUREDISK_CSI_DRIVER_VERSION} +--- +apiVersion: addons.cluster.x-k8s.io/v1alpha1 +kind: HelmChartProxy +metadata: + name: cloud-provider-azure-chart + namespace: default +spec: + chartName: cloud-provider-azure + clusterSelector: + matchLabels: + cloud-provider: azure + releaseName: cloud-provider-azure + repoURL: https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo + valuesTemplate: |- + infra: + clusterName: {{ .Cluster.metadata.name }} + cloudControllerManager: + clusterCIDR: {{ .Cluster.spec.clusterNetwork.pods.cidrBlocks | join "," }} + logVerbosity: 4 +--- +apiVersion: addons.cluster.x-k8s.io/v1alpha1 +kind: HelmChartProxy +metadata: + name: cloud-provider-azure-chart-ci + namespace: default +spec: + chartName: cloud-provider-azure + clusterSelector: + matchLabels: + cloud-provider: azure-ci + releaseName: cloud-provider-azure + repoURL: https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo + valuesTemplate: |- + infra: + clusterName: {{ .Cluster.metadata.name }} + cloudControllerManager: + clusterCIDR: {{ .Cluster.spec.clusterNetwork.pods.cidrBlocks | join "," }} + imageName: ${CCM_IMAGE_NAME} + imageRepository: ${CCM_IMAGE_REGISTRY} + imageTag: ${IMAGE_TAG_CCM} + logVerbosity: 4 + cloudNodeManager: + imageName: ${CNM_IMAGE_NAME} + imageRepository: ${CNM_IMAGE_REGISTRY} + imageTag: ${IMAGE_TAG_CCM} diff --git a/templates/test/ci/cluster-template-prow-private.yaml b/templates/test/ci/cluster-template-prow-private.yaml index 68825484f99f..fa4491b28c33 100644 --- a/templates/test/ci/cluster-template-prow-private.yaml +++ b/templates/test/ci/cluster-template-prow-private.yaml @@ -3,6 +3,7 @@ kind: Cluster metadata: labels: azuredisk-csi: "true" + cloud-provider: ${CLOUD_PROVIDER_AZURE_LABEL} cni: calico name: ${CLUSTER_NAME} namespace: default @@ -87,26 +88,14 @@ spec: clusterConfiguration: apiServer: extraArgs: - cloud-config: /etc/kubernetes/azure.json - cloud-provider: azure - extraVolumes: - - hostPath: /etc/kubernetes/azure.json - mountPath: /etc/kubernetes/azure.json - name: cloud-config - readOnly: true + cloud-provider: external timeoutForControlPlane: 20m controllerManager: extraArgs: allocate-node-cidrs: "false" - cloud-config: /etc/kubernetes/azure.json - cloud-provider: azure + cloud-provider: external cluster-name: ${CLUSTER_NAME} v: "4" - extraVolumes: - - hostPath: /etc/kubernetes/azure.json - mountPath: /etc/kubernetes/azure.json - name: cloud-config - readOnly: true etcd: local: dataDir: /var/lib/etcddisk/etcd @@ -141,15 +130,13 @@ spec: nodeRegistration: kubeletExtraArgs: azure-container-registry-config: /etc/kubernetes/azure.json - cloud-config: /etc/kubernetes/azure.json - cloud-provider: azure + cloud-provider: external name: '{{ ds.meta_data["local_hostname"] }}' joinConfiguration: nodeRegistration: kubeletExtraArgs: azure-container-registry-config: /etc/kubernetes/azure.json - cloud-config: /etc/kubernetes/azure.json - cloud-provider: azure + cloud-provider: external name: '{{ ds.meta_data["local_hostname"] }}' mounts: - - LABEL=etcd_disk @@ -251,8 +238,7 @@ spec: nodeRegistration: kubeletExtraArgs: azure-container-registry-config: /etc/kubernetes/azure.json - cloud-config: /etc/kubernetes/azure.json - cloud-provider: azure + cloud-provider: external name: '{{ ds.meta_data["local_hostname"] }}' preKubeadmCommands: [] --- @@ -338,6 +324,51 @@ spec: useHostProcessContainers: {{ hasKey .Cluster.metadata.labels "cni-windows" }} version: ${AZUREDISK_CSI_DRIVER_VERSION} --- +apiVersion: addons.cluster.x-k8s.io/v1alpha1 +kind: HelmChartProxy +metadata: + name: cloud-provider-azure-chart + namespace: default +spec: + chartName: cloud-provider-azure + clusterSelector: + matchLabels: + cloud-provider: azure + releaseName: cloud-provider-azure + repoURL: https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo + valuesTemplate: |- + infra: + clusterName: {{ .Cluster.metadata.name }} + cloudControllerManager: + clusterCIDR: {{ .Cluster.spec.clusterNetwork.pods.cidrBlocks | join "," }} + logVerbosity: 4 +--- +apiVersion: addons.cluster.x-k8s.io/v1alpha1 +kind: HelmChartProxy +metadata: + name: cloud-provider-azure-chart-ci + namespace: default +spec: + chartName: cloud-provider-azure + clusterSelector: + matchLabels: + cloud-provider: azure-ci + releaseName: cloud-provider-azure + repoURL: https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo + valuesTemplate: |- + infra: + clusterName: {{ .Cluster.metadata.name }} + cloudControllerManager: + clusterCIDR: {{ .Cluster.spec.clusterNetwork.pods.cidrBlocks | join "," }} + imageName: ${CCM_IMAGE_NAME} + imageRepository: ${CCM_IMAGE_REGISTRY} + imageTag: ${IMAGE_TAG_CCM} + logVerbosity: 4 + cloudNodeManager: + imageName: ${CNM_IMAGE_NAME} + imageRepository: ${CNM_IMAGE_REGISTRY} + imageTag: ${IMAGE_TAG_CCM} +--- apiVersion: v1 data: resources: | diff --git a/templates/test/ci/cluster-template-prow-topology.yaml b/templates/test/ci/cluster-template-prow-topology.yaml index e858174cfd3a..7b9e8127a711 100644 --- a/templates/test/ci/cluster-template-prow-topology.yaml +++ b/templates/test/ci/cluster-template-prow-topology.yaml @@ -3,6 +3,7 @@ kind: Cluster metadata: labels: azuredisk-csi: "true" + cloud-provider: ${CLOUD_PROVIDER_AZURE_LABEL} cni: calico cni-windows: ${CLUSTER_NAME}-calico containerd-logger: enabled @@ -135,6 +136,51 @@ spec: useHostProcessContainers: {{ hasKey .Cluster.metadata.labels "cni-windows" }} version: ${AZUREDISK_CSI_DRIVER_VERSION} --- +apiVersion: addons.cluster.x-k8s.io/v1alpha1 +kind: HelmChartProxy +metadata: + name: cloud-provider-azure-chart + namespace: default +spec: + chartName: cloud-provider-azure + clusterSelector: + matchLabels: + cloud-provider: azure + releaseName: cloud-provider-azure + repoURL: https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo + valuesTemplate: |- + infra: + clusterName: {{ .Cluster.metadata.name }} + cloudControllerManager: + clusterCIDR: {{ .Cluster.spec.clusterNetwork.pods.cidrBlocks | join "," }} + logVerbosity: 4 +--- +apiVersion: addons.cluster.x-k8s.io/v1alpha1 +kind: HelmChartProxy +metadata: + name: cloud-provider-azure-chart-ci + namespace: default +spec: + chartName: cloud-provider-azure + clusterSelector: + matchLabels: + cloud-provider: azure-ci + releaseName: cloud-provider-azure + repoURL: https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo + valuesTemplate: |- + infra: + clusterName: {{ .Cluster.metadata.name }} + cloudControllerManager: + clusterCIDR: {{ .Cluster.spec.clusterNetwork.pods.cidrBlocks | join "," }} + imageName: ${CCM_IMAGE_NAME} + imageRepository: ${CCM_IMAGE_REGISTRY} + imageTag: ${IMAGE_TAG_CCM} + logVerbosity: 4 + cloudNodeManager: + imageName: ${CNM_IMAGE_NAME} + imageRepository: ${CNM_IMAGE_REGISTRY} + imageTag: ${IMAGE_TAG_CCM} +--- apiVersion: v1 data: proxy: | diff --git a/templates/test/ci/cluster-template-prow-workload-identity.yaml b/templates/test/ci/cluster-template-prow-workload-identity.yaml index 690114d94397..f3eb057e6933 100644 --- a/templates/test/ci/cluster-template-prow-workload-identity.yaml +++ b/templates/test/ci/cluster-template-prow-workload-identity.yaml @@ -3,6 +3,7 @@ kind: Cluster metadata: labels: azuredisk-csi: "true" + cloud-provider: ${CLOUD_PROVIDER_AZURE_LABEL} cni: calico name: ${CLUSTER_NAME} namespace: default @@ -275,3 +276,48 @@ spec: windows: useHostProcessContainers: {{ hasKey .Cluster.metadata.labels "cni-windows" }} version: ${AZUREDISK_CSI_DRIVER_VERSION} +--- +apiVersion: addons.cluster.x-k8s.io/v1alpha1 +kind: HelmChartProxy +metadata: + name: cloud-provider-azure-chart + namespace: default +spec: + chartName: cloud-provider-azure + clusterSelector: + matchLabels: + cloud-provider: azure + releaseName: cloud-provider-azure + repoURL: https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo + valuesTemplate: |- + infra: + clusterName: {{ .Cluster.metadata.name }} + cloudControllerManager: + clusterCIDR: {{ .Cluster.spec.clusterNetwork.pods.cidrBlocks | join "," }} + logVerbosity: 4 +--- +apiVersion: addons.cluster.x-k8s.io/v1alpha1 +kind: HelmChartProxy +metadata: + name: cloud-provider-azure-chart-ci + namespace: default +spec: + chartName: cloud-provider-azure + clusterSelector: + matchLabels: + cloud-provider: azure-ci + releaseName: cloud-provider-azure + repoURL: https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo + valuesTemplate: |- + infra: + clusterName: {{ .Cluster.metadata.name }} + cloudControllerManager: + clusterCIDR: {{ .Cluster.spec.clusterNetwork.pods.cidrBlocks | join "," }} + imageName: ${CCM_IMAGE_NAME} + imageRepository: ${CCM_IMAGE_REGISTRY} + imageTag: ${IMAGE_TAG_CCM} + logVerbosity: 4 + cloudNodeManager: + imageName: ${CNM_IMAGE_NAME} + imageRepository: ${CNM_IMAGE_REGISTRY} + imageTag: ${IMAGE_TAG_CCM} diff --git a/templates/test/ci/cluster-template-prow.yaml b/templates/test/ci/cluster-template-prow.yaml index f4eb3321d126..256f9826d6a9 100644 --- a/templates/test/ci/cluster-template-prow.yaml +++ b/templates/test/ci/cluster-template-prow.yaml @@ -3,6 +3,7 @@ kind: Cluster metadata: labels: azuredisk-csi: "true" + cloud-provider: ${CLOUD_PROVIDER_AZURE_LABEL} cni: calico cni-windows: ${CLUSTER_NAME}-calico containerd-logger: enabled @@ -468,6 +469,51 @@ spec: useHostProcessContainers: {{ hasKey .Cluster.metadata.labels "cni-windows" }} version: ${AZUREDISK_CSI_DRIVER_VERSION} --- +apiVersion: addons.cluster.x-k8s.io/v1alpha1 +kind: HelmChartProxy +metadata: + name: cloud-provider-azure-chart + namespace: default +spec: + chartName: cloud-provider-azure + clusterSelector: + matchLabels: + cloud-provider: azure + releaseName: cloud-provider-azure + repoURL: https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo + valuesTemplate: |- + infra: + clusterName: {{ .Cluster.metadata.name }} + cloudControllerManager: + clusterCIDR: {{ .Cluster.spec.clusterNetwork.pods.cidrBlocks | join "," }} + logVerbosity: 4 +--- +apiVersion: addons.cluster.x-k8s.io/v1alpha1 +kind: HelmChartProxy +metadata: + name: cloud-provider-azure-chart-ci + namespace: default +spec: + chartName: cloud-provider-azure + clusterSelector: + matchLabels: + cloud-provider: azure-ci + releaseName: cloud-provider-azure + repoURL: https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo + valuesTemplate: |- + infra: + clusterName: {{ .Cluster.metadata.name }} + cloudControllerManager: + clusterCIDR: {{ .Cluster.spec.clusterNetwork.pods.cidrBlocks | join "," }} + imageName: ${CCM_IMAGE_NAME} + imageRepository: ${CCM_IMAGE_REGISTRY} + imageTag: ${IMAGE_TAG_CCM} + logVerbosity: 4 + cloudNodeManager: + imageName: ${CNM_IMAGE_NAME} + imageRepository: ${CNM_IMAGE_REGISTRY} + imageTag: ${IMAGE_TAG_CCM} +--- apiVersion: v1 data: proxy: | diff --git a/templates/test/ci/patches/cluster-label-cloud-provider-azure.yaml b/templates/test/ci/patches/cluster-label-cloud-provider-azure.yaml new file mode 100644 index 000000000000..664e84665a90 --- /dev/null +++ b/templates/test/ci/patches/cluster-label-cloud-provider-azure.yaml @@ -0,0 +1,6 @@ +apiVersion: cluster.x-k8s.io/v1beta1 +kind: Cluster +metadata: + name: ${CLUSTER_NAME} + labels: + cloud-provider: ${CLOUD_PROVIDER_AZURE_LABEL} \ No newline at end of file diff --git a/templates/test/ci/prow-azure-cni-v1/kustomization.yaml b/templates/test/ci/prow-azure-cni-v1/kustomization.yaml index fe00ee0a1413..108a8985c1ac 100644 --- a/templates/test/ci/prow-azure-cni-v1/kustomization.yaml +++ b/templates/test/ci/prow-azure-cni-v1/kustomization.yaml @@ -4,7 +4,10 @@ namespace: default resources: - ../../../flavors/azure-cni-v1/ - ../../../addons/cluster-api-helm/azuredisk-csi-driver.yaml + - ../../../addons/cluster-api-helm/cloud-provider-azure.yaml + - ../../../addons/cluster-api-helm/cloud-provider-azure-ci.yaml patchesStrategicMerge: - ../patches/tags.yaml - ../patches/controller-manager.yaml - ../patches/cluster-label-azuredisk-csi-driver.yaml + - ../patches/cluster-label-cloud-provider-azure.yaml diff --git a/templates/test/ci/prow-custom-vnet/kustomization.yaml b/templates/test/ci/prow-custom-vnet/kustomization.yaml index 0565fdf4edf5..7be3df37fe2f 100644 --- a/templates/test/ci/prow-custom-vnet/kustomization.yaml +++ b/templates/test/ci/prow-custom-vnet/kustomization.yaml @@ -6,6 +6,8 @@ resources: - ../prow/mhc.yaml - ../../../addons/cluster-api-helm/calico.yaml - ../../../addons/cluster-api-helm/azuredisk-csi-driver.yaml + - ../../../addons/cluster-api-helm/cloud-provider-azure.yaml + - ../../../addons/cluster-api-helm/cloud-provider-azure-ci.yaml patchesStrategicMerge: - ../patches/tags.yaml - ../patches/mhc.yaml @@ -15,3 +17,4 @@ patchesStrategicMerge: - ../patches/uami-control-plane.yaml - ../patches/cluster-label-calico.yaml - ../patches/cluster-label-azuredisk-csi-driver.yaml + - ../patches/cluster-label-cloud-provider-azure.yaml diff --git a/templates/test/ci/prow-dual-stack/kustomization.yaml b/templates/test/ci/prow-dual-stack/kustomization.yaml index d123be7c0dfd..4c0442e88325 100644 --- a/templates/test/ci/prow-dual-stack/kustomization.yaml +++ b/templates/test/ci/prow-dual-stack/kustomization.yaml @@ -6,6 +6,8 @@ resources: - machine-pool-dualstack.yaml - ../../../addons/cluster-api-helm/calico-dual-stack.yaml - ../../../addons/cluster-api-helm/azuredisk-csi-driver.yaml + - ../../../addons/cluster-api-helm/cloud-provider-azure.yaml + - ../../../addons/cluster-api-helm/cloud-provider-azure-ci.yaml patchesStrategicMerge: - ../patches/tags.yaml - ../patches/controller-manager.yaml @@ -13,3 +15,4 @@ patchesStrategicMerge: - patches/azure-machine-template.yaml - patches/cluster-label-calico-dual-stack.yaml - ../patches/cluster-label-azuredisk-csi-driver.yaml + - ../patches/cluster-label-cloud-provider-azure.yaml diff --git a/templates/test/ci/prow-edgezone/kustomization.yaml b/templates/test/ci/prow-edgezone/kustomization.yaml index e8a0aa31b58e..208c6a1730b3 100644 --- a/templates/test/ci/prow-edgezone/kustomization.yaml +++ b/templates/test/ci/prow-edgezone/kustomization.yaml @@ -5,6 +5,8 @@ resources: - ../../../flavors/edgezone - ../../../addons/cluster-api-helm/calico.yaml - ../../../addons/cluster-api-helm/azuredisk-csi-driver.yaml + - ../../../addons/cluster-api-helm/cloud-provider-azure.yaml + - ../../../addons/cluster-api-helm/cloud-provider-azure-ci.yaml patchesStrategicMerge: - ../patches/tags.yaml - ../patches/controller-manager.yaml @@ -17,3 +19,5 @@ patchesStrategicMerge: - patches/kubernetes-version.yaml - ../patches/cluster-label-calico.yaml - ../patches/cluster-label-azuredisk-csi-driver.yaml + - ../patches/cluster-label-cloud-provider-azure.yaml + diff --git a/templates/test/ci/prow-flatcar/kustomization.yaml b/templates/test/ci/prow-flatcar/kustomization.yaml index 60af393772e4..af05661556dd 100644 --- a/templates/test/ci/prow-flatcar/kustomization.yaml +++ b/templates/test/ci/prow-flatcar/kustomization.yaml @@ -5,8 +5,11 @@ resources: - ../../../flavors/flatcar/ - ../../../addons/cluster-api-helm/calico.yaml - ../../../addons/cluster-api-helm/azuredisk-csi-driver.yaml + - ../../../addons/cluster-api-helm/cloud-provider-azure.yaml + - ../../../addons/cluster-api-helm/cloud-provider-azure-ci.yaml patchesStrategicMerge: - ../patches/tags.yaml - ../patches/controller-manager.yaml - ../patches/cluster-label-calico.yaml - ../patches/cluster-label-azuredisk-csi-driver.yaml + - ../patches/cluster-label-cloud-provider-azure.yaml diff --git a/templates/test/ci/prow-ipv6/kustomization.yaml b/templates/test/ci/prow-ipv6/kustomization.yaml index 93cb5cf349bc..383c02a3f578 100644 --- a/templates/test/ci/prow-ipv6/kustomization.yaml +++ b/templates/test/ci/prow-ipv6/kustomization.yaml @@ -6,9 +6,11 @@ resources: - machine-pool-ipv6.yaml - ../../../addons/cluster-api-helm/calico-ipv6.yaml - ../../../addons/cluster-api-helm/azuredisk-csi-driver.yaml + - ../../../addons/cluster-api-helm/cloud-provider-azure.yaml + - ../../../addons/cluster-api-helm/cloud-provider-azure-ci.yaml patchesStrategicMerge: - ../patches/tags.yaml - ../patches/controller-manager.yaml - patches/cluster-label-calico-ipv6.yaml - ../patches/cluster-label-azuredisk-csi-driver.yaml - + - ../patches/cluster-label-cloud-provider-azure.yaml diff --git a/templates/test/ci/prow-machine-pool/kustomization.yaml b/templates/test/ci/prow-machine-pool/kustomization.yaml index 59822b47c4a1..ace0d8aadfb3 100644 --- a/templates/test/ci/prow-machine-pool/kustomization.yaml +++ b/templates/test/ci/prow-machine-pool/kustomization.yaml @@ -8,6 +8,8 @@ resources: - ../../../addons/windows/containerd-logging/containerd-logger-resource-set.yaml - ../../../addons/cluster-api-helm/calico.yaml - ../../../addons/cluster-api-helm/azuredisk-csi-driver.yaml + - ../../../addons/cluster-api-helm/cloud-provider-azure.yaml + - ../../../addons/cluster-api-helm/cloud-provider-azure-ci.yaml patchesStrategicMerge: - ../patches/azuremachinepool-vmextension.yaml - ../patches/tags.yaml @@ -16,6 +18,7 @@ patchesStrategicMerge: - ../patches/windows-containerd-labels.yaml - ../patches/cluster-label-calico.yaml - ../patches/cluster-label-azuredisk-csi-driver.yaml + - ../patches/cluster-label-cloud-provider-azure.yaml configMapGenerator: - name: cni-${CLUSTER_NAME}-calico-windows files: diff --git a/templates/test/ci/prow-nvidia-gpu/kustomization.yaml b/templates/test/ci/prow-nvidia-gpu/kustomization.yaml index d96de0180bab..db7d5a37fffe 100644 --- a/templates/test/ci/prow-nvidia-gpu/kustomization.yaml +++ b/templates/test/ci/prow-nvidia-gpu/kustomization.yaml @@ -5,12 +5,15 @@ resources: - ../../../flavors/nvidia-gpu - ../../../addons/cluster-api-helm/calico.yaml - ../../../addons/cluster-api-helm/azuredisk-csi-driver.yaml + - ../../../addons/cluster-api-helm/cloud-provider-azure.yaml + - ../../../addons/cluster-api-helm/cloud-provider-azure-ci.yaml patchesStrategicMerge: - ../patches/tags.yaml - ../patches/controller-manager.yaml - ../patches/azurecluster-gpu.yaml - ../patches/cluster-label-calico.yaml - ../patches/cluster-label-azuredisk-csi-driver.yaml + - ../patches/cluster-label-cloud-provider-azure.yaml patches: - path: patches/node-storage-type.yaml target: diff --git a/templates/test/ci/prow-private/kustomization.yaml b/templates/test/ci/prow-private/kustomization.yaml index a624b79ed552..3f8d468ae553 100644 --- a/templates/test/ci/prow-private/kustomization.yaml +++ b/templates/test/ci/prow-private/kustomization.yaml @@ -6,6 +6,8 @@ resources: - cni-resource-set.yaml - ../../../addons/cluster-api-helm/calico.yaml - ../../../addons/cluster-api-helm/azuredisk-csi-driver.yaml + - ../../../addons/cluster-api-helm/cloud-provider-azure.yaml + - ../../../addons/cluster-api-helm/cloud-provider-azure-ci.yaml patchesStrategicMerge: - ../patches/tags.yaml - ../patches/controller-manager.yaml @@ -13,10 +15,9 @@ patchesStrategicMerge: - patches/vnet-peerings.yaml - ../patches/uami-md-0.yaml - ../patches/uami-control-plane.yaml - - ../prow-intree-cloud-provider/patches/intree-cp.yaml # TODO: remove once CAPI supports Helm addons - - ../prow-intree-cloud-provider/patches/intree-md-0.yaml # TODO: remove once CAPI supports Helm addons - ../patches/cluster-label-calico.yaml - ../patches/cluster-label-azuredisk-csi-driver.yaml + - ../patches/cluster-label-cloud-provider-azure.yaml patches: - path: patches/user-assigned.yaml target: diff --git a/templates/test/ci/prow-topology/kustomization.yaml b/templates/test/ci/prow-topology/kustomization.yaml index da93db782a5a..ee41877cee41 100644 --- a/templates/test/ci/prow-topology/kustomization.yaml +++ b/templates/test/ci/prow-topology/kustomization.yaml @@ -7,11 +7,14 @@ resources: - ../../../addons/windows/csi-proxy/csi-proxy-resource-set.yaml - ../../../addons/cluster-api-helm/calico.yaml - ../../../addons/cluster-api-helm/azuredisk-csi-driver.yaml + - ../../../addons/cluster-api-helm/cloud-provider-azure.yaml + - ../../../addons/cluster-api-helm/cloud-provider-azure-ci.yaml patchesStrategicMerge: - ../patches/windows-containerd-labels.yaml - cluster.yaml - ../patches/cluster-label-calico.yaml - ../patches/cluster-label-azuredisk-csi-driver.yaml + - ../patches/cluster-label-cloud-provider-azure.yaml configMapGenerator: - name: cni-${CLUSTER_NAME}-calico-windows files: diff --git a/templates/test/ci/prow-workload-identity/kustomization.yaml b/templates/test/ci/prow-workload-identity/kustomization.yaml index 642b67c258aa..56441b4efe16 100644 --- a/templates/test/ci/prow-workload-identity/kustomization.yaml +++ b/templates/test/ci/prow-workload-identity/kustomization.yaml @@ -5,6 +5,8 @@ resources: - ../../../flavors/default - ../../../addons/cluster-api-helm/calico.yaml - ../../../addons/cluster-api-helm/azuredisk-csi-driver.yaml + - ../../../addons/cluster-api-helm/cloud-provider-azure.yaml + - ../../../addons/cluster-api-helm/cloud-provider-azure-ci.yaml patchesStrategicMerge: - ../patches/azureclusteridentity-azwi.yaml - ../patches/tags.yaml @@ -14,3 +16,5 @@ patchesStrategicMerge: - ../patches/uami-control-plane.yaml - ../patches/cluster-label-calico.yaml - ../patches/cluster-label-azuredisk-csi-driver.yaml + - ../patches/cluster-label-cloud-provider-azure.yaml + diff --git a/templates/test/ci/prow/kustomization.yaml b/templates/test/ci/prow/kustomization.yaml index 9eb601928264..a934cf6e94b2 100644 --- a/templates/test/ci/prow/kustomization.yaml +++ b/templates/test/ci/prow/kustomization.yaml @@ -12,6 +12,8 @@ resources: - ../../../addons/windows/containerd-logging/containerd-logger-resource-set.yaml - ../../../addons/cluster-api-helm/calico.yaml - ../../../addons/cluster-api-helm/azuredisk-csi-driver.yaml + - ../../../addons/cluster-api-helm/cloud-provider-azure.yaml + - ../../../addons/cluster-api-helm/cloud-provider-azure-ci.yaml patchesStrategicMerge: - ../patches/tags.yaml - ../patches/mhc.yaml @@ -24,6 +26,7 @@ patchesStrategicMerge: - ../patches/windows-server-version.yaml - ../patches/cluster-label-calico.yaml - ../patches/cluster-label-azuredisk-csi-driver.yaml + - ../patches/cluster-label-cloud-provider-azure.yaml patches: - target: group: bootstrap.cluster.x-k8s.io diff --git a/templates/test/dev/cluster-template-custom-builds-machine-pool.yaml b/templates/test/dev/cluster-template-custom-builds-machine-pool.yaml index 81353d119ea1..ca93545c10e6 100644 --- a/templates/test/dev/cluster-template-custom-builds-machine-pool.yaml +++ b/templates/test/dev/cluster-template-custom-builds-machine-pool.yaml @@ -3,6 +3,7 @@ kind: Cluster metadata: labels: azuredisk-csi: "true" + cloud-provider: ${CLOUD_PROVIDER_AZURE_LABEL} cni: calico cni-windows: ${CLUSTER_NAME}-calico containerd-logger: enabled @@ -587,6 +588,51 @@ spec: useHostProcessContainers: {{ hasKey .Cluster.metadata.labels "cni-windows" }} version: ${AZUREDISK_CSI_DRIVER_VERSION} --- +apiVersion: addons.cluster.x-k8s.io/v1alpha1 +kind: HelmChartProxy +metadata: + name: cloud-provider-azure-chart + namespace: default +spec: + chartName: cloud-provider-azure + clusterSelector: + matchLabels: + cloud-provider: azure + releaseName: cloud-provider-azure + repoURL: https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo + valuesTemplate: |- + infra: + clusterName: {{ .Cluster.metadata.name }} + cloudControllerManager: + clusterCIDR: {{ .Cluster.spec.clusterNetwork.pods.cidrBlocks | join "," }} + logVerbosity: 4 +--- +apiVersion: addons.cluster.x-k8s.io/v1alpha1 +kind: HelmChartProxy +metadata: + name: cloud-provider-azure-chart-ci + namespace: default +spec: + chartName: cloud-provider-azure + clusterSelector: + matchLabels: + cloud-provider: azure-ci + releaseName: cloud-provider-azure + repoURL: https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo + valuesTemplate: |- + infra: + clusterName: {{ .Cluster.metadata.name }} + cloudControllerManager: + clusterCIDR: {{ .Cluster.spec.clusterNetwork.pods.cidrBlocks | join "," }} + imageName: ${CCM_IMAGE_NAME} + imageRepository: ${CCM_IMAGE_REGISTRY} + imageTag: ${IMAGE_TAG_CCM} + logVerbosity: 4 + cloudNodeManager: + imageName: ${CNM_IMAGE_NAME} + imageRepository: ${CNM_IMAGE_REGISTRY} + imageTag: ${IMAGE_TAG_CCM} +--- apiVersion: v1 data: kube-proxy-patch: |- diff --git a/templates/test/dev/cluster-template-custom-builds.yaml b/templates/test/dev/cluster-template-custom-builds.yaml index 464ef82f8891..056f93566952 100644 --- a/templates/test/dev/cluster-template-custom-builds.yaml +++ b/templates/test/dev/cluster-template-custom-builds.yaml @@ -3,6 +3,7 @@ kind: Cluster metadata: labels: azuredisk-csi: "true" + cloud-provider: ${CLOUD_PROVIDER_AZURE_LABEL} cni: calico cni-windows: ${CLUSTER_NAME}-calico containerd-logger: enabled @@ -680,6 +681,51 @@ spec: useHostProcessContainers: {{ hasKey .Cluster.metadata.labels "cni-windows" }} version: ${AZUREDISK_CSI_DRIVER_VERSION} --- +apiVersion: addons.cluster.x-k8s.io/v1alpha1 +kind: HelmChartProxy +metadata: + name: cloud-provider-azure-chart + namespace: default +spec: + chartName: cloud-provider-azure + clusterSelector: + matchLabels: + cloud-provider: azure + releaseName: cloud-provider-azure + repoURL: https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo + valuesTemplate: |- + infra: + clusterName: {{ .Cluster.metadata.name }} + cloudControllerManager: + clusterCIDR: {{ .Cluster.spec.clusterNetwork.pods.cidrBlocks | join "," }} + logVerbosity: 4 +--- +apiVersion: addons.cluster.x-k8s.io/v1alpha1 +kind: HelmChartProxy +metadata: + name: cloud-provider-azure-chart-ci + namespace: default +spec: + chartName: cloud-provider-azure + clusterSelector: + matchLabels: + cloud-provider: azure-ci + releaseName: cloud-provider-azure + repoURL: https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo + valuesTemplate: |- + infra: + clusterName: {{ .Cluster.metadata.name }} + cloudControllerManager: + clusterCIDR: {{ .Cluster.spec.clusterNetwork.pods.cidrBlocks | join "," }} + imageName: ${CCM_IMAGE_NAME} + imageRepository: ${CCM_IMAGE_REGISTRY} + imageTag: ${IMAGE_TAG_CCM} + logVerbosity: 4 + cloudNodeManager: + imageName: ${CNM_IMAGE_NAME} + imageRepository: ${CNM_IMAGE_REGISTRY} + imageTag: ${IMAGE_TAG_CCM} +--- apiVersion: v1 data: kube-proxy-patch: |- diff --git a/test/e2e/azure_test.go b/test/e2e/azure_test.go index c47996ed31bd..a66cdd64f063 100644 --- a/test/e2e/azure_test.go +++ b/test/e2e/azure_test.go @@ -71,6 +71,13 @@ var _ = Describe("Workload cluster creation", func() { clusterNamePrefix = clusterNameSpace } + cloudProviderAzureLabel := "azure" + fmt.Println("Value of useCIArtifacts is", useCIArtifacts) + if useCIArtifacts { + cloudProviderAzureLabel = "azure-ci" + } + os.Setenv("CLOUD_PROVIDER_AZURE_LABEL", cloudProviderAzureLabel) + // Setup a Namespace where to host objects for this spec and create a watcher for the namespace events. var err error namespace, cancelWatches, err = setupSpecNamespace(ctx, clusterNamePrefix, bootstrapClusterProxy, artifactFolder) diff --git a/test/e2e/cloud-provider-azure.go b/test/e2e/cloud-provider-azure.go index bbe391ecbc94..44e1aa48f034 100644 --- a/test/e2e/cloud-provider-azure.go +++ b/test/e2e/cloud-provider-azure.go @@ -38,34 +38,39 @@ const ( azureDiskCSIDriverHelmReleaseName = "azuredisk-csi-driver-oot" ) -// InstallCNIAndCloudProviderAzureHelmChart installs the official cloud-provider-azure helm chart +// EnsureCNIAndCloudProviderAzureHelmChart installs the official cloud-provider-azure helm chart // and a CNI and validates that expected pods exist and are Ready. -func InstallCNIAndCloudProviderAzureHelmChart(ctx context.Context, input clusterctl.ApplyCustomClusterTemplateAndWaitInput, installHelmChart bool, cidrBlocks []string, hasWindows bool) { - specName := "cloud-provider-azure-install" - By("Installing cloud-provider-azure components via helm") - options := &HelmOptions{ - Values: []string{ - fmt.Sprintf("infra.clusterName=%s", input.ClusterName), - "cloudControllerManager.logVerbosity=4", - }, - StringValues: []string{fmt.Sprintf("cloudControllerManager.clusterCIDR=%s", strings.Join(cidrBlocks, `\,`))}, - } - // If testing a CI version of Kubernetes, use CCM and CNM images built from source. - if useCIArtifacts || usePRArtifacts { - options.Values = append(options.Values, fmt.Sprintf("cloudControllerManager.imageName=%s", os.Getenv("CCM_IMAGE_NAME"))) - options.Values = append(options.Values, fmt.Sprintf("cloudNodeManager.imageName=%s", os.Getenv("CNM_IMAGE_NAME"))) - options.Values = append(options.Values, fmt.Sprintf("cloudControllerManager.imageRepository=%s", os.Getenv("IMAGE_REGISTRY"))) - options.Values = append(options.Values, fmt.Sprintf("cloudNodeManager.imageRepository=%s", os.Getenv("IMAGE_REGISTRY"))) - options.StringValues = append(options.StringValues, fmt.Sprintf("cloudControllerManager.imageTag=%s", os.Getenv("IMAGE_TAG_CCM"))) - options.StringValues = append(options.StringValues, fmt.Sprintf("cloudNodeManager.imageTag=%s", os.Getenv("IMAGE_TAG_CNM"))) - } +func EnsureCNIAndCloudProviderAzureHelmChart(ctx context.Context, input clusterctl.ApplyCustomClusterTemplateAndWaitInput, installHelmChart bool, cidrBlocks []string, hasWindows bool) { + specName := "ensure-cloud-provider-azure" + clusterProxy := input.ClusterProxy.GetWorkloadCluster(ctx, input.Namespace, input.ClusterName) - if strings.Contains(input.ClusterName, "flatcar") { - options.StringValues = append(options.StringValues, "cloudControllerManager.caCertDir=/usr/share/ca-certificates") - } + if installHelmChart { + By("Installing cloud-provider-azure components via helm") + options := &HelmOptions{ + Values: []string{ + fmt.Sprintf("infra.clusterName=%s", input.ClusterName), + "cloudControllerManager.logVerbosity=4", + }, + StringValues: []string{fmt.Sprintf("cloudControllerManager.clusterCIDR=%s", strings.Join(cidrBlocks, `\,`))}, + } + // If testing a CI version of Kubernetes, use CCM and CNM images built from source. + if useCIArtifacts || usePRArtifacts { + options.Values = append(options.Values, fmt.Sprintf("cloudControllerManager.imageName=%s", os.Getenv("CCM_IMAGE_NAME"))) + options.Values = append(options.Values, fmt.Sprintf("cloudNodeManager.imageName=%s", os.Getenv("CNM_IMAGE_NAME"))) + options.Values = append(options.Values, fmt.Sprintf("cloudControllerManager.imageRepository=%s", os.Getenv("IMAGE_REGISTRY"))) + options.Values = append(options.Values, fmt.Sprintf("cloudNodeManager.imageRepository=%s", os.Getenv("IMAGE_REGISTRY"))) + options.StringValues = append(options.StringValues, fmt.Sprintf("cloudControllerManager.imageTag=%s", os.Getenv("IMAGE_TAG_CCM"))) + options.StringValues = append(options.StringValues, fmt.Sprintf("cloudNodeManager.imageTag=%s", os.Getenv("IMAGE_TAG_CNM"))) + } - clusterProxy := input.ClusterProxy.GetWorkloadCluster(ctx, input.Namespace, input.ClusterName) - InstallHelmChart(ctx, clusterProxy, defaultNamespace, cloudProviderAzureHelmRepoURL, cloudProviderAzureChartName, cloudProviderAzureHelmReleaseName, options, "") + if strings.Contains(input.ClusterName, "flatcar") { + options.StringValues = append(options.StringValues, "cloudControllerManager.caCertDir=/usr/share/ca-certificates") + } + + InstallHelmChart(ctx, clusterProxy, defaultNamespace, cloudProviderAzureHelmRepoURL, cloudProviderAzureChartName, cloudProviderAzureHelmReleaseName, options, "") + } else { + By("Ensuring cloud-provider-azure is installed via CAAPH") + } // We do this before waiting for the pods to be ready because there is a co-dependency between CNI (nodes ready) and cloud-provider being initialized. EnsureCNI(ctx, input, installHelmChart, cidrBlocks, hasWindows) diff --git a/test/e2e/common.go b/test/e2e/common.go index e4e9bfedc31a..227bf3896dc6 100644 --- a/test/e2e/common.go +++ b/test/e2e/common.go @@ -291,7 +291,7 @@ func ensureControlPlaneInitialized(ctx context.Context, input clusterctl.ApplyCu _, hasWindows := cluster.Labels["cni-windows"] if kubeadmControlPlane.Spec.KubeadmConfigSpec.ClusterConfiguration.ControllerManager.ExtraArgs["cloud-provider"] != "azure" { // There is a co-dependency between cloud-provider and CNI so we install both together if cloud-provider is external. - InstallCNIAndCloudProviderAzureHelmChart(ctx, input, installHelmCharts, cluster.Spec.ClusterNetwork.Pods.CIDRBlocks, hasWindows) + EnsureCNIAndCloudProviderAzureHelmChart(ctx, input, installHelmCharts, cluster.Spec.ClusterNetwork.Pods.CIDRBlocks, hasWindows) } else { EnsureCNI(ctx, input, installHelmCharts, cluster.Spec.ClusterNetwork.Pods.CIDRBlocks, hasWindows) } diff --git a/test/e2e/data/infrastructure-azure/v1beta1/bases/cloud-provider-azure-ci.yaml b/test/e2e/data/infrastructure-azure/v1beta1/bases/cloud-provider-azure-ci.yaml new file mode 100644 index 000000000000..274dc0266222 --- /dev/null +++ b/test/e2e/data/infrastructure-azure/v1beta1/bases/cloud-provider-azure-ci.yaml @@ -0,0 +1,24 @@ +apiVersion: addons.cluster.x-k8s.io/v1alpha1 +kind: HelmChartProxy +metadata: + name: cloud-provider-azure-chart-ci +spec: + clusterSelector: + matchLabels: + cloud-provider: "azure-ci" + repoURL: https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo + chartName: cloud-provider-azure + releaseName: cloud-provider-azure + valuesTemplate: | + infra: + clusterName: {{ .Cluster.metadata.name }} + cloudControllerManager: + clusterCIDR: {{ .Cluster.spec.clusterNetwork.pods.cidrBlocks | join "," }} + imageName: ${CCM_IMAGE_NAME} + imageRepository: ${CCM_IMAGE_REGISTRY} + imageTag: ${IMAGE_TAG_CCM} + logVerbosity: 4 + cloudNodeManager: + imageName: ${CNM_IMAGE_NAME} + imageRepository: ${CNM_IMAGE_REGISTRY} + imageTag: ${IMAGE_TAG_CCM} \ No newline at end of file diff --git a/test/e2e/data/infrastructure-azure/v1beta1/bases/cloud-provider-azure.yaml b/test/e2e/data/infrastructure-azure/v1beta1/bases/cloud-provider-azure.yaml new file mode 100644 index 000000000000..fe4e249dd8ab --- /dev/null +++ b/test/e2e/data/infrastructure-azure/v1beta1/bases/cloud-provider-azure.yaml @@ -0,0 +1,17 @@ +apiVersion: addons.cluster.x-k8s.io/v1alpha1 +kind: HelmChartProxy +metadata: + name: cloud-provider-azure-chart +spec: + clusterSelector: + matchLabels: + cloud-provider: "azure" + repoURL: https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo + chartName: cloud-provider-azure + releaseName: cloud-provider-azure + valuesTemplate: | + infra: + clusterName: {{ .Cluster.metadata.name }} + cloudControllerManager: + clusterCIDR: {{ .Cluster.spec.clusterNetwork.pods.cidrBlocks | join "," }} + logVerbosity: 4 \ No newline at end of file diff --git a/test/e2e/data/infrastructure-azure/v1beta1/cluster-template-kcp-remediation.yaml b/test/e2e/data/infrastructure-azure/v1beta1/cluster-template-kcp-remediation.yaml index 0fa61e9de02e..f6e5415e68fe 100644 --- a/test/e2e/data/infrastructure-azure/v1beta1/cluster-template-kcp-remediation.yaml +++ b/test/e2e/data/infrastructure-azure/v1beta1/cluster-template-kcp-remediation.yaml @@ -50,6 +50,49 @@ spec: image: mcr.microsoft.com/oss/calico/ctl version: ${CALICO_VERSION} --- +apiVersion: addons.cluster.x-k8s.io/v1alpha1 +kind: HelmChartProxy +metadata: + name: cloud-provider-azure-chart +spec: + chartName: cloud-provider-azure + clusterSelector: + matchLabels: + cloud-provider: azure + releaseName: cloud-provider-azure + repoURL: https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo + valuesTemplate: |- + infra: + clusterName: {{ .Cluster.metadata.name }} + cloudControllerManager: + clusterCIDR: {{ .Cluster.spec.clusterNetwork.pods.cidrBlocks | join "," }} + logVerbosity: 4 +--- +apiVersion: addons.cluster.x-k8s.io/v1alpha1 +kind: HelmChartProxy +metadata: + name: cloud-provider-azure-chart-ci +spec: + chartName: cloud-provider-azure + clusterSelector: + matchLabels: + cloud-provider: azure-ci + releaseName: cloud-provider-azure + repoURL: https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo + valuesTemplate: |- + infra: + clusterName: {{ .Cluster.metadata.name }} + cloudControllerManager: + clusterCIDR: {{ .Cluster.spec.clusterNetwork.pods.cidrBlocks | join "," }} + imageName: ${CCM_IMAGE_NAME} + imageRepository: ${CCM_IMAGE_REGISTRY} + imageTag: ${IMAGE_TAG_CCM} + logVerbosity: 4 + cloudNodeManager: + imageName: ${CNM_IMAGE_NAME} + imageRepository: ${CNM_IMAGE_REGISTRY} + imageTag: ${IMAGE_TAG_CCM} +--- apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 kind: KubeadmConfigTemplate metadata: diff --git a/test/e2e/data/infrastructure-azure/v1beta1/cluster-template-kcp-remediation/kustomization.yaml b/test/e2e/data/infrastructure-azure/v1beta1/cluster-template-kcp-remediation/kustomization.yaml index 9e1f19137fe8..54a19d9d1d39 100644 --- a/test/e2e/data/infrastructure-azure/v1beta1/cluster-template-kcp-remediation/kustomization.yaml +++ b/test/e2e/data/infrastructure-azure/v1beta1/cluster-template-kcp-remediation/kustomization.yaml @@ -1,12 +1,14 @@ bases: - - ../bases/cluster-with-kcp.yaml - - ../bases/md.yaml - - mhc.yaml - - ../bases/azure-cluster-identity.yaml - - ../bases/calico.yaml - - ../bases/azuredisk-csi-driver.yaml +- ../bases/cluster-with-kcp.yaml +- ../bases/md.yaml +- mhc.yaml +- ../bases/azure-cluster-identity.yaml +- ../bases/calico.yaml +- ../bases/azuredisk-csi-driver.yaml +- ../bases/cloud-provider-azure.yaml +- ../bases/cloud-provider-azure-ci.yaml patchesStrategicMerge: - - ../patches/azurecluster-identity-ref.yaml - - ../patches/cluster-label-calico.yaml - - ../patches/cluster-label-azuredisk-csi-driver.yaml +- ../patches/azurecluster-identity-ref.yaml +- ../patches/cluster-label-calico.yaml +- ../patches/cluster-label-azuredisk-csi-driver.yaml diff --git a/test/e2e/data/infrastructure-azure/v1beta1/cluster-template-kcp-scale-in.yaml b/test/e2e/data/infrastructure-azure/v1beta1/cluster-template-kcp-scale-in.yaml index 935150b76f2d..f88797036c94 100644 --- a/test/e2e/data/infrastructure-azure/v1beta1/cluster-template-kcp-scale-in.yaml +++ b/test/e2e/data/infrastructure-azure/v1beta1/cluster-template-kcp-scale-in.yaml @@ -50,6 +50,49 @@ spec: image: mcr.microsoft.com/oss/calico/ctl version: ${CALICO_VERSION} --- +apiVersion: addons.cluster.x-k8s.io/v1alpha1 +kind: HelmChartProxy +metadata: + name: cloud-provider-azure-chart +spec: + chartName: cloud-provider-azure + clusterSelector: + matchLabels: + cloud-provider: azure + releaseName: cloud-provider-azure + repoURL: https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo + valuesTemplate: |- + infra: + clusterName: {{ .Cluster.metadata.name }} + cloudControllerManager: + clusterCIDR: {{ .Cluster.spec.clusterNetwork.pods.cidrBlocks | join "," }} + logVerbosity: 4 +--- +apiVersion: addons.cluster.x-k8s.io/v1alpha1 +kind: HelmChartProxy +metadata: + name: cloud-provider-azure-chart-ci +spec: + chartName: cloud-provider-azure + clusterSelector: + matchLabels: + cloud-provider: azure-ci + releaseName: cloud-provider-azure + repoURL: https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo + valuesTemplate: |- + infra: + clusterName: {{ .Cluster.metadata.name }} + cloudControllerManager: + clusterCIDR: {{ .Cluster.spec.clusterNetwork.pods.cidrBlocks | join "," }} + imageName: ${CCM_IMAGE_NAME} + imageRepository: ${CCM_IMAGE_REGISTRY} + imageTag: ${IMAGE_TAG_CCM} + logVerbosity: 4 + cloudNodeManager: + imageName: ${CNM_IMAGE_NAME} + imageRepository: ${CNM_IMAGE_REGISTRY} + imageTag: ${IMAGE_TAG_CCM} +--- apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 kind: KubeadmConfigTemplate metadata: @@ -77,6 +120,7 @@ kind: Cluster metadata: labels: azuredisk-csi: "true" + cloud-provider: ${CLOUD_PROVIDER_AZURE_LABEL} cni: calico name: ${CLUSTER_NAME} namespace: default diff --git a/test/e2e/data/infrastructure-azure/v1beta1/cluster-template-kcp-scale-in/kustomization.yaml b/test/e2e/data/infrastructure-azure/v1beta1/cluster-template-kcp-scale-in/kustomization.yaml index 52dd66fa0933..5ff49c6056d8 100644 --- a/test/e2e/data/infrastructure-azure/v1beta1/cluster-template-kcp-scale-in/kustomization.yaml +++ b/test/e2e/data/infrastructure-azure/v1beta1/cluster-template-kcp-scale-in/kustomization.yaml @@ -4,9 +4,12 @@ bases: - ../bases/azure-cluster-identity.yaml - ../bases/calico.yaml - ../bases/azuredisk-csi-driver.yaml +- ../bases/cloud-provider-azure.yaml +- ../bases/cloud-provider-azure-ci.yaml patchesStrategicMerge: - ./cluster-with-kcp.yaml - ../patches/azurecluster-identity-ref.yaml - ../patches/cluster-label-calico.yaml - ../patches/cluster-label-azuredisk-csi-driver.yaml +- ../patches/cluster-label-cloud-provider-azure.yaml diff --git a/test/e2e/data/infrastructure-azure/v1beta1/cluster-template-machine-pool.yaml b/test/e2e/data/infrastructure-azure/v1beta1/cluster-template-machine-pool.yaml index 6daa5f9f8e37..0b08224a7c24 100644 --- a/test/e2e/data/infrastructure-azure/v1beta1/cluster-template-machine-pool.yaml +++ b/test/e2e/data/infrastructure-azure/v1beta1/cluster-template-machine-pool.yaml @@ -50,6 +50,49 @@ spec: image: mcr.microsoft.com/oss/calico/ctl version: ${CALICO_VERSION} --- +apiVersion: addons.cluster.x-k8s.io/v1alpha1 +kind: HelmChartProxy +metadata: + name: cloud-provider-azure-chart +spec: + chartName: cloud-provider-azure + clusterSelector: + matchLabels: + cloud-provider: azure + releaseName: cloud-provider-azure + repoURL: https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo + valuesTemplate: |- + infra: + clusterName: {{ .Cluster.metadata.name }} + cloudControllerManager: + clusterCIDR: {{ .Cluster.spec.clusterNetwork.pods.cidrBlocks | join "," }} + logVerbosity: 4 +--- +apiVersion: addons.cluster.x-k8s.io/v1alpha1 +kind: HelmChartProxy +metadata: + name: cloud-provider-azure-chart-ci +spec: + chartName: cloud-provider-azure + clusterSelector: + matchLabels: + cloud-provider: azure-ci + releaseName: cloud-provider-azure + repoURL: https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo + valuesTemplate: |- + infra: + clusterName: {{ .Cluster.metadata.name }} + cloudControllerManager: + clusterCIDR: {{ .Cluster.spec.clusterNetwork.pods.cidrBlocks | join "," }} + imageName: ${CCM_IMAGE_NAME} + imageRepository: ${CCM_IMAGE_REGISTRY} + imageTag: ${IMAGE_TAG_CCM} + logVerbosity: 4 + cloudNodeManager: + imageName: ${CNM_IMAGE_NAME} + imageRepository: ${CNM_IMAGE_REGISTRY} + imageTag: ${IMAGE_TAG_CCM} +--- apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 kind: KubeadmConfig metadata: @@ -76,6 +119,7 @@ kind: Cluster metadata: labels: azuredisk-csi: "true" + cloud-provider: ${CLOUD_PROVIDER_AZURE_LABEL} cni: calico name: ${CLUSTER_NAME} namespace: default diff --git a/test/e2e/data/infrastructure-azure/v1beta1/cluster-template-machine-pool/kustomization.yaml b/test/e2e/data/infrastructure-azure/v1beta1/cluster-template-machine-pool/kustomization.yaml index dce55fb18ada..79fbd2193811 100644 --- a/test/e2e/data/infrastructure-azure/v1beta1/cluster-template-machine-pool/kustomization.yaml +++ b/test/e2e/data/infrastructure-azure/v1beta1/cluster-template-machine-pool/kustomization.yaml @@ -1,11 +1,14 @@ resources: - - ../bases/cluster-with-kcp.yaml - - ../bases/mp.yaml - - ../bases/azure-cluster-identity.yaml - - ../bases/calico.yaml - - ../bases/azuredisk-csi-driver.yaml +- ../bases/cluster-with-kcp.yaml +- ../bases/mp.yaml +- ../bases/azure-cluster-identity.yaml +- ../bases/calico.yaml +- ../bases/azuredisk-csi-driver.yaml +- ../bases/cloud-provider-azure.yaml +- ../bases/cloud-provider-azure-ci.yaml patchesStrategicMerge: - - ../patches/azurecluster-identity-ref.yaml - - ../patches/cluster-label-calico.yaml - - ../patches/cluster-label-azuredisk-csi-driver.yaml +- ../patches/azurecluster-identity-ref.yaml +- ../patches/cluster-label-calico.yaml +- ../patches/cluster-label-azuredisk-csi-driver.yaml +- ../patches/cluster-label-cloud-provider-azure.yaml diff --git a/test/e2e/data/infrastructure-azure/v1beta1/cluster-template-md-remediation.yaml b/test/e2e/data/infrastructure-azure/v1beta1/cluster-template-md-remediation.yaml index 474d5da56af8..6addf229d634 100644 --- a/test/e2e/data/infrastructure-azure/v1beta1/cluster-template-md-remediation.yaml +++ b/test/e2e/data/infrastructure-azure/v1beta1/cluster-template-md-remediation.yaml @@ -50,6 +50,49 @@ spec: image: mcr.microsoft.com/oss/calico/ctl version: ${CALICO_VERSION} --- +apiVersion: addons.cluster.x-k8s.io/v1alpha1 +kind: HelmChartProxy +metadata: + name: cloud-provider-azure-chart +spec: + chartName: cloud-provider-azure + clusterSelector: + matchLabels: + cloud-provider: azure + releaseName: cloud-provider-azure + repoURL: https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo + valuesTemplate: |- + infra: + clusterName: {{ .Cluster.metadata.name }} + cloudControllerManager: + clusterCIDR: {{ .Cluster.spec.clusterNetwork.pods.cidrBlocks | join "," }} + logVerbosity: 4 +--- +apiVersion: addons.cluster.x-k8s.io/v1alpha1 +kind: HelmChartProxy +metadata: + name: cloud-provider-azure-chart-ci +spec: + chartName: cloud-provider-azure + clusterSelector: + matchLabels: + cloud-provider: azure-ci + releaseName: cloud-provider-azure + repoURL: https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo + valuesTemplate: |- + infra: + clusterName: {{ .Cluster.metadata.name }} + cloudControllerManager: + clusterCIDR: {{ .Cluster.spec.clusterNetwork.pods.cidrBlocks | join "," }} + imageName: ${CCM_IMAGE_NAME} + imageRepository: ${CCM_IMAGE_REGISTRY} + imageTag: ${IMAGE_TAG_CCM} + logVerbosity: 4 + cloudNodeManager: + imageName: ${CNM_IMAGE_NAME} + imageRepository: ${CNM_IMAGE_REGISTRY} + imageTag: ${IMAGE_TAG_CCM} +--- apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 kind: KubeadmConfigTemplate metadata: @@ -77,6 +120,7 @@ kind: Cluster metadata: labels: azuredisk-csi: "true" + cloud-provider: ${CLOUD_PROVIDER_AZURE_LABEL} cni: calico name: ${CLUSTER_NAME} namespace: default diff --git a/test/e2e/data/infrastructure-azure/v1beta1/cluster-template-md-remediation/kustomization.yaml b/test/e2e/data/infrastructure-azure/v1beta1/cluster-template-md-remediation/kustomization.yaml index ed195fc0bd6b..11dfd8ba0773 100644 --- a/test/e2e/data/infrastructure-azure/v1beta1/cluster-template-md-remediation/kustomization.yaml +++ b/test/e2e/data/infrastructure-azure/v1beta1/cluster-template-md-remediation/kustomization.yaml @@ -1,13 +1,16 @@ bases: - - ../bases/cluster-with-kcp.yaml - - ../bases/md.yaml - - mhc.yaml - - ../bases/azure-cluster-identity.yaml - - ../bases/calico.yaml - - ../bases/azuredisk-csi-driver.yaml +- ../bases/cluster-with-kcp.yaml +- ../bases/md.yaml +- mhc.yaml +- ../bases/azure-cluster-identity.yaml +- ../bases/calico.yaml +- ../bases/azuredisk-csi-driver.yaml +- ../bases/cloud-provider-azure.yaml +- ../bases/cloud-provider-azure-ci.yaml patchesStrategicMerge: - ./md.yaml - ../patches/azurecluster-identity-ref.yaml - ../patches/cluster-label-calico.yaml - ../patches/cluster-label-azuredisk-csi-driver.yaml +- ../patches/cluster-label-cloud-provider-azure.yaml diff --git a/test/e2e/data/infrastructure-azure/v1beta1/cluster-template-node-drain.yaml b/test/e2e/data/infrastructure-azure/v1beta1/cluster-template-node-drain.yaml index d53f7bd14478..8f640c9b592e 100644 --- a/test/e2e/data/infrastructure-azure/v1beta1/cluster-template-node-drain.yaml +++ b/test/e2e/data/infrastructure-azure/v1beta1/cluster-template-node-drain.yaml @@ -50,6 +50,49 @@ spec: image: mcr.microsoft.com/oss/calico/ctl version: ${CALICO_VERSION} --- +apiVersion: addons.cluster.x-k8s.io/v1alpha1 +kind: HelmChartProxy +metadata: + name: cloud-provider-azure-chart +spec: + chartName: cloud-provider-azure + clusterSelector: + matchLabels: + cloud-provider: azure + releaseName: cloud-provider-azure + repoURL: https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo + valuesTemplate: |- + infra: + clusterName: {{ .Cluster.metadata.name }} + cloudControllerManager: + clusterCIDR: {{ .Cluster.spec.clusterNetwork.pods.cidrBlocks | join "," }} + logVerbosity: 4 +--- +apiVersion: addons.cluster.x-k8s.io/v1alpha1 +kind: HelmChartProxy +metadata: + name: cloud-provider-azure-chart-ci +spec: + chartName: cloud-provider-azure + clusterSelector: + matchLabels: + cloud-provider: azure-ci + releaseName: cloud-provider-azure + repoURL: https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo + valuesTemplate: |- + infra: + clusterName: {{ .Cluster.metadata.name }} + cloudControllerManager: + clusterCIDR: {{ .Cluster.spec.clusterNetwork.pods.cidrBlocks | join "," }} + imageName: ${CCM_IMAGE_NAME} + imageRepository: ${CCM_IMAGE_REGISTRY} + imageTag: ${IMAGE_TAG_CCM} + logVerbosity: 4 + cloudNodeManager: + imageName: ${CNM_IMAGE_NAME} + imageRepository: ${CNM_IMAGE_REGISTRY} + imageTag: ${IMAGE_TAG_CCM} +--- apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 kind: KubeadmConfigTemplate metadata: @@ -77,6 +120,7 @@ kind: Cluster metadata: labels: azuredisk-csi: "true" + cloud-provider: ${CLOUD_PROVIDER_AZURE_LABEL} cni: calico name: ${CLUSTER_NAME} namespace: default diff --git a/test/e2e/data/infrastructure-azure/v1beta1/cluster-template-node-drain/kustomization.yaml b/test/e2e/data/infrastructure-azure/v1beta1/cluster-template-node-drain/kustomization.yaml index c292b89295f7..52585a6213e2 100644 --- a/test/e2e/data/infrastructure-azure/v1beta1/cluster-template-node-drain/kustomization.yaml +++ b/test/e2e/data/infrastructure-azure/v1beta1/cluster-template-node-drain/kustomization.yaml @@ -4,6 +4,8 @@ bases: - ../bases/azure-cluster-identity.yaml - ../bases/calico.yaml - ../bases/azuredisk-csi-driver.yaml +- ../bases/cloud-provider-azure.yaml +- ../bases/cloud-provider-azure-ci.yaml patchesStrategicMerge: - ./md.yaml @@ -11,3 +13,4 @@ patchesStrategicMerge: - ../patches/azurecluster-identity-ref.yaml - ../patches/cluster-label-calico.yaml - ../patches/cluster-label-azuredisk-csi-driver.yaml +- ../patches/cluster-label-cloud-provider-azure.yaml diff --git a/test/e2e/data/infrastructure-azure/v1beta1/cluster-template.yaml b/test/e2e/data/infrastructure-azure/v1beta1/cluster-template.yaml index e776ae8974fa..10f7c28fe7fc 100644 --- a/test/e2e/data/infrastructure-azure/v1beta1/cluster-template.yaml +++ b/test/e2e/data/infrastructure-azure/v1beta1/cluster-template.yaml @@ -50,6 +50,49 @@ spec: image: mcr.microsoft.com/oss/calico/ctl version: ${CALICO_VERSION} --- +apiVersion: addons.cluster.x-k8s.io/v1alpha1 +kind: HelmChartProxy +metadata: + name: cloud-provider-azure-chart +spec: + chartName: cloud-provider-azure + clusterSelector: + matchLabels: + cloud-provider: azure + releaseName: cloud-provider-azure + repoURL: https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo + valuesTemplate: |- + infra: + clusterName: {{ .Cluster.metadata.name }} + cloudControllerManager: + clusterCIDR: {{ .Cluster.spec.clusterNetwork.pods.cidrBlocks | join "," }} + logVerbosity: 4 +--- +apiVersion: addons.cluster.x-k8s.io/v1alpha1 +kind: HelmChartProxy +metadata: + name: cloud-provider-azure-chart-ci +spec: + chartName: cloud-provider-azure + clusterSelector: + matchLabels: + cloud-provider: azure-ci + releaseName: cloud-provider-azure + repoURL: https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo + valuesTemplate: |- + infra: + clusterName: {{ .Cluster.metadata.name }} + cloudControllerManager: + clusterCIDR: {{ .Cluster.spec.clusterNetwork.pods.cidrBlocks | join "," }} + imageName: ${CCM_IMAGE_NAME} + imageRepository: ${CCM_IMAGE_REGISTRY} + imageTag: ${IMAGE_TAG_CCM} + logVerbosity: 4 + cloudNodeManager: + imageName: ${CNM_IMAGE_NAME} + imageRepository: ${CNM_IMAGE_REGISTRY} + imageTag: ${IMAGE_TAG_CCM} +--- apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 kind: KubeadmConfigTemplate metadata: @@ -77,6 +120,7 @@ kind: Cluster metadata: labels: azuredisk-csi: "true" + cloud-provider: ${CLOUD_PROVIDER_AZURE_LABEL} cni: calico name: ${CLUSTER_NAME} namespace: default diff --git a/test/e2e/data/infrastructure-azure/v1beta1/cluster-template/kustomization.yaml b/test/e2e/data/infrastructure-azure/v1beta1/cluster-template/kustomization.yaml index 313469333407..6c4a1734f246 100644 --- a/test/e2e/data/infrastructure-azure/v1beta1/cluster-template/kustomization.yaml +++ b/test/e2e/data/infrastructure-azure/v1beta1/cluster-template/kustomization.yaml @@ -4,8 +4,11 @@ bases: - ../bases/azure-cluster-identity.yaml - ../bases/calico.yaml - ../bases/azuredisk-csi-driver.yaml +- ../bases/cloud-provider-azure.yaml +- ../bases/cloud-provider-azure-ci.yaml patchesStrategicMerge: - ../patches/azurecluster-identity-ref.yaml - ../patches/cluster-label-calico.yaml - ../patches/cluster-label-azuredisk-csi-driver.yaml +- ../patches/cluster-label-cloud-provider-azure.yaml diff --git a/test/e2e/data/infrastructure-azure/v1beta1/patches/cluster-label-cloud-provider-azure.yaml b/test/e2e/data/infrastructure-azure/v1beta1/patches/cluster-label-cloud-provider-azure.yaml new file mode 100644 index 000000000000..664e84665a90 --- /dev/null +++ b/test/e2e/data/infrastructure-azure/v1beta1/patches/cluster-label-cloud-provider-azure.yaml @@ -0,0 +1,6 @@ +apiVersion: cluster.x-k8s.io/v1beta1 +kind: Cluster +metadata: + name: ${CLUSTER_NAME} + labels: + cloud-provider: ${CLOUD_PROVIDER_AZURE_LABEL} \ No newline at end of file