From 1ec6711e95e7b8cbbec848853e9e4c69582e58f3 Mon Sep 17 00:00:00 2001 From: ChengHao Yang <17496418+tico88612@users.noreply.github.com> Date: Tue, 5 Nov 2024 20:51:01 +0800 Subject: [PATCH] Feat: add kubeadm-controlplane.yaml support v1beta4 Currently there is not much difference between the files, if there are more changes in the future, please use different files to distinguish them (you can use the kubeadm_config_api_version variable) Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com> --- roles/kubernetes/control-plane/tasks/kubeadm-secondary.yml | 2 +- ...ontrolplane.v1beta3.yaml.j2 => kubeadm-controlplane.yaml.j2} | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename roles/kubernetes/control-plane/templates/{kubeadm-controlplane.v1beta3.yaml.j2 => kubeadm-controlplane.yaml.j2} (95%) diff --git a/roles/kubernetes/control-plane/tasks/kubeadm-secondary.yml b/roles/kubernetes/control-plane/tasks/kubeadm-secondary.yml index 413d4946c..58a229816 100644 --- a/roles/kubernetes/control-plane/tasks/kubeadm-secondary.yml +++ b/roles/kubernetes/control-plane/tasks/kubeadm-secondary.yml @@ -32,7 +32,7 @@ - name: Create kubeadm ControlPlane config template: - src: "kubeadm-controlplane.{{ kubeadmConfig_api_version }}.yaml.j2" + src: "kubeadm-controlplane.yaml.j2" dest: "{{ kube_config_dir }}/kubeadm-controlplane.yaml" mode: "0640" backup: true diff --git a/roles/kubernetes/control-plane/templates/kubeadm-controlplane.v1beta3.yaml.j2 b/roles/kubernetes/control-plane/templates/kubeadm-controlplane.yaml.j2 similarity index 95% rename from roles/kubernetes/control-plane/templates/kubeadm-controlplane.v1beta3.yaml.j2 rename to roles/kubernetes/control-plane/templates/kubeadm-controlplane.yaml.j2 index 59759188d..24a6c23c0 100644 --- a/roles/kubernetes/control-plane/templates/kubeadm-controlplane.v1beta3.yaml.j2 +++ b/roles/kubernetes/control-plane/templates/kubeadm-controlplane.yaml.j2 @@ -1,4 +1,4 @@ -apiVersion: kubeadm.k8s.io/v1beta3 +apiVersion: kubeadm.k8s.io/{{ kubeadm_config_api_version }} kind: JoinConfiguration discovery: {% if kubeadm_use_file_discovery %}