Skip to content

[release-1.19] Enable new AKS API version with ASO API #5626

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/book/src/managed/asomanagedcluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ metadata:
name: ${CLUSTER_NAME}
spec:
resources:
- apiVersion: containerservice.azure.com/v1api20231001
- apiVersion: containerservice.azure.com/v1api20240901
kind: ManagedCluster
metadata:
name: ${CLUSTER_NAME}
Expand Down
2 changes: 1 addition & 1 deletion docs/book/src/managed/managed.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ For the complete history of this transition, see the [Managing Azure Resources w

## ASO's AKS versus CAPZ's ASOManaged AKS

It is possible to not utilize CAPZ at all and simply utilize ASO to provision an [AKS cluster definition directly](https://azure.github.io/azure-service-operator/reference/containerservice/v1api20231001/#containerservice.azure.com/v1api20231001.ManagedCluster). The advantages that CAPZ brings over this approach are the following:
It is possible to not utilize CAPZ at all and simply utilize ASO to provision an [AKS cluster definition directly](https://azure.github.io/azure-service-operator/reference/containerservice/v1api20231001/#containerservice.azure.com/v1api20240901.ManagedCluster). The advantages that CAPZ brings over this approach are the following:
- Robust Testing - CAPZ is utilized to test Kubernetes and AKS using this code with numerous end-to-end tests. ASO has no AKS-specific testing.
- Simplification of Infrastructure as Code (IaC) definitions - With ASO you have to figure out how to put together every field and there are some small examples. CAPZ provides `kustomize` template samples connected to `clusterctl generate template` as well as a [helm chart](https://github.com/mboersma/cluster-api-charts/).
- Management scale - CAPZ enables use of [ClusterClass](../topics/clusterclass.md) so you can have a smaller chunk of code to manage numerous clusters with the same configuration.
Expand Down
2 changes: 2 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
asocontainerservicev1api20231001 "github.com/Azure/azure-service-operator/v2/api/containerservice/v1api20231001"
asocontainerservicev1api20231102preview "github.com/Azure/azure-service-operator/v2/api/containerservice/v1api20231102preview"
asocontainerservicev1api20240402preview "github.com/Azure/azure-service-operator/v2/api/containerservice/v1api20240402preview"
asocontainerservicev1api20240901 "github.com/Azure/azure-service-operator/v2/api/containerservice/v1api20240901"
asokubernetesconfigurationv1 "github.com/Azure/azure-service-operator/v2/api/kubernetesconfiguration/v1api20230501"
asonetworkv1api20201101 "github.com/Azure/azure-service-operator/v2/api/network/v1api20201101"
asonetworkv1api20220701 "github.com/Azure/azure-service-operator/v2/api/network/v1api20220701"
Expand Down Expand Up @@ -92,6 +93,7 @@
_ = asocontainerservicev1api20230315preview.AddToScheme(scheme)
_ = asocontainerservicev1api20231102preview.AddToScheme(scheme)
_ = asocontainerservicev1api20240402preview.AddToScheme(scheme)
_ = asocontainerservicev1api20240901.AddToScheme(scheme)

Check warning on line 96 in main.go

View check run for this annotation

Codecov / codecov/patch

main.go#L96

Added line #L96 was not covered by tests
_ = asokubernetesconfigurationv1.AddToScheme(scheme)
// +kubebuilder:scaffold:scheme
}
Expand Down
6 changes: 3 additions & 3 deletions templates/cluster-template-aks-aso-clusterclass.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions templates/cluster-template-aks-aso.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions templates/flavors/aks-aso-clusterclass/clusterclass.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ spec:
template: |
version: ${KUBERNETES_VERSION}
resources:
- apiVersion: containerservice.azure.com/v1api20231001
- apiVersion: containerservice.azure.com/v1api20240901
kind: ManagedCluster
metadata:
name: "{{ .builtin.cluster.name }}"
Expand Down Expand Up @@ -111,7 +111,7 @@ spec:
valueFrom:
template: |
resources:
- apiVersion: "containerservice.azure.com/v1api20231001"
- apiVersion: "containerservice.azure.com/v1api20240901"
kind: ManagedClustersAgentPool
metadata:
name: "{{ .builtin.cluster.name }}-pool0"
Expand Down Expand Up @@ -139,7 +139,7 @@ spec:
valueFrom:
template: |
resources:
- apiVersion: containerservice.azure.com/v1api20231001
- apiVersion: containerservice.azure.com/v1api20240901
kind: ManagedClustersAgentPool
metadata:
name: "{{ .builtin.cluster.name }}-pool1"
Expand Down
6 changes: 3 additions & 3 deletions templates/flavors/aks-aso/cluster-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ metadata:
spec:
version: ${KUBERNETES_VERSION}
resources:
- apiVersion: containerservice.azure.com/v1api20231001
- apiVersion: containerservice.azure.com/v1api20240901
kind: ManagedCluster
metadata:
name: ${CLUSTER_NAME}
Expand Down Expand Up @@ -79,7 +79,7 @@ metadata:
name: "${CLUSTER_NAME}-pool0"
spec:
resources:
- apiVersion: "containerservice.azure.com/v1api20231001"
- apiVersion: "containerservice.azure.com/v1api20240901"
kind: ManagedClustersAgentPool
metadata:
name: ${CLUSTER_NAME}-pool0
Expand Down Expand Up @@ -118,7 +118,7 @@ metadata:
name: "${CLUSTER_NAME}-pool1"
spec:
resources:
- apiVersion: "containerservice.azure.com/v1api20231001"
- apiVersion: "containerservice.azure.com/v1api20240901"
kind: ManagedClustersAgentPool
metadata:
name: ${CLUSTER_NAME}-pool1
Expand Down
8 changes: 4 additions & 4 deletions templates/test/ci/cluster-template-prow-aks-aso.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion templates/test/ci/prow-aks-aso/patches/aks-pool2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ metadata:
name: "${CLUSTER_NAME}-pool2"
spec:
resources:
- apiVersion: "containerservice.azure.com/v1api20231001"
- apiVersion: "containerservice.azure.com/v1api20240901"
kind: ManagedClustersAgentPool
metadata:
name: ${CLUSTER_NAME}-pool2
Expand Down