Skip to content

images not found in asia.gcr.io #323

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

Closed
bino98 opened this issue Dec 18, 2021 · 4 comments
Closed

images not found in asia.gcr.io #323

bino98 opened this issue Dec 18, 2021 · 4 comments
Labels
bug Something isn't working

Comments

@bino98
Copy link

bino98 commented Dec 18, 2021

Describe the bug

Our Docker images are uploaded to the Google Container Repository. The location is asia.

However, it does not seem to be able to correctly recognize Docker images fetched from asia.gcr.io.

To Reproduce

argocd-image-updater-config

apiVersion: v1
kind: ConfigMap
metadata:
  name: argocd-image-updater-config
data:
  log.level: debug
  registries.conf: |
    registries:
    - name: Google Container Registry (Asia)
      api_url: https://asia.gcr.io
      prefix: asia.gcr.io
      ping: no
      credentials: pullsecret:argocd/lorem-sercret
kubectl exec -it argocd-image-updater-6485645f44-2zhw2 -n argocd -- sh

/ $ argocd-image-updater test asia.gcr.io/hoge/fuga
INFO[0000] getting image                                 image_name=hoge/fuga registry=asia.gcr.io
FATA[0000] could not get registry endpoint: no registry with prefix 'asia.gcr.io' configured 
/ $ 

By the way.
It seems to work correctly with gcr.io.
However, we have not uploaded the Docker image to gcr.io, so the image cannot be found. (I think that's the right behavior)

/ $ argocd-image-updater test gcr.io/hoge/fuga
INFO[0000] getting image                                 image_namehoge/fuga registry=gcr.io
INFO[0000] Fetching available tags and metadata from registry  image_name=hoge/fuga
INFO[0000] Found 0 tags in registry                      image_name=hoge/fuga
INFO[0000] no newer version of image found              
/ $ 

Expected behavior
I want Docker images uploaded to asia.gcr.io to be handled correctly.

Version

argocd-image-updater

/ $ argocd-image-updater version
argocd-image-updater: v0.9.2+9bb4753
  BuildDate: 2021-12-18T17:38:18Z
  GitCommit: 9bb4753e192d950d56ee9694c13a32502ccff498
  GoVersion: go1.14.13
  GoCompiler: gc
  Platform: linux/amd64

kubectl

$ kubectl version   Client Version: version.Info{Major:"1", Minor:"22", GitVersion:"v1.22.4", GitCommit:"b695d79d4f967c403a96986f1750a35eb75e75f1", GitTreeState:"clean", BuildDate:"2021-11-17T15:48:33Z", GoVersion:"go1.16.10", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"20+", GitVersion:"v1.20.10-gke.1600", GitCommit:"ef8e9f64449d73f9824ff5838cea80e21ec6c127", GitTreeState:"clean", BuildDate:"2021-09-06T09:24:20Z", GoVersion:"go1.15.15b5", Compiler:"gc", Platform:"linux/amd64"}
WARNING: version difference between client (1.22) and server (1.20) exceeds the supported minor version skew of +/-1

argocd
v2.2.1

@bino98 bino98 added the bug Something isn't working label Dec 18, 2021
@jannfis
Copy link
Contributor

jannfis commented Dec 19, 2021

Hi @bino98, in order for argocd-image-updater test to consider your custom registry configuration, you will need to tell it to use the registries.conf explicitly, e.g.

argocd-image-updater test --registries-conf /app/config/registries.conf asia.gcr.io/hoge/fuga

(Please note that the flag name has been changed in recent master builds to --registries-conf-path, per #295)

@bino98
Copy link
Author

bino98 commented Dec 21, 2021

Thank you for your replying @jannfis.

I tried it immediately. It just doesn't seem to work right.
Do you have a better idea?

/ $ argocd-image-updater test --registries-conf /app/config/registries.conf asia.gcr.io/hoge/fuga
INFO[0000] getting image                                 image_name=hoge/fuga registry=asia.gcr.io
DEBU[0000] rate limit for https://asia.gcr.io is 2147483647 
INFO[0000] Loaded 1 registry configurations from /app/config/registries.conf 
WARN[0000] cannot user K8s credentials without Kubernetes client  registry="https://asia.gcr.io"
FATA[0000] could not set registry credentials: could not fetch image tags 


/ $ cat /app/config/registries.conf
registries:
- name: Google Container Registry (Asia)
  api_url: https://asia.gcr.io
  prefix: asia.gcr.io
  ping: no
  credentials: pullsecret:argocd/hoge-fuga-sercret

@bino98
Copy link
Author

bino98 commented Dec 21, 2021

Restarting argocd-image-updater pods did not work.

@bino98
Copy link
Author

bino98 commented Dec 21, 2021

@jannfis

I've tried everything.

First, I made sure to use the latest binary and it worked.
It seems that I was using an older version(v0.9.2). I'm really sorry about that.

Next, about the test command. I used the latest master and tried to run --registries-conf-path, but it didn't work. The option does not seem to exist.

However, I tried to run --registries-conf-path with the run command, and it seemed to work.

Anyway, this addon is very comfortable. Thank you so much!

@bino98 bino98 closed this as completed Dec 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants