generated from bcgov/quickstart-openshift
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathopenshift.init.yml
151 lines (151 loc) · 4.2 KB
/
openshift.init.yml
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
apiVersion: template.openshift.io/v1
kind: Template
parameters:
- name: REPO
description: Repository name
value: nr-gwells
- name: ZONE
description: Deployment zone, e.g. pr-### or prod
required: true
- description: The name of the OpenShift Service exposed for the database.
displayName: Database Service Name
name: DATABASE_SERVICE_NAME
required: true
value: postgresql
- description: Username for PostgreSQL user that will be used for accessing the database.
name: POSTGRESQL_USER
required: true
value: gwells
- description: Password for the PostgreSQL connection user
name: POSTGRESQL_PASSWORD
required: true
- description: Name of the PostgreSQL database accessed.
displayName: PostgreSQL Database Name
name: POSTGRESQL_DATABASE
required: true
value: gwells
- name: FDW_DATABASE_PASSWORD
required: true
- name: DJANGO_ADMIN_PASSWORD
required: true
- name: DJANGO_ADMIN_URL
required: true
- name: DJANGO_ADMIN_USER
required: true
- name: DJANGO_SECRET_KEY
required: true
- name: E_LICENSING_AUTH_USERNAME
required: true
- name: E_LICENSING_AUTH_PASSWORD
required: true
- name: PG_MODE
required: true
- name: PG_PRIMARY_PASSWORD
required: true
- name: PG_PRIMARY_USER
required: true
- name: PG_ROOT_PASSWORD
required: true
- name: MINIO_ACCESS_KEY
required: true
- name: MINIO_SECRET_KEY
required: true
- name: S3_PUBLIC_ACCESS_KEY
required: true
- name: S3_PUBLIC_SECRET_KEY
required: true
- name: S3_HOST
required: true
- name: S3_ROOT_BUCKET
required: true
objects:
- apiVersion: v1
kind: Secret
metadata:
name: ${REPO}-${ZONE}-database
labels:
app: ${REPO}-${ZONE}
stringData:
database-name: ${POSTGRESQL_DATABASE}
database-password: ${POSTGRESQL_PASSWORD}
database-user: ${POSTGRESQL_USER}
database-host: nr-gwells-232-database.cd43d9-dev.svc.cluster.local
fdw-database-user: proxy_wells_gwells
fdw-database-password: ${FDW_DATABASE_PASSWORD}
fdw-database-server: "//nrk1-scan.bcgov/envprod1.nrs.bcgov"
fdw-database-schema: WELLS
- apiVersion: v1
kind: Secret
metadata:
name: ${REPO}-${ZONE}-minio
labels:
app: ${REPO}-${ZONE}
stringData:
MINIO_ACCESS_KEY: ${MINIO_ACCESS_KEY}
MINIO_SECRET_KEY: ${MINIO_SECRET_KEY}
S3_PUBLIC_ACCESS_KEY: ${S3_PUBLIC_ACCESS_KEY}
S3_PUBLIC_SECRET_KEY: ${S3_PUBLIC_SECRET_KEY}
S3_HOST: ${S3_HOST}
S3_ROOT_BUCKET: ${S3_ROOT_BUCKET}
- apiVersion: v1
kind: Secret
metadata:
name: ${REPO}-${ZONE}-django
labels:
app: ${REPO}-${ZONE}
stringData:
admin_password: ${DJANGO_ADMIN_PASSWORD}
admin_url: ${DJANGO_ADMIN_URL}
admin_user: ${DJANGO_ADMIN_USER}
secret_key: ${DJANGO_SECRET_KEY}
- apiVersion: v1
kind: Secret
metadata:
name: ${REPO}-${ZONE}-e-licensing
labels:
app: ${REPO}-${ZONE}
stringData:
E_LICENSING_AUTH_PASSWORD: ${E_LICENSING_AUTH_PASSWORD}
E_LICENSING_AUTH_USERNAME: ${E_LICENSING_AUTH_USERNAME}
- apiVersion: v1
kind: Secret
metadata:
creationTimestamp:
name: ${REPO}-${ZONE}-crunchy-db-credentials
labels:
app: ${REPO}-${ZONE}
stringData:
PG_MODE: ${PG_MODE}
PG_PRIMARY_PASSWORD: ${PG_PRIMARY_PASSWORD}
PG_PRIMARY_USER: ${PG_PRIMARY_USER}
PG_ROOT_PASSWORD: ${PG_ROOT_PASSWORD}
- apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: allow-from-openshift-ingress
labels:
template: openshift-test
spec:
ingress:
- from:
- namespaceSelector:
matchLabels:
network.openshift.io/policy-group: ingress
policyTypes:
- Ingress
- apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: allow-same-namespace
labels:
template: nr-gwells-backend-network-security-policy
spec:
podSelector: {}
ingress:
- from:
- namespaceSelector:
matchLabels:
environment: dev
name: cd43d9
policyTypes:
- Ingress