Add insecure-registry option to minikube start (cf. kubernetes/minikube#385)
							parent
							
								
									d28e007db8
								
							
						
					
					
						commit
						5b2655f1f3
					
				| 
						 | 
				
			
			@ -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)
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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=[]: Enable Docker insecure registry/-ies
 | 
			
		||||
      --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]
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -171,6 +171,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.
 | 
			
		||||
| 
						 | 
				
			
			@ -287,6 +288,7 @@ func engineOptions(config MachineConfig) *engine.Options {
 | 
			
		|||
 | 
			
		||||
	o := engine.Options{
 | 
			
		||||
		Env: config.DockerEnv,
 | 
			
		||||
		InsecureRegistry: config.InsecureRegistry,
 | 
			
		||||
	}
 | 
			
		||||
	return &o
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue