From aa79a05018c74f8ed8bad1908034b39c7b5b5e45 Mon Sep 17 00:00:00 2001 From: sspeiche Date: Mon, 8 Jun 2015 15:31:12 -0400 Subject: [PATCH] Added routes to templates --- openshift/templates/django-postgresql.json | 20 ++++++++++++++++++++ openshift/templates/django.json | 20 ++++++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/openshift/templates/django-postgresql.json b/openshift/templates/django-postgresql.json index 37cec1c..a819cb7 100644 --- a/openshift/templates/django-postgresql.json +++ b/openshift/templates/django-postgresql.json @@ -57,6 +57,21 @@ } } }, + { + "kind": "Route", + "apiVersion": "v1beta3", + "metadata": { + "name": "${FRONTEND_SERVICE_NAME}-route", + "creationTimestamp": null + }, + "spec": { + "host" : "${FRONTEND_ROUTE}", + "to": { + "kind" : "Service", + "name" : "${FRONTEND_SERVICE_NAME}" + } + } + }, { "kind": "BuildConfig", "apiVersion": "v1beta3", @@ -297,6 +312,11 @@ "description": "Frontend service name", "value": "django" }, + { + "name": "FRONTEND_ROUTE", + "description": "The exposed hostname that will route to the frontend service", + "value": "django-frontend.apps" + }, { "name": "DATABASE_SERVICE_NAME", "description": "Database service name", diff --git a/openshift/templates/django.json b/openshift/templates/django.json index 3b3a0d5..9ef3d03 100644 --- a/openshift/templates/django.json +++ b/openshift/templates/django.json @@ -35,6 +35,21 @@ } } }, + { + "kind": "Route", + "apiVersion": "v1beta3", + "metadata": { + "name": "${FRONTEND_SERVICE_NAME}-route", + "creationTimestamp": null + }, + "spec": { + "host" : "${FRONTEND_ROUTE}", + "to": { + "kind" : "Service", + "name" : "${FRONTEND_SERVICE_NAME}" + } + } + }, { "kind": "BuildConfig", "apiVersion": "v1beta3", @@ -204,6 +219,11 @@ "name": "DATABASE_SERVICE_NAME", "description": "Database service name" }, + { + "name": "FRONTEND_ROUTE", + "description": "The exposed hostname that will route to the frontend service", + "value": "django-frontend.apps" + }, { "name": "DATABASE_ENGINE", "description": "Database engine: postgresql, mysql or sqlite (default)"