|
@@ -3,7 +3,6 @@
|
|
|
"apiVersion": "v1",
|
|
|
"metadata": {
|
|
|
"name": "mongodb-persistent",
|
|
|
- "creationTimestamp": null,
|
|
|
"annotations": {
|
|
|
"openshift.io/display-name": "MongoDB (Persistent)",
|
|
|
"description": "MongoDB database service, with persistent storage. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/mongodb-container/blob/master/3.2/README.md.\n\nNOTE: Scaling to more than one replica is not supported. You must have persistent volumes available in your cluster to use this template.",
|
|
@@ -28,13 +27,15 @@
|
|
|
"annotations": {
|
|
|
"template.openshift.io/expose-username": "{.data['database-user']}",
|
|
|
"template.openshift.io/expose-password": "{.data['database-password']}",
|
|
|
- "template.openshift.io/expose-admin_password": "{.data['database-admin-password']}"
|
|
|
+ "template.openshift.io/expose-admin_password": "{.data['database-admin-password']}",
|
|
|
+ "template.openshift.io/expose-database_name": "{.data['database-name']}"
|
|
|
}
|
|
|
},
|
|
|
"stringData" : {
|
|
|
"database-user" : "${MONGODB_USER}",
|
|
|
"database-password" : "${MONGODB_PASSWORD}",
|
|
|
- "database-admin-password" : "${MONGODB_ADMIN_PASSWORD}"
|
|
|
+ "database-admin-password" : "${MONGODB_ADMIN_PASSWORD}",
|
|
|
+ "database-name" : "${MONGODB_DATABASE}"
|
|
|
}
|
|
|
},
|
|
|
{
|
|
@@ -42,7 +43,6 @@
|
|
|
"apiVersion": "v1",
|
|
|
"metadata": {
|
|
|
"name": "${DATABASE_SERVICE_NAME}",
|
|
|
- "creationTimestamp": null,
|
|
|
"annotations": {
|
|
|
"template.openshift.io/expose-uri": "mongodb://{.spec.clusterIP}:{.spec.ports[?(.name==\"mongo\")].port}"
|
|
|
}
|
|
@@ -89,7 +89,9 @@
|
|
|
"apiVersion": "v1",
|
|
|
"metadata": {
|
|
|
"name": "${DATABASE_SERVICE_NAME}",
|
|
|
- "creationTimestamp": null
|
|
|
+ "annotations": {
|
|
|
+ "template.alpha.openshift.io/wait-for-ready": "true"
|
|
|
+ }
|
|
|
},
|
|
|
"spec": {
|
|
|
"strategy": {
|
|
@@ -121,7 +123,6 @@
|
|
|
},
|
|
|
"template": {
|
|
|
"metadata": {
|
|
|
- "creationTimestamp": null,
|
|
|
"labels": {
|
|
|
"name": "${DATABASE_SERVICE_NAME}"
|
|
|
}
|
|
@@ -181,7 +182,12 @@
|
|
|
},
|
|
|
{
|
|
|
"name": "MONGODB_DATABASE",
|
|
|
- "value": "${MONGODB_DATABASE}"
|
|
|
+ "valueFrom": {
|
|
|
+ "secretKeyRef" : {
|
|
|
+ "name" : "${DATABASE_SERVICE_NAME}",
|
|
|
+ "key" : "database-name"
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
],
|
|
|
"resources": {
|