@@ -3,7 +3,7 @@ set -e -u -o pipefail
33
44trap cleanup EXIT
55
6- # NOTE: install ObO and run e2e against the installation
6+ # NOTE: install Observability Operator and run e2e against the installation
77
88PROJECT_ROOT=" $( git rev-parse --show-toplevel) "
99declare -r PROJECT_ROOT
@@ -30,10 +30,10 @@ cleanup() {
3030}
3131
3232install_obo () {
33- header " Install ObO "
33+ header " Install Observability Operator "
3434
3535 $NO_INSTALL && {
36- skip " installation of obo "
36+ skip " installation of Observability Operator "
3737 return 0
3838 }
3939
@@ -46,14 +46,14 @@ install_obo() {
4646 oc -n " $OPERATORS_NS " wait --for=condition=CatalogSourcesUnhealthy=False \
4747 subscription.operators.coreos.com observability-operator --timeout=60s
4848
49- ok " ObO subscription is ready"
49+ ok " Observability Operator subscription is ready"
5050 wait_for_operators_ready " $OPERATORS_NS "
5151
5252 enable_ocp
5353}
5454
5555enable_ocp () {
56- # Get ObO CSV json file
56+ # Get Observability Operator CSV json file
5757 CSV_NAME=$( oc -n " $OPERATORS_NS " get sub observability-operator -o jsonpath=' {.status.installedCSV}' )
5858 CSV_JSON_FILE=$( mktemp /tmp/" $CSV_NAME " XXXXXX.json)
5959 if [ -e " $CSV_JSON_FILE " ]; then
@@ -65,9 +65,9 @@ enable_ocp() {
6565 retry_count=0
6666 while [ " $retry_count " -lt " $max_retries " ]; do
6767 oc -n " $OPERATORS_NS " get csv " ${CSV_NAME} " -o json > " $CSV_JSON_FILE "
68- # Update CSV json file to enable OCP mode
69- ARGS_JSON=$( printf ' %s\n' " --openshift.enabled=true" | jq -R . | jq -s .)
70- jq --arg container_name operator --argjson args " $ARGS_JSON " '
68+ # Update the CSV manifest to enable the OpenShift features.
69+ ARGS_JSON=$( printf ' %s\n' " --openshift.enabled=true" | jq -R . | jq -s .)
70+ jq --arg container_name operator --argjson args " $ARGS_JSON " '
7171 (.spec.install.spec.deployments[].spec.template.spec.containers[] | select(.name == $container_name) | .args) += $args
7272 ' " $CSV_JSON_FILE " > /tmp/tmp.$$ .json && mv /tmp/tmp.$$ .json " $CSV_JSON_FILE "
7373 ok " Added arguments to container operator in '$CSV_JSON_FILE '."
@@ -85,38 +85,38 @@ enable_ocp() {
8585 fi
8686 done
8787
88- rm -f " $CSV_JSON_FILE "
88+ rm -f " $CSV_JSON_FILE "
8989
90- # enable platform monitoring
91- oc label ns " $OPERATORS_NS " openshift.io/cluster-monitoring=true
90+ # Enable platform monitoring.
91+ oc label ns " $OPERATORS_NS " openshift.io/cluster-monitoring=true
9292
93- oc wait --for=condition=Established crd/uiplugins.observability.openshift.io --timeout=60s
94- ok " Enable OCP mode successfully"
93+ oc wait --for=condition=Established crd/uiplugins.observability.openshift.io --timeout=60s
94+ ok " Enable OCP mode successfully"
9595}
9696
9797delete_obo () {
98- header " Deleting ObO subscription"
98+ header " Deleting Observability Operator subscription"
9999
100- $NO_UNINSTALL && {
101- skip " uninstallation of obo "
102- return 0
103- }
100+ $NO_UNINSTALL && {
101+ skip " uninstallation of Observability Operator "
102+ return 0
103+ }
104104
105- oc delete -n " $OPERATORS_NS " csv \
106- -l operators.coreos.com/observability-operator." $OPERATORS_NS " = || true
105+ oc delete -n " $OPERATORS_NS " csv \
106+ -l operators.coreos.com/observability-operator." $OPERATORS_NS " = || true
107107
108- oc delete -n " $OPERATORS_NS " installplan,subscriptions \
109- -l operators.coreos.com/observability-operator." $OPERATORS_NS " = || true
108+ oc delete -n " $OPERATORS_NS " installplan,subscriptions \
109+ -l operators.coreos.com/observability-operator." $OPERATORS_NS " = || true
110110
111- oc delete -f hack/olm/subscription.yaml || true
112- oc delete -f hack/olm/catalog-src.yaml || true
113- oc delete crds " $( oc api-resources --api-group=monitoring.rhobs -o name) "
114- ok " uninstalled ObO "
111+ oc delete -f hack/olm/subscription.yaml || true
112+ oc delete -f hack/olm/catalog-src.yaml || true
113+ oc delete crds " $( oc api-resources --api-group=monitoring.rhobs -o name) "
114+ ok " Observability operator uninstalled "
115115}
116116
117117parse_args () {
118- # ## while there are args parse them
119- while [[ -n " ${1+xxx} " ]]; do
118+ # ## while there are args parse them
119+ while [[ -n " ${1+xxx} " ]]; do
120120 case $1 in
121121 -h | --help)
122122 SHOW_USAGE=true
@@ -154,8 +154,8 @@ print_usage() {
154154
155155 Options:
156156 -h|--help show this help
157- --no-install do not install OBO , useful for rerunning tests
158- --no-uninstall do not uninstall OBO after test
157+ --no-install do not install Observability Operator , useful for rerunning tests
158+ --no-uninstall do not uninstall Observability Operator after test
159159 --postpone-restoration DURATION
160160 delay operator Subscription restoration after uninstall
161161 tests (e.g. 10m) to allow manual cluster inspection
0 commit comments