We've discussed adding a feature for this but don't have a solution yet. It would likely require the pod to ask for the data since routes can be late bound. It may also imply that we endorse the idea of "primary name" (which we are extremely close to with the way route host names are defaulted).
The easiest approach would be to allow DNS to provide the answer (SVC.NS.external.cluster.local CNAME to the app author selectable primary name). That's a bit harder to script than a downward API, but is consistent with the new ExternalName service in Kube/OS 1.4 (where you can CNAME a service to another DNS name).
Early binding in the template is problematic if admins are using custom routers and couples templates to routes too closely. Adding downward API for the pod is probably too hard. We've discussed having a controller write an annotation to the service indicating the desired external name but users would not have an easy way to get at that info.
On Sep 23, 2016, at 3:11 PM, Jonathan Yu <jawnsy redhat com> wrote: