From 176bbab7fb70bda3877e63b1ee0b7e0bb707919f Mon Sep 17 00:00:00 2001 From: cuisongliu Date: Mon, 11 Sep 2023 12:50:44 +0800 Subject: [PATCH] fix image-cri-shim config Signed-off-by: cuisongliu --- k3s/Kubefile | 2 +- k3s/etc/k3s.service.tmpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/k3s/Kubefile b/k3s/Kubefile index ef1198c..7a634a4 100644 --- a/k3s/Kubefile +++ b/k3s/Kubefile @@ -21,7 +21,7 @@ ENV registryData=/var/lib/registry \ defaultVIP=10.103.97.2 \ SEALOS_SYS_CRI_ENDPOINT=/run/k3s/containerd/containerd.sock \ SEALOS_SYS_IMAGE_ENDPOINT=/var/run/image-cri-shim.sock \ - SEALOS_SYS_RUN_MODE=server \ + SEALOS_SYS_RUN_MODE=master \ sandboxImage=rancher/mirrored-pause:3.6 COPY --from=docker.io/labring/kubernetes:v1.25.13 cri/registry cri/registry COPY --from=ghcr.io/labring/sealos-patch:latest . . diff --git a/k3s/etc/k3s.service.tmpl b/k3s/etc/k3s.service.tmpl index e20c8ba..86cb042 100644 --- a/k3s/etc/k3s.service.tmpl +++ b/k3s/etc/k3s.service.tmpl @@ -25,4 +25,4 @@ RestartSec=5s ExecStartPre=/bin/sh -xc '! /usr/bin/systemctl is-enabled --quiet nm-cloud-setup.service' ExecStartPre=-/sbin/modprobe br_netfilter ExecStartPre=-/sbin/modprobe overlay -ExecStart=/usr/bin/k3s {{ if contains "master" .SEALOS_SYS_K3S_MODE }}server{{ else }}agent{{end}} +ExecStart=/usr/bin/k3s {{ if and (.SEALOS_SYS_RUN_MODE) (contains "master" .SEALOS_SYS_RUN_MODE) }}server{{ else }}agent{{end}}