feat: IPv6 support 🚀 (#855)
Co-authored-by: Devin Buhl <onedr0p@users.noreply.github.com>
This commit is contained in:
1 parent
6c8b9a4755
commit
1d911f6821
6 files changed
+83
-9
No files matched your search
@@ -13,17 +13,47 @@
|
||||
success_msg: "Node CIDR {{ bootstrap_node_cidr }} is valid."
|
||||
fail_msg: "Node CIDR {{ bootstrap_node_cidr }} is invalid."
|
||||
|
||||
- name: Verify cluster CIDR
|
||||
- name: Verify cluster CIDR is ipv4 OR ipv6
|
||||
when: not bootstrap_ipv6_enabled | default(false)
|
||||
ansible.builtin.assert:
|
||||
that: ["{{ bootstrap_cluster_cidr is ansible.utils.ipv4 }}"]
|
||||
success_msg: "Cluster CIDR {{ bootstrap_cluster_cidr }} is valid."
|
||||
fail_msg: "Cluster CIDR {{ bootstrap_cluster_cidr }} is invalid."
|
||||
that: bootstrap_cluster_cidr is ansible.utils.ipv4 or bootstrap_cluster_cidr is ansible.utils.ipv6
|
||||
success_msg: Cluster CIDR {{ bootstrap_cluster_cidr }} is valid.
|
||||
fail_msg: Cluster CIDR {{ bootstrap_cluster_cidr }} is invalid.
|
||||
|
||||
- name: Verify service CIDR
|
||||
- name: Verify service CIDR is ipv4 OR ipv6
|
||||
when: not bootstrap_ipv6_enabled | default(false)
|
||||
ansible.builtin.assert:
|
||||
that: ["{{ bootstrap_service_cidr is ansible.utils.ipv4 }}"]
|
||||
success_msg: "Service CIDR {{ bootstrap_service_cidr }} is valid."
|
||||
fail_msg: "Service CIDR {{ bootstrap_service_cidr }} is invalid."
|
||||
that: bootstrap_service_cidr is ansible.utils.ipv4 or bootstrap_service_cidr is ansible.utils.ipv6
|
||||
success_msg: Service CIDR {{ bootstrap_service_cidr }} is valid.
|
||||
fail_msg: Service CIDR {{ bootstrap_service_cidr }} is invalid.
|
||||
|
||||
- name: Verify cluster CIDR is ipv4 AND ipv6
|
||||
when: bootstrap_ipv6_enabled | default(false)
|
||||
ansible.builtin.assert:
|
||||
that: >
|
||||
(
|
||||
bootstrap_cluster_cidr.split(',')[0] is ansible.utils.ipv4 or
|
||||
bootstrap_cluster_cidr.split(',')[1] is ansible.utils.ipv4
|
||||
) and (
|
||||
bootstrap_cluster_cidr.split(',')[1] is ansible.utils.ipv6 or
|
||||
bootstrap_cluster_cidr.split(',')[0] is ansible.utils.ipv6
|
||||
)
|
||||
success_msg: Cluster CIDR {{ bootstrap_cluster_cidr }} is valid.
|
||||
fail_msg: Cluster CIDR {{ bootstrap_cluster_cidr }} is invalid.
|
||||
|
||||
- name: Verify service CIDR is ipv4 AND ipv6
|
||||
when: bootstrap_ipv6_enabled | default(false)
|
||||
ansible.builtin.assert:
|
||||
that: >
|
||||
(
|
||||
bootstrap_service_cidr.split(',')[0] is ansible.utils.ipv4 or
|
||||
bootstrap_service_cidr.split(',')[1] is ansible.utils.ipv4
|
||||
) and (
|
||||
bootstrap_service_cidr.split(',')[1] is ansible.utils.ipv6 or
|
||||
bootstrap_service_cidr.split(',')[0] is ansible.utils.ipv6
|
||||
)
|
||||
success_msg: Service CIDR {{ bootstrap_service_cidr }} is valid.
|
||||
fail_msg: Service CIDR {{ bootstrap_service_cidr }} is invalid.
|
||||
|
||||
- name: Verify k8s_gateway
|
||||
ansible.builtin.assert:
|
||||
@@ -72,6 +102,16 @@
|
||||
loop_control:
|
||||
label: "{{ item.address }}"
|
||||
|
||||
- name: Verify nodes are ipv4
|
||||
ansible.builtin.assert:
|
||||
that: item.address is ansible.utils.ipv4
|
||||
success_msg: Node address {{ item.address }} is valid.
|
||||
fail_msg: Node address {{ item.address }} is invalid.
|
||||
quiet: true
|
||||
loop: "{{ bootstrap_nodes.master + bootstrap_nodes.worker | default([]) }}"
|
||||
loop_control:
|
||||
label: "{{ item.address }}"
|
||||
|
||||
- name: Verify nodes are in node CIDR
|
||||
ansible.builtin.assert:
|
||||
that: ["{{ bootstrap_node_cidr | ansible.utils.network_in_usable(item.address) }}"]
|
||||
|
||||
Reference in new issue
Block a user