Skip to content

Commit

Permalink
add zuul jobs for rocky and ubuntu
Browse files Browse the repository at this point in the history
  • Loading branch information
Yaguang Tang committed Oct 28, 2024
1 parent 0cc95df commit 3435fe3
Show file tree
Hide file tree
Showing 11 changed files with 134 additions and 23 deletions.
19 changes: 0 additions & 19 deletions .github/workflows/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,6 @@ jobs:
fail-fast: false
matrix:
version:
- 1.19.16
- 1.20.15
- 1.21.14
- 1.22.17
- 1.23.17
- 1.24.17
- 1.25.16
- 1.26.15
- 1.27.16
- 1.28.13
Expand Down Expand Up @@ -74,18 +67,6 @@ jobs:
fail-fast: false
matrix:
include:
- old_version: 1.19.16
version: 1.20.15
- old_version: 1.20.15
version: 1.21.14
- old_version: 1.21.14
version: 1.22.17
- old_version: 1.22.17
version: 1.23.17
- old_version: 1.23.17
version: 1.24.17
- old_version: 1.24.17
version: 1.25.16
- old_version: 1.25.16
version: 1.26.15
- old_version: 1.26.15
Expand Down
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.10
10 changes: 10 additions & 0 deletions roles/kubelet/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,16 @@
- "{{ ansible_facts['distribution'] | lower }}.yml"
- "{{ ansible_facts['os_family'] | lower }}.yml"

# NOTE(mnaser): Sometimes EL ships with coreutils, sometimes it ships
# with coreutils-single. We need to ensure that we have
# coreutils installed.
- name: Install coreutils
ansible.builtin.dnf:
name: coreutils
allowerasing: true
when:
- ansible_facts['os_family'] == 'RedHat'

# NOTE(mnaser): This is a list of packages that are needed for `kubeadm`
# validation.
#
Expand Down
5 changes: 1 addition & 4 deletions roles/kubelet/vars/redhat.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
kubelet_package_dependencies:
- conntrack
# NOTE(fitbeard): This is to allow our tests to run on Docker containers since
# Rocky Linux images comes with pre-installed thiner versions
# of some packages.
- "{{ 'coreutils-single' if ansible_connection == 'community.docker.docker' else 'coreutils' }}"
- coreutils
- ebtables
- ethtool
- iproute
Expand Down
8 changes: 8 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ deps =
commands =
molecule {posargs}

[testenv:molecule-aio]
deps =
{[testenv:molecule-venv]deps}
passenv =
KUBERNETES_VERSION
commands =
molecule test -s aio

[testenv:molecule-cluster-api]
deps =
{[testenv:molecule-venv]deps}
Expand Down
35 changes: 35 additions & 0 deletions zuul.d/jobs-focal.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Copyright (c) 2024 VEXXHOST, Inc.
# SPDX-License-Identifier: Apache-2.0

- job:
name: ansible-collection-kubernetes-molecule-focal
parent: ansible-collection-kubernetes-molecule
vars:
# NOTE(mnaser): Ubuntu Focal ships with an old Python
python_use_pyenv: true
nodeset:
nodes:
- name: ubuntu-focal
label: focal-2c-8g

- job:
name: ansible-collection-kubernetes-molecule-focal-aio
parent: ansible-collection-kubernetes-molecule-focal
vars:
tox_envlist: molecule-aio

- job:
name: ansible-collection-kubernetes-molecule-focal-aio-1-28
parent: ansible-collection-kubernetes-molecule-focal-aio
vars:
tox_environment:
KUBERNETES_VERSION: 1.28.4

- project-template:
name: ansible-collection-kubernetes-molecule-focal
check:
jobs:
- ansible-collection-kubernetes-molecule-focal-aio-1-28
gate:
jobs:
- ansible-collection-kubernetes-molecule-focal-aio-1-28
32 changes: 32 additions & 0 deletions zuul.d/jobs-jammy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Copyright (c) 2024 VEXXHOST, Inc.
# SPDX-License-Identifier: Apache-2.0

- job:
name: ansible-collection-kubernetes-molecule-jammy
parent: ansible-collection-kubernetes-molecule
nodeset:
nodes:
- name: ubuntu-jammy
label: jammy-2c-8g

- job:
name: ansible-collection-kubernetes-molecule-jammy-aio
parent: ansible-collection-kubernetes-molecule-jammy
vars:
tox_envlist: molecule-aio

- job:
name: ansible-collection-kubernetes-molecule-jammy-aio-1-28
parent: ansible-collection-kubernetes-molecule-jammy-aio
vars:
tox_environment:
KUBERNETES_VERSION: 1.28.4

- project-template:
name: ansible-collection-kubernetes-molecule-jammy
check:
jobs:
- ansible-collection-kubernetes-molecule-jammy-aio-1-28
gate:
jobs:
- ansible-collection-kubernetes-molecule-jammy-aio-1-28
36 changes: 36 additions & 0 deletions zuul.d/jobs-rockylinux9.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Copyright (c) 2024 VEXXHOST, Inc.
# SPDX-License-Identifier: Apache-2.0

- job:
name: ansible-collection-kubernetes-molecule-rockylinux9
parent: ansible-collection-kubernetes-molecule
vars:
# NOTE(mnaser): `python3-wheel` is not available on Rocky 9.
ensure_pip_from_packages: false
ensure_pip_from_upstream: true
nodeset:
nodes:
- name: rockylinux9
label: rockylinux9-2c-8g

- job:
name: ansible-collection-kubernetes-molecule-rockylinux9-aio
parent: ansible-collection-kubernetes-molecule-rockylinux9
vars:
tox_envlist: molecule-aio

- job:
name: ansible-collection-kubernetes-molecule-rockylinux9-aio-1-28
parent: ansible-collection-kubernetes-molecule-rockylinux9-aio
vars:
tox_environment:
KUBERNETES_VERSION: 1.28.4

- project-template:
name: ansible-collection-kubernetes-molecule-rockylinux9
check:
jobs:
- ansible-collection-kubernetes-molecule-rockylinux9-aio-1-28
gate:
jobs:
- ansible-collection-kubernetes-molecule-rockylinux9-aio-1-28
1 change: 1 addition & 0 deletions zuul.d/jobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
abstract: true
pre-run: zuul.d/playbooks/molecule/pre.yml
run: zuul.d/playbooks/molecule/run.yml
post-run: zuul.d/playbooks/molecule/post.yml

- job:
name: ansible-collection-kubernetes-molecule-cluster-api
Expand Down
6 changes: 6 additions & 0 deletions zuul.d/playbooks/molecule/post.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Copyright (c) 2024 VEXXHOST, Inc.
# SPDX-License-Identifier: Apache-2.0

- hosts: all
roles:
- role: collect-kubernetes-logs
4 changes: 4 additions & 0 deletions zuul.d/project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,7 @@
release:
jobs:
- publish-ansible-collection-vexxhost
templates:
- ansible-collection-kubernetes-molecule-focal
- ansible-collection-kubernetes-molecule-jammy
- ansible-collection-kubernetes-molecule-rockylinux9

0 comments on commit 3435fe3

Please sign in to comment.