File tree Expand file tree Collapse file tree 3 files changed +6
-4
lines changed
charts/spiderpool/templates Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -172,13 +172,14 @@ data:
172172 cat /host/etc/cni/net.d/${DEFAULT_CNI_FILEPATH}
173173
174174 echo ""
175- DEFAULT_CNI_NAME=$(grep '"name":' ${CNI_CONF_DIR}/${DEFAULT_CNI_FILEPATH} | awk '{print $2}' | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//' | tr -d ',' | tr -d '"')
175+
176+ DEFAULT_CNI_NAME=$(jq -r '.name' ${CNI_CONF_DIR}/${DEFAULT_CNI_FILEPATH})
176177 if [ -z "$DEFAULT_CNI_NAME" ] ; then
177178 error "The name fleid shouldn't be empty, please check the default cni: ${DEFAULT_CNI_FILEPATH}" && exit 1
178179 fi
179180
180181 log "Updating the clusterNetwork of the multus-cni config to $DEFAULT_CNI_NAME"
181- sed -i "s?\" clusterNetwork\": \"\"?\"clusterNetwork\": \" ${DEFAULT_CNI_NAME}\"?g" /tmp/00-multus.conf
182+ jq ". clusterNetwork=\" ${DEFAULT_CNI_NAME}\"" /tmp/00-multus.conf > /tmp/00-multus.conf.tmp && mv /tmp/00-multus.conf.tmp /tmp/00-multus.conf
182183 else
183184 log "User set multus ClusterNetwork: $MULTUS_CLUSTER_NETWORK"
184185 fi
Original file line number Diff line number Diff line change 11# Copyright 2022 Authors of spidernet-io
22# SPDX-License-Identifier: Apache-2.0
33
4- ARG BASE_IMAGE=ghcr.io/spidernet-io/spiderpool/spiderpool-base:163aca9e9d927363fa80aca7d9721b379671a790
5- ARG GOLANG_IMAGE=docker.io/library/golang:1.24.2
4+ ARG BASE_IMAGE=ghcr.io/spidernet-io/spiderpool/spiderpool-base:e5de792a4214e67a4d10a6faf476fef3d9f043ca
5+ ARG GOLANG_IMAGE=docker.io/library/golang:1.24.5@sha256:14fd8a55e59a560704e5fc44970b301d00d344e45d6b914dda228e09f359a088
66
77# ======= build bin ==========
88FROM --platform=${BUILDPLATFORM} ${GOLANG_IMAGE} AS builder
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ packages=(
1414 libmnl0
1515 bash-completion
1616 iptables
17+ jq
1718)
1819
1920
You can’t perform that action at this time.
0 commit comments