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 1, 2021
1 parent b2348a9 commit ad67e60
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
21 changes: 15 additions & 6 deletions src/tasks/platforms/minikube.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,21 +133,30 @@ export class MinikubeTasks {
configureApiServer(flags: any): ReadonlyArray<Listr.ListrTask> {
return [
{
title: 'Configure Minikube API server',
title: 'Copy certificate into Minikube',
task: async (ctx: any, task: any) => {
const args: string[] = []
args.push('cp')
args.push(ctx[OIDCContextKeys.CA_FILE])
args.push('/etc/ca-certificates/dex-ca.crt')

await execa('minikube', args, { timeout: 60000 })

task.title = `${task.title}...[OK]`
},
},
{
title: 'Configure Minikube API server',
task: async (ctx: any, task: any) => {
const args: string[] = []
args.push(`--extra-config=apiserver.oidc-issuer-url=${ctx[OIDCContextKeys.ISSUER_URL]}`)
args.push(`--extra-config=apiserver.oidc-client-id=${ctx[OIDCContextKeys.CLIENT_ID]}`)
args.push(`--extra-config=apiserver.oidc-ca-file=${ctx[OIDCContextKeys.CA_FILE]}`)
args.push('--extra-config=apiserver.oidc-ca-file=/etc/ca-certificates/dex-ca.crt')
args.push('--extra-config=apiserver.oidc-username-claim=email')
args.push('--extra-config=apiserver.oidc-groups-claim=groups')
args.push('start')

const {exitCode, stderr} = await execa('minikube', args, { timeout: 60000 })
if (exitCode !== 0) {
throw new Error(`Failed to configure API server: ${stderr}`)
}
await execa('minikube', args, { timeout: 60000 })

task.title = `${task.title}...[OK]`
},
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2645,7 +2645,7 @@ ecc-jsbn@~0.1.1:

"eclipse-che-operator@git://github.com/eclipse-che/che-operator#main":
version "0.0.0"
resolved "git://github.com/eclipse-che/che-operator#acc98201a6604cfe8526341075d0635fbcff2edf"
resolved "git://github.com/eclipse-che/che-operator#597d9cdedf72d79ea60c8f0ef7280b82d2c8fe1b"

"eclipse-che-server@git://github.com/eclipse-che/che-server#main":
version "0.0.0"
Expand Down

0 comments on commit ad67e60

Please sign in to comment.