Skip to content

Commit

Permalink
Fixes according to review
Browse files Browse the repository at this point in the history
Signed-off-by: Mykola Morhun <mmorhun@redhat.com>
  • Loading branch information
mmorhun committed Feb 26, 2020
1 parent 1587bd4 commit b1b05b5
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 16 deletions.
4 changes: 2 additions & 2 deletions src/api/kube.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { Writable } from 'stream'
import { DEFAULT_CHE_IMAGE } from '../constants'
import { getClusterClientCommand } from '../util'

import { V1alpha2Sertificate } from './typings/cert-manager'
import { V1alpha2Certificate } from './typings/cert-manager'

const AWAIT_TIMEOUT_S = 30

Expand Down Expand Up @@ -1239,7 +1239,7 @@ export class KubeHelper {
async createCheClusterCertificate(certificateTemplatePath: string, domain: string, namespace: string): Promise<void> {
const customObjectsApi = this.kc.makeApiClient(CustomObjectsApi)

const certifiate = this.safeLoadFromYamlFile(certificateTemplatePath) as V1alpha2Sertificate
const certifiate = this.safeLoadFromYamlFile(certificateTemplatePath) as V1alpha2Certificate

const CN = '*.' + domain
certifiate.spec.commonName = CN
Expand Down
10 changes: 5 additions & 5 deletions src/api/typings/cert-manager.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@
* SPDX-License-Identifier: EPL-2.0
**********************************************************************/

export interface V1alpha2Sertificate {
export interface V1alpha2Certificate {
apiVersion: string
kind: string
metadata: V1ObjectMeta
spec: V1alpha2SertificateSpec
spec: V1alpha2CertificateSpec
}

export interface V1alpha2SertificateSpec {
export interface V1alpha2CertificateSpec {
secretName: string
issuerRef: V1alpha2SertificateSpecIssuerRrederence
issuerRef: V1alpha2CertificateSpecIssuerReference
commonName: string
dnsNames: List<string>
}

export interface V1alpha2SertificateSpecIssuerRrederence {
export interface V1alpha2CertificateSpecIssuerReference {
name: string
kind: string
}
2 changes: 1 addition & 1 deletion src/commands/workspace/start.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export default class Start extends Command {
title: 'Retrieving Eclipse Che Server URL',
task: async (ctx: any, task: any) => {
ctx.cheURL = await che.cheURL(flags.chenamespace)
task.title = await `${task.title}...${ctx.cheURL}`
task.title = await `${task.title}... ${ctx.cheURL}`
}
},
{
Expand Down
2 changes: 1 addition & 1 deletion src/tasks/che.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export class CheTasks {
title: 'Retrieving Eclipse Che Server URL',
task: async (ctx: any, task: any) => {
ctx.cheURL = await this.che.cheURL(flags.chenamespace)
task.title = await `${task.title}...${ctx.cheURL}`
task.title = await `${task.title}... ${ctx.cheURL}`
}
},
{
Expand Down
7 changes: 4 additions & 3 deletions src/tasks/component-installers/cert-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,10 @@ export class CertManagerTasks {
throw new Error('Cert Manager should be deployed before.')
}

await this.kubeHelper.waitForPodReady('app.kubernetes.io/name=cert-manager', CERT_MANAGER_NAMESPACE_NAME)
await this.kubeHelper.waitForPodReady('app.kubernetes.io/name=webhook', CERT_MANAGER_NAMESPACE_NAME)
await this.kubeHelper.waitForPodReady('app.kubernetes.io/name=cainjector', CERT_MANAGER_NAMESPACE_NAME)
const timeout = 5 * 60 * 1000
await this.kubeHelper.waitForPodReady('app.kubernetes.io/name=cert-manager', CERT_MANAGER_NAMESPACE_NAME, 1000, timeout)
await this.kubeHelper.waitForPodReady('app.kubernetes.io/name=webhook', CERT_MANAGER_NAMESPACE_NAME, 1000, timeout)
await this.kubeHelper.waitForPodReady('app.kubernetes.io/name=cainjector', CERT_MANAGER_NAMESPACE_NAME, 1000, timeout)

task.title = `${task.title}...ready`
}
Expand Down
8 changes: 4 additions & 4 deletions templates/cert-manager/che-cluster-issuer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
apiVersion: cert-manager.io/v1alpha2
kind: ClusterIssuer
metadata:
name: che-cluster-issuer
namespace: cert-manager
name: che-cluster-issuer
namespace: cert-manager
spec:
ca:
secretName: ca
ca:
secretName: ca

0 comments on commit b1b05b5

Please sign in to comment.