You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Under the hood, a K3S Kubernetes distribution is provisioned and used for test purposes.
What do we lack from this setup is an ability to test ValidatingWebhookConfiguration resource from Kubernetes. We want to add a validation webhook to one of the resources that the Operator reconciles, therefore we expose a validation endpoint that is later called by Kubernetes API Server when a resource is changed.
The problem is that it is not possible to test this scenario with the current implementation, because there is no way to call the service from within Kubernetes docker container:
Description
We have a Kubernetes Operator implemented with Java Operator SDK and Quarkus.
For integration tests, we leverage dev services for Kubernetes provided by Quarkus:
Under the hood, a K3S Kubernetes distribution is provisioned and used for test purposes.
What do we lack from this setup is an ability to test
ValidatingWebhookConfiguration
resource from Kubernetes. We want to add a validation webhook to one of the resources that the Operator reconciles, therefore we expose a validation endpoint that is later called by Kubernetes API Server when a resource is changed.The problem is that it is not possible to test this scenario with the current implementation, because there is no way to call the service from within Kubernetes docker container:
I was able to test this scenario when I explicitly created a container and enabled
accessToHost
:Then I had to expose port, like below, and a call started to work:
To sum up, I am wondering if it is possible to expose a property, for example:
What do you think?
Implementation ideas
No response
The text was updated successfully, but these errors were encountered: