fix: fixed kubespray version and network provisioning

This commit is contained in:
ITQ
2025-08-20 13:22:27 +03:00
parent d266eb5945
commit 4febd4f75a
3 changed files with 6 additions and 8 deletions
@@ -16,9 +16,7 @@
# Settings for ipv6 only from Kubespray github tests # Settings for ipv6 only from Kubespray github tests
cloud_image: ubuntu-2404 ipv4_stack: true
ipv4_stack: false
ipv6_stack: true ipv6_stack: true
kube_network_plugin: calico kube_network_plugin: calico
etcd_deployment_type: kubeadm etcd_deployment_type: kubeadm
@@ -28,7 +26,5 @@ enable_nodelocaldns: false
# Settings for dualstack from Kubespray github tests # Settings for dualstack from Kubespray github tests
# cloud_image: ubuntu-2404
# ipv4_stack: true # ipv4_stack: true
# ipv6_stack: true # ipv6_stack: true
+4 -3
View File
@@ -1,15 +1,16 @@
#!/bin/bash #!/bin/bash
echo "Pulling kubespray image..." echo "Pulling kubespray image..."
docker pull quay.io/kubespray/kubespray:v2.27.1 -q docker pull quay.io/kubespray/kubespray:v2.28.0 -q
echo "Pulled" echo "Pulled"
CONTAINER_ID=`docker run --rm --mount type=bind,source="$(pwd)"/kubespray,dst=/inventory \ CONTAINER_ID=`docker run --rm --mount type=bind,source="$(pwd)"/kubespray,dst=/inventory \
--mount type=bind,source="$(pwd)"/.ssh/id_rsa,dst=/root/.ssh/id_rsa \ --mount type=bind,source="$(pwd)"/.ssh/id_rsa,dst=/root/.ssh/id_rsa \
--mount type=bind,source=/etc/hosts,dst=/etc/hosts \ --mount type=bind,source=/etc/hosts,dst=/etc/hosts \
--network host \ --network host \
--name kubespray \
--detach \ --detach \
quay.io/kubespray/kubespray:v2.27.1 \ quay.io/kubespray/kubespray:v2.28.0 \
sleep infinity` sleep infinity`
docker exec -i $CONTAINER_ID \ docker exec -i $CONTAINER_ID \
@@ -19,6 +20,6 @@ docker exec -i $CONTAINER_ID \
bash -c " \ bash -c " \
ANSIBLE_STDOUT_CALLBACK=default \ ANSIBLE_STDOUT_CALLBACK=default \
ANSIBLE_CALLBACK_WHITELIST= \ ANSIBLE_CALLBACK_WHITELIST= \
ansible-playbook -i /inventory/inventory.ini --private-key /root/.ssh/id_rsa cluster.yml -u ubuntu -b -v" ansible-playbook -i /inventory/inventory.ini --private-key /root/.ssh/id_rsa cluster.yml -u ubuntu -b -vvv"
docker rm --force $CONTAINER_ID docker rm --force $CONTAINER_ID
@@ -3,6 +3,7 @@ network:
version: 2 version: 2
ethernets: ethernets:
enp1s0: enp1s0:
accept-ra: false
dhcp4: false dhcp4: false
dhcp6: false dhcp6: false
addresses: addresses: