Skip to content

Conversation

metacosm
Copy link
Contributor

@metacosm metacosm commented Sep 8, 2025

This PR migrates the Kubernetes Dev Service to the new architecture and should fix #49381 and #49405

Resolves #47603.

The goal is for a kube container with the same configuration to be found if running and an associated build item properly produced for the existing service so that the information from the running service can be leveraged.

/cc @LarsSven @holly-cummins @ozangunalp

Copy link

github-actions bot commented Sep 8, 2025

🎊 PR Preview 1c5ad99 has been successfully built and deployed to https://quarkus-pr-main-49944-preview.surge.sh/version/main/guides/

  • Images of blog posts older than 3 months are not available.
  • Newsletters older than 3 months are not available.

@LarsSven
Copy link
Contributor

LarsSven commented Sep 9, 2025

That's amazing to see! Will make sure to test this soon against our setup.

@LarsSven
Copy link
Contributor

LarsSven commented Sep 9, 2025

For our setup, the manifest application feature of the dev service is now producing:

Failed to create Kubernetes client while trying to apply manifests.
java.lang.IllegalStateException: Mapped port can only be obtained after the container is started
	at org.testcontainers.shaded.com.google.common.base.Preconditions.checkState(Preconditions.java:513)
	at org.testcontainers.containers.ContainerState.getMappedPort(ContainerState.java:161)
	at com.dajudge.kindcontainer.KubernetesContainer.getKubeconfig(KubernetesContainer.java:156)
	at io.quarkus.kubernetes.client.deployment.DevServicesKubernetesProcessor$1.getKubeConfig(DevServicesKubernetesProcessor.java:147)
	at io.quarkus.kubernetes.client.spi.KubernetesDevServiceInfoBuildItem.getKubeConfig(KubernetesDevServiceInfoBuildItem.java:21)
	at io.quarkus.kubernetes.client.deployment.DevServicesKubernetesProcessor.applyManifests(DevServicesKubernetesProcessor.java:257)
	at java.base/java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:733)
	at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:874)

How to reproduce:

  1. Clone https://gitlab.com/rug-digitallab/products/themis/themis-core.git
  2. Checkout ls/207-scheduler
  3. Ensure you have a local build of Quarkus (it points at 999-SNAPSHOT)
  4. ./gradlew :runtime-reporter:test

@LarsSven
Copy link
Contributor

LarsSven commented Sep 9, 2025

You'll see the same failure in the integration tests: ./mvnw verify -f integration-tests/kubernetes-client-devservices -Dtest-containers on Quarkus itself.

Does this test run as part of the CI? Since it does require the container profile.

@metacosm
Copy link
Contributor Author

metacosm commented Sep 9, 2025

Yep, thanks for checking quickly, I'm working on it.

@LarsSven
Copy link
Contributor

@metacosm @holly-cummins I am curious though, for the sake of knowing how well-protected the manifest application is from regressions, does the -Dtest-containers run in the CI, or are they tests that only trigger if you run them locally? Because the most important test for protecting against regressions is an integration test which requires a docker container.

@holly-cummins
Copy link
Contributor

@metacosm @holly-cummins I am curious though, for the sake of knowing how well-protected the manifest application is from regressions, does the -Dtest-containers run in the CI, or are they tests that only trigger if you run them locally? Because the most important test for protecting against regressions is an integration test which requires a docker container.

The default run mode in the CI is -Dtest-containers, except on Windows, where it would be a container-in-container situation and not possible.

@LarsSven
Copy link
Contributor

Okay perfect, then it should be good :)

@metacosm metacosm force-pushed the new-kube-dev-service branch from 8bbd68e to eb2f79c Compare September 11, 2025 16:57
@metacosm metacosm force-pushed the new-kube-dev-service branch from eb2f79c to 354990d Compare September 11, 2025 16:58
@metacosm
Copy link
Contributor Author

Things are not working at the moment. Just pushed for sync (and ensuing discussion) purposes.

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