Skip to content

Commit b590d3f

Browse files
authored
Merge pull request #749 from bcgov/feat/srs-758-newupdate
Feat/srs 758 newupdate
2 parents 070e362 + ff2a3a2 commit b590d3f

11 files changed

+1129
-1204
lines changed

.github/openshift/deploy.backend-applications.yml

Lines changed: 288 additions & 310 deletions
Large diffs are not rendered by default.

.github/openshift/deploy.backend-gateway.yml

Lines changed: 197 additions & 228 deletions
Large diffs are not rendered by default.

.github/openshift/deploy.backend-users.yml

Lines changed: 291 additions & 305 deletions
Large diffs are not rendered by default.

.github/openshift/deploy.database.yml

Lines changed: 30 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,9 @@ apiVersion: template.openshift.io/v1
22
kind: Template
33
metadata:
44
name: ${NAME}
5-
annotations:
6-
description: "EPD Digital Services"
7-
tags: "EPD"
8-
iconClass: icon-js
9-
labels:
10-
app: ${NAME}-${COMPONENT}
11-
app.kubernetes.io/part-of: ${NAME}-${COMPONENT}
5+
labels:
6+
app: ${NAME}-${COMPONENT}
7+
app.kubernetes.io/part-of: ${NAME}-${COMPONENT}
128
parameters:
139
- name: NAME
1410
description: Product name
@@ -19,24 +15,25 @@ parameters:
1915
- name: IMAGE_TAG
2016
description: Image tag to use
2117
value: latest
22-
- description: Password for the PostgreSQL connection user.
18+
- name: POSTGRES_DB_PASSWORD
19+
description: Password for the PostgreSQL connection user.
2320
from: "[a-zA-Z0-9]{16}"
2421
generate: expression
25-
name: POSTGRES_DB_PASSWORD
26-
- description: Password for the PostgreSQL Admin connection user.
22+
- name: POSTGRES_ADMIN_PASSWORD
23+
description: Password for the PostgreSQL Admin connection user.
2724
from: "[a-zA-Z0-9]{16}"
2825
generate: expression
29-
name: POSTGRES_ADMIN_PASSWORD
30-
- description: Volume space available for data, e.g. 512Mi, 2Gi.
26+
- name: DB_PVC_SIZE
27+
description: Volume space available for data, e.g. 512Mi, 2Gi.
3128
displayName: Database Volume Capacity
32-
name: DB_PVC_SIZE
3329
required: true
3430
value: "512Mi"
3531
- name: REGISTRY
3632
value: registry.connect.redhat.com
3733
- name: PROMOTE
3834
description: Image (namespace/name:tag) to promote/import
3935
value: crunchydata/crunchy-postgres-gis:ubi8-14.7-3.1-0
36+
4037
objects:
4138
- apiVersion: v1
4239
kind: Secret
@@ -49,16 +46,17 @@ objects:
4946
POSTGRES_DB_PASSWORD: ${POSTGRES_DB_PASSWORD}
5047
POSTGRES_ADMIN_USERNAME: postgres
5148
POSTGRES_ADMIN_PASSWORD: ${POSTGRES_ADMIN_PASSWORD}
52-
- kind: ConfigMap
53-
apiVersion: v1
49+
50+
- kind: ConfigMap
51+
apiVersion: v1
5452
metadata:
5553
name: ${NAME}-${COMPONENT}
5654
data:
57-
# Configuration values can be set as key-value properties
5855
POSTGRESQL_HOST: epd-database
5956
POSTGRESQL_PORT: "5432"
6057
POSTGRES_DATABASE: epd_dev
6158
POSTGRES_DB_SCHEMA: epd_users
59+
6260
- kind: PersistentVolumeClaim
6361
apiVersion: v1
6462
metadata:
@@ -72,6 +70,7 @@ objects:
7270
requests:
7371
storage: "${DB_PVC_SIZE}"
7472
storageClassName: netapp-file-standard
73+
7574
- kind: ImageStream
7675
apiVersion: v1
7776
metadata:
@@ -82,43 +81,31 @@ objects:
8281
lookupPolicy:
8382
local: false
8483
tags:
85-
- name: ${IMAGE_TAG}
86-
from:
87-
kind: DockerImage
88-
name: ${REGISTRY}/${PROMOTE}
89-
referencePolicy:
90-
type: Local
91-
- kind: DeploymentConfig
92-
apiVersion: v1
84+
- name: ${IMAGE_TAG}
85+
from:
86+
kind: DockerImage
87+
name: ${REGISTRY}/${PROMOTE}
88+
referencePolicy:
89+
type: Local
90+
91+
- kind: Deployment
92+
apiVersion: apps/v1
9393
metadata:
9494
name: ${NAME}-${COMPONENT}
9595
labels:
9696
app: ${NAME}
9797
spec:
9898
replicas: 1
99-
triggers:
100-
- type: ConfigChange
101-
- type: ImageChange
102-
imageChangeParams:
103-
automatic: true
104-
containerNames:
105-
- ${NAME}
106-
from:
107-
kind: ImageStreamTag
108-
name: ${NAME}-${COMPONENT}:${IMAGE_TAG}
10999
selector:
110-
deploymentconfig: ${NAME}-${COMPONENT}
100+
matchLabels:
101+
app: ${NAME}-${COMPONENT}
111102
strategy:
112103
type: Recreate
113-
recreateParams:
114-
timeoutSeconds: 600
115-
activeDeadlineSeconds: 21600
104+
rollingUpdate: null
116105
template:
117106
metadata:
118-
name: ${NAME}-${COMPONENT}
119107
labels:
120108
app: ${NAME}
121-
deploymentconfig: ${NAME}-${COMPONENT}
122109
spec:
123110
volumes:
124111
- name: ${NAME}-${COMPONENT}
@@ -134,11 +121,6 @@ objects:
134121
exec:
135122
command:
136123
- /opt/crunchy/bin/postgres/readiness.sh
137-
# - bash
138-
# - '-c'
139-
# - >-
140-
# psql -q -d
141-
# $POSTGRESQL_DATABASE -c 'SELECT 1'
142124
failureThreshold: 5
143125
initialDelaySeconds: 30
144126
periodSeconds: 15
@@ -147,11 +129,6 @@ objects:
147129
exec:
148130
command:
149131
- /opt/crunchy/bin/postgres/liveness.sh
150-
# - bash
151-
# - '-c'
152-
# - >-
153-
# psql -q -d
154-
# $POSTGRESQL_DATABASE -c 'SELECT 1'
155132
failureThreshold: 5
156133
initialDelaySeconds: 30
157134
periodSeconds: 15
@@ -217,11 +194,6 @@ objects:
217194
configMapKeyRef:
218195
name: ${NAME}-database
219196
key: APPLICATION_MICROSERVICE_ENDPOINT
220-
- name: PGHOST
221-
valueFrom:
222-
secretKeyRef:
223-
name: ${NAME}-${COMPONENT}
224-
key: PGHOST
225197
volumeMounts:
226198
- name: ${NAME}-${COMPONENT}
227199
mountPath: "/pgdata"
@@ -232,6 +204,7 @@ objects:
232204
terminationGracePeriodSeconds: 30
233205
dnsPolicy: ClusterFirst
234206
schedulerName: default-scheduler
207+
235208
- apiVersion: v1
236209
kind: Service
237210
metadata:
@@ -246,6 +219,6 @@ objects:
246219
protocol: TCP
247220
targetPort: 5432
248221
selector:
249-
deploymentconfig: ${NAME}-${COMPONENT}
222+
app: ${NAME}-${COMPONENT}
250223
sessionAffinity: None
251-
type: ClusterIP
224+
type: ClusterIP

0 commit comments

Comments
 (0)