Skip to content

Commit

Permalink
chore(ci): Update database service name. (#161)
Browse files Browse the repository at this point in the history
  • Loading branch information
fergmac authored Nov 5, 2024
1 parent bb0a5f2 commit 3762bfc
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 28 deletions.
1 change: 0 additions & 1 deletion .github/workflows/.deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ jobs:
file: database/openshift.deploy.yml
overwrite: true
parameters:
-p DATABASE_SERVICE_NAME=gwells-${{ github.event.number }}-database
-p IMAGE_STREAM_NAMESPACE=${{ vars.OC_NAMESPACE }}
-p IMAGE_STREAM_NAME=crunchy-postgres-gis
-p IMAGE_TAG=${{ inputs.tag }}
Expand Down
49 changes: 22 additions & 27 deletions database/openshift.deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@ parameters:
displayName: Image Registry
name: IMAGE_REGISTRY
value: image-registry.openshift-image-registry.svc:5000
- description: The name of the OpenShift Service exposed for the database.
displayName: Database Service Name
name: DATABASE_SERVICE_NAME
required: true
value: postgresql
- description: Volume space available for data, e.g. 512Mi, 2Gi.
displayName: Volume Capacity
name: VOLUME_CAPACITY
Expand Down Expand Up @@ -123,17 +118,17 @@ objects:
metadata:
labels:
app: nr-gwells-${NAME_SUFFIX}
name: ${DATABASE_SERVICE_NAME}-setupcfg
appver: gwells-${NAME_SUFFIX}
name: ${DATABASE_SERVICE_NAME}-setupcfg
name: gwells-${NAME_SUFFIX}-database-setupcfg
appver: gwells-${NAME_SUFFIX}-database
name: gwells-${NAME_SUFFIX}-database-setupcfg
- apiVersion: v1
kind: Service
metadata:
labels:
app: nr-gwells-${NAME_SUFFIX}
annotations:
template.openshift.io/expose-uri: postgres://{.spec.clusterIP}:{.spec.ports[?(.name=="postgresql")].port}
name: ${DATABASE_SERVICE_NAME}
name: gwells-${NAME_SUFFIX}-database
spec:
ports:
- name: postgresql
Expand All @@ -142,15 +137,15 @@ objects:
protocol: TCP
targetPort: 5432
selector:
deployment: ${DATABASE_SERVICE_NAME}
deployment: gwells-${NAME_SUFFIX}-database
sessionAffinity: None
type: ClusterIP
status:
loadBalancer: {}
- apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: ${DATABASE_SERVICE_NAME}
name: gwells-${NAME_SUFFIX}-database
labels:
app: nr-gwells-${NAME_SUFFIX}
annotations:
Expand All @@ -167,22 +162,22 @@ objects:
metadata:
annotations:
template.alpha.openshift.io/wait-for-ready: "true"
name: ${DATABASE_SERVICE_NAME}
name: gwells-${NAME_SUFFIX}-database
labels:
app: nr-gwells-${NAME_SUFFIX}
spec:
replicas: 1
selector:
matchLabels:
deployment: ${DATABASE_SERVICE_NAME}
deployment: gwells-${NAME_SUFFIX}-database
strategy:
type: Recreate
template:
metadata:
labels:
name: ${DATABASE_SERVICE_NAME}
name: gwells-${NAME_SUFFIX}-database
appver: gwells-${NAME_SUFFIX}
deployment: ${DATABASE_SERVICE_NAME}
deployment: gwells-${NAME_SUFFIX}-database
spec:
containers:
- capabilities: {}
Expand All @@ -192,7 +187,7 @@ objects:
- name: CONTAINER_NAME
value: postgresql
- name: PG_PRIMARY_HOST
value: ${DATABASE_SERVICE_NAME}
value: gwells-${NAME_SUFFIX}-database
- name: PGDATA_PATH_OVERRIDE
value: userdata
- name: PGHOST
Expand All @@ -201,17 +196,17 @@ objects:
valueFrom:
secretKeyRef:
key: database-name
name: ${DATABASE_SERVICE_NAME}
name: gwells-${NAME_SUFFIX}-database
- name: PG_PASSWORD
valueFrom:
secretKeyRef:
key: database-password
name: ${DATABASE_SERVICE_NAME}
name: gwells-${NAME_SUFFIX}-database
- name: PG_USER
valueFrom:
secretKeyRef:
key: database-user
name: ${DATABASE_SERVICE_NAME}
name: gwells-${NAME_SUFFIX}-database
- name: PG_MODE
valueFrom:
secretKeyRef:
Expand Down Expand Up @@ -273,20 +268,20 @@ objects:
terminationMessagePath: /dev/termination-log
volumeMounts:
- mountPath: /pgdata
name: ${DATABASE_SERVICE_NAME}-data
name: gwells-${NAME_SUFFIX}-database-data
- mountPath: /var/run/postgresql
name: ${DATABASE_SERVICE_NAME}-run
name: gwells-${NAME_SUFFIX}-database-run
- mountPath: /pgconf
name: ${DATABASE_SERVICE_NAME}-setupcfg
name: gwells-${NAME_SUFFIX}-database-setupcfg
dnsPolicy: ClusterFirst
restartPolicy: Always
volumes:
- name: ${DATABASE_SERVICE_NAME}-data
- name: gwells-${NAME_SUFFIX}-database-data
persistentVolumeClaim:
claimName: ${DATABASE_SERVICE_NAME}
- name: ${DATABASE_SERVICE_NAME}-run
claimName: gwells-${NAME_SUFFIX}-database
- name: gwells-${NAME_SUFFIX}-database-run
emptyDir: {}
- configMap:
name: ${DATABASE_SERVICE_NAME}-setupcfg
name: ${DATABASE_SERVICE_NAME}-setupcfg
name: gwells-${NAME_SUFFIX}-database-setupcfg
name: gwells-${NAME_SUFFIX}-database-setupcfg
status: {}

0 comments on commit 3762bfc

Please sign in to comment.