Merge pull request #8431 from wenottingham/pg-ate-ten

Move to rhel8 PG10 container for persistent PG

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
softwarefactory-project-zuul[bot]
2020-10-22 21:38:51 +00:00
committed by GitHub
4 changed files with 11 additions and 13 deletions

View File

@@ -50,7 +50,7 @@
shell: | shell: |
{{ kubectl_or_oc }} -n {{ kubernetes_namespace }} exec ansible-tower-management -- \ {{ kubectl_or_oc }} -n {{ kubernetes_namespace }} exec ansible-tower-management -- \
bash -c "PGPASSWORD={{ pg_password | quote }} \ bash -c "PGPASSWORD={{ pg_password | quote }} \
scl enable rh-postgresql10 -- pg_dump --clean --create \ pg_dump --clean --create \
--host='{{ pg_hostname | default('postgresql') }}' \ --host='{{ pg_hostname | default('postgresql') }}' \
--port={{ pg_port | default('5432') }} \ --port={{ pg_port | default('5432') }} \
--username='{{ pg_username }}' \ --username='{{ pg_username }}' \

View File

@@ -145,7 +145,7 @@
block: block:
- name: Set new pg image - name: Set new pg image
shell: | shell: |
IMAGE=registry.access.redhat.com/rhscl/postgresql-10-rhel7 IMAGE=registry.redhat.io/rhel-8/postgresql-10
{{ kubectl_or_oc }} -n {{ kubernetes_namespace }} set image dc/postgresql postgresql=$IMAGE {{ kubectl_or_oc }} -n {{ kubernetes_namespace }} set image dc/postgresql postgresql=$IMAGE
- name: Wait for change to take affect - name: Wait for change to take affect

View File

@@ -95,7 +95,7 @@
shell: | shell: |
{{ kubectl_or_oc }} -n {{ kubernetes_namespace }} \ {{ kubectl_or_oc }} -n {{ kubernetes_namespace }} \
exec -i ansible-tower-management -- bash -c "PGPASSWORD={{ pg_password | quote }} \ exec -i ansible-tower-management -- bash -c "PGPASSWORD={{ pg_password | quote }} \
scl enable rh-postgresql10 -- psql \ psql \
--host={{ pg_hostname | default('postgresql') }} \ --host={{ pg_hostname | default('postgresql') }} \
--port={{ pg_port | default('5432') }} \ --port={{ pg_port | default('5432') }} \
--username={{ pg_username }} \ --username={{ pg_username }} \

View File

@@ -99,13 +99,15 @@ objects:
name: ${DATABASE_SERVICE_NAME} name: ${DATABASE_SERVICE_NAME}
- name: POSTGRESQL_MAX_CONNECTIONS - name: POSTGRESQL_MAX_CONNECTIONS
value: ${POSTGRESQL_MAX_CONNECTIONS} value: ${POSTGRESQL_MAX_CONNECTIONS}
image: registry.access.redhat.com/rhscl/postgresql-10-rhel7 image: registry.redhat.io/rhel8/postgresql-10
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
livenessProbe: livenessProbe:
initialDelaySeconds: 30 exec:
tcpSocket: command:
port: 5432 - /usr/libexec/check-container
timeoutSeconds: 1 - --live
initialDelaySeconds: 120
timeoutSeconds: 10
name: postgresql name: postgresql
ports: ports:
- containerPort: 5432 - containerPort: 5432
@@ -113,11 +115,7 @@ objects:
readinessProbe: readinessProbe:
exec: exec:
command: command:
- /bin/sh - /usr/libexec/check-container
- -i
- -c
- psql -h 127.0.0.1 -U $POSTGRESQL_USER -q -d template1
-c 'SELECT 1'
initialDelaySeconds: 5 initialDelaySeconds: 5
timeoutSeconds: 1 timeoutSeconds: 1
resources: resources: