From af5218491dc0c25079e7b97e16a3bb56c1a1421a Mon Sep 17 00:00:00 2001 From: Scott Dodson Date: Fri, 19 Feb 2016 09:56:06 -0500 Subject: Sync with latest image stream and templates --- .../db-templates/mongodb-persistent-template.json | 46 ++++++++++++++++------ 1 file changed, 34 insertions(+), 12 deletions(-) (limited to 'roles/openshift_examples/files/examples/v1.1/db-templates/mongodb-persistent-template.json') diff --git a/roles/openshift_examples/files/examples/v1.1/db-templates/mongodb-persistent-template.json b/roles/openshift_examples/files/examples/v1.1/db-templates/mongodb-persistent-template.json index e90ed6fa8..ab37e7a3a 100644 --- a/roles/openshift_examples/files/examples/v1.1/db-templates/mongodb-persistent-template.json +++ b/roles/openshift_examples/files/examples/v1.1/db-templates/mongodb-persistent-template.json @@ -65,8 +65,7 @@ }, "spec": { "strategy": { - "type": "Recreate", - "resources": {} + "type": "Recreate" }, "triggers": [ { @@ -104,19 +103,26 @@ { "name": "mongodb", "image": "mongodb", - "readinessProbe": { - "tcpSocket":{ - "port": 27017 - }, - "initialDelaySeconds": 15, - "timeoutSeconds": 1 - }, "ports": [ { "containerPort": 27017, "protocol": "TCP" } ], + "readinessProbe": { + "timeoutSeconds": 1, + "initialDelaySeconds": 3, + "exec": { + "command": [ "/bin/sh", "-i", "-c", "mongostat --host 127.0.0.1 -u admin -p $MONGODB_ADMIN_PASSWORD -n 1 --noheaders"] + } + }, + "livenessProbe": { + "timeoutSeconds": 1, + "initialDelaySeconds": 30, + "tcpSocket": { + "port": 27017 + } + }, "env": [ { "name": "MONGODB_USER", @@ -135,7 +141,11 @@ "value": "${MONGODB_ADMIN_PASSWORD}" } ], - "resources": {}, + "resources": { + "limits": { + "memory": "${MEMORY_LIMIT}" + } + }, "volumeMounts": [ { "name": "${DATABASE_SERVICE_NAME}-data", @@ -168,14 +178,22 @@ } ], "parameters": [ + { + "name": "MEMORY_LIMIT", + "displayName": "Memory limit", + "description": "Maximum amount of memory the container can use", + "value": "512Mi" + }, { "name": "DATABASE_SERVICE_NAME", - "description": "Database service name", + "displayName": "Database service name", + "description": "The name of the OpenShift Service exposed for the database", "value": "mongodb", "required": true }, { "name": "MONGODB_USER", + "displayName": "MongoDB user", "description": "Username for MongoDB user that will be used for accessing the database", "generate": "expression", "from": "user[A-Z0-9]{3}", @@ -183,6 +201,7 @@ }, { "name": "MONGODB_PASSWORD", + "displayName": "MongoDB password", "description": "Password for the MongoDB user", "generate": "expression", "from": "[a-zA-Z0-9]{16}", @@ -190,12 +209,14 @@ }, { "name": "MONGODB_DATABASE", - "description": "Database name", + "displayName": "MongoDB database name", + "description": "Name of the MongoDB database accessed", "value": "sampledb", "required": true }, { "name": "MONGODB_ADMIN_PASSWORD", + "displayName": "MongoDB admin password", "description": "Password for the database admin user", "generate": "expression", "from": "[a-zA-Z0-9]{16}", @@ -203,6 +224,7 @@ }, { "name": "VOLUME_CAPACITY", + "displayName": "Volume capacity", "description": "Volume space available for data, e.g. 512Mi, 2Gi", "value": "512Mi", "required": true -- cgit v1.2.3