• Rostislav M. Georgiev's avatar
    kubeadm: Split discovery from JoinConfiguration · 576b8d3f
    Rostislav M. Georgiev authored
    This change splits out discovery fields from JoinConfiguration by performing
    the following changes:
    
    - Introduce a BootstrapTokenDiscovery structure, that houses configuration
      options needed for bootstrap token based discovery.
    
    - Introduce a FileDiscovery structure, that houses configuration options
      (currently only a single option) needed for KubeConfig based discovery.
    
    - Introduce a Discovery structure, that houses common options (such as
      discovery timeout and TLS bootstrap token) as well as pointer to an instance
      of either BootstrapTokenDiscovery or FileDiscovery structures.
    
    - Replace the old discovery related JoinConfiguration members with a single
      Discovery member.
    
    This change is required in order to cleanup the code of unnecessary logic and
    make the serialized JoinConfiguration more structured (and therefore, more
    intuitive).
    Signed-off-by: 's avatarRostislav M. Georgiev <rostislavg@vmware.com>
    576b8d3f
discovery_test.go 1.56 KB