• Kubernetes Submit Queue's avatar
    Merge pull request #60022 from fabriziopandini/kubeadm567 · 5e64f075
    Kubernetes Submit Queue authored
    Automatic merge from submit-queue (batch tested with PRs 60148, 60022, 59125, 60068, 60154). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.
    
    Refactor kubeadm join command generation
    
    **What this PR does / why we need it**:
    Creation of the `kubeadm join` command is implemented in three different points of kubeadm:
    - `kubeadm init`
    - `kubeadm token create`
    - `kubeadm phase bootstrap-token create`
    
    This PR refactor above points in order to share a common function for creating the `kubeadm join` command.
    
    **Which issue(s) this PR fixes**:
    Fixes [#567](https://github.com/kubernetes/kubeadm/issues/567)
    
    **Special notes for your reviewer**:
    While implementing the PR, I changed the order of parameters in `kubeadm join` from:
    
    ```
      kubeadm join --token 8df4zm.5jyv2nrxb18y84jq 172.31.0.101:6443 --discovery-token-ca-cert-hash sha256:b62e1f70c1c6afebe36bc971b15b90f7e453f1c0fe2ddc4d92e07512f1143194
    ```
    
    to
    
    ```
      kubeadm join 172.31.0.101:6443 --token 8df4zm.5jyv2nrxb18y84jq --discovery-token-ca-cert-hash sha256:b62e1f70c1c6afebe36bc971b15b90f7e453f1c0fe2ddc4d92e07512f1143194
    ```
    
    **Release note**:
    ```release-note
    NONE
    ```
    5e64f075
BUILD 1.06 KB