Browse Source

Merge pull request #11868 from tico88612/test/flatcar-4081

Add Flatcar 4081 CI test
pull/12254/head
Kubernetes Prow Robot 4 months ago
committed by GitHub
parent
commit
d287420e8e
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
10 changed files with 41 additions and 16 deletions
  1. 1
      .gitlab-ci/kubevirt.yml
  2. 3
      docs/developers/ci.md
  3. 12
      tests/cloud_playbooks/roles/packet-ci/templates/vm.yml.j2
  4. 22
      tests/cloud_playbooks/roles/packet-ci/vars/main.yml
  5. 2
      tests/common_vars.yml
  6. 11
      tests/files/flatcar4081-calico.yml
  7. 2
      tests/testcases/015_check-nodes-ready.yml
  8. 2
      tests/testcases/020_check-pods-running.yml
  9. 1
      tests/testcases/030_check-network.yml
  10. 1
      tests/testcases/040_check-network-adv.yml

1
.gitlab-ci/kubevirt.yml

@ -55,6 +55,7 @@ pr:
- ubuntu22-calico-all-in-one-upgrade
- ubuntu24-calico-etcd-datastore
- ubuntu24-ha-separate-etcd
- flatcar4081-calico
# The ubuntu20-calico-all-in-one jobs are meant as early stages to prevent running the full CI if something is horribly broken
ubuntu20-calico-all-in-one:

3
docs/developers/ci.md

@ -13,6 +13,7 @@ debian11 | :white_check_mark: | :x: | :white_check_mark: | :x: | :x: | :x: | :w
debian12 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | :x: | :x: | :x: |
fedora39 | :white_check_mark: | :x: | :x: | :x: | :x: | :white_check_mark: | :x: |
fedora40 | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
flatcar4081 | :white_check_mark: | :x: | :x: | :x: | :x: | :x: | :x: |
openeuler24 | :white_check_mark: | :x: | :x: | :x: | :x: | :x: | :x: |
opensuse15 | :white_check_mark: | :x: | :x: | :x: | :x: | :x: | :x: |
rockylinux8 | :white_check_mark: | :x: | :x: | :x: | :x: | :x: | :x: |
@ -32,6 +33,7 @@ debian11 | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
debian12 | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
fedora39 | :white_check_mark: | :x: | :x: | :x: | :x: | :x: | :x: |
fedora40 | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
flatcar4081 | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
openeuler24 | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
opensuse15 | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
rockylinux8 | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
@ -51,6 +53,7 @@ debian11 | :white_check_mark: | :x: | :x: | :x: | :x: | :x: | :x: |
debian12 | :white_check_mark: | :x: | :x: | :x: | :x: | :x: | :x: |
fedora39 | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
fedora40 | :white_check_mark: | :x: | :x: | :x: | :x: | :x: | :x: |
flatcar4081 | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
openeuler24 | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
opensuse15 | :x: | :white_check_mark: | :x: | :x: | :x: | :x: | :x: |
rockylinux8 | :x: | :x: | :x: | :x: | :x: | :x: | :x: |

12
tests/cloud_playbooks/roles/packet-ci/templates/vm.yml.j2

@ -55,13 +55,5 @@ spec:
containerDisk:
image: quay.io/kubespray/vm-{{ cloud_image }}
- name: cloudinitvolume
cloudInitNoCloud:
userData: |
#cloud-config
users:
- name: {{ lookup('env', 'ANSIBLE_REMOTE_USER') }}
sudo: ALL=(ALL) NOPASSWD:ALL
shell: /bin/bash
lock_passwd: False
ssh_authorized_keys:
- {{ ssh_key.public_key }}
cloudInit{{ 'ConfigDrive' if cloud_image.startswith('flatcar') else 'NoCloud' }}:
userDataBase64: '{{ ((ignition_config | to_json) if cloud_image.startswith('flatcar') else cloudinit_config) | b64encode }}'

22
tests/cloud_playbooks/roles/packet-ci/vars/main.yml

@ -34,3 +34,25 @@ ci_job_id: "{{ lookup('ansible.builtin.env', 'CI_JOB_ID', default=undefined) }}"
pod_name: "{{ lookup('ansible.builtin.env', 'POD_NAME', default=undefined) }}"
pod_uid: "{{ lookup('ansible.builtin.env', 'POD_UID', default=undefined) }}"
pod_namespace: "{{ lookup('ansible.builtin.env', 'POD_NAMESPACE', default=undefined) }}"
cloudinit_config: |
#cloud-config
users:
- name: {{ lookup('env', 'ANSIBLE_REMOTE_USER') }}
sudo: ALL=(ALL) NOPASSWD:ALL
shell: /bin/bash
lock_passwd: False
ssh_authorized_keys:
- {{ ssh_key.public_key }}
ignition_config:
ignition:
version: "3.2.0"
passwd:
users:
- name: "{{ lookup('env', 'ANSIBLE_REMOTE_USER') }}"
groups:
- sudo
- wheel
sshAuthorizedKeys:
- "{{ ssh_key.public_key }}"

2
tests/common_vars.yml

@ -4,6 +4,8 @@ deploy_netchecker: true
dns_min_replicas: 1
unsafe_show_logs: true
bin_dir: "{{ '/opt/bin' if ansible_os_family == 'Flatcar' else '/usr/local/bin' }}"
# Registry mirrors settings
docker_registry_mirrors:
- "https://mirror.gcr.io"

11
tests/files/flatcar4081-calico.yml

@ -0,0 +1,11 @@
---
# Instance settings
cloud_image: flatcar-4081
mode: default
vm_memory: 3072
# Kubespray settings
metrics_server_enabled: true
dashboard_namespace: "kube-dashboard"
dashboard_enabled: true
loadbalancer_apiserver_type: haproxy

2
tests/testcases/015_check-nodes-ready.yml

@ -1,8 +1,6 @@
---
- name: Testcases checking nodes
hosts: kube_control_plane[0]
vars:
bin_dir: /usr/local/bin
tasks:
- import_role: # noqa name[missing]

2
tests/testcases/020_check-pods-running.yml

@ -1,8 +1,6 @@
---
- name: Testcases checking pods
hosts: kube_control_plane[0]
vars:
bin_dir: /usr/local/bin
tasks:
- import_role: # noqa name[missing]

1
tests/testcases/030_check-network.yml

@ -6,7 +6,6 @@
test_image_tag: "2.40"
# 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: "{{ 'fd85:ee78:d8a6:8607::1:0000/112' if not (ipv4_stack | default(true)) else '10.233.64.0/18' }}"
tasks:

1
tests/testcases/040_check-network-adv.yml

@ -19,7 +19,6 @@
agent_report_interval: 10
netcheck_namespace: default
netchecker_port: 31081
bin_dir: "/usr/local/bin"
tasks:
- import_role: # noqa name[missing]

Loading…
Cancel
Save