From 7e750ff4e9d3099f0087719c50e81a76500bb08a Mon Sep 17 00:00:00 2001 From: Sverre Boschman <1142569+sboschman@users.noreply.github.com> Date: Tue, 9 Nov 2021 14:17:31 +0100 Subject: [PATCH] allow ldflags to overwrite k8s version Signed-off-by: Sverre Boschman <1142569+sboschman@users.noreply.github.com> (cherry picked from commit 81a373ead5e1d99cbe6febaf35716fe2e206c0c7) --- pkg/chartutil/capabilities.go | 4 +--- pkg/lint/rules/deprecations.go | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/pkg/chartutil/capabilities.go b/pkg/chartutil/capabilities.go index d24228056..ec517817b 100644 --- a/pkg/chartutil/capabilities.go +++ b/pkg/chartutil/capabilities.go @@ -28,12 +28,10 @@ import ( helmversion "helm.sh/helm/v3/internal/version" ) -const ( +var ( k8sVersionMajor = 1 k8sVersionMinor = 20 -) -var ( // DefaultVersionSet is the default version set, which includes only Core V1 ("v1"). DefaultVersionSet = allKnownVersions() diff --git a/pkg/lint/rules/deprecations.go b/pkg/lint/rules/deprecations.go index 384c17973..b1a516cef 100644 --- a/pkg/lint/rules/deprecations.go +++ b/pkg/lint/rules/deprecations.go @@ -25,7 +25,7 @@ import ( kscheme "k8s.io/client-go/kubernetes/scheme" ) -const ( +var ( // This should be set in the Makefile based on the version of client-go being imported. // These constants will be overwritten with LDFLAGS k8sVersionMajor = 1