diff --git a/Makefile b/Makefile index 50daa97214..4a2b56b492 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,7 @@ GOLANGCI_VERSION=v1.27.0 REPO ?= rancher IMAGE=${REPO}/rke2-runtime K3S_PKG=github.com/rancher/k3s +RKE2_PKG=github.com/rancher/rke2 ifneq "$(strip $(shell command -v go 2>/dev/null))" "" GOOS ?= $(shell go env GOOS) @@ -60,8 +61,9 @@ GO_BUILDTAGS ?= no_embedded_executor GO_BUILDTAGS += ${DEBUG_TAGS} GO_TAGS=$(if $(GO_BUILDTAGS),-tags "$(GO_BUILDTAGS)",) GO_LDFLAGS=-ldflags '-extldflags "-static" \ + -X $(RKE2_PKG)/pkg/images.KubernetesVersion=$(VERSION) \ -X $(K3S_PKG)/pkg/version.Program=$(PROG) \ - -X $(K3S_PKG)/pkg/version.Version=$(VERSION) \ + -X $(K3S_PKG)/pkg/version.Version=${DRONE_TAG} \ -X $(K3S_PKG)/pkg/version.Revision=$(REVISION) $(EXTRA_LDFLAGS)' diff --git a/go.mod b/go.mod index 9efa80a61a..38a5bcfd60 100644 --- a/go.mod +++ b/go.mod @@ -61,15 +61,18 @@ replace ( ) require ( + github.com/bhendo/go-powershell v0.0.0-20190719160123-219e7fb4e41e // indirect + github.com/buger/jsonparser v0.0.0-20181115193947-bf1c66bbce23 // indirect github.com/google/go-containerregistry v0.0.0-20200424115305-087a4bdef7c4 github.com/pkg/errors v0.9.1 - github.com/rancher/k3s v1.18.3-0.20200714154145-66a8c2ad7f0f + github.com/rakelkar/gonetsh v0.0.0-20190719023240-501daadcadf8 // indirect + github.com/rancher/k3s v1.18.3-0.20200720235607-04f57e5e1da4 github.com/rancher/spur v0.0.0-20200617165101-8702c8e4ce7a github.com/rancher/wrangler v0.6.1 github.com/sirupsen/logrus v1.4.2 google.golang.org/grpc v1.26.0 - k8s.io/api v0.18.0 - k8s.io/apimachinery v0.18.0 + k8s.io/api v0.18.5 + k8s.io/apimachinery v0.18.5 k8s.io/apiserver v0.0.0 k8s.io/client-go v11.0.1-0.20190409021438-1a26190bd76a+incompatible sigs.k8s.io/yaml v1.2.0 diff --git a/go.sum b/go.sum index 74b13aea3f..1269f0aaf7 100644 --- a/go.sum +++ b/go.sum @@ -641,8 +641,10 @@ github.com/rancher/flannel v0.11.0-k3s.2 h1:0GVr5ORAIvcri1LYTE8eMQ+NrRbuPeIniPaW github.com/rancher/flannel v0.11.0-k3s.2/go.mod h1:Hn4ZV+eq0LhLZP63xZnxdGwXEoRSxs5sxELxu27M3UA= github.com/rancher/helm-controller v0.6.3 h1:tsqSXndQ7Ms8S0mBd2zWOcTV1tiZ4BUYkemYnijNXio= github.com/rancher/helm-controller v0.6.3/go.mod h1:ZylsxIMGNADRPRNW+NiBWhrwwks9vnKLQiCHYWb6Bi0= -github.com/rancher/k3s v1.18.3-0.20200714154145-66a8c2ad7f0f h1:qjT80GHkknas1kf1vpwocD52odPMzlkCa5HCysLv1Ck= -github.com/rancher/k3s v1.18.3-0.20200714154145-66a8c2ad7f0f/go.mod h1:WSf6Yb9AZIolRidcbiX2PxEbny0raKRvcj/MLtQCM0w= +github.com/rancher/k3s v1.18.3-0.20200720220621-6d59b814793b h1:CrjGJHpKXr23EIEAvwRwPNbrAgHCoOJUAZJZCE4bGss= +github.com/rancher/k3s v1.18.3-0.20200720220621-6d59b814793b/go.mod h1:SqRrh7tt2R1RVIeogka/NKGZIrWDtUv9fFgGRQRlBlA= +github.com/rancher/k3s v1.18.3-0.20200720235607-04f57e5e1da4 h1:RH6Guq10SDUPakf0ZCvYnfOsqAULyw89YUGlC5l9FKU= +github.com/rancher/k3s v1.18.3-0.20200720235607-04f57e5e1da4/go.mod h1:SqRrh7tt2R1RVIeogka/NKGZIrWDtUv9fFgGRQRlBlA= github.com/rancher/kine v0.4.0 h1:1IhWy3TzjExG8xnj46eyUEWdzqNAD1WrgL4eEBKm6Uc= github.com/rancher/kine v0.4.0/go.mod h1:IImtCJ68AIkE+VY/kUI0NkyJL5q5WzO8QvMsSXqbrpA= github.com/rancher/kubernetes v1.18.4-k3s1 h1:eTwiRm2Gu8AUDgrda5FK8atZvkh6/3ZDoRFsxmnLvLc= diff --git a/pkg/cli/cmds/agent.go b/pkg/cli/cmds/agent.go index 6445219867..ad64fe1ed6 100644 --- a/pkg/cli/cmds/agent.go +++ b/pkg/cli/cmds/agent.go @@ -40,6 +40,8 @@ var ( "server": copy, "no-flannel": drop, "cluster-secret": drop, + "protect-kernel-defaults": copy, + "snapshotter": copy, }) ) diff --git a/pkg/cli/cmds/root.go b/pkg/cli/cmds/root.go index 9fb7a6fde4..8ec337c230 100644 --- a/pkg/cli/cmds/root.go +++ b/pkg/cli/cmds/root.go @@ -10,8 +10,8 @@ import ( "strings" "github.com/rancher/k3s/pkg/version" - "github.com/sirupsen/logrus" "github.com/rancher/spur/cli" + "github.com/sirupsen/logrus" ) var ( @@ -118,7 +118,7 @@ func NewApp() *cli.App { Name: "debug", Usage: "Turn on debug logs", Destination: &debug, - EnvVars: []string{"K3S_DEBUG"}, + EnvVars: []string{"RKE2_DEBUG"}, }, &cli.StringFlag{ Name: "profile", diff --git a/pkg/cli/cmds/server.go b/pkg/cli/cmds/server.go index b96257fbec..8f2b9e6554 100644 --- a/pkg/cli/cmds/server.go +++ b/pkg/cli/cmds/server.go @@ -82,6 +82,8 @@ var ( "no-flannel": drop, "no-deploy": drop, "cluster-secret": drop, + "protect-kernel-defaults": copy, + "snapshotter": copy, }) )