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.
When instantiating vmagent custom resources, if the spec contains
image.repositorythen the operator adds alibraryprefix 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:[registry url]/[organisation]as the global registry with the operator chart'sglobal.image.registryvalue, and[image name]as theimage.repositoryin 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]libraryinfix for theconfig-reloaderimages.global.image.registry, theimage.registryparameter 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
libraryinfix whenimage.repositorydoes not contain/is incorrect, and that the default mode should be to not add the infix unless the registry matches a certain pattern.