Skip to content

Commit

Permalink
userland-proxy=false is not required anymore
Browse files Browse the repository at this point in the history
Fixes #107

Change-Id: I54a68447a375436b5a6f925b6c90bb67115dfcd0
Signed-off-by: Florent Benoit <[email protected]>
  • Loading branch information
benoitf committed May 27, 2019
1 parent 7d323c6 commit b862e0e
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 52 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Binary downloads of `chectl` can be found on [the Release page](https://github.c

Download the `chectl` binary and add it to your PATH.

Currently `chectl` requires [minikube](https://github.com/kubernetes/minikube#installation) launched with _--docker-opt userland-proxy=false_ option and [helm](https://github.com/helm/helm#install) to be locally installed.
Currently `chectl` requires [minikube](https://github.com/kubernetes/minikube#installation) and [helm](https://github.com/helm/helm#install) to be locally installed.

# Usage
```sh-session
Expand Down
26 changes: 1 addition & 25 deletions src/platforms/minikube.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,22 +45,6 @@ export class MinikubeHelper {
},
task: () => this.startMinikube()
},
{ title: 'Verify userland-proxy is disabled',
task: async (_ctx: any, task: any) => {
const userlandDisabled = await this.isUserLandDisabled()
if (!userlandDisabled) {
command.error(`E_PLATFORM_NOT_COMPLIANT_USERLAND: userland-proxy=false parameter is required on docker daemon but it was not found.
This setting is given when originally starting minikube. (you can then later check by performing command : minikube ssh -- ps auxwwww | grep dockerd
It needs to contain --userland-proxy=false
Command that needs to be added on top of your start command:
$ minikube start <all your existing-options> --docker-opt userland-proxy=false
Note: you may have to recreate the minikube installation.
`)
} else {
task.title = `${task.title}...done.`
}
}
},
// { title: 'Verify minikube memory configuration', skip: () => 'Not implemented yet', task: () => {}},
// { title: 'Verify kubernetes version', skip: () => 'Not implemented yet', task: () => {}},
{ title: 'Verify if minikube ingress addon is enabled',
Expand Down Expand Up @@ -93,7 +77,7 @@ export class MinikubeHelper {
}

async startMinikube() {
await execa('minikube', ['start', '--memory=4096', '--cpus=4', '--disk-size=50g', '--docker-opt', 'userland-proxy=false'], { timeout: 180000 })
await execa('minikube', ['start', '--memory=4096', '--cpus=4', '--disk-size=50g'], { timeout: 180000 })
}

async isIngressAddonEnabled(): Promise<boolean> {
Expand All @@ -110,12 +94,4 @@ export class MinikubeHelper {
return stdout
}

/**
* Check if userland-proxy=false is set in docker daemon options
* if not, return an error
*/
async isUserLandDisabled(): Promise<boolean> {
const {stdout} = await execa('minikube', ['ssh', '--', 'ps', 'auxwww', '|', 'grep dockerd'], { timeout: 10000 })
return stdout.includes('--userland-proxy=false')
}
}
24 changes: 0 additions & 24 deletions src/platforms/minishift.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,22 +46,6 @@ export class MinishiftHelper {
}
}
},
{ title: 'Verify userland-proxy is disabled',
task: async (_ctx: any, task: any) => {
const userlandDisabled = await this.isUserLandDisabled()
if (!userlandDisabled) {
command.error(`E_PLATFORM_NOT_COMPLIANT_USERLAND: userland-proxy=false parameter is required on docker daemon but it was not found.
This setting is given when originally starting minishift. (you can then later check by performing command : minishift ssh -- ps auxwwww | grep dockerd
It needs to contain --userland-proxy=false
Command that needs to be added on top of your start command:
$ minishift start <all your existing-options> --docker-opt userland-proxy=false
Note: you may have to recreate the minishift installation.
`)
} else {
task.title = `${task.title}...done.`
}
}
},
// { title: 'Verify minishift memory configuration', skip: () => 'Not implemented yet', task: () => {}},
// { title: 'Verify kubernetes version', skip: () => 'Not implemented yet', task: () => {}},
{ title: 'Retrieving minishift IP and domain for routes URLs',
Expand Down Expand Up @@ -91,12 +75,4 @@ export class MinishiftHelper {
return stdout
}

/**
* Check if userland-proxy=false is set in docker daemon options
* if not, return an error
*/
async isUserLandDisabled(): Promise<boolean> {
const {stdout} = await execa('minishift', ['ssh', '--', 'ps', 'auxwww', '|', 'grep dockerd'], { timeout: 10000 })
return stdout.includes('--userland-proxy=false')
}
}
2 changes: 1 addition & 1 deletion test/e2e/minikube.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jest.setTimeout(600000)
/*
## Before
PROFILE=chectl-e2e-tests
minikube start --memory=8192 --docker-opt userland-proxy=false -p ${PROFILE}
minikube start --memory=8192 -p ${PROFILE}
minikube profile ${PROFILE}
yarn test --coverage=false --testRegex=/test/e2e/minikube.test.ts
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/minishift.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jest.setTimeout(600000)
## Before
PROFILE=chectl-e2e-tests && \
minishift profile set ${PROFILE} && \
minishift start --memory=8GB --cpus=4 --disk-size=50g --vm-driver=xhyve --network-nameserver 8.8.8.8 --docker-opt userland-proxy=false --profile ${PROFILE}
minishift start --memory=8GB --cpus=4 --disk-size=50g --vm-driver=xhyve --network-nameserver 8.8.8.8 --profile ${PROFILE}
yarn test --coverage=false --testRegex=/test/e2e/minishift.test.ts
Expand Down

0 comments on commit b862e0e

Please sign in to comment.