mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-01-31 17:19:17 -03:30
refact ip stack (#11953)
This commit is contained in:
@@ -1,3 +0,0 @@
|
||||
---
|
||||
# Kubespray settings
|
||||
enable_dual_stack_networks: true
|
||||
@@ -1,4 +1,6 @@
|
||||
# For CI we are not worried about data persistence across reboot
|
||||
$os = "ubuntu2404"
|
||||
|
||||
$vm_cpus = 2
|
||||
$libvirt_volume_cache = "unsafe"
|
||||
|
||||
# Checking for box update can trigger API rate limiting
|
||||
8
tests/files/vagrant_ubuntu24-calico-dual-stack.yml
Normal file
8
tests/files/vagrant_ubuntu24-calico-dual-stack.yml
Normal file
@@ -0,0 +1,8 @@
|
||||
---
|
||||
# Instance settings
|
||||
cloud_image: ubuntu-2404
|
||||
mode: default
|
||||
|
||||
# Kubespray settings
|
||||
ipv4_stack: true
|
||||
ipv6_stack: true
|
||||
9
tests/files/vagrant_ubuntu24-calico-ipv6only-stack.rb
Normal file
9
tests/files/vagrant_ubuntu24-calico-ipv6only-stack.rb
Normal file
@@ -0,0 +1,9 @@
|
||||
$os = "ubuntu2404"
|
||||
|
||||
$vm_cpus = 2
|
||||
$libvirt_volume_cache = "unsafe"
|
||||
|
||||
# Checking for box update can trigger API rate limiting
|
||||
# https://www.vagrantup.com/docs/vagrant-cloud/request-limits.html
|
||||
$box_check_update = false
|
||||
$network_plugin = "calico"
|
||||
12
tests/files/vagrant_ubuntu24-calico-ipv6only-stack.yml
Normal file
12
tests/files/vagrant_ubuntu24-calico-ipv6only-stack.yml
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
# Instance settings
|
||||
cloud_image: ubuntu-2404
|
||||
mode: default
|
||||
|
||||
# Kubespray settings
|
||||
ipv4_stack: false
|
||||
ipv6_stack: true
|
||||
kube_network_plugin: calico
|
||||
etcd_deployment_type: kubeadm
|
||||
kube_proxy_mode: iptables
|
||||
enable_nodelocaldns: false
|
||||
@@ -5,7 +5,7 @@
|
||||
tasks:
|
||||
- name: Check the API servers are responding
|
||||
uri:
|
||||
url: "https://{{ access_ip | default(ansible_default_ipv4.address) }}:{{ kube_apiserver_port | default(6443) }}/version"
|
||||
url: "https://{{ (access_ip if (ipv4_stack | default(true)) else access_ip6) | default(ansible_default_ipv4.address if (ipv4_stack | default(true)) else ansible_default_ipv6.address) | ansible.utils.ipwrap }}:{{ kube_apiserver_port | default(6443) }}/version"
|
||||
validate_certs: false
|
||||
status_code: 200
|
||||
register: apiserver_response
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
# TODO: source those from kubespray-defaults instead.
|
||||
# Needs kubespray-defaults to be decoupled from no-proxy stuff
|
||||
bin_dir: "/usr/local/bin"
|
||||
kube_pods_subnet: 10.233.64.0/18
|
||||
kube_pods_subnet: "{{ 'fd85:ee78:d8a6:8607::1:0000/112' if not (ipv4_stack | default(true)) else '10.233.64.0/18' }}"
|
||||
|
||||
tasks:
|
||||
|
||||
@@ -115,7 +115,7 @@
|
||||
| length == 2
|
||||
|
||||
- name: Curl between pods is working
|
||||
command: "{{ bin_dir }}/kubectl -n test exec {{ item[0].metadata.name }} -- curl {{ item[1].status.podIP }}:8080"
|
||||
command: "{{ bin_dir }}/kubectl -n test exec {{ item[0].metadata.name }} -- curl {{ item[1].status.podIP | ansible.utils.ipwrap}}:8080"
|
||||
with_nested:
|
||||
- "{{ pods }}"
|
||||
- "{{ pods }}"
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
block:
|
||||
- name: Get netchecker agents
|
||||
uri:
|
||||
url: "http://{{ ansible_default_ipv4.address }}:{{ netchecker_port }}/api/v1/agents/"
|
||||
url: "http://{{ (ansible_default_ipv6.address if not (ipv4_stack | default(true)) else ansible_default_ipv4.address) | ansible.utils.ipwrap }}:{{ netchecker_port }}/api/v1/agents/"
|
||||
return_content: true
|
||||
headers:
|
||||
Accept: application/json
|
||||
@@ -64,7 +64,7 @@
|
||||
|
||||
- name: Check netchecker status
|
||||
uri:
|
||||
url: "http://{{ ansible_default_ipv4.address }}:{{ netchecker_port }}/api/v1/connectivity_check"
|
||||
url: "http://{{ (ansible_default_ipv6.address if not (ipv4_stack | default(true)) else ansible_default_ipv4.address) | ansible.utils.ipwrap }}:{{ netchecker_port }}/api/v1/connectivity_check"
|
||||
return_content: true
|
||||
headers:
|
||||
Accept: application/json
|
||||
|
||||
Reference in New Issue
Block a user