From e4343e3c4742f44ad8337e24579f598ff1cd8af0 Mon Sep 17 00:00:00 2001 From: Zespre Chang Date: Wed, 6 Nov 2024 17:51:47 +0800 Subject: [PATCH] fix(agent): use agent image for initcontainer Signed-off-by: Zespre Chang --- package/Dockerfile.agent | 2 +- pkg/controller/ippool/common.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package/Dockerfile.agent b/package/Dockerfile.agent index 9267ba7..e33e9fb 100644 --- a/package/Dockerfile.agent +++ b/package/Dockerfile.agent @@ -3,7 +3,7 @@ FROM registry.suse.com/bci/bci-base:15.6 RUN zypper -n rm container-suseconnect && \ - zypper -n in curl dhcp-tools jq + zypper -n in curl dhcp-tools iproute2 jq ARG TARGETPLATFORM diff --git a/pkg/controller/ippool/common.go b/pkg/controller/ippool/common.go index e375346..2351986 100644 --- a/pkg/controller/ippool/common.go +++ b/pkg/controller/ippool/common.go @@ -92,9 +92,9 @@ func prepareAgentPod( ServiceAccountName: agentServiceAccountName, InitContainers: []corev1.Container{ { - Name: "ip-setter", - Image: "busybox", - ImagePullPolicy: "IfNotPresent", + Name: "ip-setter", + Image: agentImage.String(), + ImagePullPolicy: corev1.PullIfNotPresent, Command: []string{ "/bin/sh", "-c",