summaryrefslogtreecommitdiffstats
path: root/roles/openshift_examples/files/examples/v3.7/db-templates/postgresql-ephemeral-template.json
diff options
context:
space:
mode:
Diffstat (limited to 'roles/openshift_examples/files/examples/v3.7/db-templates/postgresql-ephemeral-template.json')
-rw-r--r--roles/openshift_examples/files/examples/v3.7/db-templates/postgresql-ephemeral-template.json20
1 files changed, 13 insertions, 7 deletions
diff --git a/roles/openshift_examples/files/examples/v3.7/db-templates/postgresql-ephemeral-template.json b/roles/openshift_examples/files/examples/v3.7/db-templates/postgresql-ephemeral-template.json
index c37102cb0..849c9d83f 100644
--- a/roles/openshift_examples/files/examples/v3.7/db-templates/postgresql-ephemeral-template.json
+++ b/roles/openshift_examples/files/examples/v3.7/db-templates/postgresql-ephemeral-template.json
@@ -3,7 +3,6 @@
"apiVersion": "v1",
"metadata": {
"name": "postgresql-ephemeral",
- "creationTimestamp": null,
"annotations": {
"openshift.io/display-name": "PostgreSQL (Ephemeral)",
"description": "PostgreSQL database service, without persistent storage. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/blob/master/9.5.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing",
@@ -27,12 +26,14 @@
"name": "${DATABASE_SERVICE_NAME}",
"annotations": {
"template.openshift.io/expose-username": "{.data['database-user']}",
- "template.openshift.io/expose-password": "{.data['database-password']}"
+ "template.openshift.io/expose-password": "{.data['database-password']}",
+ "template.openshift.io/expose-database_name": "{.data['database-name']}"
}
},
"stringData" : {
"database-user" : "${POSTGRESQL_USER}",
- "database-password" : "${POSTGRESQL_PASSWORD}"
+ "database-password" : "${POSTGRESQL_PASSWORD}",
+ "database-name" : "${POSTGRESQL_DATABASE}"
}
},
{
@@ -40,7 +41,6 @@
"apiVersion": "v1",
"metadata": {
"name": "${DATABASE_SERVICE_NAME}",
- "creationTimestamp": null,
"annotations": {
"template.openshift.io/expose-uri": "postgres://{.spec.clusterIP}:{.spec.ports[?(.name==\"postgresql\")].port}"
}
@@ -70,7 +70,9 @@
"apiVersion": "v1",
"metadata": {
"name": "${DATABASE_SERVICE_NAME}",
- "creationTimestamp": null
+ "annotations": {
+ "template.alpha.openshift.io/wait-for-ready": "true"
+ }
},
"spec": {
"strategy": {
@@ -102,7 +104,6 @@
},
"template": {
"metadata": {
- "creationTimestamp": null,
"labels": {
"name": "${DATABASE_SERVICE_NAME}"
}
@@ -153,7 +154,12 @@
},
{
"name": "POSTGRESQL_DATABASE",
- "value": "${POSTGRESQL_DATABASE}"
+ "valueFrom": {
+ "secretKeyRef" : {
+ "name" : "${DATABASE_SERVICE_NAME}",
+ "key" : "database-name"
+ }
+ }
}
],
"resources": {