mirror of https://github.com/k3s-io/k3s
Use and version flannel/cni-plugin properly
Moves us closer to using the proper upstream for our flannel CNI plugin, instead of the snapshot that is vendored into our plugins fork. Signed-off-by: Brad Davidson <brad.davidson@rancher.com>pull/9649/head
parent
0b3593205a
commit
88d30f940d
|
@ -41,7 +41,7 @@ VERSIONFLAGS="
|
|||
|
||||
-X ${PKG_CNI_PLUGINS}/pkg/utils/buildversion.BuildVersion=${VERSION_CNIPLUGINS}
|
||||
-X ${PKG_CNI_PLUGINS}/plugins/meta/flannel.Program=flannel
|
||||
-X ${PKG_CNI_PLUGINS}/plugins/meta/flannel.Version=${VERSION_FLANNEL}
|
||||
-X ${PKG_CNI_PLUGINS}/plugins/meta/flannel.Version=${VERSION_FLANNEL_PLUGIN}
|
||||
-X ${PKG_CNI_PLUGINS}/plugins/meta/flannel.Commit=HEAD
|
||||
-X ${PKG_CNI_PLUGINS}/plugins/meta/flannel.buildDate=${buildDate}
|
||||
|
||||
|
@ -149,8 +149,11 @@ if [ ! -x ${INSTALLBIN}/cni${BINARY_POSTFIX} ]; then
|
|||
TMPDIR=$(mktemp -d)
|
||||
trap cleanup EXIT
|
||||
WORKDIR=$TMPDIR/src/github.com/containernetworking/plugins
|
||||
git clone -b $VERSION_CNIPLUGINS https://github.com/rancher/plugins.git $WORKDIR
|
||||
git clone --single-branch --depth=1 --branch=$VERSION_CNIPLUGINS https://github.com/rancher/plugins.git $WORKDIR
|
||||
cd $WORKDIR
|
||||
rm -rf plugins/meta/flannel
|
||||
git clone --single-branch --depth=1 --branch=$VERSION_FLANNEL_PLUGIN https://github.com/flannel-io/cni-plugin.git plugins/meta/flannel
|
||||
sed -i 's/package main/package flannel/; s/func main/func Main/' plugins/meta/flannel/*.go
|
||||
GO111MODULE=off GOPATH=$TMPDIR CGO_ENABLED=0 "${GO}" build -tags "$TAGS" -gcflags="all=${GCFLAGS}" -ldflags "$VERSIONFLAGS $LDFLAGS $STATIC" -o $INSTALLBIN/cni${BINARY_POSTFIX}
|
||||
)
|
||||
fi
|
||||
|
|
|
@ -69,6 +69,7 @@ if [ -z "$VERSION_CRI_DOCKERD" ]; then
|
|||
fi
|
||||
|
||||
VERSION_CNIPLUGINS="v1.4.0-k3s2"
|
||||
VERSION_FLANNEL_PLUGIN="v1.4.0-flannel1"
|
||||
|
||||
VERSION_KUBE_ROUTER=$(get-module-version github.com/cloudnativelabs/kube-router/v2)
|
||||
if [ -z "$VERSION_KUBE_ROUTER" ]; then
|
||||
|
|
Loading…
Reference in New Issue