• Kubernetes Submit Queue's avatar
    Merge pull request #35436 from danwinship/utilversion · 4505224c
    Kubernetes Submit Queue authored
    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
    4505224c
Name
Last commit
Last update
..
async Loading commit data...
bandwidth Loading commit data...
cache Loading commit data...
cert Loading commit data...
chmod Loading commit data...
chown Loading commit data...
clock Loading commit data...
codeinspector Loading commit data...
config Loading commit data...
configz Loading commit data...
crlf Loading commit data...
dbus Loading commit data...
diff Loading commit data...
ebtables Loading commit data...
env Loading commit data...
errors Loading commit data...
exec Loading commit data...
flag Loading commit data...
flock Loading commit data...
flowcontrol Loading commit data...
flushwriter Loading commit data...
framer Loading commit data...
goroutinemap Loading commit data...
hash Loading commit data...
homedir Loading commit data...
httpstream Loading commit data...
initsystem Loading commit data...
integer Loading commit data...
interrupt Loading commit data...
intstr Loading commit data...
io Loading commit data...
iptables Loading commit data...
json Loading commit data...
jsonpath Loading commit data...
keymutex Loading commit data...
labels Loading commit data...
limitwriter Loading commit data...
logs Loading commit data...
maps Loading commit data...
metrics Loading commit data...
mount Loading commit data...
net Loading commit data...
netsh Loading commit data...
node Loading commit data...
oom Loading commit data...
parsers Loading commit data...
procfs Loading commit data...
proxy Loading commit data...
rand Loading commit data...
resourcecontainer Loading commit data...
rlimit Loading commit data...
runtime Loading commit data...
selinux Loading commit data...
sets Loading commit data...
slice Loading commit data...
strategicpatch Loading commit data...
strings Loading commit data...
sysctl Loading commit data...
system Loading commit data...
taints Loading commit data...
term Loading commit data...
testing Loading commit data...
threading Loading commit data...
uuid Loading commit data...
validation Loading commit data...
version Loading commit data...
wait Loading commit data...
workqueue Loading commit data...
wsstream Loading commit data...
yaml Loading commit data...
BUILD Loading commit data...
doc.go Loading commit data...
template.go Loading commit data...
template_test.go Loading commit data...
trace.go Loading commit data...
trie.go Loading commit data...
umask.go Loading commit data...
umask_windows.go Loading commit data...
util.go Loading commit data...
util_test.go Loading commit data...