k3s/pkg/util
Kubernetes Submit Queue 4505224cd3 Merge pull request #35436 from danwinship/utilversion
Automatic merge from submit-queue

Add a package for handling version numbers (including non-"Semantic" versions)

As noted in #32401, we are using Semantic Version-parsing libraries to parse version numbers that aren't necessarily "Semantic". Although, contrary to what I'd said there, it turns out that this wasn't actually currently a problem for the iptables code, because the regexp used to extract the version number out of the "iptables --version" output only pulled out three components, so given "iptables v1.4.19.1", it would have extracted just "1.4.19". Still, it could be a problem if they later release "1.5" rather than "1.5.0", or if we eventually need to _compare_ against a 4-digit version number.

Also, as noted in #23854, we were also using two different semver libraries in different parts of the code (plus a wrapper around one of them in pkg/version).

This PR adds pkg/util/version, with code to parse and compare both semver and non-semver version strings, and then updates kubernetes to use it everywhere (including getting rid of a bunch of code duplication in kubelet by making utilversion.Version implement the kubecontainer.Version interface directly).

Ironically, this does not actually allow us to get rid of either of the vendored semver libraries, because we still have other dependencies that depend on each of them. (cadvisor uses blang/semver and etcd uses coreos/go-semver)

fixes #32401, #23854
2016-12-13 12:10:38 -08:00
..
async autoupdate BUILD files 2016-12-12 13:30:07 -08:00
bandwidth autoupdate BUILD files 2016-12-12 13:30:07 -08:00
cache autoupdate BUILD files 2016-12-12 13:30:07 -08:00
cert autoupdate BUILD files 2016-12-12 13:30:07 -08:00
chmod autoupdate BUILD files 2016-12-12 13:30:07 -08:00
chown autoupdate BUILD files 2016-12-12 13:30:07 -08:00
clock autoupdate BUILD files 2016-12-12 13:30:07 -08:00
codeinspector autoupdate BUILD files 2016-12-12 13:30:07 -08:00
config autoupdate BUILD files 2016-12-12 13:30:07 -08:00
configz autoupdate BUILD files 2016-12-12 13:30:07 -08:00
crlf autoupdate BUILD files 2016-12-12 13:30:07 -08:00
dbus autoupdate BUILD files 2016-12-12 13:30:07 -08:00
diff autoupdate BUILD files 2016-12-12 13:30:07 -08:00
ebtables autoupdate BUILD files 2016-12-12 13:30:07 -08:00
env autoupdate BUILD files 2016-12-12 13:30:07 -08:00
errors autoupdate BUILD files 2016-12-12 13:30:07 -08:00
exec autoupdate BUILD files 2016-12-12 13:30:07 -08:00
flag autoupdate BUILD files 2016-12-12 13:30:07 -08:00
flock autoupdate BUILD files 2016-12-12 13:30:07 -08:00
flowcontrol autoupdate BUILD files 2016-12-12 13:30:07 -08:00
flushwriter autoupdate BUILD files 2016-12-12 13:30:07 -08:00
framer autoupdate BUILD files 2016-12-12 13:30:07 -08:00
goroutinemap autoupdate BUILD files 2016-12-12 13:30:07 -08:00
hash autoupdate BUILD files 2016-12-12 13:30:07 -08:00
homedir autoupdate BUILD files 2016-12-12 13:30:07 -08:00
httpstream autoupdate BUILD files 2016-12-12 13:30:07 -08:00
initsystem autoupdate BUILD files 2016-12-12 13:30:07 -08:00
integer autoupdate BUILD files 2016-12-12 13:30:07 -08:00
interrupt autoupdate BUILD files 2016-12-12 13:30:07 -08:00
intstr autoupdate BUILD files 2016-12-12 13:30:07 -08:00
io autoupdate BUILD files 2016-12-12 13:30:07 -08:00
iptables Port iptables code to pkg/util/version, don't use semvers 2016-12-13 08:53:04 -05:00
json autoupdate BUILD files 2016-12-12 13:30:07 -08:00
jsonpath autoupdate BUILD files 2016-12-12 13:30:07 -08:00
keymutex autoupdate BUILD files 2016-12-12 13:30:07 -08:00
labels autoupdate BUILD files 2016-12-12 13:30:07 -08:00
limitwriter autoupdate BUILD files 2016-12-12 13:30:07 -08:00
logs autoupdate BUILD files 2016-12-12 13:30:07 -08:00
maps autoupdate BUILD files 2016-12-12 13:30:07 -08:00
metrics autoupdate BUILD files 2016-12-12 13:30:07 -08:00
mount autoupdate BUILD files 2016-12-12 13:30:07 -08:00
net autoupdate BUILD files 2016-12-12 13:30:07 -08:00
netsh autoupdate BUILD files 2016-12-12 13:30:07 -08:00
node autoupdate BUILD files 2016-12-12 13:30:07 -08:00
oom autoupdate BUILD files 2016-12-12 13:30:07 -08:00
parsers autoupdate BUILD files 2016-12-12 13:30:07 -08:00
procfs autoupdate BUILD files 2016-12-12 13:30:07 -08:00
proxy autoupdate BUILD files 2016-12-12 13:30:07 -08:00
rand autoupdate BUILD files 2016-12-12 13:30:07 -08:00
resourcecontainer autoupdate BUILD files 2016-12-12 13:30:07 -08:00
rlimit autoupdate BUILD files 2016-12-12 13:30:07 -08:00
runtime autoupdate BUILD files 2016-12-12 13:30:07 -08:00
selinux autoupdate BUILD files 2016-12-12 13:30:07 -08:00
sets autoupdate BUILD files 2016-12-12 13:30:07 -08:00
slice autoupdate BUILD files 2016-12-12 13:30:07 -08:00
strategicpatch autoupdate BUILD files 2016-12-12 13:30:07 -08:00
strings autoupdate BUILD files 2016-12-12 13:30:07 -08:00
sysctl autoupdate BUILD files 2016-12-12 13:30:07 -08:00
system autoupdate BUILD files 2016-12-12 13:30:07 -08:00
taints autoupdate BUILD files 2016-12-12 13:30:07 -08:00
term autoupdate BUILD files 2016-12-12 13:30:07 -08:00
testing autoupdate BUILD files 2016-12-12 13:30:07 -08:00
threading autoupdate BUILD files 2016-12-12 13:30:07 -08:00
uuid autoupdate BUILD files 2016-12-12 13:30:07 -08:00
validation Merge pull request #38171 from xingzhou/kube-typo 2016-12-13 11:28:30 -08:00
version Add a package for handling version numbers (including non-semvers) 2016-12-13 08:53:00 -05:00
wait autoupdate BUILD files 2016-12-12 13:30:07 -08:00
workqueue autoupdate BUILD files 2016-12-12 13:30:07 -08:00
wsstream autoupdate BUILD files 2016-12-12 13:30:07 -08:00
yaml autoupdate BUILD files 2016-12-12 13:30:07 -08:00
BUILD autoupdate BUILD files 2016-12-12 13:30:07 -08:00
doc.go Use Go canonical import paths 2016-07-16 13:48:21 -04:00
template.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
template_test.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
trace.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
trie.go Make Kubernetes OpenAPI operation IDs unique 2016-10-12 14:54:12 -07:00
umask.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
umask_windows.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
util.go kubelet: storage: don't hang kubelet on unresponsive nfs 2016-10-18 08:45:40 -05:00
util_test.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00