feat: Rename stable-all-namespaces channel to tech-preview-stable-all-namespaces

Signed-off-by: Flavius Lacatusu <flacatus@redhat.com>
pull/1051/head
Flavius Lacatusu 2021-09-06 09:42:32 +02:00
parent e5b0625d69
commit 9d143391bb
No known key found for this signature in database
GPG Key ID: 1F5C00691820AC13
19 changed files with 24 additions and 22 deletions

2
.gitignore vendored
View File

@ -118,7 +118,7 @@ bundle/next/eclipse-che-preview-kubernetes/generated
bundle/next/eclipse-che-preview-openshift/generated
bundle/stable/eclipse-che-preview-kubernetes/generated
bundle/stable/eclipse-che-preview-openshift/generated
bundle/stable-all-namespaces/eclipse-che-preview-openshift/generated
bundle/tech-preview-stable-all-namespaces/eclipse-che-preview-openshift/generated
testbin/setup-envtest.sh

View File

@ -143,19 +143,19 @@ $ chectl server:deploy --installer=olm --platform=<CHECTL_SUPPORTED_PLATFORM> --
Eclipse Che introduced a new channel which installs Eclipse Che in AllNamespace mode with Devworkspace Operator like an OLM dependency.
More info about DevWorkspace Operator can be found [here](https://github.com/devfile/devworkspace-operator).
Before installing Eclipse Che using channel `stable-all-namespaces` we need to consider the following:
Before installing Eclipse Che using channel `tech-preview-stable-all-namespaces` we need to consider the following:
* It is not possible to have Eclipse Che installed in single Namespace (currently the default one) and then try to install Che in All Namespace mode using the new channel stable-all-namespaces.
* To update to stable-all-namespaces channel you need first to remove all subscriptions created for Che installed from next or stable
* It is not possible to have Eclipse Che installed in single Namespace (currently the default one) and then try to install Che in All Namespace mode using the new channel tech-preview-stable-all-namespaces.
* To update to tech-preview-stable-all-namespaces channel you need first to remove all subscriptions created for Che installed from next or stable
channels. IMPORTANT: Removing subscriptions doesnt mean Eclipse Che operands(che-server, keycloak or roles) will be removed from the cluster.
* DevWorkspace engine will be by default enabled in the new channel.
* In case if you have already installed Che with DevWorkspace engine enabled from channels next or stable you need to remove all DevWorkspace resources from the cluster following the next [scripts](https://github.com/devfile/devworkspace-operator/blob/main/build/make/deploy.mk#L77).
* `stable-all-namespaces` channel is supported only in OpenShift.
* `tech-preview-stable-all-namespaces` channel is supported only in OpenShift.
If the OpenShift Cluster already have all these considerations done you can proceed to install the Eclipse Che using stable-all-namespaces channel from OperatorHub or using the new channel you need to perform the following chectl command:
If the OpenShift Cluster already have all these considerations done you can proceed to install the Eclipse Che using tech-preview-stable-all-namespaces channel from OperatorHub or using the new channel you need to perform the following chectl command:
```bash
chectl server:deploy --installer=olm --platform=openshift --olm-channel=stable-all-namespaces
chectl server:deploy --installer=olm --platform=openshift --olm-channel=tech-preview-stable-all-namespaces
```
### Deploy Che operator using operator-sdk

View File

@ -5,8 +5,8 @@ LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1
LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/
LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/
LABEL operators.operatorframework.io.bundle.package.v1=eclipse-che-preview-openshift
LABEL operators.operatorframework.io.bundle.channels.v1=stable-all-namespaces
LABEL operators.operatorframework.io.bundle.channel.default.v1=stable-all-namespaces
LABEL operators.operatorframework.io.bundle.channels.v1=tech-preview-stable-all-namespaces
LABEL operators.operatorframework.io.bundle.channel.default.v1=tech-preview-stable-all-namespaces
LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.7.1+git
LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1
LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v3

View File

@ -1,5 +1,5 @@
--- /home/runner/work/che-operator/che-operator/bundle/stable-all-namespaces/eclipse-che-preview-openshift/generated/openshift/che-operator.clusterserviceversion.yaml 2021-09-01 12:09:22.551607799 +0000
+++ /home/runner/work/che-operator/che-operator/bundle/stable-all-namespaces/eclipse-che-preview-openshift/manifests/che-operator.clusterserviceversion.yaml 2021-09-01 12:10:19.199632303 +0000
--- /home/runner/work/che-operator/che-operator/bundle/tech-preview-stable-all-namespaces/eclipse-che-preview-openshift/generated/openshift/che-operator.clusterserviceversion.yaml 2021-09-01 12:09:22.551607799 +0000
+++ /home/runner/work/che-operator/che-operator/bundle/tech-preview-stable-all-namespaces/eclipse-che-preview-openshift/manifests/che-operator.clusterserviceversion.yaml 2021-09-01 12:10:19.199632303 +0000
@@ -41,7 +41,7 @@
"externalDb": false
},

View File

@ -4,8 +4,8 @@ annotations:
operators.operatorframework.io.bundle.manifests.v1: manifests/
operators.operatorframework.io.bundle.metadata.v1: metadata/
operators.operatorframework.io.bundle.package.v1: eclipse-che-preview-openshift
operators.operatorframework.io.bundle.channels.v1: stable-all-namespaces
operators.operatorframework.io.bundle.channel.default.v1: stable-all-namespaces
operators.operatorframework.io.bundle.channels.v1: tech-preview-stable-all-namespaces
operators.operatorframework.io.bundle.channel.default.v1: tech-preview-stable-all-namespaces
operators.operatorframework.io.metrics.builder: operator-sdk-v1.6.1+git
operators.operatorframework.io.metrics.mediatype.v1: metrics+v1
operators.operatorframework.io.metrics.project_layout: go.kubebuilder.io/v3

View File

@ -28,7 +28,7 @@ init() {
FORCE_UPDATE=""
BUILDX_PLATFORMS="linux/amd64,linux/ppc64le"
DEV_WORKSPACE_CONTROLLER_VERSION="main"
STABLE_CHANNELS=("stable-all-namespaces" "stable")
STABLE_CHANNELS=("tech-preview-stable-all-namespaces" "stable")
if [[ $# -lt 1 ]]; then usage; exit; fi
@ -255,7 +255,7 @@ pushOlmBundlesToQuayIo() {
echo "[INFO] releaseOperatorCode :: Login to quay.io..."
docker login quay.io -u "${QUAY_ECLIPSE_CHE_USERNAME}" -p "${QUAY_ECLIPSE_CHE_PASSWORD}"
echo "[INFO] Push OLM bundles to quay.io"
. ${RELEASE_DIR}/olm/buildAndPushBundleImages.sh -c "stable-all-namespaces" -p "openshift" -f "true"
. ${RELEASE_DIR}/olm/buildAndPushBundleImages.sh -c "tech-preview-stable-all-namespaces" -p "openshift" -f "true"
. ${RELEASE_DIR}/olm/buildAndPushBundleImages.sh -c "stable" -p "kubernetes" -f "true"
. ${RELEASE_DIR}/olm/buildAndPushBundleImages.sh -c "stable" -p "openshift" -f "true"
}

View File

@ -21,7 +21,7 @@ CURRENT_DIR=$(pwd)
SCRIPT=$(readlink -f "${BASH_SOURCE[0]}")
BASE_DIR=$(dirname "$(dirname "$SCRIPT")")
PLATFORMS="kubernetes,openshift"
STABLE_CHANNELS=("stable-all-namespaces" "stable")
STABLE_CHANNELS=("tech-preview-stable-all-namespaces" "stable")
source "${BASE_DIR}/olm/check-yq.sh"
base_branch="main"
@ -116,13 +116,15 @@ do
for channel in "${STABLE_CHANNELS[@]}"
do
if [[ $channel == "stable-all-namespaces" && $platform == "kubernetes" ]];then
getLatestsStableVersions
if [[ $channel == "tech-preview-stable-all-namespaces" && $platform == "kubernetes" ]];then
continue
fi
if [[ $channel == "stable-all-namespaces" ]];then
if [[ $channel == "tech-preview-stable-all-namespaces" ]];then
# Add suffix for stable-<all-namespaces> channel
LAST_PACKAGE_VERSION="$LAST_PACKAGE_VERSION-all-namespaces"
PREVIOUS_PACKAGE_VERSION="${PREVIOUS_PACKAGE_VERSION}-all-namespaces"
fi
echo

View File

@ -90,7 +90,7 @@ do
source ${BASE_DIR}/olm.sh
echo "[INFO] Creating release '${RELEASE}' for platform '${platform}'"
if [[ ${CHANNEL} == "stable-all-namespaces" ]] && [[ ${platform} == "kubernetes" ]];then
if [[ ${CHANNEL} == "tech-preview-stable-all-namespaces" ]] && [[ ${platform} == "kubernetes" ]];then
continue
fi
@ -128,7 +128,7 @@ do
-e "s/${lastPackageNextVersion}/${RELEASE}/" \
-e "s/createdAt:.*$/createdAt: \"$(date -u +%FT%TZ)\"/" "${LAST_NEXT_CSV}" > "${RELEASE_CSV}"
if [[ ${CHANNEL} == "stable-all-namespaces" ]];then
if [[ ${CHANNEL} == "tech-preview-stable-all-namespaces" ]];then
# Set by default devworkspace enabled
CR_SAMPLE=$(yq -r ".metadata.annotations.\"alm-examples\"" "${RELEASE_CSV}" | yq -r ".[0] | .spec.devWorkspace.enable |= true | [.]" | sed -r 's/"/\\"/g')
yq -rY " (.metadata.annotations.\"alm-examples\") = \"${CR_SAMPLE}\"" "${RELEASE_CSV}" > "${RELEASE_CSV}.old"
@ -137,7 +137,7 @@ do
# Move the suggested namespace to openshift-operators.
sed -ri 's|operatorframework.io/suggested-namespace: eclipse-che|operatorframework.io/suggested-namespace: openshift-operators|' "${RELEASE_CSV}"
# Set stable-all-namespaces versions
# Set tech-preview-stable-all-namespaces versions
yq -Yi '.spec.replaces |= "'${packageName}'.v'$LAST_RELEASE_VERSION'-all-namespaces"' ${RELEASE_CSV}
yq -Yi '.spec.version |= "'${RELEASE}'-all-namespaces"' ${RELEASE_CSV}
yq -Yi '.metadata.name |= "eclipse-che-preview-openshift.v'${RELEASE}'-all-namespaces"' ${RELEASE_CSV}
@ -169,7 +169,7 @@ do
-e 's/LABEL operators.operatorframework.io.bundle.channel.default.v1=next/LABEL operators.operatorframework.io.bundle.channel.default.v1='$CHANNEL'/' \
-i "${BUNDLE_DOCKERFILE}"
if [[ ${CHANNEL} == "stable-all-namespaces" ]]; then
if [[ ${CHANNEL} == "tech-preview-stable-all-namespaces" ]]; then
# Set specific OpenShift version
echo -e "\nLABEL com.redhat.openshift.versions=\"v4.8\"" >> "${BUNDLE_DOCKERFILE}"
echo -e "\n com.redhat.openshift.versions: \"v4.8\"" >> "${ANNOTATION_METADATA_YAML}"