From 7e207f0ad53d9ec7ca448b598d97fc2413c3daa9 Mon Sep 17 00:00:00 2001 From: Mohamed Radwan Date: Wed, 23 Aug 2023 10:38:40 +0200 Subject: [PATCH] adding environment variables --- workload-identity/README.md | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/workload-identity/README.md b/workload-identity/README.md index d5268bb..89fae77 100644 --- a/workload-identity/README.md +++ b/workload-identity/README.md @@ -110,6 +110,25 @@ spec: - "/bin/bash" - "-c" - "sleep infinity" + env: + - name: AZURE_CLIENT_ID + value: XXXXXXXXXXXXXX + - name: AZURE_TENANT_ID + value: XXXXXXXXXXXXXX + - name: AZURE_FEDERATED_TOKEN_FILE + value: /var/run/secrets/tokens/azure-identity-token + volumeMounts: + - mountPath: /var/run/secrets/tokens + name: azure-identity-token + volumes: + - name: azure-identity-token + projected: + defaultMode: 420 + sources: + - serviceAccountToken: + audience: api://AzureADTokenExchange + expirationSeconds: 3600 + path: azure-identity-token EOF # Get pod name and get a shell to container in pod @@ -149,4 +168,4 @@ az group create -n test -l westeurope # exit the container exit -``` \ No newline at end of file +```