diff --git a/src/tasks/che-cluster-tasks.ts b/src/tasks/che-cluster-tasks.ts index d8a40bee0..f64664132 100644 --- a/src/tasks/che-cluster-tasks.ts +++ b/src/tasks/che-cluster-tasks.ts @@ -75,7 +75,7 @@ export namespace CheClusterTasks { } if (!ctx[InfrastructureContext.IS_OPENSHIFT]) { - if (!cheCluster.spec?.networking?.tlsSecretName) { + if (cheCluster.spec?.networking?.tlsSecretName === undefined) { merge(cheCluster, { spec: { networking: { tlsSecretName: EclipseChe.CHE_TLS_SECRET_NAME } } }) } if (flags[DOMAIN_FLAG]) { diff --git a/src/tasks/installers/dex-installer.ts b/src/tasks/installers/dex-installer.ts index 8ef428a34..801cce6c4 100644 --- a/src/tasks/installers/dex-installer.ts +++ b/src/tasks/installers/dex-installer.ts @@ -24,7 +24,6 @@ import { KubeClient } from '../../api/kube-client' import {base64Decode, getEmbeddedTemplatesDirectory, newListr, safeLoadFromYamlFile} from '../../utils/utls' import { V1Certificate } from '../../api/types/cert-manager' import {Installer} from './installer' -import {Che} from '../../utils/che' import {CHE_NAMESPACE_FLAG, DOMAIN_FLAG} from '../../flags' import {PlatformTasks} from '../platforms/platform-tasks' import {CommonTasks} from '../common-tasks' @@ -90,7 +89,6 @@ export class DexInstaller implements Installer { }) tasks.add({ title: 'Create Certificates', - skip: () => Che.getTlsSecretName() === '', task: async (_ctx: any, task: any) => { const dexCaCertificateFilePath = this.getDexCaCertificateFilePath() @@ -132,7 +130,6 @@ export class DexInstaller implements Installer { }) tasks.add({ title: `Create ConfigMap ${Dex.CONFIG_MAP}`, - skip: () => Che.getTlsSecretName() === '', task: async (ctx: any, task: any) => { const flags = CheCtlContext.getFlags() const dexCa = new V1ConfigMap() diff --git a/src/utils/che.ts b/src/utils/che.ts index 3d0235694..3bf364ee5 100644 --- a/src/utils/che.ts +++ b/src/utils/che.ts @@ -14,7 +14,6 @@ import {CheCtlContext, EclipseCheContext, InfrastructureContext} from '../contex import {EclipseChe} from '../tasks/installers/eclipse-che/eclipse-che' import {KubeClient} from '../api/kube-client' import {CHE_NAMESPACE_FLAG} from '../flags' -import {CheCluster} from '../api/types/che-cluster' import {OpenShift} from './openshift' import * as nodeforge from 'node-forge' import {base64Decode} from './utls' @@ -34,22 +33,6 @@ export namespace Che { return logsReader.readNamespaceEvents(namespace, directory, follow) } - export function getTlsSecretName(): string { - const ctx = CheCtlContext.get() - - const crPatch = ctx[EclipseCheContext.CR_PATCH] as CheCluster - if (crPatch?.spec?.networking?.tlsSecretName !== undefined) { - return crPatch?.spec?.networking?.tlsSecretName - } - - const customCR = ctx[EclipseCheContext.CUSTOM_CR] as CheCluster - if (customCR?.spec?.networking?.tlsSecretName !== undefined) { - return customCR?.spec?.networking?.tlsSecretName - } - - return EclipseChe.CHE_TLS_SECRET_NAME - } - export function getCheClusterFieldConfigured(fieldPath: string): any | undefined { const ctx = CheCtlContext.get()