From 85e79a7a71a3f4fbc311ee9f1b6831db8b9ec442 Mon Sep 17 00:00:00 2001 From: gabemontero Date: Thu, 10 Mar 2016 16:59:16 -0500 Subject: [PATCH] parameterize name --- openshift/templates/django-postgresql.json | 31 +++++++++++++--------- openshift/templates/django.json | 31 +++++++++++++--------- 2 files changed, 38 insertions(+), 24 deletions(-) diff --git a/openshift/templates/django-postgresql.json b/openshift/templates/django-postgresql.json index eb9af34..063591a 100644 --- a/openshift/templates/django-postgresql.json +++ b/openshift/templates/django-postgresql.json @@ -17,7 +17,7 @@ "kind": "Service", "apiVersion": "v1", "metadata": { - "name": "django-psql-example", + "name": "${NAME}", "annotations": { "description": "Exposes and load balances the application pods" } @@ -31,7 +31,7 @@ } ], "selector": { - "name": "django-psql-example" + "name": "${NAME}" } } }, @@ -39,13 +39,13 @@ "kind": "Route", "apiVersion": "v1", "metadata": { - "name": "django-psql-example" + "name": "${NAME}" }, "spec": { "host": "${APPLICATION_DOMAIN}", "to": { "kind": "Service", - "name": "django-psql-example" + "name": "${NAME}" } } }, @@ -53,7 +53,7 @@ "kind": "ImageStream", "apiVersion": "v1", "metadata": { - "name": "django-psql-example", + "name": "${NAME}", "annotations": { "description": "Keeps track of changes in the application image" } @@ -63,7 +63,7 @@ "kind": "BuildConfig", "apiVersion": "v1", "metadata": { - "name": "django-psql-example", + "name": "${NAME}", "annotations": { "description": "Defines how to build the application" } @@ -90,7 +90,7 @@ "output": { "to": { "kind": "ImageStreamTag", - "name": "django-psql-example:latest" + "name": "${NAME}:latest" } }, "triggers": [ @@ -116,7 +116,7 @@ "kind": "DeploymentConfig", "apiVersion": "v1", "metadata": { - "name": "django-psql-example", + "name": "${NAME}", "annotations": { "description": "Defines how to deploy the application server" } @@ -135,7 +135,7 @@ ], "from": { "kind": "ImageStreamTag", - "name": "django-psql-example:latest" + "name": "${NAME}:latest" } } }, @@ -145,13 +145,13 @@ ], "replicas": 1, "selector": { - "name": "django-psql-example" + "name": "${NAME}" }, "template": { "metadata": { - "name": "django-psql-example", + "name": "${NAME}", "labels": { - "name": "django-psql-example" + "name": "${NAME}" } }, "spec": { @@ -337,6 +337,13 @@ } ], "parameters": [ + { + "name": "NAME", + "displayName": "Name", + "description": "The name assigned to all of the frontend objects defined in this template.", + "required": true, + "value": "django-psql-example" + }, { "name": "MEMORY_LIMIT", "displayName": "Memory Limit", diff --git a/openshift/templates/django.json b/openshift/templates/django.json index 38d933f..a36678b 100644 --- a/openshift/templates/django.json +++ b/openshift/templates/django.json @@ -17,7 +17,7 @@ "kind": "Service", "apiVersion": "v1", "metadata": { - "name": "django-example", + "name": "${NAME}", "annotations": { "description": "Exposes and load balances the application pods" } @@ -31,7 +31,7 @@ } ], "selector": { - "name": "django-example" + "name": "${NAME}" } } }, @@ -39,13 +39,13 @@ "kind": "Route", "apiVersion": "v1", "metadata": { - "name": "django-example" + "name": "${NAME}" }, "spec": { "host": "${APPLICATION_DOMAIN}", "to": { "kind": "Service", - "name": "django-example" + "name": "${NAME}" } } }, @@ -53,7 +53,7 @@ "kind": "ImageStream", "apiVersion": "v1", "metadata": { - "name": "django-example", + "name": "${NAME}", "annotations": { "description": "Keeps track of changes in the application image" } @@ -63,7 +63,7 @@ "kind": "BuildConfig", "apiVersion": "v1", "metadata": { - "name": "django-example", + "name": "${NAME}", "annotations": { "description": "Defines how to build the application" } @@ -90,7 +90,7 @@ "output": { "to": { "kind": "ImageStreamTag", - "name": "django-example:latest" + "name": "${NAME}:latest" } }, "triggers": [ @@ -116,7 +116,7 @@ "kind": "DeploymentConfig", "apiVersion": "v1", "metadata": { - "name": "django-example", + "name": "${NAME}", "annotations": { "description": "Defines how to deploy the application server" } @@ -135,7 +135,7 @@ ], "from": { "kind": "ImageStreamTag", - "name": "django-example:latest" + "name": "${NAME}:latest" } } }, @@ -145,13 +145,13 @@ ], "replicas": 1, "selector": { - "name": "django-example" + "name": "${NAME}" }, "template": { "metadata": { - "name": "django-example", + "name": "${NAME}", "labels": { - "name": "django-example" + "name": "${NAME}" } }, "spec": { @@ -223,6 +223,13 @@ } ], "parameters": [ + { + "name": "NAME", + "displayName": "Name", + "description": "The name assigned to all of the frontend objects defined in this template.", + "required": true, + "value": "django-example" + }, { "name": "MEMORY_LIMIT", "displayName": "Memory Limit",