From 257018b7864c58387b56eb1a4283eee329fc084b Mon Sep 17 00:00:00 2001 From: TheMeinerLP Date: Mon, 22 Jun 2026 12:59:11 +0200 Subject: [PATCH] feat(discovery): add Micronaut Kubernetes service discovery client Add micronaut-kubernetes-discovery-client so the app discovers services in its own namespace via the Kubernetes API, populating the discovery client (previously the compositeDiscoveryClient health showed an empty services map). The module's beans require the k8s environment, so this stays inert in local/dev. In-cluster it needs RBAC to read services/endpoints (handled in the Helm chart) and the `k8s` environment active. --- backend/build.gradle.kts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backend/build.gradle.kts b/backend/build.gradle.kts index 09b0cfe..5b3d26b 100644 --- a/backend/build.gradle.kts +++ b/backend/build.gradle.kts @@ -19,6 +19,9 @@ dependencies { implementation(mn.micronaut.management) implementation(mn.micronaut.micrometer.core) implementation(mn.micronaut.micrometer.registry.prometheus) + // Kubernetes service discovery — beans only activate in the k8s environment, + // so this is inert in local/dev. Needs RBAC (read services/endpoints) in-cluster. + implementation(mn.micronaut.kubernetes.discovery.client) implementation(mn.micronaut.http.client.jdk) implementation(mn.micronaut.openapi) implementation(mn.swagger.core)