Skip to content

Commit

Permalink
Use redis/postgres images from quay registry
Browse files Browse the repository at this point in the history
The current redis and postgresql images aren't using the fully qualified
registry name and use docker.io.
The images used for those app aren't the same than the one used dowstream
and could cause issue with different versions / parameters.

The images from the sclorg namespace on the quay.io registry are the upstream
equivalent to the downstream images for redis and postgresql.

Signed-off-by: Dimitri Savineau <[email protected]>
  • Loading branch information
dsavineau committed Apr 3, 2023
1 parent 6740dad commit 1ebe3a0
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 30 deletions.
4 changes: 2 additions & 2 deletions roles/postgres/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ database_username: "{{ deployment_type }}"
# Name of k8s secret containing postgres host, username, password, database, port, and type
database_secret: ''

_postgres_image: postgres
_postgres_image_version: 13
_postgres_image: quay.io/sclorg/postgresql-13-c8s
_postgres_image_version: latest

# Add a nodeSelector for the Postgres pods.
# It must match a node's labels for the pod to be scheduled on that node.
Expand Down
24 changes: 0 additions & 24 deletions roles/postgres/templates/postgres.statefulset.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ spec:
args: {{ database.postgres_extra_args }}
{% endif %}
env:
# For postgres_image based on rhel8/postgresql-13
- name: POSTGRESQL_DATABASE
valueFrom:
secretKeyRef:
Expand All @@ -72,29 +71,6 @@ spec:
secretKeyRef:
name: '{{ __database_secret }}'
key: password

# For postgres_image based on postgres
- name: POSTGRES_DB
valueFrom:
secretKeyRef:
name: '{{ __database_secret }}'
key: database
- name: POSTGRES_USER
valueFrom:
secretKeyRef:
name: '{{ __database_secret }}'
key: username
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
name: '{{ __database_secret }}'
key: password
- name: PGDATA
value: '{{ database.postgres_data_path }}'
- name: POSTGRES_INITDB_ARGS
value: '{{ postgres_initdb_args }}'
- name: POSTGRES_HOST_AUTH_METHOD
value: '{{ postgres_host_auth_method }}'
ports:
- containerPort: {{ eda_postgres_port | default('5432')}}
name: postgres-{{ supported_pg_version }}
Expand Down
2 changes: 0 additions & 2 deletions roles/postgres/vars/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
---
# vars file for PostgreSQL database

postgres_initdb_args: '--auth-host=scram-sha-256'
postgres_host_auth_method: 'scram-sha-256'
supported_pg_version: 13
4 changes: 2 additions & 2 deletions roles/redis/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

deployment_type: eda

_redis_image: redis
_redis_image_version: 7
_redis_image: quay.io/sclorg/redis-6-c8s
_redis_image_version: latest

redis:
replicas: 1
Expand Down

0 comments on commit 1ebe3a0

Please sign in to comment.