On Fri, Apr 8, 2016 at 4:01 PM, Jordan Liggitt <jligg...@redhat.com> wrote:
> I'm pretty sure it is intentional that the only variables available are > the ones defined in the template itself. > right, those are not system variables or anything, they are just parameters that users can provide values for. if you provide no value for a route hostname, you get a generated default, as seen when you left APPLICATION_DOMAIN blank. > > On Fri, Apr 8, 2016 at 3:29 PM, Dale Bewley <d...@bewley.net> wrote: > >> I'm creating a template which has 2 services. One is a python gunicorn >> and one is httpd. >> >> I want the first service reachable at app-project.domain/ and the second >> service to be reachable at app-project.domain/static. That works, but I'm >> having trouble automating it in a template. >> >> Unfortunately if I use default value of ${APPLICATION_DOMAIN} it includes >> the service name and I wind up with a distinct hostname in each route: >> app-static-project.domain and app-py-project.domain >> >> { >> "kind": "Route", >> "apiVersion": "v1", >> "metadata": { >> "name": "${NAME}-static" >> }, >> "spec": { >> "host": "${APPLICATION_DOMAIN}", >> "path": "/${STATIC_DIR}", >> "to": { >> "kind": "Service", >> "name": "${NAME}-static" >> }, >> "tls": { >> "termination" : "edge" >> } >> } >> }, >> { >> "kind": "Route", >> "apiVersion": "v1", >> "metadata": { >> "name": "${NAME}-py" >> }, >> "spec": { >> "host": "${APPLICATION_DOMAIN}", >> "to": { >> "kind": "Service", >> "name": "${NAME}-py" >> }, >> "tls": { >> "termination" : "edge" >> } >> } >> }, >> >> >> I could prompt for a hostname, but I would like to auto-generate the >> hostname to include the project by default. What I would like is >> <app>-<project>.<cloud_apps_domain> in both routes. >> >> >> Is is there a list somewhere of the variables available to templates? >> >> _______________________________________________ >> users mailing list >> users@lists.openshift.redhat.com >> http://lists.openshift.redhat.com/openshiftmm/listinfo/users >> > > > _______________________________________________ > users mailing list > users@lists.openshift.redhat.com > http://lists.openshift.redhat.com/openshiftmm/listinfo/users > > -- Ben Parees | OpenShift
_______________________________________________ users mailing list users@lists.openshift.redhat.com http://lists.openshift.redhat.com/openshiftmm/listinfo/users