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

@ -35,12 +35,13 @@ import (
)
var (
minikubeISO string
memory int
cpus int
disk = newUnitValue(20 * units.GB)
vmDriver string
dockerEnv []string
minikubeISO string
memory int
cpus int
disk = newUnitValue(20 * units.GB)
vmDriver string
dockerEnv []string
insecureRegistry []string
)
// startCmd represents the start command
@ -58,12 +59,13 @@ func runStart(cmd *cobra.Command, args []string) {
defer api.Close()
config := cluster.MachineConfig{
MinikubeISO: minikubeISO,
Memory: memory,
CPUs: cpus,
DiskSize: int(*disk / units.MB),
VMDriver: vmDriver,
DockerEnv: dockerEnv,
MinikubeISO: minikubeISO,
Memory: memory,
CPUs: cpus,
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

@ -169,12 +169,13 @@ type sshAble interface {
// MachineConfig contains the parameters used to start a cluster.
type MachineConfig struct {
MinikubeISO string
Memory int
CPUs int
DiskSize int
VMDriver string
DockerEnv []string // Each entry is formatted as KEY=VALUE.
MinikubeISO string
Memory int
CPUs int
DiskSize int
VMDriver string
DockerEnv []string // Each entry is formatted as KEY=VALUE.
InsecureRegistry []string
}
// StartCluster starts a k8s cluster on the specified Host.
@ -290,7 +291,8 @@ func SetupCerts(d drivers.Driver) error {
func engineOptions(config MachineConfig) *engine.Options {
o := engine.Options{
Env: config.DockerEnv,
Env: config.DockerEnv,
InsecureRegistry: config.InsecureRegistry,
}
return &o
}