Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Update dependency, remove Issuer creation from chectl #1455

Merged
merged 1 commit into from
Jul 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import * as path from 'path'
import { CheHelper } from '../../api/che'
import { KubeHelper } from '../../api/kube'
import { OpenShiftHelper } from '../../api/openshift'
import { V1Certificate } from '../../api/typings/cert-manager'
import { DEFAULT_DEV_WORKSPACE_CONTROLLER_NAMESPACE } from '../../constants'
import { CertManagerTasks } from '../component-installers/cert-manager'
import { createNamespaceTask } from '../installers/common-tasks'
Expand Down Expand Up @@ -112,38 +111,6 @@ export class DevWorkspaceTasks {
return new Listr(this.certManagerTask.getDeployCertManagerTasks(flags), ctx.listrOptions)
},
},
// WARNING: Issuer and Certificate should be moved to che-operator side. Depends on issue: https://github.com/eclipse/che/issues/19502
{
title: `Create certificate issuer ${this.devWorkspaceCertIssuer}`,
enabled: (ctx: any) => !ctx.isOpenShift,
task: async (ctx: any, task: any) => {
const certIssuerExist = await this.kubeHelper.isCertificateIssuerExists(this.devWorkspaceCertIssuer, ctx.certManagerK8sApiVersion, DEFAULT_DEV_WORKSPACE_CONTROLLER_NAMESPACE)
if (certIssuerExist) {
task.title = `${task.title}...It already exists.`
return
}
const devWorkspaceIssuerCertFilePath = path.join(this.getTemplatePath(ctx), 'devworkspace-controller-selfsigned-issuer.Issuer.yaml')
await this.kubeHelper.createCertificateIssuer(devWorkspaceIssuerCertFilePath, ctx.certManagerK8sApiVersion, DEFAULT_DEV_WORKSPACE_CONTROLLER_NAMESPACE)

task.title = `${task.title}...Done.`
},
},
{
title: `Create self signed certificate ${this.devWorkspaceCertificate}`,
enabled: (ctx: any) => !ctx.isOpenShift,
task: async (ctx: any, task: any) => {
const certExists = await this.kubeHelper.isNamespacedCertificateExists(this.devWorkspaceCertificate, ctx.certManagerK8sApiVersion, DEFAULT_DEV_WORKSPACE_CONTROLLER_NAMESPACE)
if (certExists) {
task.title = `${task.title}...It already exists.`
return
}

const certificateTemplatePath = path.join(this.getTemplatePath(ctx), 'devworkspace-controller-serving-cert.Certificate.yaml')
const certifiateYaml = this.kubeHelper.safeLoadFromYamlFile(certificateTemplatePath) as V1Certificate
await this.kubeHelper.createCheClusterCertificate(certifiateYaml, ctx.certManagerK8sApiVersion)
task.title = `${task.title}...Done.`
},
},
]
}

Expand Down
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2611,15 +2611,15 @@ ecc-jsbn@~0.1.1:

"eclipse-che-devfile-workspace-operator@git://github.com/devfile/devworkspace-operator#main":
version "0.0.0"
resolved "git://github.com/devfile/devworkspace-operator#ecec8b97c0ce749e1aa2ec89793cf7d862ab0f77"
resolved "git://github.com/devfile/devworkspace-operator#f922763dda5bea87229413596abc986222c4cc56"

"eclipse-che-operator@git://github.com/eclipse-che/che-operator#main":
version "0.0.0"
resolved "git://github.com/eclipse-che/che-operator#727141e3d44dd265e9827fceede485689e892bef"
resolved "git://github.com/eclipse-che/che-operator#5650d4cf852b28b326c834ef03d7ccca55e75db7"

"eclipse-che-server@git://github.com/eclipse-che/che-server#main":
version "0.0.0"
resolved "git://github.com/eclipse-che/che-server#7a81693167ee35d4bee5f54ae5931d31c73d7a91"
resolved "git://github.com/eclipse-che/che-server#0860edadd32aac261803e001787a5d2d2da28489"

editorconfig@^0.15.0:
version "0.15.3"
Expand Down