startCmd.Flags().String(NFSSharesRoot,"/nfsshares","Where to root the NFS Shares (defaults to /nfsshares, only supported with hyperkit now)")
startCmd.Flags().StringArrayVar(&dockerEnv,"docker-env",nil,"Environment variables to pass to the Docker daemon. (format: key=value)")
startCmd.Flags().StringArrayVar(&dockerOpt,"docker-opt",nil,"Specify arbitrary flags to pass to the Docker daemon. (format: key=value)")
startCmd.Flags().String(apiServerName,constants.APIServerName,"The apiserver name which is used in the generated certificate for localkube/kubernetes. This can be used if you want to make the apiserver available from outside the machine")
startCmd.Flags().StringArrayVar(&apiServerNames,"apiserver-names",nil,"A set of apiserver names which are used in the generated certificate for localkube/kubernetes. This can be used if you want to make the apiserver available from outside the machine")
startCmd.Flags().IPSliceVar(&apiServerIPs,"apiserver-ips",nil,"A set of apiserver IP Addresses which are used in the generated certificate for localkube/kubernetes. This can be used if you want to make the apiserver available from outside the machine")
startCmd.Flags().String(apiServerName,constants.APIServerName,"The apiserver name which is used in the generated certificate for kubernetes. This can be used if you want to make the apiserver available from outside the machine")
startCmd.Flags().StringArrayVar(&apiServerNames,"apiserver-names",nil,"A set of apiserver names which are used in the generated certificate for kubernetes. This can be used if you want to make the apiserver available from outside the machine")
startCmd.Flags().IPSliceVar(&apiServerIPs,"apiserver-ips",nil,"A set of apiserver IP Addresses which are used in the generated certificate for kubernetes. This can be used if you want to make the apiserver available from outside the machine")
startCmd.Flags().String(dnsDomain,constants.ClusterDNSDomain,"The cluster dns domain name used in the kubernetes cluster")
startCmd.Flags().StringSliceVar(&insecureRegistry,"insecure-registry",nil,"Insecure Docker registries to pass to the Docker daemon. The default service CIDR range will automatically be added.")
startCmd.Flags().StringSliceVar(®istryMirror,"registry-mirror",nil,"Registry mirrors to pass to the Docker daemon")
startCmd.Flags().String(kubernetesVersion,constants.DefaultKubernetesVersion,"The kubernetes version that the minikube VM will use (ex: v1.2.3) \n OR a URI which contains a localkube binary (ex: https://storage.googleapis.com/minikube/k8sReleases/v1.3.0/localkube-linux-amd64)")
startCmd.Flags().String(containerRuntime,"","The container runtime to be used")
startCmd.Flags().String(networkPlugin,"","The name of the network plugin")
startCmd.Flags().String(featureGates,"","A set of key=value pairs that describe feature gates for alpha/experimental features.")
// test that an error is returned if malformed JSON is at the url endpoint
handler:=&URLHandlerMalformed{}
server:=httptest.NewServer(handler)
_,err:=GetK8sVersionsFromURL(server.URL)
iferr==nil{
t.Fatalf("Malformed version value was returned from URL but no error was thrown")
}
}
funcTestPrintKubernetesVersions(t*testing.T){
cachedK8sVersions=nil
// test that no kubernetes version text is printed if there are no versions being served
// TODO(aprindle) or should this be an error?!?!
handlerNone:=&URLHandlerNone{}
server:=httptest.NewServer(handlerNone)
varoutputBufferbytes.Buffer
PrintKubernetesVersions(&outputBuffer,server.URL)
iflen(outputBuffer.String())!=0{
t.Fatalf("Expected PrintKubernetesVersions to not output text as there are no versioned served at the current URL but output was [%s]",outputBuffer.String())
}
// test that update text is printed if the latest version is greater than the current version