Skip to content

Commit

Permalink
feat: configure DWO progressTimeout through Che Cluster CR
Browse files Browse the repository at this point in the history
Fix eclipse-che/che#21820

Signed-off-by: Andrew Obuchowicz <[email protected]>
  • Loading branch information
AObuchow committed Dec 7, 2022
1 parent aa314bf commit 1348347
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions pkg/deploy/dev-workspace-config/dev_workspace_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,15 @@ func updateOperatorConfig(cheCluster *chev2.CheCluster, operatorConfig *controll
operatorConfig.Workspace = &controllerv1alpha1.WorkspaceConfig{}
}

return updateWorkspaceConfig(pvc, pvcStrategy == constants.PerWorkspacePVCStorageStrategy, cheCluster.IsContainerBuildCapabilitiesEnabled(), cheCluster.Spec.DevEnvironments.PodSchedulerName, operatorConfig.Workspace)
return updateWorkspaceConfig(pvc,
pvcStrategy == constants.PerWorkspacePVCStorageStrategy,
cheCluster.IsContainerBuildCapabilitiesEnabled(),
cheCluster.Spec.DevEnvironments.PodSchedulerName,
cheCluster.Spec.DevEnvironments.StartTimeout,
operatorConfig.Workspace)
}

func updateWorkspaceConfig(pvc *chev2.PVC, isPerWorkspacePVCStorageStrategy bool, enabledContainerBuildCapabilities bool, podSchedulerName string, workspaceConfig *controllerv1alpha1.WorkspaceConfig) error {
func updateWorkspaceConfig(pvc *chev2.PVC, isPerWorkspacePVCStorageStrategy bool, enabledContainerBuildCapabilities bool, podSchedulerName string, startTimeout string, workspaceConfig *controllerv1alpha1.WorkspaceConfig) error {
if pvc != nil {
if pvc.StorageClass != "" {
workspaceConfig.StorageClassName = &pvc.StorageClass
Expand Down Expand Up @@ -126,6 +131,7 @@ func updateWorkspaceConfig(pvc *chev2.PVC, isPerWorkspacePVCStorageStrategy bool
}

workspaceConfig.SchedulerName = podSchedulerName
workspaceConfig.ProgressTimeout = startTimeout

return nil
}

0 comments on commit 1348347

Please sign in to comment.