Skip to content

Ignore immutable registry errors when source image changed with a flag or configuration #69

@R1cc4rd07

Description

@R1cc4rd07

Hi all,

I've encountered an issue uploading images to my immutable registry.

When the source image gets changed for whatever reason dregsy tries reuploading the image but fails because the image tag already exists and can't be overwritten.

Log message:

The image tag '1.20.12' already exists in the 'xxxxxx/kubectl' repository and cannot be overwritten because the repository is immutable.

I think there should be a configuration/flag available to ignore errors like this and simply drop a warning at the end saying something like:

The source image for <insert repo name> was changed in < tag version >. The image was not uploaded because the target registry is immutable.

But this should not be an error just a warning.
I suggest a new field for the configuration of dregsy tasks something like this:

"tasks": {
  [
    "source": {
      "regsitry": "my-registry.com",
      "auth": "xxxxxxxxx"
    },
    "target": {
      "registry": "my-traget-registry.com",
      "auth": "xxxxxxxxx",
      "immutable": true
    },
    ...
  ]
}

or simply a flag called "ignoreImmutable" or something like this.

Let me know what you think.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions