pyctuator icon indicating copy to clipboard operation
pyctuator copied to clipboard

Support for Kubernetes Discovery Without Requiring registration_url

Open banyan-god opened this issue 6 months ago • 0 comments

Problem

Currently, the Pyctuator constructor requires a registration_url parameter and always attempts to register with Spring Boot Admin via this URL. However, when using Kubernetes discovery in Spring Boot Admin, manual registration is not needed or desired. Supplying a dummy URL results in warnings like:

WARNING:root:Failed registering with boot-admin, [Errno -2] Name or service not known (<class 'socket.gaierror'>)

This is noisy and confusing, especially in environments where K8s discovery is the preferred mechanism. Feature Request

Please add support for a "discovery-only" mode in Pyctuator, where:

The registration_url parameter is optional.

If registration_url is not provided (or set to None), Pyctuator does not attempt to register with Spring Boot Admin.

Pyctuator still exposes all actuator endpoints as usual.

Use Case

In Kubernetes environments, Spring Boot Admin can auto-discover services via the Kubernetes API.

Manual registration is not needed, and the current requirement for registration_url leads to unnecessary warnings.

Proposed Solution

Make registration_url optional in the Pyctuator constructor.

If not provided, skip the registration logic entirely.

References

[Spring Boot Admin Kubernetes Discovery docs](https://codecentric.github.io/spring-boot-admin/current/#kubernetes)

[Related discussion in the community](https://github.com/SolarEdgeTech/pyctuator/issues)

Thank you for your work on Pyctuator!

banyan-god avatar Jun 06 '25 23:06 banyan-god