openshift-roadshow / parksmap-web

This is the web and service gateway component. It's implemented in SpringBoot
Apache License 2.0
46 stars 119 forks source link

Application searches for Endpoints - which fails if service name is different from route name #6

Open wkulhanek opened 6 years ago

wkulhanek commented 6 years ago

The application fails when the route name is different from the service name.

E.g. there are two versions of a backend at mlbparks-blue and mlbparks-green (which would also be the service name). And then there is one route 'mlbparks' that points to either the service 'mlbparks-blue' or 'mlbparks-green' depending which is currently active.

The application currently looks for an Endpoint 'mlbparks' - which does not exist since the endpoints have the same names as the services.

It actually crashes in the getEndpointsAddressSize method with a NullPointerException.

It would be good to modify the application to not store endpoints but actual route (or service) names.

@jorgemoralespou