• Lubomir I. Ivanov's avatar
    kubeadm: fix the air-gapped and offline support issues · 682b1b3d
    Lubomir I. Ivanov authored
    1) Do not fail in case a bind address cannot be obtained
    
    If netutil.ChooseBindAddress() fails looking up IP route tables
    it will fail with an error in which case the kubeadm config
    code will hard stop.
    
    This scenario is possible if the Linux user intentionally disables
    the WiFi from the distribution settings. In such a case the distro
    could empty files such files as /proc/net/route and ChooseBindAddress()
    will return an error.
    
    For improved offline support, don't error on such scenarios but instead
    show a warning. This is done by using the NoRoutesError type.
    Also default the address to 0.0.0.0.
    
    While doing that, prevent some commands like `init`, `join` and also
    phases like `controlplane` and `certs` from using such an invalid
    address.
    
    Add unit tests for the new function for address verification.
    
    2) Fallback to local client version
    
    If there is no internet, label versions fail and this breaks
    air-gapped setups unless the users pass an explicit version.
    
    To work around that:
    - Remain using 'release/stable-x.xx' as the default version.
    - On timeout or any error different from status 404 return error
    - On status 404 fallback to using the version of the client via
    kubeadmVersion()
    
    Add unit tests for kubeadmVersion().
    Co-authored-by: 's avatarAlexander Kanevskiy <alexander.kanevskiy@intel.com>
    682b1b3d
Name
Last commit
Last update
.github Loading commit data...
Godeps Loading commit data...
api Loading commit data...
build Loading commit data...
cluster Loading commit data...
cmd Loading commit data...
docs Loading commit data...
hack Loading commit data...
logo Loading commit data...
pkg Loading commit data...
plugin Loading commit data...
staging Loading commit data...
test Loading commit data...
third_party Loading commit data...
translations Loading commit data...
vendor Loading commit data...
.bazelrc Loading commit data...
.generated_files Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.kazelcfg.json Loading commit data...
BUILD.bazel Loading commit data...
CHANGELOG-1.10.md Loading commit data...
CHANGELOG-1.11.md Loading commit data...
CHANGELOG-1.12.md Loading commit data...
CHANGELOG-1.2.md Loading commit data...
CHANGELOG-1.3.md Loading commit data...
CHANGELOG-1.4.md Loading commit data...
CHANGELOG-1.5.md Loading commit data...
CHANGELOG-1.6.md Loading commit data...
CHANGELOG-1.7.md Loading commit data...
CHANGELOG-1.8.md Loading commit data...
CHANGELOG-1.9.md Loading commit data...
CHANGELOG.md Loading commit data...
CONTRIBUTING.md Loading commit data...
LICENSE Loading commit data...
Makefile Loading commit data...
Makefile.generated_files Loading commit data...
OWNERS Loading commit data...
OWNERS_ALIASES Loading commit data...
README.md Loading commit data...
SECURITY_CONTACTS Loading commit data...
SUPPORT.md Loading commit data...
WORKSPACE Loading commit data...
code-of-conduct.md Loading commit data...