From ac7d3009706e7d983172bb69e2a6f18758db6469 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 166d366977..9e816f7319 100644 --- a/pkg/kube/Dockerfile +++ b/pkg/kube/Dockerfile @@ -26,6 +26,8 @@ COPY cluster-init.sh /usr/bin/ COPY cluster-utils.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 b6ab99a55c..443bf5bcad 100755 --- a/pkg/kube/cluster-init.sh +++ b/pkg/kube/cluster-init.sh @@ -29,6 +29,8 @@ CLUSTER_WAIT_FILE="/run/kube/cluster-change-wait-ongoing" # Source the utility script, Dockerfile copies the script to /usr/bin # shellcheck source=/dev/null . /usr/bin/cluster-utils.sh +# shellcheck source=pkg/kube/cluster-update.sh +. /usr/bin/cluster-update.sh # get cluster IP address from the cluster status file get_cluster_node_ip() { diff --git a/pkg/kube/cluster-update.sh b/pkg/kube/cluster-update.sh new file mode 100644 index 0000000000..dd75967a3a --- /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 +}