From 5d5de63310eb228964ba9e25eff69ce2e3fb1b5e Mon Sep 17 00:00:00 2001 From: Honza Horak Date: Fri, 22 Dec 2017 11:05:59 +0100 Subject: [PATCH 1/2] Add PYTHON_VERSION parameter to the templates --- openshift/templates/django-postgresql-persistent.json | 9 ++++++++- openshift/templates/django-postgresql.json | 9 ++++++++- openshift/templates/django.json | 9 ++++++++- 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/openshift/templates/django-postgresql-persistent.json b/openshift/templates/django-postgresql-persistent.json index 7a0ab21..8c18978 100644 --- a/openshift/templates/django-postgresql-persistent.json +++ b/openshift/templates/django-postgresql-persistent.json @@ -105,7 +105,7 @@ "from": { "kind": "ImageStreamTag", "namespace": "${NAMESPACE}", - "name": "python:3.5" + "name": "python:${PYTHON_VERSION}" }, "env": [ { @@ -437,6 +437,13 @@ "description": "The OpenShift Namespace where the ImageStream resides.", "value": "openshift" }, + { + "name": "PYTHON_VERSION", + "displayName": "Version of Python Image", + "description": "Version of Python image to be used (3.4, 3.5, 3.6 or latest).", + "value": "3.6", + "required": true + }, { "name": "MEMORY_LIMIT", "displayName": "Memory Limit", diff --git a/openshift/templates/django-postgresql.json b/openshift/templates/django-postgresql.json index be3fc74..e52839d 100644 --- a/openshift/templates/django-postgresql.json +++ b/openshift/templates/django-postgresql.json @@ -105,7 +105,7 @@ "from": { "kind": "ImageStreamTag", "namespace": "${NAMESPACE}", - "name": "python:3.5" + "name": "python:${PYTHON_VERSION}" }, "env": [ { @@ -418,6 +418,13 @@ "description": "The OpenShift Namespace where the ImageStream resides.", "value": "openshift" }, + { + "name": "PYTHON_VERSION", + "displayName": "Version of Python Image", + "description": "Version of Python image to be used (3.4, 3.5, 3.6 or latest).", + "value": "3.6", + "required": true + }, { "name": "MEMORY_LIMIT", "displayName": "Memory Limit", diff --git a/openshift/templates/django.json b/openshift/templates/django.json index dffe4f8..1b1fb9d 100644 --- a/openshift/templates/django.json +++ b/openshift/templates/django.json @@ -102,7 +102,7 @@ "from": { "kind": "ImageStreamTag", "namespace": "${NAMESPACE}", - "name": "python:3.5" + "name": "python:${PYTHON_VERSION}" }, "env": [ { @@ -248,6 +248,13 @@ "description": "The OpenShift Namespace where the ImageStream resides.", "value": "openshift" }, + { + "name": "PYTHON_VERSION", + "displayName": "Version of Python Image", + "description": "Version of Python image to be used (3.4, 3.5, 3.6 or latest).", + "value": "3.6", + "required": true + }, { "name": "MEMORY_LIMIT", "displayName": "Memory Limit", From c266beafabb5cce6530cd3d2b7649c51868ac3ad Mon Sep 17 00:00:00 2001 From: Honza Horak Date: Fri, 22 Dec 2017 13:12:41 +0100 Subject: [PATCH 2/2] Add POSTGRESQL_VERSION parameter to the templates --- openshift/templates/django-postgresql-persistent.json | 9 ++++++++- openshift/templates/django-postgresql.json | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/openshift/templates/django-postgresql-persistent.json b/openshift/templates/django-postgresql-persistent.json index 8c18978..1d7c3fa 100644 --- a/openshift/templates/django-postgresql-persistent.json +++ b/openshift/templates/django-postgresql-persistent.json @@ -329,7 +329,7 @@ "from": { "kind": "ImageStreamTag", "namespace": "${NAMESPACE}", - "name": "postgresql:9.5" + "name": "postgresql:${POSTGRESQL_VERSION}" } } }, @@ -444,6 +444,13 @@ "value": "3.6", "required": true }, + { + "name": "POSTGRESQL_VERSION", + "displayName": "Version of PostgreSQL Image", + "description": "Version of PostgreSQL image to be used (9.4, 9.5, 9.6 or latest).", + "value": "9.6", + "required": true + }, { "name": "MEMORY_LIMIT", "displayName": "Memory Limit", diff --git a/openshift/templates/django-postgresql.json b/openshift/templates/django-postgresql.json index e52839d..159df36 100644 --- a/openshift/templates/django-postgresql.json +++ b/openshift/templates/django-postgresql.json @@ -312,7 +312,7 @@ "from": { "kind": "ImageStreamTag", "namespace": "${NAMESPACE}", - "name": "postgresql:9.5" + "name": "postgresql:${POSTGRESQL_VERSION}" } } }, @@ -425,6 +425,13 @@ "value": "3.6", "required": true }, + { + "name": "POSTGRESQL_VERSION", + "displayName": "Version of PostgreSQL Image", + "description": "Version of PostgreSQL image to be used (9.4, 9.5, 9.6 or latest).", + "value": "9.6", + "required": true + }, { "name": "MEMORY_LIMIT", "displayName": "Memory Limit",