zapier/kubechecks

POSTs result in 404s

audrey-mux opened this issue · 4 comments

Hi
I'm trying this out but not getting very far, as POSTs always result in a 404.

Pod log:

11:20PM DBG Debug level logging enabled.
11:20PM INF Initialized logger.
11:20PM INF setting logrus log level log_level=debug
11:20PM INF Initializing telemetry
11:20PM INF otel disabled
11:20PM INF Server Configuration: 
11:20PM INF Webhook URL Base: https://kubechecks.mycompany.io
11:20PM INF Webhook URL Prefix: 
11:20PM INF VCS Type: github
Starting KubeChecks: v1.0.7-linux-amd64 7e4bc21
11:20PM DBG building VCS to Application Map
11:20PM DBG Token Length - 40
11:20PM INF setting up hook handler path=/hooks
11:20PM INF hook handler setup complete path=/hooks projectPath=/github/project
11:20PM ??? ⇨ http server started on [::]:8080

Configmap:

  KUBECHECKS_ARGOCD_API_SERVER_ADDR: https://argo.mycompany.io
  KUBECHECKS_LOG_LEVEL: debug
  KUBECHECKS_PERSIST_LOG_LEVEL: 'true'
  KUBECHECKS_VCS_BASE_URL: https://github.com/company/repo
  KUBECHECKS_VCS_TYPE: github
  KUBECHECKS_WEBHOOK_URL_BASE: https://kubechecks.mycompany.io

Ingress:

  rules:
    - host: kubechecks.mycompany.io
      http:
        paths:
          - path: /hooks
            pathType: Prefix
            backend:
              service:
                name: kubechecks
                port:
                  number: 8080

I thought maybe my Ingress config was wrong so i tried execing into the pod and curling localhost:8080/hooks and that results in a 404 too.

Pod isn't spitting out any other info, so what did i screw up?

try http://localhost:8080/hooks/github/project? I think there's a bit more path necessary; we try to communicate it in the message that starts "hook handler setup complete", but we could do a better job.

try http://localhost:8080/hooks/github/project? I think there's a bit more path necessary; we try to communicate it in the message that starts "hook handler setup complete", but we could do a better job.

Ah! Ok, set my webhook to that and it's now receiving events. It didn't work with a secret set though, even though KUBECHECKS_WEBHOOK_SECRET and the Github webhook secret matched.

Glad it works! We may certainly have a bug in the webhook secret usage in github, would you mind creating an issue?

Sure! I'll close this one, thanks!