From 2d43e5cde8ca0e22caf8d07e9682347ef9300325 Mon Sep 17 00:00:00 2001 From: Andrew Durbin Date: Fri, 22 Nov 2024 16:16:47 -0700 Subject: [PATCH] Base cluster-update.sh to define needed link_multus_into_k3s The remaining contents of this file coming in another PR Signed-off-by: Andrew Durbin --- pkg/kube/Dockerfile | 2 ++ pkg/kube/cluster-init.sh | 2 ++ pkg/kube/cluster-update.sh | 8 ++++++++ 3 files changed, 12 insertions(+) create mode 100644 pkg/kube/cluster-update.sh diff --git a/pkg/kube/Dockerfile b/pkg/kube/Dockerfile index 5bf563bcb88..65d1d0f4fdf 100644 --- a/pkg/kube/Dockerfile +++ b/pkg/kube/Dockerfile @@ -25,6 +25,8 @@ COPY --from=build /out/ / COPY cluster-init.sh /usr/bin/ COPY cgconfig.conf /etc +COPY cluster-update.sh /usr/bin/ + # k3s COPY install-etcdctl.sh /usr/bin/ RUN mkdir -p /etc/rancher/k3s diff --git a/pkg/kube/cluster-init.sh b/pkg/kube/cluster-init.sh index 531c7cee359..d3956d8eb2a 100755 --- a/pkg/kube/cluster-init.sh +++ b/pkg/kube/cluster-init.sh @@ -21,6 +21,8 @@ VNC_RUNNING=false . /usr/bin/descheduler-utils.sh # shellcheck source=pkg/kube/longhorn-utils.sh . /usr/bin/longhorn-utils.sh +# shellcheck source=pkg/kube/cluster-update.sh +. /usr/bin/cluster-update.sh logmsg() { local MSG diff --git a/pkg/kube/cluster-update.sh b/pkg/kube/cluster-update.sh new file mode 100644 index 00000000000..dd75967a3af --- /dev/null +++ b/pkg/kube/cluster-update.sh @@ -0,0 +1,8 @@ +#!/bin/sh +# +# Copyright (c) 2024 Zededa, Inc. +# SPDX-License-Identifier: Apache-2.0 + +link_multus_into_k3s() { + ln -s /var/lib/cni/bin/multus /var/lib/rancher/k3s/data/current/bin/multus +}