test: Introduce Helm-based functional test
This change introduces an operator functional test that is related to the existing template-based functional test (and indeed re-uses most elements of it). The primary differences are: (1) we do the install using helm (2) the operator deployment derives its name from the helm app name This test also configure the helm chart such that the PXC operator and cert-manager are installed as this an underlying requirement of the test. Change-Id: Ibd8add5fffbe8bff798ccffebfb3c0c5eb17f619
This commit is contained in:
parent
5a493beb6d
commit
32b61e2d9c
25
.zuul.yaml
25
.zuul.yaml
|
@ -16,14 +16,29 @@
|
||||||
- job:
|
- job:
|
||||||
description: Operator integration tests with Kubernetes
|
description: Operator integration tests with Kubernetes
|
||||||
name: zuul-operator-functional-k8s
|
name: zuul-operator-functional-k8s
|
||||||
|
abstract: true
|
||||||
parent: zuul-operator-functional
|
parent: zuul-operator-functional
|
||||||
pre-run:
|
pre-run:
|
||||||
- playbooks/zuul-operator-functional/pre-k8s.yaml
|
- playbooks/zuul-operator-functional/pre-k8s.yaml
|
||||||
- playbooks/zuul-operator-functional/install_templates.yaml
|
|
||||||
nodeset: ubuntu-bionic
|
nodeset: ubuntu-bionic
|
||||||
vars:
|
vars:
|
||||||
namespace: 'default'
|
namespace: 'default'
|
||||||
|
|
||||||
|
- job:
|
||||||
|
description: Operator integration tests with Kubernetes using templates
|
||||||
|
name: zuul-operator-functional-k8s-template
|
||||||
|
parent: zuul-operator-functional-k8s
|
||||||
|
pre-run:
|
||||||
|
- playbooks/zuul-operator-functional/install_templates.yaml
|
||||||
|
|
||||||
|
- job:
|
||||||
|
description: Operation integration tests with Kubernetes using helm
|
||||||
|
name: zuul-operator-functional-k8s-helm
|
||||||
|
parent: zuul-operator-functional-k8s
|
||||||
|
pre-run:
|
||||||
|
- playbooks/zuul-operator-functional/pre-k8s.yaml
|
||||||
|
- playbooks/zuul-operator-functional/install_helm.yaml
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
description: Image and buildset registry job
|
description: Image and buildset registry job
|
||||||
name: zuul-operator-build-image
|
name: zuul-operator-build-image
|
||||||
|
@ -113,7 +128,9 @@
|
||||||
- zuul-nox-docs
|
- zuul-nox-docs
|
||||||
- zuul-operator-helm-lint
|
- zuul-operator-helm-lint
|
||||||
- zuul-operator-build-image
|
- zuul-operator-build-image
|
||||||
- zuul-operator-functional-k8s:
|
- zuul-operator-functional-k8s-template:
|
||||||
|
dependencies: zuul-operator-build-image
|
||||||
|
- zuul-operator-functional-k8s-helm:
|
||||||
dependencies: zuul-operator-build-image
|
dependencies: zuul-operator-build-image
|
||||||
gate:
|
gate:
|
||||||
jobs:
|
jobs:
|
||||||
|
@ -121,8 +138,10 @@
|
||||||
- zuul-nox-docs
|
- zuul-nox-docs
|
||||||
- zuul-operator-helm-lint
|
- zuul-operator-helm-lint
|
||||||
- zuul-operator-upload-image
|
- zuul-operator-upload-image
|
||||||
- zuul-operator-functional-k8s:
|
- zuul-operator-functional-k8s-template:
|
||||||
dependencies: zuul-operator-upload-image
|
dependencies: zuul-operator-upload-image
|
||||||
|
- zuul-operator-functional-k8s-helm:
|
||||||
|
dependencies: zuul-operator-build-image
|
||||||
promote:
|
promote:
|
||||||
jobs:
|
jobs:
|
||||||
- zuul-promote-nox-docs
|
- zuul-promote-nox-docs
|
||||||
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
- name: install and start zuul operator
|
||||||
|
hosts: all
|
||||||
|
roles:
|
||||||
|
- role: ensure-helm
|
||||||
|
vars:
|
||||||
|
helm_version: 3.10.1
|
||||||
|
vars:
|
||||||
|
# Override this if you are running the operator interactively
|
||||||
|
# locally for development.
|
||||||
|
install_operator: true
|
||||||
|
zuul_work_dir: "{{ zuul.projects['opendev.org/zuul/zuul-operator'].src_dir }}"
|
||||||
|
tasks:
|
||||||
|
- name: Install Operator
|
||||||
|
when: install_operator
|
||||||
|
command: helm install --set image.tag=latest,cert-manager.enabled=true,pxc-operator.enabled=true test helm/zuul-operator
|
||||||
|
args:
|
||||||
|
chdir: "{{ zuul_work_dir }}"
|
||||||
|
|
||||||
|
- name: Wait for operator deployment
|
||||||
|
when: install_operator
|
||||||
|
command: timeout 8m kubectl rollout status deployment/test-zuul-operator
|
Loading…
Reference in New Issue