Skip to content

Commit

Permalink
Use "kubeadm join" to join masters to control plane (kubernetes-sigs#…
Browse files Browse the repository at this point in the history
…6661)

Remove configuration variable kubeadm_control_plane
  • Loading branch information
hafe authored and LuckySB committed Jan 16, 2021
1 parent 9b48936 commit c962925
Show file tree
Hide file tree
Showing 12 changed files with 2 additions and 70 deletions.
2 changes: 0 additions & 2 deletions inventory/sample/group_vars/k8s-cluster/k8s-cluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,6 @@ kata_containers_enabled: false
## Settings for containerized control plane (kubelet/secrets)
helm_deployment_type: host

# Enable kubeadm experimental control plane
kubeadm_control_plane: false
kubeadm_certificate_key: "{{ lookup('password', credentials_dir + '/kubeadm_certificate_key.creds length=64 chars=hexdigits') | lower }}"

# K8s image pull policy (imagePullPolicy)
Expand Down
1 change: 0 additions & 1 deletion roles/kubernetes/kubeadm/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,6 @@
include_tasks: kubeadm_etcd_node.yml
when:
- etcd_kubeadm_enabled
- kubeadm_control_plane
- inventory_hostname not in groups['kube-master']
- kube_network_plugin in ["calico", "flannel", "canal", "cilium"] or cilium_deploy_additionally | default(false) | bool
- kube_network_plugin != "calico" or calico_datastore == "etcd"
3 changes: 0 additions & 3 deletions roles/kubernetes/master/defaults/main/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
# disable upgrade cluster
upgrade_cluster_setup: false

# Enable kubeadm experimental control plane
kubeadm_control_plane: false

# Experimental kubeadm etcd deployment mode. Available only for new deployment
etcd_kubeadm_enabled: false

Expand Down
44 changes: 0 additions & 44 deletions roles/kubernetes/master/tasks/kubeadm-secondary-legacy.yml

This file was deleted.

9 changes: 2 additions & 7 deletions roles/kubernetes/master/tasks/kubeadm-setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -196,13 +196,8 @@
tags:
- kubeadm_token

- name: kubeadm | Initialize other masters (experimental control plane)
include_tasks: kubeadm-secondary-experimental.yml
when: kubeadm_control_plane

- name: kubeadm | Initialize other masters (legacy not control plane)
include_tasks: kubeadm-secondary-legacy.yml
when: not kubeadm_control_plane
- name: kubeadm | Join other masters
include_tasks: kubeadm-secondary.yml

- name: kubeadm | upgrade kubernetes cluster
include_tasks: kubeadm-upgrade.yml
Expand Down
6 changes: 0 additions & 6 deletions roles/kubernetes/preinstall/tasks/0020-verify-settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -258,12 +258,6 @@
when: resolvconf_mode is defined
run_once: true

- name: Stop if kubeadm etcd mode is enabled but experimental control plane is not
assert:
that: kubeadm_control_plane
msg: "kubeadm etcd mode requires experimental control plane"
when: etcd_kubeadm_enabled

- name: Stop if etcd deployment type is not host or docker
assert:
that: etcd_deployment_type in ['host', 'docker']
Expand Down
3 changes: 0 additions & 3 deletions roles/kubespray-defaults/defaults/main/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -401,9 +401,6 @@ kubelet_protect_kernel_defaults: true
## the k8s cluster.
kube_feature_gates: []

# Enable kubeadm experimental control plane
kubeadm_control_plane: false

# Local volume provisioner storage classes
# Levarages Ansibles string to Python datatype casting. Otherwise the dict_key isn't substituted
# see https://github.com/ansible/ansible/issues/17324
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ cloud_image: centos-7
mode: ha

# Kubespray settings
kubeadm_control_plane: true
kubeadm_certificate_key: 3998c58db6497dd17d909394e62d515368c06ec617710d02edea31c06d741085
kube_proxy_mode: iptables
kube_network_plugin: flannel
Expand Down
1 change: 0 additions & 1 deletion tests/files/packet_ubuntu16-flannel-ha.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ mode: ha
# Kubespray settings
kube_network_plugin: flannel
etcd_kubeadm_enabled: true
kubeadm_control_plane: true
kubeadm_certificate_key: 3998c58db6497dd17d909394e62d515368c06ec617710d02edea31c06d741085
skip_non_kubeadm_warning: true
deploy_netchecker: true
Expand Down
1 change: 0 additions & 1 deletion tests/files/packet_ubuntu18-flannel-containerd-ha-once.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ mode: ha
vm_memory: 1600Mi

# Kubespray settings
kubeadm_control_plane: true
kubeadm_certificate_key: 3998c58db6497dd17d909394e62d515368c06ec617710d02edea31c06d741085
kube_proxy_mode: iptables
kube_network_plugin: flannel
Expand Down
1 change: 0 additions & 1 deletion tests/files/packet_ubuntu18-flannel-containerd-ha.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ mode: ha
vm_memory: 1600Mi

# Kubespray settings
kubeadm_control_plane: true
kubeadm_certificate_key: 3998c58db6497dd17d909394e62d515368c06ec617710d02edea31c06d741085
kube_proxy_mode: iptables
kube_network_plugin: flannel
Expand Down

0 comments on commit c962925

Please sign in to comment.