Skip to content

feat: enable Kubernetes service discovery client#144

Merged
TheMeinerLP merged 1 commit into
mainfrom
feat/k8s-service-discovery
Jun 22, 2026
Merged

feat: enable Kubernetes service discovery client#144
TheMeinerLP merged 1 commit into
mainfrom
feat/k8s-service-discovery

Conversation

@TheMeinerLP

Copy link
Copy Markdown
Contributor

Why

In-cluster, /health showed compositeDiscoveryClient with an empty services: {} — no discovery backend was configured. This adds Micronaut's Kubernetes discovery client so the app discovers services in its own namespace.

What

  • Add micronaut-kubernetes-discovery-client (micronaut-kubernetes 7.1.1).

The module's beans only activate in the Kubernetes environment, so it is inert for local/dev runs. In-cluster it additionally requires:

  • RBAC: get/list/watch on services and endpoints (added in the Helm chart helm/micronaut).
  • The k8s environment active (set via the deployment's profiles).

Mirrors the Otis change; see the companion Kubernetes-FLUX change for the RBAC + release wiring.

Verification

  • ./gradlew compileJava
  • Resolves: micronaut-kubernetes-discovery-client:7.1.1.

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.
@github-actions

Copy link
Copy Markdown
Contributor

Test results

 27 files   27 suites   3s ⏱️
 53 tests  41 ✅ 12 💤 0 ❌
159 runs  123 ✅ 36 💤 0 ❌

Results for commit fe78489.

@TheMeinerLP TheMeinerLP merged commit 0f3fc6f into main Jun 22, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant