Add cri-o support to use-buildset registry
This lets use-buildset-registry notify cri-o about the new registries.conf file if it is being used as the container backend for k8s. Change-Id: Ia1805519ab4b6bb5f79df0492f702effc6a3e024
This commit is contained in:
parent
b62c488eab
commit
b6cb191295
@ -105,3 +105,15 @@
|
||||
when: buildset_registry_docker_user is not defined
|
||||
block:
|
||||
- include_tasks: user-config.yaml
|
||||
|
||||
- name: Check if cri-o is installed
|
||||
stat:
|
||||
path: /etc/crio/crio.conf
|
||||
register: crio_path
|
||||
# TODO: with cri-o >= 1.16, change this to a SIGHUP of the crio process
|
||||
- name: Restart cri-o
|
||||
when: crio_path.stat.exists
|
||||
service:
|
||||
name: crio
|
||||
state: restarted
|
||||
become: true
|
||||
|
@ -0,0 +1,8 @@
|
||||
- hosts: all
|
||||
tasks:
|
||||
- name: Describe dockertest pod
|
||||
command: kubectl describe pod/quaytest
|
||||
ignore_errors: true
|
||||
- name: Describe upstream-dockertest pod
|
||||
command: kubectl describe pod/upstream-dockertest
|
||||
ignore_errors: true
|
31
test-playbooks/registry/buildset-registry-k8s-crio.yaml
Normal file
31
test-playbooks/registry/buildset-registry-k8s-crio.yaml
Normal file
@ -0,0 +1,31 @@
|
||||
- hosts: all
|
||||
roles:
|
||||
- role: clear-firewall
|
||||
- role: install-kubernetes
|
||||
vars:
|
||||
minikube_dns_resolvers:
|
||||
- '1.1.1.1'
|
||||
- '8.8.8.8'
|
||||
kubernetes_runtime: cri-o
|
||||
- role: use-buildset-registry
|
||||
buildset_registry_docker_user: root
|
||||
tasks:
|
||||
- name: Wait for cluster to come up
|
||||
command: kubectl cluster-info
|
||||
register: result
|
||||
until: result.rc == 0
|
||||
retries: 5
|
||||
delay: 30
|
||||
- name: Run a local test pod
|
||||
command: kubectl run --generator=run-pod/v1 --image=quay.io/zuul/quay-testimage quaytest
|
||||
- name: Wait for the pod to be ready
|
||||
command: kubectl wait --for=condition=Ready pod/quaytest --timeout=60s
|
||||
- name: Check the output of the pod
|
||||
shell: "kubectl logs pod/quaytest | grep 'Zuul container test'"
|
||||
|
||||
- name: Run a remote test pod
|
||||
command: kubectl run --generator=run-pod/v1 --image=debian:testing upstream-dockertest --command -- /bin/bash -c 'echo Upstream; sleep infinity'
|
||||
- name: Wait for the pod to be ready
|
||||
command: kubectl wait --for=condition=Ready pod/upstream-dockertest --timeout=60s
|
||||
- name: Check the output of the pod
|
||||
shell: "kubectl logs pod/upstream-dockertest | grep 'Upstream'"
|
@ -111,6 +111,30 @@
|
||||
vars:
|
||||
container_command: docker
|
||||
|
||||
- job:
|
||||
name: zuul-jobs-test-registry-buildset-registry-k8s-crio
|
||||
dependencies: zuul-jobs-test-registry-buildset-registry
|
||||
description: |
|
||||
Test a buildset registry with kubernetes and CRIO
|
||||
|
||||
It is not meant to be used directly but rather run on changes
|
||||
to roles in the zuul-jobs repo.
|
||||
files:
|
||||
- roles/pull-from-intermediate-registry/.*
|
||||
- roles/push-to-intermediate-registry/.*
|
||||
- roles/install-docker/.*
|
||||
- roles/install-kubernetes/.*
|
||||
- roles/build-docker-image/.*
|
||||
- roles/run-buildset-registry/.*
|
||||
- roles/use-buildset-registry/.*
|
||||
- test-playbooks/registry/.*
|
||||
run: test-playbooks/registry/buildset-registry-k8s-crio.yaml
|
||||
post-run:
|
||||
- test-playbooks/registry/buildset-registry-k8s-crio-post.yaml
|
||||
- test-playbooks/registry/test-registry-post.yaml
|
||||
vars:
|
||||
container_command: podman
|
||||
|
||||
- job:
|
||||
name: zuul-jobs-test-registry-buildset-registry-openshift-docker
|
||||
dependencies: zuul-jobs-test-registry-buildset-registry
|
||||
@ -193,6 +217,7 @@
|
||||
- zuul-jobs-test-registry-podman
|
||||
- zuul-jobs-test-registry-buildset-registry
|
||||
- zuul-jobs-test-registry-buildset-registry-k8s-docker
|
||||
- zuul-jobs-test-registry-buildset-registry-k8s-crio
|
||||
- zuul-jobs-test-registry-buildset-registry-openshift-docker
|
||||
- zuul-jobs-test-install-kubernetes-docker
|
||||
- zuul-jobs-test-install-kubernetes-crio
|
||||
|
Loading…
Reference in New Issue
Block a user