From fe78489d99ff857e683fb53e04396ed5c3db86ae Mon Sep 17 00:00:00 2001 From: TheMeinerLP Date: Mon, 22 Jun 2026 13:00:06 +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. --- build.gradle.kts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build.gradle.kts b/build.gradle.kts index 249b646..bc93cfd 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -41,6 +41,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) // External Dependencies implementation(mn.mariadb.java.client) implementation(mn.postgresql)