upbound / up

The @upbound CLI
Apache License 2.0
50 stars 42 forks source link

`up version` returns an error if the current kube config does not point to a cluster with crossplane and upbound spaces-controller installed. #453

Open djeremiah opened 3 months ago

djeremiah commented 3 months ago

What happened?

When running up version, the default value for --client=false causes the command to log an error:

Client Version: v0.26.0
up: error: version.Cmd.Run(): unable to get crossplane version: Crossplane version or image tag not found

Defaulting to an opt-out for something that errors out if you haven't yet installed crossplane and just want to check the cli is not a great experience. Ideally, the experience could either be:

Perhaps something like:

Client Version: v0.26.0
Server Version: Crossplane not found in current kubernetes context
Spaces Controller Version: Upbound spaces-controller not found in current kubernetes context

How can we reproduce it?

Run up version without crossplane or spaces installed

haarchri commented 3 months ago
kubectl version
Client Version: version.Info{Major:"1", Minor:"27", GitVersion:"v1.27.3", GitCommit:"25b4e43193bcda6c7328a6d147b1fb73a33f1598", GitTreeState:"clean", BuildDate:"2023-06-14T09:47:38Z", GoVersion:"go1.20.5", Compiler:"gc", Platform:"darwin/arm64"}
Kustomize Version: v5.0.1
The connection to the server 127.0.0.1:60695 was refused - did you specify the right host or port?
haarchri commented 3 months ago

think you get the same in kubectl - an error from the libraries ?