Skip to content

Docker Hub default namespace is removed on write back #1012

@AlessandroZanatta

Description

@AlessandroZanatta

Is your feature request related to a problem? Please describe.
I would like to be able to specify every image name as a fully qualified name, that is, registry.url/namespace/imagename:tag.

However, this is not possible for docker.io/library/<...>, as the library/ part gets removed here (I think).

When using git write-back-method and the kustomization write-back-target, that is:

    argocd-image-updater.argoproj.io/write-back-method: git
    argocd-image-updater.argoproj.io/write-back-target: kustomization

it results in the following kustomization update:

images:
  - name: docker.io/postgres
    newTag: 16.6-alpine

which does not match the image tag in the pod, such as docker.io/library/postgres:16-alpine, hence the pod is not rolled to the new image by argocd.

Describe the solution you'd like
Would it be possible to avoid removing the default namespace? The comment here does not specify why this gets removed, could you please clarify? If it's something that can be fixed, I'd be happy to send a PR for it!

I've also tried specifying the Docker Hub registry in the configuration with a blank defaultNs, but that resulted in errors from the registry:

time="2025-01-14T08:42:37+01:00" level=error msg="Could not get tags from registry: errors:\ndenied: requested access to the resource is denied\nunauthorized: authentication required\n" alias=postgres application=anime image_name=postgres image_tag=16-alpine registry=docker.io

I do not see a way to enforce retaining the library part in the image name in the docs (unless I missed it, that is).

Describe alternatives you've considered
The alternative is leaving the library/ part out of the image names, which I do not particularly like given that all the other images are fully qualified.

Additional context
I think it's a pretty niche feature, but also a slight improvement that could be added to this amazing project!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions