forked from bcgov/hets
-
Notifications
You must be signed in to change notification settings - Fork 0
/
db-postgresql-secrets.yaml
61 lines (61 loc) · 1.91 KB
/
db-postgresql-secrets.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
apiVersion: v1
kind: Template
metadata:
creationTimestamp: null
name: "true"
objects:
- kind: Secret
apiVersion: v1
metadata:
name: ${NAME}-${ENV}
selector:
deploymentconfig: ${NAME}-${ENV}
stringData:
admin-password: "${POSTGRESQL_ADMIN_PASSWORD}"
database-password: "${POSTGRESQL_PASSWORD}"
database-user: "${POSTGRESQL_USER}"
connection-string: "User ID=${POSTGRESQL_USER};Password=${POSTGRESQL_PASSWORD};Host=${NAME}-${ENV};Port=5432;Database=${POSTGRESQL_DATABASE_NAME}"
type: Opaque
parameters:
- description: Name of the project (HETS)
displayName: PROJECT_NAME
name: PROJECT_NAME
required: true
value: "hets"
- name: NAME
displayName: Name
description: The name assigned to all of the OpenShift resources associated to the PostgreSQL instance.
required: true
value: "hets-db"
- description: A name suffix used for all objects
displayName: Suffix
name: SUFFIX
required: false
value: "-dev"
- name: POSTGRESQL_USER
displayName: PostgreSQL Connection Username
description: Username for PostgreSQL user that will be used for accessing the database.
required: true
value: hetsuser
- name: POSTGRESQL_PASSWORD
displayName: PostgreSQL Connection Password
description: Password for the PostgreSQL connection user.
required: true
generate: expression
from: "[a-zA-Z0-9]{32}"
- name: POSTGRESQL_ADMIN_PASSWORD
displayName: PostgreSQL Admin Password
description: Password for the 'postgres' PostgreSQL administrative account.
required: true
generate: expression
from: "[a-zA-Z0-9]{32}"
- name: POSTGRESQL_DATABASE_NAME
displayName: PostgreSQL Database Name
description: The name of the PostgreSQL database.
required: true
value: hets
- description: Environment short name (dev,test,uat,prod)
displayName: ENV
name: ENV
required: false
value: "dev"