nodepool-functional-k8s: switch to microk8s

Switch this job to use microk8s, which should be more stable than
minikube on our Ubuntu testing hosts.

Depends-on: https://review.opendev.org/c/zuul/zuul-jobs/+/866953
Change-Id: I8e76581ea5cf4a4241aec48bc59086d7f17cd72a
This commit is contained in:
Ian Wienand 2022-12-08 16:34:24 +11:00 committed by Clark Boylan
parent 2785d3bd20
commit 610443d04b
5 changed files with 8 additions and 18 deletions

View File

@ -4,7 +4,6 @@
name: nodepool-functional-k8s
pre-run: playbooks/nodepool-functional-k8s/pre.yaml
run: playbooks/nodepool-functional-k8s/run.yaml
post-run: playbooks/nodepool-functional-k8s/post.yaml
required-projects:
- zuul/nodepool
nodeset: ubuntu-jammy

View File

@ -15,9 +15,9 @@ labels:
min-ready: 1
providers:
- name: minikube
- name: microk8s
driver: kubernetes
context: minikube
context: microk8s
pools:
- name: main
max-servers: 2
@ -26,4 +26,4 @@ providers:
type: namespace
- name: pod-fedora
type: pod
image: quay.io/fedora/fedora:34-x86_64
image: quay.io/fedora/fedora:37-x86_64

View File

@ -1,10 +0,0 @@
- hosts: all
vars:
minikube_log: '{{ ansible_user_dir }}/zuul-output/logs/minikube.txt'
tasks:
- name: Produce minikube log
become: yes
shell: '/tmp/minikube logs > {{ minikube_log }}'
environment:
MINIKUBE_HOME: "{{ ansible_user_dir }}"

View File

@ -5,4 +5,8 @@
zookeeper_use_tls: true
- role: ensure-tox
- role: ensure-kubernetes
docker_version: 18.06.1~ce~3-0~ubuntu
ensure_kubernetes_type: microk8s
# k8s > 1.23 changed the way the service account tokens
# are auto-generated; see
# https://storyboard.openstack.org/#!/story/2010224
ensure_kubernetes_microk8s_channel: '1.23/stable'

View File

@ -1,11 +1,9 @@
[tox]
minversion = 3.1
skipsdist = True
envlist = pep8,py3
ignore_basepython_conflict = True
[testenv]
basepython = python3
# Set STATSD env variables so that statsd code paths are tested.
setenv = STATSD_HOST=localhost
STATSD_PORT=8125
@ -60,7 +58,6 @@ commands = stestr --test-path ./nodepool/tests/functional/kubernetes run --no-su
stestr slowest
[testenv:functional_openshift]
basepython = python3
commands = stestr --test-path ./nodepool/tests/functional/openshift run --no-subunit-trace {posargs}
stestr slowest