Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add postgresql admin password generation, update version to 12-el8, a… #409

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 23 additions & 3 deletions examples/postgresql-ephemeral-template.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
},
"message": "The following service(s) have been created in your project: ${DATABASE_SERVICE_NAME}.\n\n Username: ${POSTGRESQL_USER}\n Password: ${POSTGRESQL_PASSWORD}\n Database Name: ${POSTGRESQL_DATABASE}\n Connection URL: postgresql://${DATABASE_SERVICE_NAME}:5432/\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/.",
"labels": {
"template": "postgresql-ephemeral-template"
"template": "postgresql-ephemeral-template",
"app.openshift.io/runtime": "postgresql"
},
"objects": [
{
Expand All @@ -27,12 +28,14 @@
"annotations": {
"template.openshift.io/expose-username": "{.data['database-user']}",
"template.openshift.io/expose-password": "{.data['database-password']}",
"template.openshift.io/expose-postgres_password": "{.data['database-postgres-password']}",
"template.openshift.io/expose-database_name": "{.data['database-name']}"
}
},
"stringData" : {
"database-user" : "${POSTGRESQL_USER}",
"database-password" : "${POSTGRESQL_PASSWORD}",
"database-postgres-password" : "${POSTGRESQL_ADMIN_PASSWORD}",
"database-name" : "${POSTGRESQL_DATABASE}"
}
},
Expand Down Expand Up @@ -152,6 +155,15 @@
}
}
},
{
"name": "POSTGRESQL_ADMIN_PASSWORD",
"valueFrom": {
"secretKeyRef" : {
"name" : "${DATABASE_SERVICE_NAME}",
"key" : "database-postgres-password"
}
}
},
{
"name": "POSTGRESQL_DATABASE",
"valueFrom": {
Expand Down Expand Up @@ -235,6 +247,14 @@
"from": "[a-zA-Z0-9]{16}",
"required": true
},
{
"name": "POSTGRESQL_ADMIN_PASSWORD",
"displayName": "PostgreSQL Admin Connection Password",
"description": "Password for the PostgreSQL postgres user.",
"generate": "expression",
"from": "[a-zA-Z0-9]{16}",
"required": true
},
{
"name": "POSTGRESQL_DATABASE",
"displayName": "PostgreSQL Database Name",
Expand All @@ -245,8 +265,8 @@
{
"name": "POSTGRESQL_VERSION",
"displayName": "Version of PostgreSQL Image",
"description": "Version of PostgreSQL image to be used (10-el7, 10-el8, or latest).",
"value": "10-el8",
"description": "Version of PostgreSQL image to be used (10-el7, 10-el8, 12-el8 or latest).",
"value": "12-el8",
"required": true
}
]
Expand Down
28 changes: 24 additions & 4 deletions examples/postgresql-persistent-template.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@
"openshift.io/support-url": "https://access.redhat.com"
}
},
"message": "The following service(s) have been created in your project: ${DATABASE_SERVICE_NAME}.\n\n Username: ${POSTGRESQL_USER}\n Password: ${POSTGRESQL_PASSWORD}\n Database Name: ${POSTGRESQL_DATABASE}\n Connection URL: postgresql://${DATABASE_SERVICE_NAME}:5432/\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/.",
"message": "The following service(s) have been created in your project: ${DATABASE_SERVICE_NAME}.\n\n Username: ${POSTGRESQL_USER}\n Password: ${POSTGRESQL_PASSWORD}\n Administrator Password: ${POSTGRESQL_ADMIN_PASSWORD}\n Database Name: ${POSTGRESQL_DATABASE}\n Connection URL: postgresql://${DATABASE_SERVICE_NAME}:5432/\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/.",
"labels": {
"template": "postgresql-persistent-template"
"template": "postgresql-persistent-template",
"app.openshift.io/runtime": "postgresql"
},
"objects": [
{
Expand All @@ -27,12 +28,14 @@
"annotations": {
"template.openshift.io/expose-username": "{.data['database-user']}",
"template.openshift.io/expose-password": "{.data['database-password']}",
"template.openshift.io/expose-postgres_password": "{.data['database-postgres-password']}",
"template.openshift.io/expose-database_name": "{.data['database-name']}"
}
},
"stringData" : {
"database-user" : "${POSTGRESQL_USER}",
"database-password" : "${POSTGRESQL_PASSWORD}",
"database-postgres-password" : "${POSTGRESQL_ADMIN_PASSWORD}",
"database-name" : "${POSTGRESQL_DATABASE}"
}
},
Expand Down Expand Up @@ -169,6 +172,15 @@
}
}
},
{
"name": "POSTGRESQL_ADMIN_PASSWORD",
"valueFrom": {
"secretKeyRef" : {
"name" : "${DATABASE_SERVICE_NAME}",
"key" : "database-postgres-password"
}
}
},
{
"name": "POSTGRESQL_DATABASE",
"valueFrom": {
Expand Down Expand Up @@ -252,6 +264,14 @@
"from": "[a-zA-Z0-9]{16}",
"required": true
},
{
"name": "POSTGRESQL_ADMIN_PASSWORD",
"displayName": "PostgreSQL Admin Connection Password",
"description": "Password for the PostgreSQL postgres user.",
"generate": "expression",
"from": "[a-zA-Z0-9]{16}",
"required": true
},
{
"name": "POSTGRESQL_DATABASE",
"displayName": "PostgreSQL Database Name",
Expand All @@ -269,8 +289,8 @@
{
"name": "POSTGRESQL_VERSION",
"displayName": "Version of PostgreSQL Image",
"description": "Version of PostgreSQL image to be used (10-el7, 10-el8, or latest).",
"value": "10-el8",
"description": "Version of PostgreSQL image to be used (10-el7, 10-el8, 12-el8 or latest).",
"value": "12-el8",
"required": true
}
]
Expand Down