zapier / kubechecks

Check your Kubernetes changes before they hit the cluster
https://kubechecks.readthedocs.io/en/latest/
Mozilla Public License 2.0
177 stars 16 forks source link

Unable to enable KUBECHECKS_MONITOR_ALL_APPLICATIONS #296

Open joelp172 opened 2 weeks ago

joelp172 commented 2 weeks ago

I have KubeChecks running and setup on a local MiniKube cluster along with argocd for testing and eval. I have the svcs exposed on some dev urls.

If I set KUBECHECKS_MONITOR_ALL_APPLICATIONS: false kuebchecks starts sucessfully

5:22PM INF ArgoCD client configuration auth-token=199 grpc-web-root-path= insecure=false server-addr=https://argocd.myurl-dev.co.uk
5:22PM INF not monitoring applications, MonitorAllApplications: false
5:22PM INF initializing git settings
5:22PM INF Initializing telemetry
5:22PM INF otel disabled
5:22PM INF starting web server
5:22PM INF listening for requests
Method  Path
GET /ready
GET /live
GET /metrics
POST    /hooks/github/project
5:22PM ??? ⇨ http server started on [::]:8080

I can send PRs to the webhook and it receives them fine.

However, if I set KUBECHECKS_MONITOR_ALL_APPLICATIONS: true I get the following error:

could not create ArgoCD Application Client error="dial tcp: address tcp///argocd.myurl-dev.co.uk: unknown port"

Its also the same if I use internal cluster addresses. Is there some config I am missing?

djeebus commented 1 week ago

It looks like you need <host>:<port>, not <protocol>://<host>. so instead of https://argocd.myurl-dev.co.uk, you want argocd.myurl-dev.co.uk:443. We could do a better job of validating that's set correctly, but it's how argocd's sdk expects you to pass the address