Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kubernetes Dev-Service using "api-only" will not work, if using "image.substitutor" for TestContainers #38152

Open
Tanemahuta opened this issue Jan 12, 2024 · 2 comments · May be fixed by #38154

Comments

@Tanemahuta
Copy link

Describe the bug

When using an Image Substitutor (either image.substitutor in ~/.testcontainer.properties or Env TESTCONTAINERS_IMAGE_SUBSTITUTOR, see here) for test-containers, the kubernetes client configuration may not detect the kubernetes-client-config will fail.

Expected behavior

Kubernetes configuration is created based on the requested service.

Actual behavior

RuntimeException is thrown.

How to Reproduce?

  1. Create a class implementing org.testcontainers.utility.ImageNameSubstitutor, replacing the e.g. the registry for kube-api.
  2. One of
    1. Set EnvVar TESTCONTAINERS_IMAGE_SUBSTITUTOR to the class' name
    2. Create file or add line in ~/.testcontainers.properties image.substitutor= pointing to the class' name
  3. @Inject the KubernetesClient in your test

Output of uname -a or ver

Darwin 23.2.0 Darwin Kernel Version 23.2.0: Wed Nov 15 21:54:10 PST 2023; root:xnu-10002.61.3~2/RELEASE_X86_64 x86_64

Output of java -version

openjdk version "19.0.2" 2023-01-17

Quarkus version or git rev

3.6.4

Build tool (ie. output of mvnw --version or gradlew --version)

Gradle 8.5

Additional information

No response

Copy link

quarkus-bot bot commented Jan 12, 2024

/cc @geoand (devservices,kubernetes), @iocanel (kubernetes), @stuartwdouglas (devservices)

Tanemahuta added a commit to Tanemahuta/quarkus that referenced this issue Jan 12, 2024
@geoand
Copy link
Contributor

geoand commented Jan 12, 2024

Can you please add the stacktrace that you are getting when the problem occurs?

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants