robusta-dev / kubewatch

Watch k8s events and trigger Handlers
Apache License 2.0
547 stars 79 forks source link

Add TLS option for webhook #7

Closed aldlfkahs closed 1 year ago

aldlfkahs commented 1 year ago

Current code cannot handle https case for webhook, so I implemented tls option.

I added two configuration for webhook; tlsskip and cert.

I also updated config/sample.go and examples/kubewatch.conf.webhook.yaml for usage example.

I tried to keep code convention but I cannot sure, so any comment for my code is welcome.

Also I have a question, does this project provides any official image for kubewatch? Because bitnami/kubewatch does not updated for last 4 months.

Thanks.

arikalon1 commented 1 year ago

Thanks for this PR @aldlfkahs

We do have an official image of Kubewatch. The latest image is: us-central1-docker.pkg.dev/genuine-flight-317411/devel/kubewatch:v1.13 (doesn't include your PR yet)

We'll add the latest image available to the project reamde

arikalon1 commented 1 year ago

btw, I think we could work with https before, just not with self signed certificates. right?

aldlfkahs commented 1 year ago

@arikalon1 Thanks for replying.

btw, I think we could work with https before, just not with self signed certificates. right?

Yes, you are right. It's for self signed certificates case. My explanation wasn't enough I think.

I will fix codes according to your comments after I clearly understand your second comment!