Open rohanKanojia opened 3 years ago
It's perfectly possible to write admission controllers and conversion webhooks using Fabric8 KC, but it requires having a Webhook REST API working in the app because the Kubernetes API server makes an HTTPS POST request to the given service and URL path.
So, one option I see is to just have an example with a framework like Quarkus to "test" this, anyway it should be possible to write an integration test but I'm not sure how much work would it require to have a proper integration in the actual itests module.
This issue has been automatically marked as stale because it has not had any activity since 90 days. It will be closed if no further activity occurs within 7 days. Thank you for your contributions!
Hi @rohanKanojia i would like to take this up if no one is working on it.
I think that this should be possible now by leveraging the Kube API test module.
I think that this should be possible now by leveraging the Kube API test module.
Yes, this should be possible with this.
Also you might find this useful: https://github.com/operator-framework/josdk-webhooks
As suggested by @jorsol in https://github.com/fabric8io/kubernetes-client/pull/3363#issuecomment-892806386 , We should test admission and conversion webhooks written using Fabric8 Kubernetes Client. I'm not sure if anyone has done it yet in Java. We need to check if a user is able to write an admission controller using Fabric8 Kubernetes Client. You can check Kubernetes documentation[0] on how to do this.
If we're able to write one without any problems. We need to add integration tests for the following scenarios:
[0] https://kubernetes.io/blog/2019/03/21/a-guide-to-kubernetes-admission-controllers/