Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove support for legacy image field for image specifications #133

Merged
merged 1 commit into from
Nov 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions component/common.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions docs/modules/ROOT/pages/references/parameters.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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`

Expand Down
2 changes: 1 addition & 1 deletion tests/golden/params/argocd/argocd/25_hooks/hooks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
simu marked this conversation as resolved.
Show resolved Hide resolved
imagePullPolicy: IfNotPresent
name: argocd-post-sync
ports: []
Expand Down
Loading