diff --git a/charts/azure-aks-aso/Chart.yaml b/charts/azure-aks-aso/Chart.yaml index 94b7555..9f03aa6 100644 --- a/charts/azure-aks-aso/Chart.yaml +++ b/charts/azure-aks-aso/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: azure-aks-aso description: A chart describing an AKS cluster for CAPZ using the ASO API type: application -version: 0.3.0 +version: 0.4.0 appVersion: 0.1.0 maintainers: - name: mboersma diff --git a/charts/azure-aks-aso/README.md b/charts/azure-aks-aso/README.md index 9da9334..66ae0aa 100644 --- a/charts/azure-aks-aso/README.md +++ b/charts/azure-aks-aso/README.md @@ -50,6 +50,10 @@ managedMachinePoolSpecs: mode: User vmSize: Standard_DS2_v2 type: VirtualMachineScaleSets + +clusterClassName: "aksasoclass" +withClusterClass: false +withClusterTopology: false ``` ## Install the CAPZ AKS-ASO Helm chart @@ -58,6 +62,26 @@ managedMachinePoolSpecs: helm install capi/azure-aks-aso -f values.yaml ``` +## Install the CAPZ AKS-ASO Helm chart with ClusterClass + +Be sure to set both of these values to `true` in the values.yaml file. +```yaml +withClusterClass: true +withClusterTopology: true +``` + +``` +helm install capi/azure-aks-aso -f values.yaml +``` + +On the first install, there will be this message and it is expected since the clusterclass needs to provision first. It will eventually reconcile successfully. + +```shell +W0829 14:39:51.801605 93841 warnings.go:70] Cluster refers to ClusterClass default/aksasoclass, but this ClusterClass does not exist. Cluster topology has not been fully validated. The ClusterClass must be created to reconcile the Cluster +``` + +After the ClusterClass is created, it is possible to stamp out numerous instances of that Clusterclass using just ClusterTopology by changing `withClusterClass: false` and doing different helm chart installations against that same management cluster with different release names. + ## Uninstall the CAPZ AKS-ASO Helm chart ```bash diff --git a/charts/azure-aks-aso/templates/clusterclass.yaml b/charts/azure-aks-aso/templates/clusterclass.yaml index 4532732..86e94e9 100644 --- a/charts/azure-aks-aso/templates/clusterclass.yaml +++ b/charts/azure-aks-aso/templates/clusterclass.yaml @@ -28,7 +28,7 @@ spec: name: {{ $.Values.clusterClassName | quote }} infrastructure: ref: - apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 + apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1 kind: AzureASOManagedMachinePoolTemplate name: {{ printf "%s-%s" $.Values.clusterClassName $mpName | quote }} {{- end }} diff --git a/charts/azure-aks-aso/values.yaml b/charts/azure-aks-aso/values.yaml index 76f34bb..01a2311 100644 --- a/charts/azure-aks-aso/values.yaml +++ b/charts/azure-aks-aso/values.yaml @@ -15,22 +15,49 @@ clusterNetwork: null kubernetesVersion: v1.30.3 managedClusterAPIVersion: v1api20231001 +# https://azure.github.io/azure-service-operator/reference/containerservice/v1api20231001/#containerservice.azure.com/v1api20231001.ManagedCluster_Spec managedClusterSpec: + autoUpgradeProfile: + nodeOSUpgradeChannel: NodeImage + upgradeChannel: stable + disableLocalAccounts: false + enableRBAC: true identity: type: SystemAssigned servicePrincipalProfile: clientId: msi + sku: + name: Base + tier: Free + supportPlan: "KubernetesOfficial" managedMachinePoolAPIVersion: v1api20231001 +# https://azure.github.io/azure-service-operator/reference/containerservice/v1api20231001/#containerservice.azure.com/v1api20231001.ManagedClusters_AgentPool_Spec managedMachinePoolSpecs: pool0: count: 1 + enableAutoScaling: true + enableEncryptionAtHost: false + enableFIPS: false + enableNodePublicIP: false + enableUltraSSD: false + maxCount: 3 + minCount: 1 mode: System + osSKU: AzureLinux vmSize: Standard_DS2_v2 type: VirtualMachineScaleSets pool1: count: 1 + enableAutoScaling: true + enableEncryptionAtHost: false + enableFIPS: false + enableNodePublicIP: false + enableUltraSSD: false + maxCount: 3 + minCount: 0 mode: User + osSKU: AzureLinux vmSize: Standard_DS2_v2 type: VirtualMachineScaleSets