spring-boot-admin icon indicating copy to clipboard operation
spring-boot-admin copied to clipboard

config for show/hide instances URI

Open hamid646m opened this issue 2 years ago • 5 comments

How about adding a config to show/hide instances URI? some instances are not exposed and having the URI there give wrong impression.

hamid646m avatar Jun 09 '23 08:06 hamid646m

Hi @hamid646m

if we understand correctly, you have some services (e.g. in Kubernetes) that are not reachable from the outside (e.g. from user that uses SBA Frontend in browser). So clicking the link to the service in the SBA Frontend does not work and you want to remove the display of the uri from the service. That would also mean to remove the link to health and actuator endpoints from the detail view of the service.

Things that would need to be done:

  • pass the info that uri should be hidden with registration
  • pass the info that uri should be hidden with discovery (probably via metadata)
  • evaluate the property in frontend

If you want to contribute that feature we would be happy to get a pull request. Otherwise we can implement that once someone has time.

erikpetzold avatar Jun 23 '23 06:06 erikpetzold

Hi @erikpetzold is this issue still open for contribution? If yes, @erikpetzold, any suggestions on the implementation flow and design are welcomed.

ukasus avatar Mar 25 '24 16:03 ukasus

Hi @ukasus, yes this is still open and could be implemented. We're happy that you want to contribute.

The main steps are already outlined in the previous message. Keep in mind that there are 2 ways to add clients, self registration and discovery - both need to be capable of passing that information. Of course you can start with one first and get it working, then think about the other. I have not thought about the implementation yet, but see for example DefaultServiceInstanceConverter for how to get Metadata from discovered services and store information about it.

You can also create a WIP Pull Request wih a first draft of your implementation and get feedback before implementing every detail and all the tests etc. So you don't put too much effort in a wrong direction.

If you have a specific question also feel free to ask here or in the WIP PR.

erikpetzold avatar Mar 25 '24 17:03 erikpetzold

Hi @erikpetzold, thanks for your response and valuable suggestion. We are showcasing the instance URL in several views (instance view list, instance homepage, etc.). Do we need to mask all of the occurrences, or the target view is the instance list view only?

ukasus avatar Apr 08 '24 18:04 ukasus

I'm not sure what you mean, but I think if the flag is set, all of the links using this url should be removed. See also above:

That would also mean to remove the link to health and actuator endpoints from the detail view of the service.

As I wrote you can start small and exted step by step, if something is missing you will get feedback from the team.

erikpetzold avatar Apr 09 '24 07:04 erikpetzold