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: 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