Fix etcd client generation (#10769)

* ci: redefine multinode to node-etcd-client

This should allow to catch several class of problem rather than just
one -> from network plugin such as calico or cilium talking directly to
the etcd.

* Dynamically define etcd host range

This has two benefits:
- We don't play the etcd role twice for no reason
- We have access to the whole cluster (if needed) to use things like
  group_by.
This commit is contained in:
Max Gautier
2024-01-16 15:50:41 +01:00
committed by GitHub
parent a0a2f40295
commit a9e29a9eb2
5 changed files with 28 additions and 25 deletions

View File

@@ -81,16 +81,20 @@ instance-2
[broken_etcd]
instance-1 etcd_member_name=etcd2
instance-2 etcd_member_name=etcd3
{% elif mode == "multinode" %}
{% elif mode == "node-etcd-client" %}
[kube_control_plane]
instance-1
[etcd]
instance-1
[kube_node]
instance-2
instance-3
[kube_node]
instance-1
instance-2
instance-3
instance-4
{% endif %}
[k8s_cluster:children]

View File

@@ -7,7 +7,7 @@ _vm_count_dict:
ha-recover: 3
ha-recover-noquorum: 3
all-in-one: 1
multinode: 3
node-etcd-client: 4
default: 2
vm_count: "{{ _vm_count_dict[mode | d('default')] }}"

View File

@@ -1,7 +1,7 @@
---
# Instance settings
cloud_image: ubuntu-2204
mode: multinode
mode: node-etcd-client
vm_memory: 1600Mi
# Kubespray settings