diff --git a/Makefile b/Makefile index cf5ebd665..f3485279e 100644 --- a/Makefile +++ b/Makefile @@ -348,6 +348,11 @@ install-che-operands: generate manifests download-kustomize download-gateway-res fi $(K8S_CLI) scale deploy che-operator -n $(ECLIPSE_CHE_NAMESPACE) --replicas=0 + + # Disable Webhooks since che operator pod is scaled down + $(K8S_CLI) delete validatingwebhookconfiguration org.eclipse.che + $(K8S_CLI) patch crd checlusters.org.eclipse.che --patch '{"spec": {"conversion": null}}' --type=merge + $(MAKE) store_tls_cert $(MAKE) create-checluster-cr @@ -397,9 +402,6 @@ bundle: generate manifests download-kustomize download-operator-sdk ## Generate --channels $(CHANNEL) \ --default-channel $(CHANNEL) - # Remove service from the bundle since OLM create that itself - rm $${BUNDLE_PATH}/manifests/che-operator-service_v1_service.yaml - # Rename clusterserviceversion file mv $${BUNDLE_PATH}/manifests/$(ECLIPSE_CHE_PACKAGE_NAME).clusterserviceversion.yaml $${CSV_PATH} diff --git a/build/scripts/olm/testUpdate.sh b/build/scripts/olm/testUpdate.sh index e5d15c188..a8ecb47ed 100755 --- a/build/scripts/olm/testUpdate.sh +++ b/build/scripts/olm/testUpdate.sh @@ -59,7 +59,7 @@ run() { discoverEclipseCheBundles ${CHANNEL} - if [[ "${PREVIOUS_VERSION}" == "${LATEST_VERSION}" ]]; then + if [[ "${PREVIOUS_CSV_NAME}" == "${LATEST_CSV_NAME}" ]]; then echo "[ERROR] Nothing to update. OLM channel '${CHANNEL}' contains only one bundle '${LATEST_CSV_NAME}'" exit 1 fi diff --git a/bundle/next/eclipse-che-preview-openshift/manifests/che-operator-service_v1_service.yaml b/bundle/next/eclipse-che-preview-openshift/manifests/che-operator-service_v1_service.yaml new file mode 100644 index 000000000..1582ede40 --- /dev/null +++ b/bundle/next/eclipse-che-preview-openshift/manifests/che-operator-service_v1_service.yaml @@ -0,0 +1,31 @@ +# +# Copyright (c) 2019-2021 Red Hat, Inc. +# This program and the accompanying materials are made +# available under the terms of the Eclipse Public License 2.0 +# which is available at https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# +# Contributors: +# Red Hat, Inc. - initial API and implementation +# + +apiVersion: v1 +kind: Service +metadata: + creationTimestamp: null + labels: + app.kubernetes.io/component: che-operator + app.kubernetes.io/instance: che + app.kubernetes.io/managed-by: olm + app.kubernetes.io/name: che + app.kubernetes.io/part-of: che.eclipse.org + name: che-operator-service +spec: + ports: + - port: 443 + targetPort: 9443 + selector: + app: che-operator +status: + loadBalancer: {} diff --git a/bundle/next/eclipse-che-preview-openshift/manifests/che-operator.clusterserviceversion.yaml b/bundle/next/eclipse-che-preview-openshift/manifests/che-operator.clusterserviceversion.yaml index 5a3c6f8a8..c1b8966b8 100644 --- a/bundle/next/eclipse-che-preview-openshift/manifests/che-operator.clusterserviceversion.yaml +++ b/bundle/next/eclipse-che-preview-openshift/manifests/che-operator.clusterserviceversion.yaml @@ -77,7 +77,7 @@ metadata: operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 repository: https://github.com/eclipse-che/che-operator support: Eclipse Foundation - name: eclipse-che-preview-openshift.v7.55.0-690.next + name: eclipse-che-preview-openshift.v7.55.0-693.next namespace: placeholder spec: apiservicedefinitions: {} @@ -1230,7 +1230,7 @@ spec: maturity: stable provider: name: Eclipse Foundation - version: 7.55.0-690.next + version: 7.55.0-693.next webhookdefinitions: - admissionReviewVersions: - v1 diff --git a/config/openshift/olm/kustomization.yaml b/config/openshift/olm/kustomization.yaml index 81f8b82ba..5ba6dd1b8 100644 --- a/config/openshift/olm/kustomization.yaml +++ b/config/openshift/olm/kustomization.yaml @@ -21,6 +21,7 @@ resources: patchesStrategicMerge: - patches/extralabels_in_checlusters.yaml + - patches/extralabels_in_service.yaml patchesJson6902: - target: diff --git a/config/openshift/olm/patches/extralabels_in_service.yaml b/config/openshift/olm/patches/extralabels_in_service.yaml new file mode 100644 index 000000000..0f6805a06 --- /dev/null +++ b/config/openshift/olm/patches/extralabels_in_service.yaml @@ -0,0 +1,19 @@ +# +# Copyright (c) 2019-2021 Red Hat, Inc. +# This program and the accompanying materials are made +# available under the terms of the Eclipse Public License 2.0 +# which is available at https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# +# Contributors: +# Red Hat, Inc. - initial API and implementation +# + +apiVersion: v1 +kind: Service +metadata: + name: che-operator-service + namespace: eclipse-che + labels: + app.kubernetes.io/managed-by: olm \ No newline at end of file