@@ -15,6 +15,7 @@ It has been successfully tested against the following popular registries:
15
15
* GitHub Packages Registry (` docker.pkg.github.com ` )
16
16
* GitLab Container Registry (` registry.gitlab.com ` )
17
17
* Google Container Registry (` gcr.io ` )
18
+ * Azure Container Registry (` azurecr.io ` )
18
19
19
20
Chances are, that it will work out of the box for other registries as well.
20
21
@@ -326,3 +327,29 @@ two strategies to overcome this:
326
327
i.e. for getting EKS credentials from the aws CLI. For example, if the
327
328
token has a lifetime of 12 hours, you can set `credsexpire : 12h` and Argo
328
329
CD Image Updater will get a new token after 12 hours.
330
+
331
+ # ## <a name="external-script-azure"></a>Configuring a script to authenticate against an Azure Container Registry
332
+
333
+ You can authenticate against an Azure Container Registry using Azure Managed Identities with an external script :
334
+
335
+ ` ` ` yaml
336
+ registries:
337
+ - name: ACR example with external script
338
+ api_url: https://acr-example.azurecr.io/
339
+ prefix: acr-example.azurecr.io
340
+ credentials: ext:/app/scripts/acr-login.sh
341
+ credsexpire: 10h
342
+ ` ` `
343
+
344
+ The script should contain the name of the registry :
345
+
346
+ ` ` ` bash
347
+ acr-login.sh: |
348
+ #!/bin/sh
349
+ LOGIN=$(az login --identity)
350
+ REGISTRY="acr-example"
351
+ TOKEN=$(az acr login --name $REGISTRY --expose-token --output tsv --query accessToken)
352
+ echo "00000000-0000-0000-0000-000000000000:$TOKEN"
353
+ ` ` `
354
+
355
+ And the image used for `argocd-image-updater` should contain the Azure CLI.
0 commit comments