Change the spring boot admin registery unique ID

11/25/2019

I have a requirement where my client applications are having almost same properties and even the URL is same, as they are running behind a load balancer, the only change they have is a particular set of environment properties that differ.

Is it possible to register them uniquely based on that property.

-- Ask149
kubernetes
openshift
openshift-origin
spring-boot-admin

1 Answer

11/25/2019

I would say there are a few approaches.

  • One would be loading Environment Variables from a Kubernetes Secret.

  • Second using helm(https://helm.sh/)

    Helm helps you manage Kubernetes applications — Helm Charts help you define, install, and upgrade even the most complex Kubernetes application.

    Charts are easy to create, version, share, and publish — so start using Helm and stop the copy-and-paste.

Explanation: If you would use a secret option, you would probably create two separate secrets with env variables that you need and load those based on the app name, or if you have them setup in different namespaces then copy the secret over to each as those resources will not work between different namespaces.

If you would use helm, you will have to write your chart and put the env variables into values.yaml or mix it together and load secret from inside Kubernetes.

This will work on Kubernetes, I do not know (based on your tags) if it's the same on OpenShift.

Please provide some samples of what you have already done and I'll provide more details.

-- Crou
Source: StackOverflow