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

Add OAuth support. It is need for access to Azure CR #224

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

vikborisov
Copy link

@vikborisov vikborisov commented Jun 30, 2021

We also forked the nokia repo and fixed the OAuth contract.

Image Updater gets support for Azure CR

@CLAassistant
Copy link

CLAassistant commented Jun 30, 2021

CLA assistant check
All committers have signed the CLA.

@jannfis
Copy link
Contributor

jannfis commented Jul 6, 2021

Hey @vikborisov, thanks for this PR.

However, I feel that we should not move to yet another fork of docker-registry-client. Due to the staleness of both, the original repository and all of its forks, I was thinking whether to just vendor in the code or make a clone of this repository available under argoproj-labs repository.

Once this is done, please feel free to submit any changes required to make oAuth work.

@vikborisov
Copy link
Author

@jannfis Can you make a fork and i create a PR with my changes?

@jannfis
Copy link
Contributor

jannfis commented Sep 18, 2021

Me moved away from docker-registry-client to use Docker's distribution/v3 API (see #249). Chances are, that this will enable oAuth support by default.

@andloh
Copy link

andloh commented Oct 29, 2021

Any updates on this?

@janpieper
Copy link
Contributor

janpieper commented Nov 3, 2021

@andloh We're using version 0.10.1 with Azure Container Registry and it works fine so far.

registries:
  - name: youracrname
    ping: yes
    api_url: https://youracrname.azurecr.io
    prefix: youracrname.azurecr.io
    credentials: [...]
$ argocd-image-updater test --registries-conf registries.conf youracrname.azurecr.io/your-image

If this does not help you: Either we discuss your problem here or maybe create an issue 😉

@andloh
Copy link

andloh commented Nov 15, 2021

Hi, thanks @janpieper.

What du you use for authentication? SP, MSI, Token, Access Keys etc...

Also...is it possible to use the integrated ACR -> AKS authentication? E.g the /etc/kubernetes/azure.conf

@janpieper
Copy link
Contributor

What du you use for authentication? SP, MSI, Token, Access Keys etc...

Service Principal

@anthonyoride
Copy link

anthonyoride commented Aug 15, 2023

What du you use for authentication? SP, MSI, Token, Access Keys etc...

Service Principal

@janpieper i have been struggling with this for sometime. i'm using service principal but having authentication issues. i'm using the same ACR secret config for image pull in my deployments and it works flawlessly. but same ACR secret config doesn't work for argocd image updater. below are samples of my configs;

--ApplicationSet--

apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: my-backend-app
namespace: argocd
spec:
generators:

  • list:
    elements:
    • app: auth-service
      image: myapp-auth-service
    • app: cart-service
      image: my-cart-service
      template:
      metadata:
      name: '{{app}}'
      annotations:
      argocd-image-updater.argoproj.io/image-list: image-url=myrepo.azurecr.io/{{image}}:latest
      argocd-image-updater.argoproj.io/image-url.update-strategy: digest

---Image Updater Configmap---

apiVersion: v1
data:
log.level: debug
registries.conf: |
registries:
- name: ACR
prefix: myrepo.azurecr.io
api_url: https://myrepo.azurecr.io
credentials: pullsecret:default/acr-config
kind: ConfigMap

Help will really be appreciated.

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.

6 participants