Skip to content

Commit cd7d738

Browse files
committed
Install Cluster Observability Operator in zuul jobs
Watcher relies on MetricStorage provided by telemetry which uses OpenShift Cluster Observability Operator. This patch is installing the operator before deploying the watcher operator so that we have it running before doing kuttl preparation steps.
1 parent 4b402a5 commit cd7d738

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
- name: Create the COO subscription
3+
ansible.builtin.shell:
4+
cmd: |
5+
oc create -f - <<EOF
6+
apiVersion: operators.coreos.com/v1alpha1
7+
kind: Subscription
8+
metadata:
9+
name: cluster-observability-operator
10+
namespace: openshift-operators
11+
spec:
12+
channel: development
13+
installPlanApproval: Automatic
14+
name: cluster-observability-operator
15+
source: redhat-operators
16+
sourceNamespace: openshift-marketplace
17+
EOF
18+
register: output
19+
20+
# need to have a wait here, since the csv is not created immediately. There is a slight delay, during which time, the oc wait command would fail, since there's no resource to watch
21+
- name: Wait for the required resource to be created
22+
ansible.builtin.command:
23+
cmd:
24+
oc get csv --namespace=openshift-operators -l operators.coreos.com/cluster-observability-operator.openshift-operators
25+
delay: 10
26+
retries: 20
27+
register: output
28+
until: output.stdout_lines | length != 0
29+
30+
- name: Wait for the resources to be available
31+
ansible.builtin.command:
32+
cmd: |
33+
oc wait --timeout=300s --for jsonpath="{.status.phase}"=Succeeded csv --namespace=openshift-operators -l operators.coreos.com/cluster-observability-operator.openshift-operators

ci/playbooks/deploy_watcher_service.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
KUBECONFIG: "{{ cifmw_openshift_kubeconfig }}"
99
PATH: "{{ cifmw_path }}"
1010
tasks:
11+
- name: Import tasks for creating COO subscription
12+
ansible.builtin.include_tasks: "create-coo-subscription.yaml"
13+
1114
- name: Install Watcher Operator
1215
cifmw.general.ci_script:
1316
output_dir: "{{ cifmw_basedir }}/artifacts"

0 commit comments

Comments
 (0)