From e4e4e686f66171e3f9fce88dd0f6c9788ea43363 Mon Sep 17 00:00:00 2001 From: Matt Moyer Date: Wed, 31 Mar 2021 15:03:40 -0500 Subject: [PATCH] Use "0.0.0" as our fake version instead of "?.?.?" to avoid a panic. These values need to pass the validation in k8s.io/component-base/metrics: https://github.com/kubernetes/component-base/blob/v0.20.5/metrics/version_parser.go#L28-L50 Signed-off-by: Matt Moyer --- hack/lib/version.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/hack/lib/version.sh b/hack/lib/version.sh index 55bf97b3..c1eb8c84 100644 --- a/hack/lib/version.sh +++ b/hack/lib/version.sh @@ -55,9 +55,11 @@ kube::version::get_version_vars() { else # KUBE_GIT_VERSION was not supplied - KUBE_GIT_VERSION='?.?.?' - KUBE_GIT_MAJOR='?' - KUBE_GIT_MINOR='?' + # These values need to pass the validation in k8s.io/component-base/metrics: + # https://github.com/kubernetes/component-base/blob/v0.20.5/metrics/version_parser.go#L28-L50 + KUBE_GIT_VERSION='0.0.0' + KUBE_GIT_MAJOR='0' + KUBE_GIT_MINOR='0' fi fi }