Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Anatolii Bazko <[email protected]>
  • Loading branch information
tolusha committed Jun 25, 2021
1 parent a8cac78 commit 28be444
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 44 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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: {}
Expand Down Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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: {}
Expand Down Expand Up @@ -1333,4 +1329,4 @@ spec:
maturity: stable
provider:
name: Eclipse Foundation
version: 7.33.0-240.nightly
version: 7.33.0-242.nightly
27 changes: 5 additions & 22 deletions pkg/deploy/dev-workspace/dev_workspace.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ var (
}

syncDwCheItems = []func(*deploy.DeployContext) (bool, error){
syncDwCheCRD,
syncDwCheCR,
syncDwCheMetricsService,
}
Expand All @@ -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
Expand All @@ -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
}
Expand Down

0 comments on commit 28be444

Please sign in to comment.