Merge pull request #9291 from priyawadhwa/improve-error
Add advice for the DRV_CP_ENDPOINT errorpull/9296/head
commit
8190e184c0
|
@ -311,7 +311,7 @@ func setupKubeAdm(mAPI libmachine.API, cfg config.ClusterConfig, n config.Node,
|
|||
func setupKubeconfig(h *host.Host, cc *config.ClusterConfig, n *config.Node, clusterName string) *kubeconfig.Settings {
|
||||
addr, err := apiServerURL(*h, *cc, *n)
|
||||
if err != nil {
|
||||
exit.Error(reason.DrvCPEndpoint, "Failed to get API Server URL", err)
|
||||
exit.Message(reason.DrvCPEndpoint, fmt.Sprintf("failed to get API Server URL: %v", err), out.V{"profileArg": fmt.Sprintf("--profile=%s", clusterName)})
|
||||
}
|
||||
|
||||
if cc.KubernetesConfig.APIServerName != constants.APIServerName {
|
||||
|
|
|
@ -207,7 +207,13 @@ var (
|
|||
ProviderNotFound = Kind{ID: "PROVIDER_NOT_FOUND", ExitCode: ExProviderNotFound}
|
||||
ProviderUnavailable = Kind{ID: "PROVIDER_UNAVAILABLE", ExitCode: ExProviderNotFound, Style: style.Shrug}
|
||||
|
||||
DrvCPEndpoint = Kind{ID: "DRV_CP_ENDPOINT", ExitCode: ExDriverError}
|
||||
DrvCPEndpoint = Kind{ID: "DRV_CP_ENDPOINT",
|
||||
Advice: `Recreate the cluster by running:
|
||||
minikube delete {{.profileArg}}
|
||||
minikube start {{.profileArg}}`,
|
||||
ExitCode: ExDriverError,
|
||||
Style: style.Failure,
|
||||
}
|
||||
DrvPortForward = Kind{ID: "DRV_PORT_FORWARD", ExitCode: ExDriverError}
|
||||
DrvUnsupportedMulti = Kind{ID: "DRV_UNSUPPORTED_MULTINODE", ExitCode: ExDriverConflict}
|
||||
DrvUnsupportedOS = Kind{ID: "DRV_UNSUPPORTED_OS", ExitCode: ExDriverUnsupported}
|
||||
|
|
Loading…
Reference in New Issue