Skip to content

Commit

Permalink
add additional ASO values (#27)
Browse files Browse the repository at this point in the history
* Fix API for ClusterClass
  • Loading branch information
dtzar authored Sep 3, 2024
1 parent c3c4dd0 commit 4053fc9
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/azure-aks-aso/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
24 changes: 24 additions & 0 deletions charts/azure-aks-aso/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -58,6 +62,26 @@ managedMachinePoolSpecs:
helm install <name> 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 <name> 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
Expand Down
2 changes: 1 addition & 1 deletion charts/azure-aks-aso/templates/clusterclass.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
27 changes: 27 additions & 0 deletions charts/azure-aks-aso/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 4053fc9

Please sign in to comment.