What happened:
In the latest docker image k8s.gcr.io/metrics-server/metrics-server:v0.3.7 it's not returned the version by the binary
so cannot identify which one is running.
# wget -qO- https://metrics-server/version
{
"major": "",
"minor": "",
"gitVersion": "v0.0.0-master+$Format:%h$",
"gitCommit": "$Format:%H$",
"gitTreeState": "",
"buildDate": "1970-01-01T00:00:00Z",
"goVersion": "go1.12.12",
"compiler": "gc",
"platform": "linux/amd64"
}
What you expected to happen:
To return version like in previous v.0.3.6:
wget -qO- https://metrics-server/version
{
"major": "",
"minor": "",
"gitVersion": "v0.3.6-1+d1f4f6fc09cd31-dirty",
"gitCommit": "d1f4f6fc09cd3134e8ea5ba4e0bd2db4e8002ed8",
"gitTreeState": "dirty",
"buildDate": "2019-10-14T12:43:57Z",
"goVersion": "go1.10.8",
"compiler": "gc",
"platform": "linux/amd64"
}
Anything else we need to know?:
This info is useful for testing which version of binary is running in the system.
Environment:
/king bug
Is there any flag available for version checking ?
Looks like this was broken during https://github.com/kubernetes-sigs/metrics-server/pull/480
Flag --version can be used for version checking, but it shares source with gitVersion from /version endpoint. This means it will also not work on 0.3.7
I will start discussion about cutting new release either 0.3.7 or 0.4.0 with a fix
Tested v0.4.0
{
"major": "",
"minor": "",
"gitVersion": "v0.4.0",
"gitCommit": "4ae05bdf59af95e6309cc426ed10f5c93816261d",
"gitTreeState": "",
"buildDate": "2020-11-12T23:22:42Z",
"goVersion": "go1.14.2",
"compiler": "gc",
"platform": "linux/amd64"
}
Please upgrade