From 78486a55d341bca026f2f5bfb5a1093f04410cf0 Mon Sep 17 00:00:00 2001 From: Travis Mehlinger Date: Thu, 23 Apr 2020 09:49:25 -0500 Subject: [PATCH 1/2] change hosts update container image The most recent Fedora image doesn't include a `diff` binary. This changes the container image to use Ubuntu Bionic instead, which _does_ provide a diff binary. --- deploy/addons/registry-aliases/node-etc-hosts-update.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/addons/registry-aliases/node-etc-hosts-update.tmpl b/deploy/addons/registry-aliases/node-etc-hosts-update.tmpl index 0ef938876b25..4b58c2606077 100644 --- a/deploy/addons/registry-aliases/node-etc-hosts-update.tmpl +++ b/deploy/addons/registry-aliases/node-etc-hosts-update.tmpl @@ -17,7 +17,7 @@ spec: spec: initContainers: - name: update - image: registry.fedoraproject.org/fedora + image: ubuntu:bionic volumeMounts: - name: etchosts mountPath: /host-etc/hosts From 475bbc4ff227d9a8b6967f834dcb3b427bed43a1 Mon Sep 17 00:00:00 2001 From: Travis Mehlinger Date: Fri, 24 Apr 2020 14:10:24 -0500 Subject: [PATCH 2/2] use alpine instead --- deploy/addons/registry-aliases/node-etc-hosts-update.tmpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deploy/addons/registry-aliases/node-etc-hosts-update.tmpl b/deploy/addons/registry-aliases/node-etc-hosts-update.tmpl index 4b58c2606077..dce9320c60b2 100644 --- a/deploy/addons/registry-aliases/node-etc-hosts-update.tmpl +++ b/deploy/addons/registry-aliases/node-etc-hosts-update.tmpl @@ -17,7 +17,7 @@ spec: spec: initContainers: - name: update - image: ubuntu:bionic + image: alpine:3.11 volumeMounts: - name: etchosts mountPath: /host-etc/hosts @@ -39,7 +39,7 @@ spec: for H in $REGISTRY_ALIASES; do echo "$HOSTS" | grep "$H" || HOSTS="$HOSTS$NL$REGISTRY_SERVICE_HOST$TAB$H"; done; - echo "$HOSTS" | diff -u /host-etc/hosts - || echo "$HOSTS" > /host-etc/hosts + echo "$HOSTS" | diff -U 3 /host-etc/hosts - || echo "$HOSTS" > /host-etc/hosts echo "Done." containers: - name: pause-for-update