Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Allow ACR authentication using Azure CLI #609

Closed
wants to merge 19 commits into from

Conversation

jwhy89
Copy link

@jwhy89 jwhy89 commented Aug 17, 2023

Install azure-cli in Docker image in order to use the az acr login command.

Can be used with Azure Managed Identities with the following script:

registries:
- name: ACR example with external script
  api_url: https://acr-example.azurecr.io/
  prefix: acr-example.azurecr.io
  credentials: ext:/app/scripts/acr-login.sh
  credsexpire: 10h

The script should contain the name of the registry:

  acr-login.sh: |
    #!/bin/sh
    LOGIN=$(az login --identity)
    REGISTRY="acr-example"
    TOKEN=$(az acr login --name $REGISTRY --expose-token --output tsv --query accessToken)
    echo "00000000-0000-0000-0000-000000000000:$TOKEN"

Closes #550 #473 and #586

xescab and others added 18 commits August 17, 2023 12:18
Install azure-cli in Docker image in order to use the `az acr login` command.

Can be used with Azure Managed Identities with the following script:

```yaml
---
apiVersion: v1
kind: ConfigMap
metadata:
  name: argocd-image-updater-config
  namespace: argocd
data:
  log.level: debug
  registries.conf: |
    registries:
    - name: acrexample
      api_url: https://acrexample.azurecr.io/
      prefix: acrexample.azurecr.io
      ping: yes
      insecure: no
      credentials: ext:/app/scripts/acr-login.sh
      credsexpire: 10h
---
apiVersion: v1
kind: ConfigMap
metadata:
  name: argocd-image-updater-config-acr
  namespace: argocd
data:
  acr-login.sh: |
    #!/bin/sh
    LOGIN=$(az login --identity)
    REGISTRY="acrexample"
    TOKEN=$(az acr login --name $REGISTRY --expose-token --output tsv --query accessToken)
    echo "00000000-0000-0000-0000-000000000000:$TOKEN"
```

Closes argoproj-labs#550 and argoproj-labs#473

Signed-off-by: Jarvis Yang <[email protected]>
Signed-off-by: Jarvis Yang <[email protected]>
Signed-off-by: Jarvis Yang <[email protected]>
Signed-off-by: Daniel Mavis <[email protected]>
Signed-off-by: Jarvis Yang <[email protected]>
Co-authored-by: Abdellah Derfoufi <[email protected]>
Signed-off-by: Jarvis Yang <[email protected]>
* ci: Fix codegen

Signed-off-by: jannfis <[email protected]>

* Fix tar call

Signed-off-by: jannfis <[email protected]>

---------

Signed-off-by: jannfis <[email protected]>
Signed-off-by: Jarvis Yang <[email protected]>
…roj-labs#573)

* Fix original override not respected

Signed-off-by: KS. Yim <[email protected]>

* Add writeOverrides unittest

Signed-off-by: KS. Yim <[email protected]>

* Add helm override commit test

Signed-off-by: KS. Yim <[email protected]>

* lint

Signed-off-by: KS. Yim <[email protected]>

* fix shadowed err

Signed-off-by: KS. Yim <[email protected]>

---------

Signed-off-by: KS. Yim <[email protected]>
Co-authored-by: KS. Yim <[email protected]>
Signed-off-by: Jarvis Yang <[email protected]>
…rgoproj-labs#594)

* fix: update go mods to use newer argocd app definition

Signed-off-by: Jesse Bye <[email protected]>

* fix deps and tests

Signed-off-by: Jesse Bye <[email protected]>

* fix spelling

Signed-off-by: Jesse Bye <[email protected]>

---------

Signed-off-by: Jesse Bye <[email protected]>
Signed-off-by: Jarvis Yang <[email protected]>
…labs#600)

makes argocd-image-updater compatible with restricted Pod Security Standard

Signed-off-by: Takeo Sawada <[email protected]>
Signed-off-by: Jarvis Yang <[email protected]>
…ion (argoproj-labs#424)

* Add possibility to specify write-back GIT repository as annotation.

Signed-off-by: flozzone <[email protected]>

* Update golangci-lint to 1.52.2.

Signed-off-by: flozzone <[email protected]>

* Replace deprecated golangci linters with 'unused' linter.

Signed-off-by: flozzone <[email protected]>

* Fix Goimport issues.

Signed-off-by: flozzone <[email protected]>

---------

Signed-off-by: flozzone <[email protected]>
Signed-off-by: Jarvis Yang <[email protected]>
Signed-off-by: Jarvis Yang <[email protected]>
@jwhy89
Copy link
Author

jwhy89 commented Aug 21, 2023

@jannfis I don't know where @xesceb went but here's the updated PR with DCO.

@jwhy89
Copy link
Author

jwhy89 commented Sep 11, 2023

Closed by #586

@jwhy89 jwhy89 closed this Sep 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot pull images from Azure Container Registry