Skip to content

Commit d854d10

Browse files
committed
Run minimal watcher tempest api test
Thanks to watcher api service and tls integration, we are now able to run watcher_tempest_plugin.tests.api.admin.test_api_discovery.TestApiDiscovery[1] test in EDPM CI. It will act as a base for keep existing watcher integration healthy. Links: [1]. openstack-k8s-operators#47 (comment) Signed-off-by: Chandan Kumar (raukadah) <[email protected]>
1 parent 8fa5ab6 commit d854d10

File tree

4 files changed

+102
-7
lines changed

4 files changed

+102
-7
lines changed

.zuul.yaml

Lines changed: 69 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@
22
- project:
33
name: openstack-k8s-operators/watcher-operator
44
default-branch: main
5+
templates:
6+
- opendev-master-watcher-operator-pipeline
57
github-check:
68
jobs:
79
- noop
810
- watcher-operator-doc-preview
9-
- openstack-meta-content-provider:
10-
vars:
11-
cifmw_operator_build_meta_build: false
1211
- watcher-operator-validation
1312
- watcher-operator-kuttl
1413

1514
- job:
1615
name: watcher-operator-base
16+
override-checkout: main
1717
parent: podified-multinode-edpm-deployment-crc-2comp
18-
dependencies: ["openstack-meta-content-provider"]
18+
dependencies: ["openstack-meta-content-provider-master"]
1919
description: |
2020
A multinode EDPM Zuul job which has one ansible controller, one
2121
extracted crc and two computes. It will be used for testing watcher-operator.
@@ -45,9 +45,19 @@
4545
# whole test suite
4646
cifmw_test_operator_tempest_include_list: |
4747
watcher_tempest_plugin.tests.api.admin.test_api_discovery.TestApiDiscovery
48+
# Donot use openstack services containers from meta content provider master
49+
# job.
50+
cifmw_update_containers_openstack: false
51+
extra-vars:
52+
# Override zuul meta content provider provided content_provider_dlrn_md5_hash
53+
# var. As returned dlrn md5 hash comes from master release but job is using
54+
# antelope content.
55+
content_provider_dlrn_md5_hash: ''
4856

4957
- job:
5058
name: watcher-operator-kuttl
59+
override-checkout: main
60+
dependencies: ["openstack-meta-content-provider-master"]
5161
parent: cifmw-multinode-kuttl-operator-target
5262
description: |
5363
A zuul job to run watcher operator kuttl tests.
@@ -66,6 +76,11 @@
6676
source: "{{ watcher_hook }}"
6777
extra_vars:
6878
watcher_catalog_image: "{{ content_provider_registry_ip }}:5001/openstack-k8s-operators/watcher-operator-index:{{ zuul.patchset }}"
79+
extra-vars:
80+
# Override zuul meta content provider provided content_provider_dlrn_md5_hash
81+
# var. As returned dlrn md5 hash comes from master release but job is using
82+
# antelope content.
83+
content_provider_dlrn_md5_hash: ''
6984

7085
- job:
7186
name: watcher-operator-doc-preview
@@ -76,3 +91,53 @@
7691
vars:
7792
asciidoc_available: true
7893
doc_available: false
94+
95+
##########################################################
96+
# #
97+
# Master Zuul Jobs #
98+
# #
99+
##########################################################
100+
101+
102+
- job:
103+
name: openstack-meta-content-provider-master
104+
override-checkout: main
105+
description: |
106+
A zuul job building content from OpenDev master release.
107+
parent: openstack-meta-content-provider
108+
vars:
109+
cifmw_operator_build_meta_build: false
110+
cifmw_bop_openstack_release: master
111+
cifmw_bop_dlrn_baseurl: "https://trunk.rdoproject.org/centos9-master"
112+
cifmw_repo_setup_branch: master
113+
cifmw_build_containers_registry_namespace: podified-master-centos9
114+
115+
- job:
116+
name: watcher-operator-validation-master
117+
parent: watcher-operator-validation
118+
override-checkout: main
119+
description: |
120+
A Zuul job consuming content from openstack-meta-content-provider-master
121+
and deploying EDPM with master content.
122+
dependencies: ["openstack-meta-content-provider-master"]
123+
vars:
124+
cifmw_repo_setup_branch: master
125+
# To consume containers from meta content provider
126+
cifmw_update_containers_openstack: true
127+
128+
##########################################################
129+
# #
130+
# Project Template #
131+
# #
132+
##########################################################
133+
134+
- project-template:
135+
name: opendev-master-watcher-operator-pipeline
136+
description: |
137+
Project template to run meta content provider and
138+
EDPM job with master opendev and github operator
139+
content.
140+
github-check:
141+
jobs:
142+
- openstack-meta-content-provider-master
143+
- watcher-operator-validation-master

Makefile

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -375,8 +375,14 @@ update-watcher-csv:
375375
fi
376376

377377
CATALOG_IMAGE ?= quay.io/openstack-k8s-operators/watcher-operator-index:latest
378+
WATCHER_API_IMAGE_URL_DEFAULT ?= quay.io/podified-master-centos9/openstack-watcher-api:current-podified
379+
WATCHER_DECISION_ENGINE_IMAGE_URL_DEFAULT ?= quay.io/podified-master-centos9/openstack-watcher-decision-engine:current-podified
380+
WATCHER_APPLIER_IMAGE_URL_DEFAULT ?= quay.io/podified-master-centos9/openstack-watcher-applier:current-podified
378381

379382
.PHONY: watcher
383+
watcher: export WATCHER_API_IMAGE=${WATCHER_API_IMAGE_URL_DEFAULT}
384+
watcher: export WATCHER_DECISION_ENGINE_IMAGE=${WATCHER_DECISION_ENGINE_IMAGE_URL_DEFAULT}
385+
watcher: export WATCHER_APPLIER_IMAGE=${WATCHER_APPLIER_IMAGE_URL_DEFAULT}
380386
watcher: export CATALOG_IMG=${CATALOG_IMAGE}
381387
watcher: ## Install watcher operator via olm
382388
bash ci/olm.sh
@@ -449,9 +455,9 @@ SKIP_CERT ?=false
449455
.PHONY: run-with-webhook
450456
run-with-webhook: export METRICS_PORT?=33080
451457
run-with-webhook: export HEALTH_PORT?=33081
452-
run-with-webhook: export WATCHER_API_IMAGE_URL_DEFAULT=quay.io/podified-master-centos9/openstack-watcher-api:current-podified
453-
run-with-webhook: export WATCHER_DECISION_ENGINE_IMAGE_URL_DEFAULT=quay.io/podified-master-centos9/openstack-watcher-decision-engine:current-podified
454-
run-with-webhook: export WATCHER_APPLIER_IMAGE_URL_DEFAULT=quay.io/podified-master-centos9/openstack-watcher-applier:current-podified
458+
run-with-webhook: export WATCHER_API_IMAGE_URL_DEFAULT=${WATCHER_API_IMAGE_URL_DEFAULT}
459+
run-with-webhook: export WATCHER_DECISION_ENGINE_IMAGE_URL_DEFAULT=${WATCHER_DECISION_ENGINE_IMAGE_URL_DEFAULT}
460+
run-with-webhook: export WATCHER_APPLIER_IMAGE_URL_DEFAULT=${WATCHER_APPLIER_IMAGE_URL_DEFAULT}
455461
run-with-webhook: manifests generate fmt vet ## Run a controller from your host.
456462
/bin/bash hack/clean_local_webhook.sh
457463
/bin/bash hack/run_with_local_webhook.sh

ci/olm.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,12 @@ spec:
3333
channel: alpha
3434
source: watcher-operator-index
3535
sourceNamespace: openstack-operators
36+
config:
37+
env:
38+
- name: WATCHER_API_IMAGE_URL_DEFAULT
39+
value: ${WATCHER_API_IMAGE}
40+
- name: WATCHER_DECISION_ENGINE_IMAGE_URL_DEFAULT
41+
value: ${WATCHER_DECISION_ENGINE_IMAGE}
42+
- name: WATCHER_APPLIER_IMAGE_URL_DEFAULT
43+
value: ${WATCHER_APPLIER_IMAGE}
3644
EOF_CAT

ci/playbooks/deploy_watcher_service.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,29 @@
88
KUBECONFIG: "{{ cifmw_openshift_kubeconfig }}"
99
PATH: "{{ cifmw_path }}"
1010
tasks:
11+
- name: Fetch dlrn md5_hash from master DLRN repo
12+
when: content_provider_dlrn_md5_hash | length == 0
13+
ansible.builtin.uri:
14+
url: "https://{{ watcher_dlrn_server | default('trunk.rdoproject.org') }}/{{ watcher_dlrn_namespace | default('centos9-master') }}/{{ watcher_dlrn_tag | default('current-podified') }}/delorean.repo.md5"
15+
return_content: true
16+
register: latest_dlrn_tag
17+
until: latest_dlrn_tag.status == 200
18+
retries: 6
19+
delay: 5
20+
1121
- name: Install Watcher Operator
22+
vars:
23+
_tag: "{{ latest_dlrn_tag.content | default('current-podified') }}"
24+
_registry_url: "{{ content_provider_os_registry_url | default('quay.io/podified-master-centos9') }}"
1225
cifmw.general.ci_script:
1326
output_dir: "{{ cifmw_basedir }}/artifacts"
1427
chdir: "{{ ansible_user_dir }}/src/github.com/openstack-k8s-operators/watcher-operator"
1528
script: make watcher
1629
extra_args:
1730
CATALOG_IMAGE: "{{ watcher_catalog_image | default('quay.io/openstack-k8s-operators/watcher-operator-index:latest') }}"
31+
WATCHER_API_IMAGE_URL_DEFAULT: "{{ content_provider_os_registry_url }}/openstack-watcher-api:{{ _tag }}"
32+
WATCHER_DECISION_ENGINE_IMAGE_URL_DEFAULT: "{{ content_provider_os_registry_url }}/openstack-watcher-decision-engine:{{ _tag }}"
33+
WATCHER_APPLIER_IMAGE_URL_DEFAULT: "{{ content_provider_os_registry_url }}/openstack-watcher-applier:{{ _tag }}"
1834

1935
- name: Deploy Watcher service
2036
when: deploy_watcher_service | default('true') | bool

0 commit comments

Comments
 (0)