-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
Showing
2 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- | ||
- name: Create the COO subscription | ||
ansible.builtin.shell: | ||
cmd: | | ||
oc create -f - <<EOF | ||
apiVersion: operators.coreos.com/v1alpha1 | ||
kind: Subscription | ||
metadata: | ||
name: cluster-observability-operator | ||
namespace: openshift-operators | ||
spec: | ||
channel: development | ||
installPlanApproval: Automatic | ||
name: cluster-observability-operator | ||
source: redhat-operators | ||
sourceNamespace: openshift-marketplace | ||
EOF | ||
register: output | ||
|
||
# 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 | ||
- name: Wait for the required resource to be created | ||
ansible.builtin.command: | ||
cmd: | ||
oc get csv --namespace=openshift-operators -l operators.coreos.com/cluster-observability-operator.openshift-operators | ||
delay: 10 | ||
retries: 20 | ||
register: output | ||
until: output.stdout_lines | length != 0 | ||
|
||
- name: Wait for the resources to be available | ||
ansible.builtin.command: | ||
cmd: | | ||
oc wait --timeout=300s --for jsonpath="{.status.phase}"=Succeeded csv --namespace=openshift-operators -l operators.coreos.com/cluster-observability-operator.openshift-operators |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters