Merge pull request #386 from ascheman/feature/insecure-registry

Add insecure-registry option to minikube start
pull/387/head
Jimmi Dyson 2016-07-22 10:45:04 +01:00 committed by GitHub
commit 22bac3210b
3 changed files with 25 additions and 19 deletions

View File

@ -41,6 +41,7 @@ var (
disk = newUnitValue(20 * units.GB)
vmDriver string
dockerEnv []string
insecureRegistry []string
)
// startCmd represents the start command
@ -64,6 +65,7 @@ func runStart(cmd *cobra.Command, args []string) {
DiskSize: int(*disk / units.MB),
VMDriver: vmDriver,
DockerEnv: dockerEnv,
InsecureRegistry: insecureRegistry,
}
var host *host.Host
@ -163,5 +165,6 @@ func init() {
diskFlag.DefValue = constants.DefaultDiskSize
startCmd.Flags().StringSliceVar(&dockerEnv, "docker-env", nil, "Environment variables to pass to the Docker daemon. (format: key=value)")
startCmd.Flags().StringSliceVar(&insecureRegistry, "insecure-registry", nil, "Insecure Docker registries to pass to the Docker daemon")
RootCmd.AddCommand(startCmd)
}

View File

@ -18,6 +18,7 @@ minikube start
--cpus=1: Number of CPUs allocated to the minikube VM
--disk-size=20g: Disk size allocated to the minikube VM (format: <number>[<unit>], where unit = b, k, m or g)
--docker-env=[]: Environment variables to pass to the Docker daemon. (format: key=value)
--insecure-registry=[]: Insecure Docker registries to pass to the Docker daemon
--iso-url="https://storage.googleapis.com/minikube/minikube-0.5.iso": Location of the minikube iso
--memory=1024: Amount of RAM allocated to the minikube VM
--vm-driver="virtualbox": VM driver is one of: [virtualbox vmwarefusion kvm xhyve]

View File

@ -175,6 +175,7 @@ type MachineConfig struct {
DiskSize int
VMDriver string
DockerEnv []string // Each entry is formatted as KEY=VALUE.
InsecureRegistry []string
}
// StartCluster starts a k8s cluster on the specified Host.
@ -291,6 +292,7 @@ func engineOptions(config MachineConfig) *engine.Options {
o := engine.Options{
Env: config.DockerEnv,
InsecureRegistry: config.InsecureRegistry,
}
return &o
}