Skip to content

Commit

Permalink
chore: wait for operator pod ready once sub is created (#2728)
Browse files Browse the repository at this point in the history
Signed-off-by: Anatolii Bazko <[email protected]>
  • Loading branch information
tolusha authored Aug 21, 2023
1 parent 906ec96 commit 6c68a87
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import {
CATALOG_SOURCE_IMAGE_FLAG,
} from './flags'
import {
getEmbeddedTemplatesDirectory,
getEmbeddedTemplatesDirectory, getProjectName,
getProjectVersion,
isCheFlavor,
safeLoadFromYamlFile,
Expand Down Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions src/tasks/installers/eclipse-che/eclipse-che-olm-installer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<any> {
Expand Down Expand Up @@ -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]))
}
}

0 comments on commit 6c68a87

Please sign in to comment.