Skip to content

Ability to set the host gateway for k8s devcontainer #46588

@Baachi

Description

@Baachi

Description

Heyho!

We are building our own Kubernetes operator based on the Java operator SDK and quarkus. To test our operator works, we are writing Junit tests. The application deployed through our cluster needs a MongoDB database, which the operator creates and passes the credentials to. So, in our test setup, we need the operator to be able to communicate with MongoDB, and the container deployed in k3s can access the MongoDB container. Currently, we set it to host.docker.internal which works fine for MacOS and Windows but not on Linux since on Linux, the k3s container needs to be added via "--add-host".

Implementation ideas

Implement a new configuration option "quarkus.kubernetes-client.devservices.hosts" which is getting passed to GenericContainer::withExtraHost.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions