issue with splitting hostname from route #26
Description
I've encountered an issue while trying various route paths (paths that used to work with the old contraband autopilot)
Here's my example:
cf zero-downtime-push armada-liquid -f pcf2/manifest.yaml --legacy-push --vars-file pcf2/vars-uat.yaml --show-crash-log
manifest.yaml
---
default_envs: &default_envs
SPRING_PROFILES_ACTIVE: common,dev,cloud
TZ: GMT
defaults: &defaults
buildpacks:
- java_buildpack_offline
env:
*default_envs
timeout: 120
services:
- vault-service
applications:
- name: armada-openshift
routes:
- route: armada-openshift((domain_suffix))
<<: *defaults
path: armada-openshift-1.0.0-exec.jar
I have tried two variations so far that do not work
vars-uat.yaml
domain_suffix: "-uat.apps.cf2.com"
expected: armada-openshift-uat.apps.cf2.com
result: armada-uat.apps.cf2.com
check if routes should be added or switched from existing one
map routes to new application armada-openshift
map route [map-route armada-openshift apps.cf2.com --hostname armada-uat]Creating route armada-uat.apps.cf2.com for org TZU0 / space tzu0_uat as akrush...
OK
Route armada-uat.apps.cf2.com already exists
Adding route armada-uat.apps.cf2.com to app armada-openshift in org TZU0 / space tzu0_uat as akrush...
and
vars-uat.yaml
domain_suffix: ".uat.apps.cf2.com"
expected: armada-openshift.uat.apps.cf2.com
result: error
check if routes should be added or switched from existing one
map routes to new application armada-openshift
map route [map-route armada-openshift apps.cf2.com --hostname armada.uat]Creating route armada.uat.apps.cf2.com for org TZU0 / space tzu0_uat as akrush...
FAILED
Error resolving route:
Server error, status code: 400, error code: 210001, message: The route is invalid: host format
could not map route armada.uat.apps.cf2.com to application%!(EXTRA string=armada-openshift)
both of these setups result in non-optimal results where the former sets all routes to armada-uat.apps.cf2.com
instead of the full route name
and the latter just doesn't work at all
This does work with the following though:
vars-uat.yaml
domain_suffix: ".apps.cf2.com"
To be completely honest, I don't know if it has to do with the vars file (although my guess would be no) however I am away from my work laptop right now so I wanted to post this before going to bed.
Best,
Alex