Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Anatolii Bazko <abazko@redhat.com>
  • Loading branch information
tolusha committed Oct 5, 2021
1 parent 853993b commit 45f1607
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion installers/dex/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ spec:
spec:
serviceAccountName: dex
containers:
- image: quay.io/dexidp/dex:v2.28.1
- image: ghcr.io/dexidp/dex:v2.30.0
name: dex
command: ["/usr/local/bin/dex", "serve", "/etc/dex/cfg/config.yaml"]
ports:
Expand Down
4 changes: 2 additions & 2 deletions src/tasks/component-installers/cert-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { CheHelper } from '../../api/che'
import { KubeHelper } from '../../api/kube'
import { V1Certificate } from '../../api/typings/cert-manager'
import { CA_CERT_GENERATION_JOB_IMAGE, CERT_MANAGER_NAMESPACE_NAME, CHE_RELATED_COMPONENT_LABEL, CHE_ROOT_CA_SECRET_NAME, CHE_TLS_SECRET_NAME, DEFAULT_CA_CERT_FILE_NAME } from '../../constants'
import { base64Decode } from '../../util'
import { base64Decode, getEmbeddedTemplatesDirectory } from '../../util'
import { getMessageImportCaCertIntoBrowser } from '../installers/common-tasks'

export const CERT_MANAGER_CA_SECRET_NAME = 'ca'
Expand Down Expand Up @@ -59,7 +59,7 @@ export class CertManagerTasks {
if (!await fs.pathExists(yamlPath)) {
// Older Che versions don't have Cert Manager install yaml in templates
// Try to use embedded in chectl version
yamlPath = path.join(__dirname, '../../../installers/cert-manager.yml')
yamlPath = path.join(getEmbeddedTemplatesDirectory(), '..', 'installers', 'cert-manager.yml')
}
// Apply additional --validate=false flag to be able to deploy Cert Manager on Kubernetes v1.15.4 or below
await this.kubeHelper.applyResource(yamlPath, '--validate=false')
Expand Down
4 changes: 2 additions & 2 deletions src/tasks/component-installers/dex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import * as path from 'path'
import { CheHelper } from '../../api/che'
import { ChectlContext, OIDCContextKeys } from '../../api/context'
import { KubeHelper } from '../../api/kube'
import { base64Decode } from '../../util'
import { base64Decode, getEmbeddedTemplatesDirectory } from '../../util'
import { PlatformTasks } from '../platforms/platform'
import { CertManagerTasks } from './cert-manager'

Expand Down Expand Up @@ -241,6 +241,6 @@ export class DexTasks {
}

getDexResourceFilePath(fileName: string): string {
return path.join(this.flags.templates, '..', 'installers', 'dex', fileName)
return path.join(getEmbeddedTemplatesDirectory(), '..', 'installers', 'dex', fileName)
}
}
6 changes: 3 additions & 3 deletions src/tasks/installers/olm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { KubeHelper } from '../../api/kube'
import { CatalogSource, Subscription } from '../../api/typings/olm'
import { VersionHelper } from '../../api/version'
import { CUSTOM_CATALOG_SOURCE_NAME, CVS_PREFIX, DEFAULT_CHE_NAMESPACE, DEFAULT_CHE_OLM_PACKAGE_NAME, DEFAULT_OLM_KUBERNETES_NAMESPACE, DEFAULT_OPENSHIFT_MARKET_PLACE_NAMESPACE, DEFAULT_OPENSHIFT_OPERATORS_NS_NAME, KUBERNETES_OLM_CATALOG, NEXT_CATALOG_SOURCE_NAME, OLM_NEXT_CHANNEL_NAME, OLM_STABLE_CHANNEL_NAME, OPENSHIFT_OLM_CATALOG, OPERATOR_GROUP_NAME, STABLE_ALL_NAMESPACES_CHANNEL_NAME, DEFAULT_CHE_OPERATOR_SUBSCRIPTION_NAME } from '../../constants'
import { isKubernetesPlatformFamily } from '../../util'
import { getEmbeddedTemplatesDirectory, isKubernetesPlatformFamily } from '../../util'

import { createEclipseCheCluster, createNamespaceTask, patchingEclipseCheCluster } from './common-tasks'

Expand All @@ -43,7 +43,7 @@ export class OLMTasks {
enabled: () => flags['cluster-monitoring'] && flags.platform === 'openshift',
title: `Create Role ${this.prometheusRoleName} in namespace ${flags.chenamespace}`,
task: async (_ctx: any, task: any) => {
const yamlFilePath = path.join(flags.templates, '..', 'installers', 'prometheus-role.yaml')
const yamlFilePath = path.join(getEmbeddedTemplatesDirectory(), '..', 'installers', 'prometheus-role.yaml')
const exist = await kube.roleExist(this.prometheusRoleName, flags.chenamespace)
if (exist) {
task.title = `${task.title}...It already exists.`
Expand All @@ -58,7 +58,7 @@ export class OLMTasks {
title: `Create RoleBinding ${this.prometheusRoleBindingName} in namespace ${flags.chenamespace}`,
task: async (_ctx: any, task: any) => {
const exist = await kube.roleBindingExist(this.prometheusRoleBindingName, flags.chenamespace)
const yamlFilePath = path.join(flags.templates, '..', 'installers', 'prometheus-role-binding.yaml')
const yamlFilePath = path.join(getEmbeddedTemplatesDirectory(), '..', 'installers', 'prometheus-role-binding.yaml')

if (exist) {
task.title = `${task.title}...It already exists.`
Expand Down

0 comments on commit 45f1607

Please sign in to comment.