@@ -120,54 +120,120 @@ function create_icsp_connected () {
120120 - registry.stage.redhat.io
121121 source: registry.redhat.io
122122EOF
123- else
124- image_version=" ${test_version// ./ -} "
125- cat << EOF | oc apply -f -
126- apiVersion: operator.openshift.io/v1alpha1
127- kind: ImageContentSourcePolicy
128- metadata:
129- name: logging-registry
130- spec:
131- repositoryDigestMirrors:
132- - source: registry.redhat.io/openshift-logging/cluster-logging-rhel9-operator
133- mirrors:
134- - quay.io/redhat-user-workloads/obs-logging-tenant/cluster-logging-operator-v$image_version
135- - source: registry.redhat.io/openshift-logging/log-file-metric-exporter-rhel9
136- mirrors:
137- - quay.io/redhat-user-workloads/obs-logging-tenant/log-file-metric-exporter-v$image_version
138- - source: registry.redhat.io/openshift-logging/eventrouter-rhel9
139- mirrors:
140- - quay.io/redhat-user-workloads/obs-logging-tenant/logging-eventrouter-v$image_version
141- - source: registry.redhat.io/openshift-logging/vector-rhel9
142- mirrors:
143- - quay.io/redhat-user-workloads/obs-logging-tenant/logging-vector-v$image_version
144- - source: registry.redhat.io/openshift-logging/cluster-logging-operator-bundle
145- mirrors:
146- - quay.io/redhat-user-workloads/obs-logging-tenant/cluster-logging-operator-bundle-v$image_version
147- - source: registry.redhat.io/openshift-logging/loki-operator-bundle
148- mirrors:
149- - quay.io/redhat-user-workloads/obs-logging-tenant/loki-operator-bundle-v$image_version
150- - source: registry.redhat.io/openshift-logging/loki-rhel9-operator
151- mirrors:
152- - quay.io/redhat-user-workloads/obs-logging-tenant/loki-operator-v$image_version
153- - source: registry.redhat.io/openshift-logging/logging-loki-rhel9
154- mirrors:
155- - quay.io/redhat-user-workloads/obs-logging-tenant/logging-loki-v$image_version
156- - source: registry.redhat.io/openshift-logging/lokistack-gateway-rhel9
157- mirrors:
158- - quay.io/redhat-user-workloads/obs-logging-tenant/lokistack-gateway-v$image_version
159- - source: registry.redhat.io/openshift-logging/opa-openshift-rhel9
160- mirrors:
161- - quay.io/redhat-user-workloads/obs-logging-tenant/opa-openshift-v$image_version
123+ elif [[ $test_version == " 5.8" ]]; then
124+ cat << EOF | oc apply -f -
125+ apiVersion: operator.openshift.io/v1alpha1
126+ kind: ImageContentSourcePolicy
127+ metadata:
128+ name: logging-registry
129+ spec:
130+ repositoryDigestMirrors:
131+ - source: registry.redhat.io/openshift-logging/cluster-logging-rhel9-operator
132+ mirrors:
133+ - quay.io/redhat-user-workloads/obs-logging-tenant/cluster-logging-operator-v5-8
134+ - source: registry.redhat.io/openshift-logging/log-file-metric-exporter-rhel9
135+ mirrors:
136+ - quay.io/redhat-user-workloads/obs-logging-tenant/log-file-metric-exporter-v5-8
137+ - source: registry.redhat.io/openshift-logging/eventrouter-rhel9
138+ mirrors:
139+ - quay.io/redhat-user-workloads/obs-logging-tenant/logging-eventrouter-v5-8
140+ - source: registry.redhat.io/openshift-logging/vector-rhel9
141+ mirrors:
142+ - quay.io/redhat-user-workloads/obs-logging-tenant/logging-vector-v5-8
143+ - source: registry.redhat.io/openshift-logging/cluster-logging-operator-bundle
144+ mirrors:
145+ - quay.io/redhat-user-workloads/obs-logging-tenant/cluster-logging-operator-bundle-v5-8
146+ - source: registry.redhat.io/openshift-logging/loki-operator-bundle
147+ mirrors:
148+ - quay.io/redhat-user-workloads/obs-logging-tenant/loki-operator-bundle-v5-8
149+ - source: registry.redhat.io/openshift-logging/loki-rhel9-operator
150+ mirrors:
151+ - quay.io/redhat-user-workloads/obs-logging-tenant/loki-operator-v5-8
152+ - source: registry.redhat.io/openshift-logging/logging-loki-rhel9
153+ mirrors:
154+ - quay.io/redhat-user-workloads/obs-logging-tenant/logging-loki-v5-8
155+ - source: registry.redhat.io/openshift-logging/lokistack-gateway-rhel9
156+ mirrors:
157+ - quay.io/redhat-user-workloads/obs-logging-tenant/lokistack-gateway-v5-8
158+ - source: registry.redhat.io/openshift-logging/opa-openshift-rhel9
159+ mirrors:
160+ - quay.io/redhat-user-workloads/obs-logging-tenant/opa-openshift-v5-8
161+ - source: registry.redhat.io/openshift-logging/elasticsearch-operator-bundle
162+ mirrors:
163+ - quay.io/redhat-user-workloads/obs-logging-tenant/elasticsearch-operator-bundle-v5-8
164+ - source: registry.redhat.io/openshift-logging/elasticsearch-rhel9-operator
165+ mirrors:
166+ - quay.io/redhat-user-workloads/obs-logging-tenant/elasticsearch-operator-v5-8
167+ - source: registry.redhat.io/openshift-logging/elasticsearch-proxy-rhel9
168+ mirrors:
169+ - quay.io/redhat-user-workloads/obs-logging-tenant/elasticsearch-proxy-v5-8
170+ - source: registry.redhat.io/openshift-logging/logging-curator5-rhel9
171+ mirrors:
172+ - quay.io/redhat-user-workloads/obs-logging-tenant/logging-curator5-v5-8
173+ - source: registry.redhat.io/openshift-logging/elasticsearch6-rhel9
174+ mirrors:
175+ - quay.io/redhat-user-workloads/obs-logging-tenant/logging-elasticsearch6-v5-8
176+ - source: registry.redhat.io/openshift-logging/fluentd-rhel9
177+ mirrors:
178+ - quay.io/redhat-user-workloads/obs-logging-tenant/logging-fluentd-v5-8
179+ - source: registry.redhat.io/openshift-logging/logging-view-plugin-rhel9
180+ mirrors:
181+ - quay.io/redhat-user-workloads/obs-logging-tenant/logging-view-plugin-v5-8
182+ - source: registry.redhat.io/openshift-logging/kibana6-rhel8
183+ mirrors:
184+ - quay.io/redhat-user-workloads/obs-logging-tenant/logging-kibana-v5-8
185+ EOF
186+ else
187+ image_version=" ${test_version// ./ -} "
188+ cat << EOF | oc apply -f -
189+ apiVersion: operator.openshift.io/v1alpha1
190+ kind: ImageContentSourcePolicy
191+ metadata:
192+ name: logging-registry
193+ spec:
194+ repositoryDigestMirrors:
195+ - source: registry.redhat.io/openshift-logging/cluster-logging-rhel9-operator
196+ mirrors:
197+ - quay.io/redhat-user-workloads/obs-logging-tenant/cluster-logging-operator-v$image_version
198+ - source: registry.redhat.io/openshift-logging/log-file-metric-exporter-rhel9
199+ mirrors:
200+ - quay.io/redhat-user-workloads/obs-logging-tenant/log-file-metric-exporter-v$image_version
201+ - source: registry.redhat.io/openshift-logging/eventrouter-rhel9
202+ mirrors:
203+ - quay.io/redhat-user-workloads/obs-logging-tenant/logging-eventrouter-v$image_version
204+ - source: registry.redhat.io/openshift-logging/vector-rhel9
205+ mirrors:
206+ - quay.io/redhat-user-workloads/obs-logging-tenant/logging-vector-v$image_version
207+ - source: registry.redhat.io/openshift-logging/cluster-logging-operator-bundle
208+ mirrors:
209+ - quay.io/redhat-user-workloads/obs-logging-tenant/cluster-logging-operator-bundle-v$image_version
210+ - source: registry.redhat.io/openshift-logging/loki-operator-bundle
211+ mirrors:
212+ - quay.io/redhat-user-workloads/obs-logging-tenant/loki-operator-bundle-v$image_version
213+ - source: registry.redhat.io/openshift-logging/loki-rhel9-operator
214+ mirrors:
215+ - quay.io/redhat-user-workloads/obs-logging-tenant/loki-operator-v$image_version
216+ - source: registry.redhat.io/openshift-logging/logging-loki-rhel9
217+ mirrors:
218+ - quay.io/redhat-user-workloads/obs-logging-tenant/logging-loki-v$image_version
219+ - source: registry.redhat.io/openshift-logging/lokistack-gateway-rhel9
220+ mirrors:
221+ - quay.io/redhat-user-workloads/obs-logging-tenant/lokistack-gateway-v$image_version
222+ - source: registry.redhat.io/openshift-logging/opa-openshift-rhel9
223+ mirrors:
224+ - quay.io/redhat-user-workloads/obs-logging-tenant/opa-openshift-v$image_version
162225EOF
163226 fi
227+
164228 if [ $? == 0 ]; then
165229 echo " create the ICSP successfully"
230+ sleep 60
231+ echo " check mcp status"
232+ check_mcp_status
166233 else
167- echo " !!! fail to create the ICSP"
234+ echo " !!! failed to create the ICSP"
168235 return 1
169236 fi
170-
171237}
172238
173239function operator_sdk_install_operator() {
@@ -473,7 +539,15 @@ if [[ ! -z ${index_image} ]]; then
473539 check_marketplace
474540 create_catalog_sources
475541 subscribe_operator " cluster-logging" " openshift-logging"
476- subscribe_operator " loki-operator" " openshift-operators-redhat"
542+ if [[ $test_version == " 5.8" ]]; then
543+ subscribe_operator " elasticsearch-operator" " openshift-operators-redhat"
544+ cluster_minor_version=$( oc get clusterversion/version -ojsonpath=' {.status.desired.version}' 2> /dev/null | cut -d ' .' -f 2)
545+ if (( cluster_minor_version < 16 )) ; then
546+ subscribe_operator " loki-operator" " openshift-operators-redhat"
547+ fi
548+ else
549+ subscribe_operator " loki-operator" " openshift-operators-redhat"
550+ fi
477551else
478552 echo " Install operator via operator-sdk"
479553 # install operator-sdk
504578 * " cluster-logging-operator-bundle" * )
505579 operator_sdk_install_operator $bundle " openshift-logging"
506580 ;;
581+ * " elasticsearch-operator-bundle" * )
582+ operator_sdk_install_operator $bundle " openshift-operators-redhat"
583+ ;;
507584 * )
508585 echo " unkonw bundle $bundle "
509586 ;;
0 commit comments