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 <moyerm@vmware.com>
This commit is contained in:
parent
fe9f12a29c
commit
e4e4e686f6
@ -55,9 +55,11 @@ kube::version::get_version_vars() {
|
|||||||
|
|
||||||
else
|
else
|
||||||
# KUBE_GIT_VERSION was not supplied
|
# KUBE_GIT_VERSION was not supplied
|
||||||
KUBE_GIT_VERSION='?.?.?'
|
# These values need to pass the validation in k8s.io/component-base/metrics:
|
||||||
KUBE_GIT_MAJOR='?'
|
# https://github.com/kubernetes/component-base/blob/v0.20.5/metrics/version_parser.go#L28-L50
|
||||||
KUBE_GIT_MINOR='?'
|
KUBE_GIT_VERSION='0.0.0'
|
||||||
|
KUBE_GIT_MAJOR='0'
|
||||||
|
KUBE_GIT_MINOR='0'
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user