Skip to content

Commit

Permalink
Add quotes around image reference in resolv-prepender
Browse files Browse the repository at this point in the history
  • Loading branch information
cybertron committed Jan 19, 2024
1 parent 10a4774 commit 4609fda
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Expand Up @@ -17,7 +17,7 @@ contents:
# restart the service or we may interrupt the pull and end up with a corrupt image.
# We're better off with incorrect search domains for a while than wedging the
# system with a bad image.
if ! diff -q /run/resolv-prepender/env /run/resolv-prepender/env.new && /usr/bin/podman image exists {{ .Images.baremetalRuntimeCfgImage }}; then
if ! diff -q /run/resolv-prepender/env /run/resolv-prepender/env.new && /usr/bin/podman image exists "{{ .Images.baremetalRuntimeCfgImage }}"; then
>&2 echo "NM resolv-prepender: Environment variable(s) changed. Restarting service."
systemctl is-active on-prem-resolv-prepender && systemctl kill on-prem-resolv-prepender
fi
Expand Down
4 changes: 2 additions & 2 deletions templates/common/on-prem/files/resolv-prepender.yaml
Expand Up @@ -23,9 +23,9 @@ contents:
# Ref.: https://github.com/containers/common/blob/e028741ef77fdfa3ae261b9d23cdd50253d586c4/libimage/copier.go#L27-L30
>&2 echo "NM resolv-prepender: Checking if baremetal runtime cfg image already exists"
if ! /usr/bin/podman image exists {{ .Images.baremetalRuntimeCfgImage }}; then
if ! /usr/bin/podman image exists "{{ .Images.baremetalRuntimeCfgImage }}"; then
>&2 echo "NM resolv-prepender: Starting download of baremetal runtime cfg image"
while ! /usr/bin/podman pull --authfile /var/lib/kubelet/config.json {{ .Images.baremetalRuntimeCfgImage }}; do sleep 1; done
while ! /usr/bin/podman pull --authfile /var/lib/kubelet/config.json "{{ .Images.baremetalRuntimeCfgImage }}"; do sleep 1; done
>&2 echo "NM resolv-prepender: Download of baremetal runtime cfg image completed"
else
>&2 echo "NM resolv-prepender: Image exists, no need to download"
Expand Down

0 comments on commit 4609fda

Please sign in to comment.