Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test case for calico using etcd datastore #10722

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitlab-ci/packet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ packet_ubuntu22-calico-all-in-one:
extends: .packet_pr
when: on_success

packet_ubuntu22-calico-etcd-datastore:
stage: deploy-part2
extends: .packet_pr
when: on_success

packet_centos7-flannel-addons-ha:
extends: .packet_pr
stage: deploy-part2
Expand Down
4 changes: 3 additions & 1 deletion docs/test_cases.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Node Layouts

There are five node layout types: `default`, `separate`, `ha`, `scale`, and `all-in-one`.
There are six node layout types: `default`, `separate`, `ha`, `scale`, `all-in-one`, and `multinode`.

`default` is a non-HA two nodes setup with one separate `kube_node`
and the `etcd` group merged with the `kube_control_plane`.
Expand All @@ -18,6 +18,8 @@ never actually deployed, but certificates are generated for them.

`all-in-one` layout use a single node for with `kube_control_plane`, `etcd` and `kube_node` merged.

`multinode` layout consists of two separate `kube_node` and a merged single `etcd+kube_control_plane` node.

Note, the canal network plugin deploys flannel as well plus calico policy controller.

## Test cases
Expand Down
10 changes: 10 additions & 0 deletions tests/cloud_playbooks/roles/packet-ci/templates/inventory.j2
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,16 @@ instance-2
[broken_etcd]
instance-1 etcd_member_name=etcd2
instance-2 etcd_member_name=etcd3
{% elif mode == "multinode" %}
[kube_control_plane]
instance-1

[etcd]
instance-1

[kube_node]
instance-2
instance-3
{% endif %}

[k8s_cluster:children]
Expand Down
1 change: 1 addition & 0 deletions tests/cloud_playbooks/roles/packet-ci/vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ _vm_count_dict:
ha-recover: 3
ha-recover-noquorum: 3
all-in-one: 1
multinode: 3
default: 2

vm_count: "{{ _vm_count_dict[mode | d('default')] }}"
29 changes: 29 additions & 0 deletions tests/files/packet_ubuntu22-calico-etcd-datastore.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
# Instance settings
cloud_image: ubuntu-2204
mode: multinode
vm_memory: 1600Mi

# Kubespray settings
auto_renew_certificates: true

# Currently ipvs not available on KVM: https://packages.ubuntu.com/search?suite=focal&arch=amd64&mode=exactfilename&searchon=contents&keywords=ip_vs_sh.ko
kube_proxy_mode: iptables
enable_nodelocaldns: False

containerd_registries:
"docker.io": "https://mirror.gcr.io"

containerd_registries_mirrors:
- prefix: docker.io
mirrors:
- host: https://mirror.gcr.io
capabilities: ["pull", "resolve"]
skip_verify: false
- prefix: 172.19.16.11:5000
mirrors:
- host: http://172.19.16.11:5000
capabilities: ["pull", "resolve", "push"]
skip_verify: true

calico_datastore: "etcd"