update to latest 2.26.0 kubespray version and add dns zones settings to coredns
This commit is contained in:
@@ -1,10 +1,7 @@
|
||||
---
|
||||
- name: Stop if either kube_control_plane or kube_node group is empty
|
||||
- name: Stop if kube_control_plane group is empty
|
||||
assert:
|
||||
that: "groups.get( item )"
|
||||
with_items:
|
||||
- kube_control_plane
|
||||
- kube_node
|
||||
that: groups.get( 'kube_control_plane' )
|
||||
run_once: true
|
||||
when: not ignore_assert_errors
|
||||
|
||||
@@ -47,7 +44,7 @@
|
||||
assert:
|
||||
that: item.value | type_debug == 'bool'
|
||||
msg: "{{ item.value }} isn't a bool"
|
||||
run_once: yes
|
||||
run_once: true
|
||||
with_items:
|
||||
- { name: download_run_once, value: "{{ download_run_once }}" }
|
||||
- { name: deploy_netchecker, value: "{{ deploy_netchecker }}" }
|
||||
@@ -77,6 +74,13 @@
|
||||
- not ignore_assert_errors
|
||||
- inventory_hostname in groups['kube_node']
|
||||
|
||||
# This command will fail if cgroups are not enabled on the node.
|
||||
# For reference: https://kubernetes.io/docs/concepts/architecture/cgroups/#check-cgroup-version
|
||||
- name: Stop if cgroups are not enabled on nodes
|
||||
command: stat -fc %T /sys/fs/cgroup/
|
||||
changed_when: false
|
||||
when: not ignore_assert_errors
|
||||
|
||||
# This assertion will fail on the safe side: One can indeed schedule more pods
|
||||
# on a node than the CIDR-range has space for when additional pods use the host
|
||||
# network namespace. It is impossible to ascertain the number of such pods at
|
||||
@@ -168,21 +172,21 @@
|
||||
that:
|
||||
- kube_service_addresses | ansible.utils.ipaddr('net')
|
||||
msg: "kube_service_addresses = '{{ kube_service_addresses }}' is not a valid network range"
|
||||
run_once: yes
|
||||
run_once: true
|
||||
|
||||
- name: "Check that kube_pods_subnet is a network range"
|
||||
assert:
|
||||
that:
|
||||
- kube_pods_subnet | ansible.utils.ipaddr('net')
|
||||
msg: "kube_pods_subnet = '{{ kube_pods_subnet }}' is not a valid network range"
|
||||
run_once: yes
|
||||
run_once: true
|
||||
|
||||
- name: "Check that kube_pods_subnet does not collide with kube_service_addresses"
|
||||
assert:
|
||||
that:
|
||||
- kube_pods_subnet | ansible.utils.ipaddr(kube_service_addresses) | string == 'None'
|
||||
msg: "kube_pods_subnet cannot be the same network segment as kube_service_addresses"
|
||||
run_once: yes
|
||||
run_once: true
|
||||
|
||||
- name: "Check that IP range is enough for the nodes"
|
||||
assert:
|
||||
@@ -190,7 +194,7 @@
|
||||
- 2 ** (kube_network_node_prefix - kube_pods_subnet | ansible.utils.ipaddr('prefix')) >= groups['k8s_cluster'] | length
|
||||
msg: "Not enough IPs are available for the desired node count."
|
||||
when: kube_network_plugin != 'calico'
|
||||
run_once: yes
|
||||
run_once: true
|
||||
|
||||
- name: Stop if unknown dns mode
|
||||
assert:
|
||||
@@ -242,7 +246,7 @@
|
||||
|
||||
# TODO: Clean this task up when we drop backward compatibility support for `etcd_kubeadm_enabled`
|
||||
- name: Stop if etcd deployment type is not host or kubeadm when container_manager != docker and etcd_kubeadm_enabled is not defined
|
||||
run_once: yes
|
||||
run_once: true
|
||||
when: etcd_kubeadm_enabled is defined
|
||||
block:
|
||||
- name: Warn the user if they are still using `etcd_kubeadm_enabled`
|
||||
@@ -288,7 +292,7 @@
|
||||
assert:
|
||||
that: containerd_version is version(containerd_min_version_required, '>=')
|
||||
msg: "containerd_version is too low. Minimum version {{ containerd_min_version_required }}"
|
||||
run_once: yes
|
||||
run_once: true
|
||||
when:
|
||||
- containerd_version not in ['latest', 'edge', 'stable']
|
||||
- container_manager == 'containerd'
|
||||
@@ -316,3 +320,15 @@
|
||||
when:
|
||||
- kube_apiserver_enable_admission_plugins is defined
|
||||
- kube_apiserver_enable_admission_plugins | length > 0
|
||||
|
||||
- name: Verify that the packages list structure is valid
|
||||
ansible.utils.validate:
|
||||
criteria: "{{ lookup('file', 'pkgs-schema.json') }}"
|
||||
data: "{{ pkgs }}"
|
||||
|
||||
- name: Verify that the packages list is sorted
|
||||
vars:
|
||||
pkgs_lists: "{{ pkgs.keys() | list }}"
|
||||
assert:
|
||||
that: "pkgs_lists | sort == pkgs_lists"
|
||||
fail_msg: "pkgs is not sorted: {{ pkgs_lists | ansible.utils.fact_diff(pkgs_lists | sort) }}"
|
||||
|
||||
Reference in New Issue
Block a user