kubeshop / kusk-gateway

Kusk-gateway is an OpenAPI-driven API Gateway for Kubernetes
https://kubeshop.github.io/kusk-gateway/
MIT License
253 stars 21 forks source link

extended kusk version #852

Closed jasmingacic closed 1 year ago

jasmingacic commented 1 year ago

Signed-off-by: jasmingacic jasmin.gacic@gmail.com fixes #810

# go run main.go version
Kusk version 
https://github.com/kubeshop/kusk-gateway/releases/latest

kusk-gateway-manager:  kubeshop/kusk-gateway:v1.3.3, gcr.io/kubebuilder/kube-rbac-proxy:v0.8.0
kusk-gateway-api:  kubeshop/kusk-gateway-api:v1.1.5
kusk-gateway-envoy-fleet:  docker.io/envoyproxy/envoy:v1.23.1
kusk-gateway-private-envoy-fleet:  docker.io/envoyproxy/envoy:v1.23.1
kusk-gateway-dashboard:  kubeshop/kusk-gateway-dashboard:v1.2.0
netlify[bot] commented 1 year ago

Deploy Preview for kusk-docs-preview canceled.

Name Link
Latest commit 1d412e460c24fa642a5e7318371a5444a1676002
Latest deploy log https://app.netlify.com/sites/kusk-docs-preview/deploys/634404eda946ae0009593166
jasmingacic commented 1 year ago

Yes we can have it any way we want.

We should also provide status of kusk installed or running.

I was thinking maybe we provide json output as well. It could be handy for automation.

kylehodgetts commented 1 year ago

How does this behave if the cluster is unreachable?

mbana commented 1 year ago

How does this behave if the cluster is unreachable?

When I'm not running the cluster I get this output:

$ go run main.go version            
Kusk version 
https://github.com/kubeshop/kusk-gateway/releases/latest

Error: Get "https://192.168.39.182:8443/api?timeout=32s": dial tcp 192.168.39.182:8443: connect: no route to host
Usage:
  kusk version [flags]

Flags:
  -h, --help   help for version

Global Flags:
      --config string   config file (default is $HOME/.kusk.yaml)
  -v, --verbose         Help message for toggle

❌ Get "https://192.168.39.182:8443/api?timeout=32s": dial tcp 192.168.39.182:8443: connect: no route to host
exit status 1

Perhaps, you could read the manifests from the kusk binary to get the versions, if the cluster isn't up?

jasmingacic commented 1 year ago

I just added this for invalid config or inaccessible cluster: image

jasmingacic commented 1 year ago

I just tweaked so it shows like this: image The reason for this is that our manager pod has two containers. One is ours kubeshop/kusk-gateway:v1.3.3 and the other one is added by the kubebuilder gcr.io/kubebuilder/kube-rbac-proxy:v0.8.0