Skip to content

Commit

Permalink
Merge pull request #133 from projectsyn/remove-image-field
Browse files Browse the repository at this point in the history
Remove support for legacy `image` field for image specifications
  • Loading branch information
simu authored Nov 21, 2023
2 parents 5c2382d + 29c7a5f commit 7b1a9d8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
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
imagePullPolicy: IfNotPresent
name: argocd-post-sync
ports: []
Expand Down

0 comments on commit 7b1a9d8

Please sign in to comment.