chdsbd / kodiak

🔮 A bot to automatically update and merge GitHub PRs
https://kodiakhq.com
GNU Affero General Public License v3.0
1.03k stars 65 forks source link

Self-hosting error: Method Not Allowed #870

Closed yash-zededa closed 8 months ago

yash-zededa commented 1 year ago

Hi,

I have deployed the kodiak helm chart in our k8s cluster. The app and the redis pods are running fine.

When I try to test the integration by delivering the payload I get an error.

Method Not Allowed

chdsbd commented 1 year ago

Hi,

Do you have more context or logs? There's not much to go off of here.

I'd recommend the hosted Kodiak app via https://github.com/marketplace/kodiakhq if you're having trouble self hosting

yash-zededa commented 1 year ago

@chdsbd I have deployed the version cdignam/kodiak:v0.54.0 using k8s. I can see status OK when I hit the endpoint.

But when github tries to deliver the payload it gives me an error.

Method not allowed

sbdchd commented 1 year ago

To clarify, the webhook endpoint is giving a method not allowed when GitHub tries to send a request to it?

Do you have a log line for it?

yash-zededa commented 1 year ago

I have resolved that issue. I am facing a different issue now. When I try to hit the endpoint of the kodiak bot using the github payload I am getting an authentication issue.

As per my understanding kodiak uses github private key to create a jwt token which is then used for authentication, right ?

Somehow the jwt authentication is not working.

I am using helm chart for deploying the kodiak bot on k8s. Below is the configuration I am using.

  repository: cdignam/kodiak
  pullPolicy: IfNotPresent
  tag: d6f1720f7ad7babb2f25283d9bf51c3f7e031a44
janhartigan commented 8 months ago

@yash-zededa come on man, don't be the guy on the internet who says "I resolved my issue" without explaining what you did to fix it. Nobody likes that guy.

janhartigan commented 8 months ago

OK so for anyone coming back to this issue from the future, the issue was that I ignored this line in the docs:

Use your Heroku app hostname for the webhook URL with /api/github/hook appended. Something like https://my-kodiak-app.herokuapp.com/api/github/hook.

So whatever your webhook URL is, you need to make sure you append /api/github/hook in the GitHub app settings.

janhartigan commented 8 months ago

@chdsbd @sbdchd given the above and the fact that the OP disappeared, you can probably close this issue.