[kubeadm] use v1beta3 configuration version
* extra admission controls now don't have a version in their file names eventratelimit.v1beta2.yaml.j2 -> eventratelimit.yaml.j2 * cri_socket variable includes the unix:// prefix to be conformat with upstream
This commit is contained in:
parent
589823bdc1
commit
2cd8c51a07
12 changed files with 21 additions and 20 deletions
|
@ -1,4 +1,4 @@
|
||||||
runtime-endpoint: unix://{{ cri_socket }}
|
runtime-endpoint: {{ cri_socket }}
|
||||||
image-endpoint: unix://{{ cri_socket }}
|
image-endpoint: {{ cri_socket }}
|
||||||
timeout: 30
|
timeout: 30
|
||||||
debug: false
|
debug: false
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
debug = false
|
debug = false
|
||||||
debug_full = false
|
debug_full = false
|
||||||
address = "unix://{{ cri_socket }}"
|
address = "{{ cri_socket }}"
|
||||||
namespace = "k8s.io"
|
namespace = "k8s.io"
|
||||||
snapshotter = "native"
|
snapshotter = "native"
|
||||||
cni_path = "/opt/cni/bin"
|
cni_path = "/opt/cni/bin"
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
apiVersion: kubeadm.k8s.io/v1beta2
|
apiVersion: kubeadm.k8s.io/v1beta3
|
||||||
kind: InitConfiguration
|
kind: InitConfiguration
|
||||||
nodeRegistration:
|
nodeRegistration:
|
||||||
criSocket: {{ cri_socket }}
|
criSocket: {{ cri_socket }}
|
||||||
---
|
---
|
||||||
apiVersion: kubeadm.k8s.io/v1beta2
|
apiVersion: kubeadm.k8s.io/v1beta3
|
||||||
kind: ClusterConfiguration
|
kind: ClusterConfiguration
|
||||||
imageRepository: {{ kube_image_repo }}
|
imageRepository: {{ kube_image_repo }}
|
||||||
kubernetesVersion: {{ kube_version }}
|
kubernetesVersion: {{ kube_version }}
|
||||||
|
|
|
@ -73,9 +73,9 @@
|
||||||
kubeadm_config_api_fqdn: "{{ apiserver_loadbalancer_domain_name|default('lb-apiserver.kubernetes.local') }}"
|
kubeadm_config_api_fqdn: "{{ apiserver_loadbalancer_domain_name|default('lb-apiserver.kubernetes.local') }}"
|
||||||
when: loadbalancer_apiserver is defined
|
when: loadbalancer_apiserver is defined
|
||||||
|
|
||||||
- name: Set kubeadm api version to v1beta2
|
- name: Set kubeadm api version to v1beta3
|
||||||
set_fact:
|
set_fact:
|
||||||
kubeadmConfig_api_version: v1beta2
|
kubeadmConfig_api_version: v1beta3
|
||||||
|
|
||||||
- name: kubeadm | Create kubeadm config
|
- name: kubeadm | Create kubeadm config
|
||||||
template:
|
template:
|
||||||
|
@ -92,14 +92,14 @@
|
||||||
|
|
||||||
- name: kubeadm | Push admission control config file
|
- name: kubeadm | Push admission control config file
|
||||||
template:
|
template:
|
||||||
src: "admission-controls.{{ kubeadmConfig_api_version }}.yaml.j2"
|
src: "admission-controls.yaml.j2"
|
||||||
dest: "{{ kube_config_dir }}/admission-controls/admission-controls.yaml"
|
dest: "{{ kube_config_dir }}/admission-controls/admission-controls.yaml"
|
||||||
mode: 0640
|
mode: 0640
|
||||||
when: kube_apiserver_admission_control_config_file
|
when: kube_apiserver_admission_control_config_file
|
||||||
|
|
||||||
- name: kubeadm | Push admission control config files
|
- name: kubeadm | Push admission control config files
|
||||||
template:
|
template:
|
||||||
src: "{{ item|lower }}.{{ kubeadmConfig_api_version }}.yaml.j2"
|
src: "{{ item|lower }}.yaml.j2"
|
||||||
dest: "{{ kube_config_dir }}/admission-controls/{{ item|lower }}.yaml"
|
dest: "{{ kube_config_dir }}/admission-controls/{{ item|lower }}.yaml"
|
||||||
mode: 0640
|
mode: 0640
|
||||||
when:
|
when:
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
apiVersion: kubeadm.k8s.io/v1beta2
|
apiVersion: kubeadm.k8s.io/v1beta3
|
||||||
kind: InitConfiguration
|
kind: InitConfiguration
|
||||||
{% if kubeadm_token is defined %}
|
{% if kubeadm_token is defined %}
|
||||||
bootstrapTokens:
|
bootstrapTokens:
|
||||||
|
@ -29,7 +29,7 @@ nodeRegistration:
|
||||||
cloud-provider: external
|
cloud-provider: external
|
||||||
{% endif %}
|
{% endif %}
|
||||||
---
|
---
|
||||||
apiVersion: kubeadm.k8s.io/v1beta2
|
apiVersion: kubeadm.k8s.io/v1beta3
|
||||||
kind: ClusterConfiguration
|
kind: ClusterConfiguration
|
||||||
clusterName: {{ cluster_name }}
|
clusterName: {{ cluster_name }}
|
||||||
etcd:
|
etcd:
|
||||||
|
@ -86,7 +86,6 @@ etcd:
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
dns:
|
dns:
|
||||||
type: CoreDNS
|
|
||||||
imageRepository: {{ coredns_image_repo | regex_replace('/coredns(?!/coredns).*$','') }}
|
imageRepository: {{ coredns_image_repo | regex_replace('/coredns(?!/coredns).*$','') }}
|
||||||
imageTag: {{ coredns_image_tag }}
|
imageTag: {{ coredns_image_tag }}
|
||||||
networking:
|
networking:
|
||||||
|
@ -125,7 +124,9 @@ apiServer:
|
||||||
{% if kube_apiserver_insecure_port|string != "0" %}
|
{% if kube_apiserver_insecure_port|string != "0" %}
|
||||||
insecure-bind-address: {{ kube_apiserver_insecure_bind_address }}
|
insecure-bind-address: {{ kube_apiserver_insecure_bind_address }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if kube_version is version('v1.24.0','<') %}
|
||||||
insecure-port: "{{ kube_apiserver_insecure_port }}"
|
insecure-port: "{{ kube_apiserver_insecure_port }}"
|
||||||
|
{% endif %}
|
||||||
{% if kube_apiserver_enable_admission_plugins|length > 0 %}
|
{% if kube_apiserver_enable_admission_plugins|length > 0 %}
|
||||||
enable-admission-plugins: {{ kube_apiserver_enable_admission_plugins | join(',') }}
|
enable-admission-plugins: {{ kube_apiserver_enable_admission_plugins | join(',') }}
|
||||||
{% endif %}
|
{% endif %}
|
|
@ -1,4 +1,4 @@
|
||||||
apiVersion: kubeadm.k8s.io/v1beta2
|
apiVersion: kubeadm.k8s.io/v1beta3
|
||||||
kind: JoinConfiguration
|
kind: JoinConfiguration
|
||||||
discovery:
|
discovery:
|
||||||
bootstrapToken:
|
bootstrapToken:
|
||||||
|
@ -25,4 +25,4 @@ nodeRegistration:
|
||||||
key: node-role.kubernetes.io/master
|
key: node-role.kubernetes.io/master
|
||||||
{% else %}
|
{% else %}
|
||||||
taints: []
|
taints: []
|
||||||
{% endif %}
|
{% endif %}
|
|
@ -54,7 +54,7 @@
|
||||||
|
|
||||||
- name: Set kubeadm api version to v1beta2
|
- name: Set kubeadm api version to v1beta2
|
||||||
set_fact:
|
set_fact:
|
||||||
kubeadmConfig_api_version: v1beta2
|
kubeadmConfig_api_version: v1beta3
|
||||||
|
|
||||||
- name: Create kubeadm client config
|
- name: Create kubeadm client config
|
||||||
template:
|
template:
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
apiVersion: kubeadm.k8s.io/v1beta2
|
apiVersion: kubeadm.k8s.io/v1beta3
|
||||||
kind: JoinConfiguration
|
kind: JoinConfiguration
|
||||||
discovery:
|
discovery:
|
||||||
bootstrapToken:
|
bootstrapToken:
|
|
@ -13,7 +13,7 @@ KUBELET_HOSTNAME="--hostname-override={{ kube_override_hostname }}"
|
||||||
--kubeconfig={{ kube_config_dir }}/kubelet.conf \
|
--kubeconfig={{ kube_config_dir }}/kubelet.conf \
|
||||||
{# end kubeadm specific settings #}
|
{# end kubeadm specific settings #}
|
||||||
--container-runtime=remote \
|
--container-runtime=remote \
|
||||||
--container-runtime-endpoint=unix://{{ cri_socket }} \
|
--container-runtime-endpoint={{ cri_socket }} \
|
||||||
--runtime-cgroups={{ kubelet_runtime_cgroups }} \
|
--runtime-cgroups={{ kubelet_runtime_cgroups }} \
|
||||||
{% endset %}
|
{% endset %}
|
||||||
|
|
||||||
|
|
|
@ -289,11 +289,11 @@ container_manager_on_localhost: "{{ container_manager }}"
|
||||||
# CRI socket path
|
# CRI socket path
|
||||||
cri_socket: >-
|
cri_socket: >-
|
||||||
{%- if container_manager == 'crio' -%}
|
{%- if container_manager == 'crio' -%}
|
||||||
/var/run/crio/crio.sock
|
unix:///var/run/crio/crio.sock
|
||||||
{%- elif container_manager == 'containerd' -%}
|
{%- elif container_manager == 'containerd' -%}
|
||||||
/var/run/containerd/containerd.sock
|
unix:////var/run/containerd/containerd.sock
|
||||||
{%- elif container_manager == 'docker' -%}
|
{%- elif container_manager == 'docker' -%}
|
||||||
/var/run/cri-dockerd.sock
|
unix:///var/run/cri-dockerd.sock
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
|
|
||||||
## Uncomment this if you want to force overlay/overlay2 as docker storage driver
|
## Uncomment this if you want to force overlay/overlay2 as docker storage driver
|
||||||
|
|
Loading…
Reference in a new issue