Skip to content

Commit

Permalink
Merge pull request #275 from FabianKramm/v0.5
Browse files Browse the repository at this point in the history
fix: backport k3s removal
  • Loading branch information
FabianKramm authored Jan 6, 2022
2 parents e6d3359 + 00e7b1b commit 990faad
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion charts/k3s/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
9 changes: 4 additions & 5 deletions cmd/vclusterctl/cmd/app/create/values/k3s.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -61,10 +60,10 @@ func getDefaultK3SReleaseValues(client kubernetes.Interface, createOptions *crea
var ok bool
image, ok = K3SVersionMap[serverVersionString]
if !ok {
if serverMinorInt > 22 {
if serverMinorInt > 21 {
log.Infof("officially unsupported host server version %s, will fallback to virtual cluster version v1.22", serverVersionString)
image = K3SVersionMap["1.22"]
serverVersionString = "1.22"
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"]
Expand Down
3 changes: 1 addition & 2 deletions hack/build-cli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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);}')
Expand All @@ -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"
Expand Down

0 comments on commit 990faad

Please sign in to comment.