From 28be4441c52da3c5b4ee220c72ed4194c5944516 Mon Sep 17 00:00:00 2001 From: Anatolii Bazko Date: Fri, 25 Jun 2021 11:57:01 +0300 Subject: [PATCH] Fixes Signed-off-by: Anatolii Bazko --- .../che-operator.clusterserviceversion.yaml | 18 +++---------- .../che-operator.clusterserviceversion.yaml | 10 +++---- pkg/deploy/dev-workspace/dev_workspace.go | 27 ++++--------------- 3 files changed, 11 insertions(+), 44 deletions(-) diff --git a/deploy/olm-catalog/nightly/eclipse-che-preview-kubernetes/manifests/che-operator.clusterserviceversion.yaml b/deploy/olm-catalog/nightly/eclipse-che-preview-kubernetes/manifests/che-operator.clusterserviceversion.yaml index b0e9e3ff4..960129a75 100644 --- a/deploy/olm-catalog/nightly/eclipse-che-preview-kubernetes/manifests/che-operator.clusterserviceversion.yaml +++ b/deploy/olm-catalog/nightly/eclipse-che-preview-kubernetes/manifests/che-operator.clusterserviceversion.yaml @@ -86,21 +86,13 @@ metadata: categories: Developer Tools certified: "false" containerImage: quay.io/eclipse/che-operator:nightly -<<<<<<< HEAD - createdAt: "2021-06-24T13:43:23Z" -======= - createdAt: "2021-06-24T12:41:27Z" ->>>>>>> Fixes + createdAt: "2021-06-25T08:46:05Z" description: A Kube-native development solution that delivers portable and collaborative developer workspaces. operatorframework.io/suggested-namespace: eclipse-che repository: https://github.com/eclipse-che/che-operator support: Eclipse Foundation -<<<<<<< HEAD - name: eclipse-che-preview-kubernetes.v7.33.0-240.nightly -======= - name: eclipse-che-preview-kubernetes.v7.33.0-244.nightly ->>>>>>> Fixes + name: eclipse-che-preview-kubernetes.v7.33.0-242.nightly namespace: placeholder spec: apiservicedefinitions: {} @@ -1260,8 +1252,4 @@ spec: maturity: stable provider: name: Eclipse Foundation -<<<<<<< HEAD - version: 7.33.0-240.nightly -======= - version: 7.33.0-244.nightly ->>>>>>> Fixes + version: 7.33.0-242.nightly diff --git a/deploy/olm-catalog/nightly/eclipse-che-preview-openshift/manifests/che-operator.clusterserviceversion.yaml b/deploy/olm-catalog/nightly/eclipse-che-preview-openshift/manifests/che-operator.clusterserviceversion.yaml index 25bdfb650..e9d030e01 100644 --- a/deploy/olm-catalog/nightly/eclipse-che-preview-openshift/manifests/che-operator.clusterserviceversion.yaml +++ b/deploy/olm-catalog/nightly/eclipse-che-preview-openshift/manifests/che-operator.clusterserviceversion.yaml @@ -77,17 +77,13 @@ metadata: categories: Developer Tools, OpenShift Optional certified: "false" containerImage: quay.io/eclipse/che-operator:nightly -<<<<<<< HEAD - createdAt: "2021-06-24T13:43:34Z" -======= - createdAt: "2021-06-24T12:41:34Z" ->>>>>>> Fixes + createdAt: "2021-06-25T08:46:11Z" description: A Kube-native development solution that delivers portable and collaborative developer workspaces in OpenShift. operatorframework.io/suggested-namespace: eclipse-che repository: https://github.com/eclipse-che/che-operator support: Eclipse Foundation - name: eclipse-che-preview-openshift.v7.33.0-240.nightly + name: eclipse-che-preview-openshift.v7.33.0-242.nightly namespace: placeholder spec: apiservicedefinitions: {} @@ -1333,4 +1329,4 @@ spec: maturity: stable provider: name: Eclipse Foundation - version: 7.33.0-240.nightly + version: 7.33.0-242.nightly diff --git a/pkg/deploy/dev-workspace/dev_workspace.go b/pkg/deploy/dev-workspace/dev_workspace.go index c42b8771c..ba73429f9 100644 --- a/pkg/deploy/dev-workspace/dev_workspace.go +++ b/pkg/deploy/dev-workspace/dev_workspace.go @@ -114,6 +114,7 @@ var ( } syncDwCheItems = []func(*deploy.DeployContext) (bool, error){ + syncDwCheCRD, syncDwCheCR, syncDwCheMetricsService, } @@ -125,12 +126,9 @@ func ReconcileDevWorkspace(deployContext *deploy.DeployContext) (bool, error) { return true, nil } - if !util.IsTestMode() { - // sync CRD needed to start DWCO - done, err := syncDwCheCRD(deployContext) - if !done { - return false, err - } + // do nothing if dev workspace is disabled + if !deployContext.CheCluster.Spec.DevWorkspace.Enable { + return true, nil } // check if DW exists on the cluster @@ -143,23 +141,8 @@ func ReconcileDevWorkspace(deployContext *deploy.DeployContext) (bool, error) { return false, err } - if !devWorkspaceWebhookExists { - if !util.IsTestMode() { - // if DW does not exists then sync CRD needed to start DWCO - done, err := syncDwWorkspaceRoutingCRD(deployContext) - if !done { - return false, err - } - } - } - - // do nothing if dev workspace is disabled, all CRDs are on the cluster to start DWCO - if !deployContext.CheCluster.Spec.DevWorkspace.Enable { - return true, nil - } - - // if DW exists then check if version matches if devWorkspaceWebhookExists { + // if DW exists then check if version matches if err := checkWebTerminalSubscription(deployContext); err != nil { return false, err }