diff --git a/charts/k3s/values.yaml b/charts/k3s/values.yaml index 578ada388..8d4762b3a 100644 --- a/charts/k3s/values.yaml +++ b/charts/k3s/values.yaml @@ -33,7 +33,7 @@ syncer: # Virtual Cluster (k3s) configuration vcluster: # Image to use for the virtual cluster - image: rancher/k3s:v1.22.2-k3s1 + image: rancher/k3s:v1.21.4-k3s1 command: - /bin/k3s baseArgs: diff --git a/cmd/vclusterctl/cmd/app/create/values/k3s.go b/cmd/vclusterctl/cmd/app/create/values/k3s.go index b6b05e973..c70e79290 100644 --- a/cmd/vclusterctl/cmd/app/create/values/k3s.go +++ b/cmd/vclusterctl/cmd/app/create/values/k3s.go @@ -15,8 +15,7 @@ import ( ) var K3SVersionMap = map[string]string{ - "1.22": "rancher/k3s:v1.22.2-k3s2", - "1.21": "rancher/k3s:v1.21.5-k3s2", + "1.21": "rancher/k3s:v1.21.4-k3s1", "1.20": "rancher/k3s:v1.20.11-k3s2", "1.19": "rancher/k3s:v1.19.13-k3s1", "1.18": "rancher/k3s:v1.18.20-k3s1", @@ -61,10 +60,10 @@ func getDefaultK3SReleaseValues(client kubernetes.Interface, createOptions *crea var ok bool image, ok = K3SVersionMap[serverVersionString] if !ok { - if serverMinorInt > 22 { - log.Infof("officially unsupported host server version %s, will fallback to virtual cluster version v1.22", serverVersionString) - image = K3SVersionMap["1.22"] - serverVersionString = "1.22" + if serverMinorInt > 21 { + log.Infof("officially unsupported host server version %s, will fallback to virtual cluster version v1.21", serverVersionString) + image = K3SVersionMap["1.21"] + serverVersionString = "1.21" } else { log.Infof("officially unsupported host server version %s, will fallback to virtual cluster version v1.16", serverVersionString) image = K3SVersionMap["1.16"] diff --git a/devspace.yaml b/devspace.yaml index 65cc6947a..a9af3319e 100644 --- a/devspace.yaml +++ b/devspace.yaml @@ -3,7 +3,7 @@ vars: - name: SYNCER_IMAGE value: ghcr.io/loft-sh/loft-enterprise/dev-vcluster - name: K3S_IMAGE - value: rancher/k3s:v1.21.2-k3s1 + value: rancher/k3s:v1.21.4-k3s1 # Replace this with your clusters service CIDR, you can find it out via # kubectl apply -f hack/wrong-cluster-ip-service.yaml - name: SERVICE_CIDR diff --git a/hack/build-cli.sh b/hack/build-cli.sh index d64e08262..f0b2472fc 100644 --- a/hack/build-cli.sh +++ b/hack/build-cli.sh @@ -13,7 +13,6 @@ export GOFLAGS=-mod=vendor # go mod vendor VCLUSTER_ROOT=$(git rev-parse --show-toplevel) -VERSION=$(git describe --tags $(git rev-list --tags --max-count=1)) COMMIT_HASH=$(git rev-parse --short HEAD 2>/dev/null) DATE=$(date "+%Y-%m-%d") BUILD_PLATFORM=$(uname -a | awk '{print tolower($1);}') @@ -29,7 +28,7 @@ if [[ "$(pwd)" != "${VCLUSTER_ROOT}" ]]; then fi GO_BUILD_CMD="go build -a" -GO_BUILD_LDFLAGS="-s -w -X main.commitHash=${COMMIT_HASH} -X main.buildDate=${DATE} -X main.version=${VERSION}" +GO_BUILD_LDFLAGS="-s -w -X main.commitHash=${COMMIT_HASH} -X main.buildDate=${DATE} -X main.version=${RELEASE_VERSION}" if [[ -z "${VCLUSTER_BUILD_PLATFORMS}" ]]; then VCLUSTER_BUILD_PLATFORMS="linux windows darwin" @@ -46,7 +45,7 @@ mkdir -p "${VCLUSTER_ROOT}/release" cp -a "${VCLUSTER_ROOT}/assets/." "${VCLUSTER_ROOT}/release/" # generate vcluster-images.txt -go run -mod vendor "${VCLUSTER_ROOT}/hack/assets/main.go" ${VERSION} > "${VCLUSTER_ROOT}/release/vcluster-images.txt" +go run -mod vendor "${VCLUSTER_ROOT}/hack/assets/main.go" ${RELEASE_VERSION} > "${VCLUSTER_ROOT}/release/vcluster-images.txt" for OS in ${VCLUSTER_BUILD_PLATFORMS[@]}; do for ARCH in ${VCLUSTER_BUILD_ARCHS[@]}; do