Hi Team,
We are facing an issue with service registry while doing the Blue Green deployment. When we first deploy an app named myapp, in service registry its route is getting registered as myapp-new, This url is changing when we re deploy to the actual/intended one (myapp). Due to this reason, any new app we deploy in PCF we are deploying it twice. I am looking for a solution where the 'new ' is not appended to the url and we dont have to deploy twice. We have not faced this issue in PCF 1, now we migrated to PCF 2 and we get this issue.
service discovery will register the name of the app as specified in the manifest by default unless the app property "spring.application.name" is specified.
see docs for some more information
https://docs.pivotal.io/spring-cloud-services/2-0/common/service-registry/writing-client-applications.html#register-a-service
We have added this property in yml already. But still facing the issue. spring.application.name -> this property is set to our desired app name
spring.application.name would need to be set in the "application.properties" file.
I have it already. The problem is in re staging the application. It worked in PCF 1 and we recently migrated to PCF 2 and now we see this issue with service registry route.
what you are describing does not sound like the expected behavior. I would recommend opening a support ticket so we can perform deeper investigation.
This issue is resolved, I have set the API_NAME in jenkins pipeline before the restage
cf set-env ${API_NAME}-dev VARIABLE_NAME VARIABLE_VALUE.
This helped me with getting the correct route registered in Servie Registry