Skip to content

Commit

Permalink
Merge pull request #12055 from jupierce/quickstart_passwords_in_secrets
Browse files Browse the repository at this point in the history
Merged by openshift-bot
  • Loading branch information
OpenShift Bot authored Dec 2, 2016
2 parents 82b0df4 + 0d886ad commit 7b90443
Show file tree
Hide file tree
Showing 16 changed files with 1,008 additions and 158 deletions.
43 changes: 41 additions & 2 deletions examples/db-templates/mariadb-ephemeral-template.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,18 @@
"template": "mariadb-persistent-template"
},
"objects": [
{
"kind": "Secret",
"apiVersion": "v1",
"metadata": {
"name": "${DATABASE_SERVICE_NAME}"
},
"stringData" : {
"databaseUser" : "${MYSQL_USER}",
"databasePassword" : "${MYSQL_PASSWORD}",
"databaseRootPassword" : "${MYSQL_ROOT_PASSWORD}"
}
},
{
"kind": "Service",
"apiVersion": "v1",
Expand Down Expand Up @@ -100,11 +112,30 @@
"env": [
{
"name": "MYSQL_USER",
"value": "${MYSQL_USER}"
"valueFrom": {
"secretKeyRef" : {
"name" : "${DATABASE_SERVICE_NAME}",
"key" : "databaseUser"
}
}
},
{
"name": "MYSQL_PASSWORD",
"value": "${MYSQL_PASSWORD}"
"valueFrom": {
"secretKeyRef" : {
"name" : "${DATABASE_SERVICE_NAME}",
"key" : "databasePassword"
}
}
},
{
"name": "MYSQL_ROOT_PASSWORD",
"valueFrom": {
"secretKeyRef" : {
"name" : "${DATABASE_SERVICE_NAME}",
"key" : "databaseRootPassword"
}
}
},
{
"name": "MYSQL_DATABASE",
Expand Down Expand Up @@ -175,6 +206,14 @@
"from": "[a-zA-Z0-9]{16}",
"required": true
},
{
"name": "MYSQL_ROOT_PASSWORD",
"displayName": "MariaDB root Password",
"description": "Password for the MariaDB root user.",
"generate": "expression",
"from": "[a-zA-Z0-9]{16}",
"required": true
},
{
"name": "MYSQL_DATABASE",
"displayName": "MariaDB Database Name",
Expand Down
43 changes: 41 additions & 2 deletions examples/db-templates/mariadb-persistent-template.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,18 @@
"template": "mariadb-persistent-template"
},
"objects": [
{
"kind": "Secret",
"apiVersion": "v1",
"metadata": {
"name": "${DATABASE_SERVICE_NAME}"
},
"stringData" : {
"databaseUser" : "${MYSQL_USER}",
"databasePassword" : "${MYSQL_PASSWORD}",
"databaseRootPassword" : "${MYSQL_ROOT_PASSWORD}"
}
},
{
"kind": "Service",
"apiVersion": "v1",
Expand Down Expand Up @@ -117,11 +129,30 @@
"env": [
{
"name": "MYSQL_USER",
"value": "${MYSQL_USER}"
"valueFrom": {
"secretKeyRef" : {
"name" : "${DATABASE_SERVICE_NAME}",
"key" : "databaseUser"
}
}
},
{
"name": "MYSQL_PASSWORD",
"value": "${MYSQL_PASSWORD}"
"valueFrom": {
"secretKeyRef" : {
"name" : "${DATABASE_SERVICE_NAME}",
"key" : "databasePassword"
}
}
},
{
"name": "MYSQL_ROOT_PASSWORD",
"valueFrom": {
"secretKeyRef" : {
"name" : "${DATABASE_SERVICE_NAME}",
"key" : "databaseRootPassword"
}
}
},
{
"name": "MYSQL_DATABASE",
Expand Down Expand Up @@ -192,6 +223,14 @@
"from": "[a-zA-Z0-9]{16}",
"required": true
},
{
"name": "MYSQL_ROOT_PASSWORD",
"displayName": "MariaDB root Password",
"description": "Password for the MariaDB root user.",
"generate": "expression",
"from": "[a-zA-Z0-9]{16}",
"required": true
},
{
"name": "MYSQL_DATABASE",
"displayName": "MariaDB Database Name",
Expand Down
39 changes: 33 additions & 6 deletions examples/db-templates/mongodb-ephemeral-template.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,18 @@
"template": "mongodb-ephemeral-template"
},
"objects": [
{
"kind": "Secret",
"apiVersion": "v1",
"metadata": {
"name": "${DATABASE_SERVICE_NAME}"
},
"stringData" : {
"databaseUser" : "${MONGODB_USER}",
"databasePassword" : "${MONGODB_PASSWORD}",
"databaseAdminPassword" : "${MONGODB_ADMIN_PASSWORD}"
}
},
{
"kind": "Service",
"apiVersion": "v1",
Expand Down Expand Up @@ -113,19 +125,34 @@
"env": [
{
"name": "MONGODB_USER",
"value": "${MONGODB_USER}"
"valueFrom": {
"secretKeyRef" : {
"name" : "${DATABASE_SERVICE_NAME}",
"key" : "databaseUser"
}
}
},
{
"name": "MONGODB_PASSWORD",
"value": "${MONGODB_PASSWORD}"
"valueFrom": {
"secretKeyRef" : {
"name" : "${DATABASE_SERVICE_NAME}",
"key" : "databasePassword"
}
}
},
{
"name": "MONGODB_DATABASE",
"value": "${MONGODB_DATABASE}"
"name": "MONGODB_ADMIN_PASSWORD",
"valueFrom": {
"secretKeyRef" : {
"name" : "${DATABASE_SERVICE_NAME}",
"key" : "databaseAdminPassword"
}
}
},
{
"name": "MONGODB_ADMIN_PASSWORD",
"value": "${MONGODB_ADMIN_PASSWORD}"
"name": "MONGODB_DATABASE",
"value": "${MONGODB_DATABASE}"
}
],
"resources": {
Expand Down
39 changes: 33 additions & 6 deletions examples/db-templates/mongodb-persistent-template.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,18 @@
"template": "mongodb-persistent-template"
},
"objects": [
{
"kind": "Secret",
"apiVersion": "v1",
"metadata": {
"name": "${DATABASE_SERVICE_NAME}"
},
"stringData" : {
"databaseUser" : "${MONGODB_USER}",
"databasePassword" : "${MONGODB_PASSWORD}",
"databaseAdminPassword" : "${MONGODB_ADMIN_PASSWORD}"
}
},
{
"kind": "Service",
"apiVersion": "v1",
Expand Down Expand Up @@ -130,19 +142,34 @@
"env": [
{
"name": "MONGODB_USER",
"value": "${MONGODB_USER}"
"valueFrom": {
"secretKeyRef" : {
"name" : "${DATABASE_SERVICE_NAME}",
"key" : "databaseUser"
}
}
},
{
"name": "MONGODB_PASSWORD",
"value": "${MONGODB_PASSWORD}"
"valueFrom": {
"secretKeyRef" : {
"name" : "${DATABASE_SERVICE_NAME}",
"key" : "databasePassword"
}
}
},
{
"name": "MONGODB_DATABASE",
"value": "${MONGODB_DATABASE}"
"name": "MONGODB_ADMIN_PASSWORD",
"valueFrom": {
"secretKeyRef" : {
"name" : "${DATABASE_SERVICE_NAME}",
"key" : "databaseAdminPassword"
}
}
},
{
"name": "MONGODB_ADMIN_PASSWORD",
"value": "${MONGODB_ADMIN_PASSWORD}"
"name": "MONGODB_DATABASE",
"value": "${MONGODB_DATABASE}"
}
],
"resources": {
Expand Down
43 changes: 41 additions & 2 deletions examples/db-templates/mysql-ephemeral-template.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,18 @@
"template": "mysql-ephemeral-template"
},
"objects": [
{
"kind": "Secret",
"apiVersion": "v1",
"metadata": {
"name": "${DATABASE_SERVICE_NAME}"
},
"stringData" : {
"databaseUser" : "${MYSQL_USER}",
"databasePassword" : "${MYSQL_PASSWORD}",
"databaseRootPassword" : "${MYSQL_ROOT_PASSWORD}"
}
},
{
"kind": "Service",
"apiVersion": "v1",
Expand Down Expand Up @@ -113,11 +125,30 @@
"env": [
{
"name": "MYSQL_USER",
"value": "${MYSQL_USER}"
"valueFrom": {
"secretKeyRef" : {
"name" : "${DATABASE_SERVICE_NAME}",
"key" : "databaseUser"
}
}
},
{
"name": "MYSQL_PASSWORD",
"value": "${MYSQL_PASSWORD}"
"valueFrom": {
"secretKeyRef" : {
"name" : "${DATABASE_SERVICE_NAME}",
"key" : "databasePassword"
}
}
},
{
"name": "MYSQL_ROOT_PASSWORD",
"valueFrom": {
"secretKeyRef" : {
"name" : "${DATABASE_SERVICE_NAME}",
"key" : "databaseRootPassword"
}
}
},
{
"name": "MYSQL_DATABASE",
Expand Down Expand Up @@ -196,6 +227,14 @@
"from": "[a-zA-Z0-9]{16}",
"required": true
},
{
"name": "MYSQL_ROOT_PASSWORD",
"displayName": "MySQL root user Password",
"description": "Password for the MySQL root user.",
"generate": "expression",
"from": "[a-zA-Z0-9]{16}",
"required": true
},
{
"name": "MYSQL_DATABASE",
"displayName": "MySQL Database Name",
Expand Down
43 changes: 41 additions & 2 deletions examples/db-templates/mysql-persistent-template.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,18 @@
"template": "mysql-persistent-template"
},
"objects": [
{
"kind": "Secret",
"apiVersion": "v1",
"metadata": {
"name": "${DATABASE_SERVICE_NAME}"
},
"stringData" : {
"databaseUser" : "${MYSQL_USER}",
"databasePassword" : "${MYSQL_PASSWORD}",
"databaseRootPassword" : "${MYSQL_ROOT_PASSWORD}"
}
},
{
"kind": "Service",
"apiVersion": "v1",
Expand Down Expand Up @@ -117,11 +129,30 @@
"env": [
{
"name": "MYSQL_USER",
"value": "${MYSQL_USER}"
"valueFrom": {
"secretKeyRef" : {
"name" : "${DATABASE_SERVICE_NAME}",
"key" : "databaseUser"
}
}
},
{
"name": "MYSQL_PASSWORD",
"value": "${MYSQL_PASSWORD}"
"valueFrom": {
"secretKeyRef" : {
"name" : "${DATABASE_SERVICE_NAME}",
"key" : "databasePassword"
}
}
},
{
"name": "MYSQL_ROOT_PASSWORD",
"valueFrom": {
"secretKeyRef" : {
"name" : "${DATABASE_SERVICE_NAME}",
"key" : "databaseRootPassword"
}
}
},
{
"name": "MYSQL_DATABASE",
Expand Down Expand Up @@ -192,6 +223,14 @@
"from": "[a-zA-Z0-9]{16}",
"required": true
},
{
"name": "MYSQL_ROOT_PASSWORD",
"displayName": "MySQL root user Password",
"description": "Password for the MySQL root user.",
"generate": "expression",
"from": "[a-zA-Z0-9]{16}",
"required": true
},
{
"name": "MYSQL_DATABASE",
"displayName": "MySQL Database Name",
Expand Down
Loading

0 comments on commit 7b90443

Please sign in to comment.