From 643716a68e2cfad9acfeda46f0550c3c9b343081 Mon Sep 17 00:00:00 2001 From: William P Date: Thu, 25 Sep 2025 10:52:22 -0400 Subject: [PATCH] multus: patch daemonset to install dhcp client --- system-apps/multus/daemonset.yaml | 33 +++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/system-apps/multus/daemonset.yaml b/system-apps/multus/daemonset.yaml index 365866f..1514c8b 100644 --- a/system-apps/multus/daemonset.yaml +++ b/system-apps/multus/daemonset.yaml @@ -95,6 +95,39 @@ spec: - name: cnibin mountPath: /host/opt/cni/bin mountPropagation: Bidirectional + - name: install-dhcp + image: alpine:3.22.1 + env: + - name: VERSION + value: "1.8.0" + command: ["/bin/sh"] + args: + - -c + - | + if [ "${HOSTTYPE}" = "x86_64" ] || [ "${HOSTTYPE}" = "amd64" ]; then + ARCH="amd64" + elif [ "${HOSTTYPE}" = "arm64" ] || [ "${HOSTTYPE}" = "aarch64" ]; then + ARCH="arm64" + else + exit 1 + fi + + set -e + apk add --no-cache wget tar + wget https://github.com/containernetworking/plugins/releases/download/v${VERSION}/cni-plugins-linux-${ARCH}-v${VERSION}.tgz + tar -xzf cni-plugins-linux-${ARCH}-v${VERSION}.tgz -C /host/opt/cni/bin --strip-components=1 --wildcards '*/dhcp' + rm cni-plugins-linux-${ARCH}-v${VERSION}.tgz + resources: + requests: + cpu: "10m" + memory: "15Mi" + securityContext: + privileged: true + terminationMessagePolicy: FallbackToLogsOnError + volumeMounts: + - name: cnibin + mountPath: /host/opt/cni/bin + mountPropagation: Bidirectional terminationGracePeriodSeconds: 10 volumes: - name: cni