zapier / kubechecks

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

ARGOCD_API_INSECURE not being respected #168

Open pauloconnor opened 5 months ago

pauloconnor commented 5 months ago

I have a secret that contains the environment variable

KUBECHECKS_ARGOCD_API_INSECURE: "true"

But the app tries to talk to a https endpoint, regardless of the value. Oddly, I don't see any argocd client information being posted to the pod log

Version: 1.3.3 Pod log:

3:17PM DBG Debug level logging enabled.
3:17PM TRC Trace level logging enabled.
3:17PM INF Initialized logger.
3:17PM INF setting logrus log level log_level=error
3:17PM INF Initializing telemetry
3:17PM INF otel disabled
3:17PM INF Server Configuration: 
3:17PM INF Webhook URL Base: https://kubechecks-webhook.prod.foo.com
3:17PM INF Webhook URL Prefix: 
3:17PM INF VCS Type: github
3:17PM DBG Token Length - 40
3:17PM INF Initializing git settings
3:17PM DBG building command args=["config","--global","user.email","kubechecks@zapier.com"]
3:17PM DBG building command args=["config","--global","user.name","deploy"]
3:17PM DBG building command args=["https://deploy:********@github.com"]
3:17PM DBG building command args=["config","--global","credential.helper","store"]
3:17PM DBG git credentials set
Starting KubeChecks: v1.3.3 197a3c0
3:17PM DBG building VCS to Application Map
3:17PM WRN failed to build vcs app map from argo error="failed to list applications: failed to applications: rpc error: code = Unknown desc = Post \"https://argocd-server.argocd.svc.cluster.local:443/application.ApplicationService/List\": EOF"
Method  Path
GET /ready
GET /live
POST    /hooks/github/project
GET /metrics
3:17PM ??? ⇨ http server started on [::]:8080
3:18PM DBG Received hook request
3:18PM INF ignoring Github pull request event due to non commit based action action=closed
3:18PM DBG Ignoring event, not a merge request
djeebus commented 5 months ago

It's not logged because you're running 1.3.3, which didn't log that information. That said, it looks like Insecure in this context means don't validate the certificate. I think you want to modify the PlainText flag, which we don't currently expose. Happy to accept merge requests! Otherwise we'll add it to the short list.