From 3762bfc85a444c34ce4ee316b018380fda624e16 Mon Sep 17 00:00:00 2001 From: Fergus MacConnell Date: Tue, 5 Nov 2024 15:07:01 -0800 Subject: [PATCH] chore(ci): Update database service name. (#161) --- .github/workflows/.deploy.yml | 1 - database/openshift.deploy.yml | 49 ++++++++++++++++------------------- 2 files changed, 22 insertions(+), 28 deletions(-) diff --git a/.github/workflows/.deploy.yml b/.github/workflows/.deploy.yml index b4e91f702..eca6980ce 100644 --- a/.github/workflows/.deploy.yml +++ b/.github/workflows/.deploy.yml @@ -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 }} diff --git a/database/openshift.deploy.yml b/database/openshift.deploy.yml index d107ad6af..83118eadf 100644 --- a/database/openshift.deploy.yml +++ b/database/openshift.deploy.yml @@ -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 @@ -123,9 +118,9 @@ 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: @@ -133,7 +128,7 @@ objects: 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 @@ -142,7 +137,7 @@ objects: protocol: TCP targetPort: 5432 selector: - deployment: ${DATABASE_SERVICE_NAME} + deployment: gwells-${NAME_SUFFIX}-database sessionAffinity: None type: ClusterIP status: @@ -150,7 +145,7 @@ objects: - apiVersion: v1 kind: PersistentVolumeClaim metadata: - name: ${DATABASE_SERVICE_NAME} + name: gwells-${NAME_SUFFIX}-database labels: app: nr-gwells-${NAME_SUFFIX} annotations: @@ -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: {} @@ -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 @@ -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: @@ -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: {}