diff --git a/src/context.ts b/src/context.ts index 62cf28a1f..bdfa35c5b 100644 --- a/src/context.ts +++ b/src/context.ts @@ -39,7 +39,7 @@ import { CATALOG_SOURCE_IMAGE_FLAG, } from './flags' import { - getEmbeddedTemplatesDirectory, + getEmbeddedTemplatesDirectory, getProjectName, getProjectVersion, isCheFlavor, safeLoadFromYamlFile, @@ -180,9 +180,9 @@ export namespace CheCtlContext { // for backward compatability flags[CHE_NAMESPACE_FLAG] = ctx[EclipseCheContext.NAMESPACE] if (ctx[InfrastructureContext.IS_OPENSHIFT]) { - ctx[EclipseCheContext.OPERATOR_NAMESPACE] = ctx[InfrastructureContext.OPENSHIFT_OPERATOR_NAMESPACE] + ctx[EclipseCheContext.OPERATOR_NAMESPACE] = process.env[`${getProjectName().toUpperCase()}_OPERATOR_NAMESPACE`] || ctx[InfrastructureContext.OPENSHIFT_OPERATOR_NAMESPACE] } else { - ctx[EclipseCheContext.OPERATOR_NAMESPACE] = ctx[EclipseCheContext.NAMESPACE] + ctx[EclipseCheContext.OPERATOR_NAMESPACE] = process.env[`${getProjectName().toUpperCase()}_OPERATOR_NAMESPACE`] || ctx[EclipseCheContext.NAMESPACE] } // Eclipse Che context diff --git a/src/tasks/installers/eclipse-che/eclipse-che-olm-installer.ts b/src/tasks/installers/eclipse-che/eclipse-che-olm-installer.ts index 942e70d27..92b1c868c 100644 --- a/src/tasks/installers/eclipse-che/eclipse-che-olm-installer.ts +++ b/src/tasks/installers/eclipse-che/eclipse-che-olm-installer.ts @@ -25,6 +25,7 @@ import {DevWorkspaceInstallerFactory} from '../dev-workspace/dev-workspace-insta import {CommonTasks} from '../../common-tasks' import {DevWorkspace} from '../dev-workspace/dev-workspace' import {Che} from '../../../utils/che' +import {PodTasks} from '../../pod-tasks' export class EclipseCheOlmInstaller implements Installer { getDeployTasks(): Listr.ListrTask { @@ -132,5 +133,7 @@ export class EclipseCheOlmInstaller implements Installer { ctx[EclipseCheContext.APPROVAL_STRATEGY], flags[STARTING_CSV_FLAG] )) + + tasks.add(PodTasks.getPodStartTasks(EclipseChe.CHE_OPERATOR, EclipseChe.CHE_OPERATOR_SELECTOR, ctx[EclipseCheContext.OPERATOR_NAMESPACE])) } }