dsk-dev kubespray 이동
This commit is contained in:
@@ -0,0 +1,93 @@
|
||||
[all]
|
||||
{% for instance in vms.results %}
|
||||
instance-{{ loop.index }} ansible_host={{instance.stdout}}
|
||||
{% endfor %}
|
||||
|
||||
{% if mode is defined and mode in ["separate", "separate-scale"] %}
|
||||
[kube_control_plane]
|
||||
instance-1
|
||||
|
||||
[kube_node]
|
||||
instance-2
|
||||
|
||||
[etcd]
|
||||
instance-3
|
||||
{% elif mode is defined and mode in ["ha", "ha-scale"] %}
|
||||
[kube_control_plane]
|
||||
instance-1
|
||||
instance-2
|
||||
|
||||
[kube_node]
|
||||
instance-3
|
||||
|
||||
[etcd]
|
||||
instance-1
|
||||
instance-2
|
||||
instance-3
|
||||
{% elif mode == "default" %}
|
||||
[kube_control_plane]
|
||||
instance-1
|
||||
|
||||
[kube_node]
|
||||
instance-2
|
||||
|
||||
[etcd]
|
||||
instance-1
|
||||
{% elif mode == "aio" %}
|
||||
[kube_control_plane]
|
||||
instance-1
|
||||
|
||||
[kube_node]
|
||||
instance-1
|
||||
|
||||
[etcd]
|
||||
instance-1
|
||||
{% elif mode == "ha-recover" %}
|
||||
[kube_control_plane]
|
||||
instance-1
|
||||
instance-2
|
||||
|
||||
[kube_node]
|
||||
instance-3
|
||||
|
||||
[etcd]
|
||||
instance-3
|
||||
instance-1
|
||||
instance-2
|
||||
|
||||
[broken_kube_control_plane]
|
||||
instance-2
|
||||
|
||||
[broken_etcd]
|
||||
instance-2 etcd_member_name=etcd3
|
||||
{% elif mode == "ha-recover-noquorum" %}
|
||||
[kube_control_plane]
|
||||
instance-3
|
||||
instance-1
|
||||
instance-2
|
||||
|
||||
[kube_node]
|
||||
instance-3
|
||||
|
||||
[etcd]
|
||||
instance-3
|
||||
instance-1
|
||||
instance-2
|
||||
|
||||
[broken_kube_control_plane]
|
||||
instance-1
|
||||
instance-2
|
||||
|
||||
[broken_etcd]
|
||||
instance-1 etcd_member_name=etcd2
|
||||
instance-2 etcd_member_name=etcd3
|
||||
{% endif %}
|
||||
|
||||
[k8s_cluster:children]
|
||||
kube_node
|
||||
kube_control_plane
|
||||
calico_rr
|
||||
|
||||
[calico_rr]
|
||||
|
||||
[fake_hosts]
|
||||
@@ -0,0 +1,52 @@
|
||||
---
|
||||
apiVersion: kubevirt.io/v1alpha3
|
||||
kind: VirtualMachine
|
||||
metadata:
|
||||
name: "instance-{{ vm_id }}"
|
||||
namespace: "{{ test_name }}"
|
||||
labels:
|
||||
kubevirt.io/os: {{ cloud_image }}
|
||||
spec:
|
||||
running: true
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
kubevirt.io/size: small
|
||||
kubevirt.io/domain: "{{ test_name }}"
|
||||
spec:
|
||||
domain:
|
||||
devices:
|
||||
blockMultiQueue: true
|
||||
disks:
|
||||
- disk:
|
||||
bus: virtio
|
||||
name: containervolume
|
||||
cache: writethrough
|
||||
- disk:
|
||||
bus: virtio
|
||||
name: cloudinitvolume
|
||||
interfaces:
|
||||
- name: default
|
||||
bridge: {}
|
||||
cpu:
|
||||
cores: {{ vm_cpu_cores }}
|
||||
sockets: {{ vm_cpu_sockets }}
|
||||
threads: {{ vm_cpu_threads }}
|
||||
resources:
|
||||
requests:
|
||||
memory: {{ vm_memory * memory_allocation_ratio }}
|
||||
cpu: {{ vm_cpu_cores * cpu_allocation_ratio }}
|
||||
limits:
|
||||
memory: {{ vm_memory }}
|
||||
cpu: {{ vm_cpu_cores }}
|
||||
networks:
|
||||
- name: default
|
||||
pod: {}
|
||||
terminationGracePeriodSeconds: 0
|
||||
volumes:
|
||||
- name: containervolume
|
||||
containerDisk:
|
||||
image: quay.io/kubespray/vm-{{ cloud_image }}
|
||||
- name: cloudinitvolume
|
||||
cloudInitNoCloud:
|
||||
userDataBase64: {{ cloud_init[cloud_image] }}
|
||||
Reference in New Issue
Block a user