sigs.k8s.io/cluster-api-provider-azure@v1.14.3/docs/book/src/topics/aso.md (about) 1 # Azure Service Operator 2 3 ## Overview 4 5 CAPZ interfaces with Azure to create and manage some types of resources using [Azure Service Operator 6 (ASO)](https://azure.github.io/azure-service-operator/). 7 8 More context around the decision for CAPZ to pivot towards using ASO can be found in the 9 [proposal](https://github.com/kubernetes-sigs/cluster-api-provider-azure/blob/main/docs/proposals/20230123-azure-service-operator.md). 10 11 ## Primary changes 12 13 For most users, the introduction of ASO is expected to be fully transparent and backwards compatible. Changes 14 that may affect specific use cases are described below. 15 16 ### Installation 17 18 Beginning with CAPZ v1.11.0, ASO's control plane will be installed automatically by `clusterctl` in the 19 `capz-system` namespace alongside CAPZ's control plane components. When ASO is already installed on a cluster, 20 installing ASO again with CAPZ is expected to fail and `clusterctl` cannot install CAPZ without ASO. The 21 suggested workaround for users facing this issue is to uninstall the existing ASO control plane (but **keep** 22 the ASO CRDs) and then to install CAPZ. 23 24 ### Bring-your-own (BYO) resource 25 26 CAPZ had already allowed users to pre-create some resources like resource groups and virtual networks and 27 reference those resources in CAPZ resources. CAPZ will then use those existing resources without creating new 28 ones and assume the user is responsible for managing them, so will not actively reconcile changes to or delete 29 those resources. 30 31 This use case is still supported with ASO installed. The main difference is that an ASO resource will be 32 created for CAPZ's own bookkeeping, but configured not to be actively reconciled by ASO. When the Cluster API 33 Cluster owning the resource is deleted, the ASO resource will also be deleted from the management cluster but 34 the resource will not be deleted in Azure. 35 36 Additionally, BYO resources may include ASO resources managed by the user. CAPZ will not modify or delete such 37 resources. Note that `clusterctl move` will not move user-managed ASO resources. 38 39 ## Configuration with Environment Variables 40 41 These environment variables are passed through to the `aso-controller-settings` Secret to configure ASO when 42 CAPZ is installed and are consumed by `clusterctl init`. They may also be modified directly in the Secret 43 after installing ASO with CAPZ: 44 45 - `AZURE_AUTHORITY_HOST` 46 - `AZURE_RESOURCE_MANAGER_AUDIENCE` 47 - `AZURE_RESOURCE_MANAGER_ENDPOINT` 48 - `AZURE_SYNC_PERIOD` 49 50 More details on each can be found in [ASO's documentation](https://azure.github.io/azure-service-operator/guide/aso-controller-settings-options/). 51 52 ## Using ASO for non-CAPZ resources 53 54 CAPZ's installation of ASO can be used directly to manage Azure resources outside the domain of 55 Cluster API. 56 57 ### Installing more CRDs 58 59 #### For a fresh installation 60 Before performing a `clusterctl init`, users can specify additional ASO CRDs to be installed in the management cluster by exporting `ADDITIONAL_ASO_CRDS` variable. 61 For example, to install all the CRDs of `cache.azure.com` and `MongodbDatabase.documentdb.azure.com`: 62 - `export ADDITIONAL_ASO_CRDS="cache.azure.com/*;documentdb.azure.com/MongodbDatabase"` 63 - continue with the installation of CAPZ as specified here [Cluster API Quick Start](https://cluster-api.sigs.k8s.io/user/quick-start.html). 64 65 #### For an existing CAPZ installation being upgraded to v1.14.0(or beyond) 66 CAPZ's installation of ASO configures only the ASO CRDs that are required by CAPZ. To make more resource types available, export `ADDITIONAL_ASO_CRDS` and then upgrade CAPZ. 67 For example, to install the all CRDs of `cache.azure.com` and `MongodbDatabase.documentdb.azure.com`, follow these steps: 68 - `export ADDITIONAL_ASO_CRDS="cache.azure.com/*;documentdb.azure.com/MongodbDatabase"` 69 - continue with the upgrade of CAPZ as specified [here](https://cluster-api.sigs.k8s.io/tasks/upgrading-cluster-api-versions.html?highlight=upgrade#when-to-upgrade] 70 71 You will see that the `--crd-pattern` in Azure Service Operator's Deployment (in the `capz-system` namespace) looks like below: 72 ``` 73 . 74 - --crd-names=cache.azure.com/*;documentdb.azure.com/MongodbDatabase 75 . 76 ``` 77 78 More details about how ASO manages CRDs can be found [here](https://azure.github.io/azure-service-operator/guide/crd-management/). 79 80 **Note:** To install the resource for the newly installed CRDs, make sure that the ASO operator has the authentication to install the resources. Refer [authentication in ASO](https://azure.github.io/azure-service-operator/guide/authentication/) for more details. 81 An example configuration file and demo for `Azure Cache for Redis` can be found [here](https://github.com/Azure-Samples/azure-service-operator-samples/tree/master/azure-votes-redis).