debug logic for dhcp install

This commit is contained in:
2025-09-25 11:00:45 -04:00
parent 512e5270e0
commit bee5e777fa

View File

@@ -104,19 +104,20 @@ spec:
args: args:
- -c - -c
- | - |
if [ "${uname -m}" = "x86_64" ] || [ "${uname -m}" = "amd64" ]; then set -e -x # Enable debug output
ARCH="amd64" ARCH=$(uname -m)
elif [ "${uname -m}" = "arm64" ] || [ "${uname -m}" = "aarch64" ]; then case "$ARCH" in
ARCH="arm64" x86_64) ARCH="amd64" ;;
else aarch64) ARCH="arm64" ;;
exit 1 *) echo "Unsupported architecture: $ARCH"; exit 1 ;;
fi esac
echo "Installing CNI plugins for $ARCH, version $VERSION"
set -e
apk add --no-cache wget tar apk add --no-cache wget tar
wget https://github.com/containernetworking/plugins/releases/download/v${VERSION}/cni-plugins-linux-${ARCH}-v${VERSION}.tgz wget -q https://github.com/containernetworking/plugins/releases/download/v${VERSION}/cni-plugins-linux-${ARCH}-v${VERSION}.tgz || { echo "Failed to download tarball"; exit 1; }
tar -xzf cni-plugins-linux-${ARCH}-v${VERSION}.tgz -C /host/opt/cni/bin --strip-components=1 --wildcards '*/dhcp' mkdir -p /host/opt/cni/bin
tar -xzf cni-plugins-linux-${ARCH}-v${VERSION}.tgz -C /host/opt/cni/bin --strip-components=1 --wildcards '*/dhcp' || { echo "Failed to extract tarball"; exit 1; }
rm cni-plugins-linux-${ARCH}-v${VERSION}.tgz rm cni-plugins-linux-${ARCH}-v${VERSION}.tgz
echo "Successfully installed dhcp"
resources: resources:
requests: requests:
cpu: "10m" cpu: "10m"