Skip to content

Commit

Permalink
Fixed error exit. Added docs
Browse files Browse the repository at this point in the history
  • Loading branch information
kadern0 committed Sep 20, 2021
1 parent 69a5a93 commit ec2d479
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 14 deletions.
2 changes: 1 addition & 1 deletion cmd/minikube/cmd/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -1090,7 +1090,7 @@ func validateFlags(cmd *cobra.Command, drvName string) {
if cmd.Flags().Changed(humanReadableDiskSize) {
err := validateDiskSize(viper.GetString(humanReadableDiskSize))
if err != nil {
exit.Message(reason.Usage, "{{.err}}", out.V{"err": err})
exitIfNotForced(reason.RsrcInsufficientStorage, "Requested disk size {{.requested_size}} is less than minimum of {{.minimum_size}}", out.V{"requested_size": humanReadableDiskSize, "minimum_size": minimumDiskSize})
}
}

Expand Down
3 changes: 1 addition & 2 deletions translations/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,6 @@
"Insecure Docker registries to pass to the Docker daemon. The default service CIDR range will automatically be added.": "Unsichere Docker-Registrys, die an den Docker-Daemon übergeben werden. Der CIDR-Bereich des Standarddienstes wird automatisch hinzugefügt.",
"Install VirtualBox and ensure it is in the path, or select an alternative value for --driver": "",
"Install the latest hyperkit binary, and run 'minikube delete'": "",
"Invalid Container Runtime: \"{{.runtime}}\". Valid runtimes are: {{.validOptions}}": "",
"Invalid port": "",
"Istio needs {{.minCPUs}} CPUs -- your configuration only allocates {{.cpus}} CPUs": "",
"Istio needs {{.minMem}}MB of memory -- your configuration only allocates {{.memory}}MB": "",
Expand Down Expand Up @@ -775,7 +774,6 @@
"VM driver is one of: %v": "VM-Treiber ist einer von: %v",
"Valid components are: {{.valid_extra_opts}}": "",
"Validate your KVM networks. Run: virt-host-validate and then virsh net-list --all": "",
"Validation unable to parse disk size '{{.diskSize}}': {{.error}}": "",
"Verify that your HTTP_PROXY and HTTPS_PROXY environment variables are set correctly.": "",
"Verifying Kubernetes components...": "",
"Verifying dashboard health ...": "",
Expand Down Expand Up @@ -935,6 +933,7 @@
"{{.driver_name}} has less than 2 CPUs available, but Kubernetes requires at least 2 to be available": "",
"{{.driver_name}} has only {{.container_limit}}MB memory but you specified {{.specified_memory}}MB": "",
"{{.driver}} only has {{.size}}MiB available, less than the required {{.req}}MiB for Kubernetes": "",
"{{.err}}": "",
"{{.extra_option_component_name}}.{{.key}}={{.value}}": "",
"{{.name}} doesn't have images.": "",
"{{.name}} has following images:": "",
Expand Down
3 changes: 1 addition & 2 deletions translations/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,6 @@
"Insecure Docker registries to pass to the Docker daemon. The default service CIDR range will automatically be added.": "Registros de Docker que no son seguros y que se transferirán al daemon de Docker. Se añadirá automáticamente el intervalo CIDR de servicio predeterminado.",
"Install VirtualBox and ensure it is in the path, or select an alternative value for --driver": "",
"Install the latest hyperkit binary, and run 'minikube delete'": "",
"Invalid Container Runtime: \"{{.runtime}}\". Valid runtimes are: {{.validOptions}}": "",
"Invalid port": "",
"Istio needs {{.minCPUs}} CPUs -- your configuration only allocates {{.cpus}} CPUs": "",
"Istio needs {{.minMem}}MB of memory -- your configuration only allocates {{.memory}}MB": "",
Expand Down Expand Up @@ -780,7 +779,6 @@
"VM driver is one of: %v": "El controlador de la VM es uno de los siguientes: %v",
"Valid components are: {{.valid_extra_opts}}": "",
"Validate your KVM networks. Run: virt-host-validate and then virsh net-list --all": "",
"Validation unable to parse disk size '{{.diskSize}}': {{.error}}": "",
"Verify that your HTTP_PROXY and HTTPS_PROXY environment variables are set correctly.": "",
"Verifying Kubernetes components...": "",
"Verifying dashboard health ...": "",
Expand Down Expand Up @@ -940,6 +938,7 @@
"{{.driver_name}} has less than 2 CPUs available, but Kubernetes requires at least 2 to be available": "",
"{{.driver_name}} has only {{.container_limit}}MB memory but you specified {{.specified_memory}}MB": "",
"{{.driver}} only has {{.size}}MiB available, less than the required {{.req}}MiB for Kubernetes": "",
"{{.err}}": "",
"{{.extra_option_component_name}}.{{.key}}={{.value}}": "",
"{{.name}} doesn't have images.": "",
"{{.name}} has following images:": "",
Expand Down
1 change: 1 addition & 0 deletions translations/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -948,6 +948,7 @@
"{{.driver_name}} has less than 2 CPUs available, but Kubernetes requires at least 2 to be available": "{{.driver_name}} dispose de moins de 2 processeurs disponibles, mais Kubernetes nécessite au moins 2 procésseurs pour fonctionner",
"{{.driver_name}} has only {{.container_limit}}MB memory but you specified {{.specified_memory}}MB": "{{.driver_name}} ne dispose que de {{.container_limit}}Mo de mémoire, mais vous avez spécifié {{.specified_memory}}Mo",
"{{.driver}} only has {{.size}}MiB available, less than the required {{.req}}MiB for Kubernetes": "{{.driver}} ne dispose que de {{.size}}Mio disponible, moins que les {{.req}}Mio requis pour Kubernetes",
"{{.err}}": "",
"{{.extra_option_component_name}}.{{.key}}={{.value}}": "{{.extra_option_component_name}}.{{.key}}={{.value}}",
"{{.name}} doesn't have images.": "{{.name}} n'a pas d'images.",
"{{.name}} has following images:": "{{.name}} a les images suivantes :",
Expand Down
2 changes: 1 addition & 1 deletion translations/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,6 @@
"Insecure Docker registries to pass to the Docker daemon. The default service CIDR range will automatically be added.": "Docker デーモンに渡す Docker レジストリが安全ではありません。デフォルトのサービス CIDR 範囲が自動的に追加されます",
"Install VirtualBox and ensure it is in the path, or select an alternative value for --driver": "",
"Install the latest hyperkit binary, and run 'minikube delete'": "",
"Invalid Container Runtime: \"{{.runtime}}\". Valid runtimes are: {{.validOptions}}": "",
"Invalid port": "",
"Istio needs {{.minCPUs}} CPUs -- your configuration only allocates {{.cpus}} CPUs": "",
"Istio needs {{.minMem}}MB of memory -- your configuration only allocates {{.memory}}MB": "",
Expand Down Expand Up @@ -957,6 +956,7 @@
"{{.driver}} does not appear to be installed": "{{.driver}} がインストールされていないようです",
"{{.driver}} does not appear to be installed, but is specified by an existing profile. Please run 'minikube delete' or install {{.driver}}": "{{.driver}} がインストールされていないようですが、既存のプロフィールから指定されています。「 minikube delete 」を実行、あるいは {{.driver}} をインストールしてください",
"{{.driver}} only has {{.size}}MiB available, less than the required {{.req}}MiB for Kubernetes": "",
"{{.err}}": "",
"{{.extra_option_component_name}}.{{.key}}={{.value}}": "{{.extra_option_component_name}}.{{.key}}={{.value}}",
"{{.name}} doesn't have images.": "",
"{{.name}} has following images:": "",
Expand Down
3 changes: 1 addition & 2 deletions translations/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,6 @@
"Insecure Docker registries to pass to the Docker daemon. The default service CIDR range will automatically be added.": "",
"Install VirtualBox and ensure it is in the path, or select an alternative value for --driver": "",
"Install the latest hyperkit binary, and run 'minikube delete'": "",
"Invalid Container Runtime: \"{{.runtime}}\". Valid runtimes are: {{.validOptions}}": "",
"Invalid port": "",
"Istio needs {{.minCPUs}} CPUs -- your configuration only allocates {{.cpus}} CPUs": "",
"Istio needs {{.minMem}}MB of memory -- your configuration only allocates {{.memory}}MB": "",
Expand Down Expand Up @@ -781,7 +780,6 @@
"Using the {{.driver}} driver based on user configuration": "유저 환경 설정 정보에 기반하여 {{.driver}} 드라이버를 사용하는 중",
"Valid components are: {{.valid_extra_opts}}": "",
"Validate your KVM networks. Run: virt-host-validate and then virsh net-list --all": "",
"Validation unable to parse disk size '{{.diskSize}}': {{.error}}": "",
"Verify that your HTTP_PROXY and HTTPS_PROXY environment variables are set correctly.": "",
"Verifying Kubernetes components...": "Kubernetes 구성 요소를 확인...",
"Verifying dashboard health ...": "",
Expand Down Expand Up @@ -952,6 +950,7 @@
"{{.driver_name}} has only {{.container_limit}}MB memory but you specified {{.specified_memory}}MB": "",
"{{.driver}} does not appear to be installed": "{{.driver}} 가 설치되지 않았습니다",
"{{.driver}} only has {{.size}}MiB available, less than the required {{.req}}MiB for Kubernetes": "",
"{{.err}}": "",
"{{.extra_option_component_name}}.{{.key}}={{.value}}": "",
"{{.name}} cluster does not exist": "{{.name}} 클러스터가 존재하지 않습니다",
"{{.name}} doesn't have images.": "{{.name}} 이미지가 없습니다.",
Expand Down
3 changes: 1 addition & 2 deletions translations/pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,6 @@
"Insecure Docker registries to pass to the Docker daemon. The default service CIDR range will automatically be added.": "",
"Install VirtualBox and ensure it is in the path, or select an alternative value for --driver": "",
"Install the latest hyperkit binary, and run 'minikube delete'": "",
"Invalid Container Runtime: \"{{.runtime}}\". Valid runtimes are: {{.validOptions}}": "",
"Invalid port": "",
"Invalid size passed in argument: {{.error}}": "Nieprawidłowy rozmiar przekazany w argumencie: {{.error}}",
"Istio needs {{.minCPUs}} CPUs -- your configuration only allocates {{.cpus}} CPUs": "",
Expand Down Expand Up @@ -789,7 +788,6 @@
"VM driver is one of: %v": "Sterownik wirtualnej maszyny to jeden z: %v",
"Valid components are: {{.valid_extra_opts}}": "",
"Validate your KVM networks. Run: virt-host-validate and then virsh net-list --all": "",
"Validation unable to parse disk size '{{.diskSize}}': {{.error}}": "",
"Verify that your HTTP_PROXY and HTTPS_PROXY environment variables are set correctly.": "Zweryfikuj czy zmienne HTTP_PROXY i HTTPS_PROXY są ustawione poprawnie",
"Verify the IP address of the running cluster in kubeconfig.": "Weryfikacja adresu IP działającego klastra w kubeconfig",
"Verifying Kubernetes components...": "",
Expand Down Expand Up @@ -954,6 +952,7 @@
"{{.driver_name}} has less than 2 CPUs available, but Kubernetes requires at least 2 to be available": "",
"{{.driver_name}} has only {{.container_limit}}MB memory but you specified {{.specified_memory}}MB": "",
"{{.driver}} only has {{.size}}MiB available, less than the required {{.req}}MiB for Kubernetes": "sterownik {{.driver}} ma tylko {{.size}}MiB dostępnej przestrzeni dyskowej, to mniej niż wymagane {{.req}}MiB dla Kubernetesa",
"{{.err}}": "",
"{{.extra_option_component_name}}.{{.key}}={{.value}}": "",
"{{.name}} cluster does not exist": "Klaster {{.name}} nie istnieje",
"{{.name}} doesn't have images.": "{{.name}} nie ma obrazów.",
Expand Down
3 changes: 1 addition & 2 deletions translations/strings.txt
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,6 @@
"Insecure Docker registries to pass to the Docker daemon. The default service CIDR range will automatically be added.": "",
"Install VirtualBox and ensure it is in the path, or select an alternative value for --driver": "",
"Install the latest hyperkit binary, and run 'minikube delete'": "",
"Invalid Container Runtime: \"{{.runtime}}\". Valid runtimes are: {{.validOptions}}": "",
"Invalid port": "",
"Istio needs {{.minCPUs}} CPUs -- your configuration only allocates {{.cpus}} CPUs": "",
"Istio needs {{.minMem}}MB of memory -- your configuration only allocates {{.memory}}MB": "",
Expand Down Expand Up @@ -722,7 +721,6 @@
"Using the {{.driver}} driver based on user configuration": "",
"Valid components are: {{.valid_extra_opts}}": "",
"Validate your KVM networks. Run: virt-host-validate and then virsh net-list --all": "",
"Validation unable to parse disk size '{{.diskSize}}': {{.error}}": "",
"Verify that your HTTP_PROXY and HTTPS_PROXY environment variables are set correctly.": "",
"Verifying Kubernetes components...": "",
"Verifying dashboard health ...": "",
Expand Down Expand Up @@ -880,6 +878,7 @@
"{{.driver_name}} has less than 2 CPUs available, but Kubernetes requires at least 2 to be available": "",
"{{.driver_name}} has only {{.container_limit}}MB memory but you specified {{.specified_memory}}MB": "",
"{{.driver}} only has {{.size}}MiB available, less than the required {{.req}}MiB for Kubernetes": "",
"{{.err}}": "",
"{{.extra_option_component_name}}.{{.key}}={{.value}}": "",
"{{.name}} doesn't have images.": "",
"{{.name}} has following images:": "",
Expand Down
3 changes: 1 addition & 2 deletions translations/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,6 @@
"Insecure Docker registries to pass to the Docker daemon. The default service CIDR range will automatically be added.": "传递给 Docker 守护进程的不安全 Docker 注册表。系统会自动添加默认服务 CIDR 范围。",
"Install VirtualBox and ensure it is in the path, or select an alternative value for --driver": "",
"Install the latest hyperkit binary, and run 'minikube delete'": "",
"Invalid Container Runtime: \"{{.runtime}}\". Valid runtimes are: {{.validOptions}}": "",
"Invalid port": "",
"Istio needs {{.minCPUs}} CPUs -- your configuration only allocates {{.cpus}} CPUs": "",
"Istio needs {{.minMem}}MB of memory -- your configuration only allocates {{.memory}}MB": "",
Expand Down Expand Up @@ -890,7 +889,6 @@
"VM may be unable to resolve external DNS records": "虚拟机可能无法解析外部 DNS 记录",
"Valid components are: {{.valid_extra_opts}}": "",
"Validate your KVM networks. Run: virt-host-validate and then virsh net-list --all": "",
"Validation unable to parse disk size '{{.diskSize}}': {{.error}}": "",
"Verify that your HTTP_PROXY and HTTPS_PROXY environment variables are set correctly.": "验证是否正确设置了 HTTP_PROXY 和 HTTPS_PROXY 环境变量。",
"Verify the IP address of the running cluster in kubeconfig.": "在 kubeconfig 中验证正在运行的集群 IP 地址。",
"Verifying Kubernetes components...": "",
Expand Down Expand Up @@ -1064,6 +1062,7 @@
"{{.driver}} does not appear to be installed": "似乎并未安装 {{.driver}}",
"{{.driver}} does not appear to be installed, but is specified by an existing profile. Please run 'minikube delete' or install {{.driver}}": "似乎并未安装 {{.driver}},但已被当前的配置文件指定。请执行 'minikube delete' 或者安装 {{.driver}}",
"{{.driver}} only has {{.size}}MiB available, less than the required {{.req}}MiB for Kubernetes": "",
"{{.err}}": "",
"{{.extra_option_component_name}}.{{.key}}={{.value}}": "",
"{{.name}} doesn't have images.": "",
"{{.name}} has following images:": "",
Expand Down

0 comments on commit ec2d479

Please sign in to comment.