fix: ReAdd che-operator-service into OLM bundle (#1529)

* fix: ReAdd che-operator-service into OLM bundle

Signed-off-by: Anatolii Bazko <abazko@redhat.com>
pull/1530/head
Anatolii Bazko 2022-09-28 13:51:38 +03:00 committed by GitHub
parent 2c7637d468
commit 5ed85fe7fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 59 additions and 6 deletions

View File

@ -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}

View File

@ -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

View File

@ -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: {}

View File

@ -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

View File

@ -21,6 +21,7 @@ resources:
patchesStrategicMerge:
- patches/extralabels_in_checlusters.yaml
- patches/extralabels_in_service.yaml
patchesJson6902:
- target:

View File

@ -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