Skip to content

Operator rewrites declarative image paths in an inconsistent manner #2409

Description

@clausstrommer

When instantiating vmagent custom resources, if the spec contains image.repository then the operator adds a library prefix to the container's repository string https://github.com/VictoriaMetrics/operator/blob/master/internal/controller/operator/factory/build/container.go#L245 . This causes several inconsistencies:

  • Organisations using cloud-hosted private registries would want to use [registry url]/[organisation] as the global registry with the operator chart's global.image.registry value, and [image name] as the image.repository in the vmagent custom resource's spec. In this scenario, instead of [registry url]/[organisation]/[image name] the vmagent's image is rewritten as [registry url]/[organisation]/library/[image name]
  • By comparison, the operator does not add the library infix for the config-reloader images.
  • When setting global.image.registry, the image.registry parameter in the vmagent's spec is ignored. This means that one cannot override it as a workaround for the agent's image by setting the registry to [registry url] and the image to [organisation]/[image name].

I believe the assumption from #1816 about requiring the library infix when image.repository does not contain / is incorrect, and that the default mode should be to not add the infix unless the registry matches a certain pattern.

Metadata

Metadata

Labels

bugSomething isn't workingwaiting for releaseThe change was merged to upstream, but wasn't released yet.

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions