diff --git a/component/common.libsonnet b/component/common.libsonnet index 8420fe54..da83e54b 100644 --- a/component/common.libsonnet +++ b/component/common.libsonnet @@ -9,14 +9,15 @@ local evaluate_log_format = function(component) local render_image(imagename, include_tag=false) = local imagespec = params.images[imagename]; + local img = '%(registry)s/%(repository)s' % imagespec; local image = if std.objectHas(imagespec, 'image') && imagespec.image != null then std.trace( - 'Field `image` for selecting the container image `%s` has been deprecated in favor of fields `registry` and `repository`, please update your config' % imagename, - imagespec.image + 'Field `image` for selecting the container image `%s` has been removed. Please use fields `registry` and `repository` instead' % imagename, + img ) else - '%(registry)s/%(repository)s' % imagespec; + img; if include_tag then '%(image)s:%(tag)s' % { image: image, tag: imagespec.tag } else diff --git a/docs/modules/ROOT/pages/references/parameters.adoc b/docs/modules/ROOT/pages/references/parameters.adoc index e833a97c..25b377b1 100644 --- a/docs/modules/ROOT/pages/references/parameters.adoc +++ b/docs/modules/ROOT/pages/references/parameters.adoc @@ -41,6 +41,7 @@ SSH known hosts for Git servers. type:: dictionary Dictionary containing the container images used by this component. +Each entry follows the https://syn.tools/syn/explanations/commodore-components/container-images.html[Commodore component best practices] for specifying container images. == `log_level` diff --git a/tests/golden/params/argocd/argocd/25_hooks/hooks.yaml b/tests/golden/params/argocd/argocd/25_hooks/hooks.yaml index 969aa626..141fc061 100644 --- a/tests/golden/params/argocd/argocd/25_hooks/hooks.yaml +++ b/tests/golden/params/argocd/argocd/25_hooks/hooks.yaml @@ -86,7 +86,7 @@ spec: env: - name: HOME value: /home - image: mymirror.io/kubectl:1.28.4@sha256:9aa77d80cf5d32e0345c8468a45d39134a8016e30eccddaf720bf197ad7dd9f0 + image: docker.io/bitnami/kubectl:1.28.4@sha256:9aa77d80cf5d32e0345c8468a45d39134a8016e30eccddaf720bf197ad7dd9f0 imagePullPolicy: IfNotPresent name: argocd-post-sync ports: []