From 8f2d3d2b04267b7b65d7562cbfda55c6aca8d044 Mon Sep 17 00:00:00 2001 From: Bevan Arps Date: Mon, 9 Jun 2025 13:18:56 +1200 Subject: [PATCH 1/2] Add missing label --- cosmos-todo-list-mi/cosmos-app.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/cosmos-todo-list-mi/cosmos-app.yaml b/cosmos-todo-list-mi/cosmos-app.yaml index 0e18c4a..ba66935 100644 --- a/cosmos-todo-list-mi/cosmos-app.yaml +++ b/cosmos-todo-list-mi/cosmos-app.yaml @@ -22,6 +22,7 @@ spec: metadata: labels: app: cosmos-todo-app + azure.workload.identity/use: "true" annotations: azure.workload.identity/inject-proxy-sidecar: "true" spec: From 9f9cbc54717af45b4d94ce2f30ab0512cce5317d Mon Sep 17 00:00:00 2001 From: Bevan Arps Date: Mon, 9 Jun 2025 13:19:02 +1200 Subject: [PATCH 2/2] Update readme --- cosmos-todo-list/README.md | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/cosmos-todo-list/README.md b/cosmos-todo-list/README.md index bb0ed5e..c1347b5 100644 --- a/cosmos-todo-list/README.md +++ b/cosmos-todo-list/README.md @@ -24,11 +24,10 @@ The operator is installed in your cluster and propagates changes to resources th Follow [these instructions](https://github.com/Azure/azure-service-operator/tree/master/v2#installation) to install the ASO v2 operator in your cluster. -Part of this installs -the [custom resource definitions](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/) for the Azure and Cosmos DB resources -we're going to create next: ResourceGroup, DatabaseAccount, -SqlDatabase, and SqlDatabaseContainer. +* When specifying the `crdPattern` configuration option to select which custom resources (CRs) are installed, make sure + you include both `resources.azure.com/*` (for the ResourceGroup CR) and `documentdb.azure.com/*` (for the DatabaseAccount, + SqlDatabase, and SqlDatabaseContainer CRs). ) ## Create the Cosmos DB resources @@ -41,36 +40,45 @@ The YAML documents in [cosmos-sql-demo.yaml](cosmos-sql-demo.yaml) create a numb * A container (equivalent to a table in the [Cosmos DB resource model](https://docs.microsoft.com/en-us/azure/cosmos-db/account-databases-containers-items)) Create environment variables to hold app name. This APP_NAME below is used to generate the names of some resources in Azure below. + ```sh export APP_NAME=cosmos-todo ``` + **Warning:**: Some of these names must be unique, so we recommend you edit APP_NAME above to be something unique to yourself to avoid conflicts. For example: APP_NAME=foo-cosmos-todo Create them all by applying the file: + ```sh envsubst