diff options
Diffstat (limited to 'roles/openshift_examples/files/examples/v1.1/db-templates/mysql-ephemeral-template.json')
-rw-r--r-- | roles/openshift_examples/files/examples/v1.1/db-templates/mysql-ephemeral-template.json | 38 |
1 files changed, 33 insertions, 5 deletions
diff --git a/roles/openshift_examples/files/examples/v1.1/db-templates/mysql-ephemeral-template.json b/roles/openshift_examples/files/examples/v1.1/db-templates/mysql-ephemeral-template.json index 84911d2d6..2c28db746 100644 --- a/roles/openshift_examples/files/examples/v1.1/db-templates/mysql-ephemeral-template.json +++ b/roles/openshift_examples/files/examples/v1.1/db-templates/mysql-ephemeral-template.json @@ -48,8 +48,7 @@ }, "spec": { "strategy": { - "type": "Recreate", - "resources": {} + "type": "Recreate" }, "triggers": [ { @@ -93,6 +92,21 @@ "protocol": "TCP" } ], + "readinessProbe": { + "timeoutSeconds": 1, + "initialDelaySeconds": 5, + "exec": { + "command": [ "/bin/sh", "-i", "-c", + "MYSQL_PWD='$MYSQL_PASSWORD' mysql -h 127.0.0.1 -u $MYSQL_USER -D $MYSQL_DATABASE -e 'SELECT 1'"] + } + }, + "livenessProbe": { + "timeoutSeconds": 1, + "initialDelaySeconds": 30, + "tcpSocket": { + "port": 3306 + } + }, "env": [ { "name": "MYSQL_USER", @@ -107,7 +121,11 @@ "value": "${MYSQL_DATABASE}" } ], - "resources": {}, + "resources": { + "limits": { + "memory": "${MEMORY_LIMIT}" + } + }, "volumeMounts": [ { "name": "${DATABASE_SERVICE_NAME}-data", @@ -141,13 +159,21 @@ ], "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": "mysql", "required": true }, { "name": "MYSQL_USER", + "displayName": "MySQL user", "description": "Username for MySQL user that will be used for accessing the database", "generate": "expression", "from": "user[A-Z0-9]{3}", @@ -155,6 +181,7 @@ }, { "name": "MYSQL_PASSWORD", + "displayName": "MySQL password", "description": "Password for the MySQL user", "generate": "expression", "from": "[a-zA-Z0-9]{16}", @@ -162,7 +189,8 @@ }, { "name": "MYSQL_DATABASE", - "description": "Database name", + "displayName": "MySQL database name", + "description": "Name of the MySQL database accessed", "value": "sampledb", "required": true } |