kubernetes-client icon indicating copy to clipboard operation
kubernetes-client copied to clipboard

Ability to give port number to EnableKubernetesMockClient

Open KaanSimsek opened this issue 1 year ago • 0 comments

Is your task related to a problem? Please describe

In my project, I need to specify the port number on which the mock server will run. When I checked the source code, I noticed there is no option for this, and the port number is randomly changing. I am planning to open a PR for this.

Describe the solution you'd like

For a solution, we can add an extra integer field to EnableKubernetesMockClient with a default value of 0. Then, inside KubernetesMockServerExtension, instead of calling mock.init(), we can call mock.init(InetAddress.getLocalHost(), a.port()).

Describe alternatives you've considered

No response

Additional context

No response

KaanSimsek avatar May 27 '24 09:05 KaanSimsek