• Rostislav M. Georgiev's avatar
    kubeadm: Don't load deprecated configs · f64baf75
    Rostislav M. Georgiev authored
    Currently kubeadm supports a couple of configuration versions - v1alpha3 and
    v1beta1. The former is deprecated, but still supported.
    
    To discourage users from using it and to speedup conversion to newer versions,
    we disable the loading of deprecated configurations by all kubeadm
    sub-commands, but "kubeadm config migrate".
    
    v1alpha3 is still present and supported at source level, but cannot be used
    directly with kubeadm and some of its internal APIs.
    
    The added benefit to this is, that users won't need to lookup for an old
    kubeadm binary after upgrade, just because they were stuck with a deprecated
    config version for too long.
    
    To achieve this, the following was done:
    
    - ValidateSupportedVersion now has an allowDeprecated boolean parameter, that
      controls if the function should return an error upon detecting deprecated
      config version. Currently the only deprecated version is v1alpha3.
    
    - ValidateSupportedVersion is made package private, because it's not used
      outside of the package anyway.
    
    - BytesToInitConfiguration and LoadJoinConfigurationFromFile are modified to
      disallow loading of deprecated kubeadm config versions. An error message,
      that points users to kubeadm config migrate is returned.
    
    - MigrateOldConfig is still allowed to load deprecated kubeadm config versions.
    
    - A bunch of tests were fixed to not expect success if v1alpha3 config is
      supplied.
    Signed-off-by: 's avatarRostislav M. Georgiev <rostislavg@vmware.com>
    f64baf75
Name
Last commit
Last update
..
cmd Loading commit data...
kubeconfig Loading commit data...
BUILD Loading commit data...
util.go Loading commit data...