From 07a191f19c60ac5d11cf1373ef8feaa16b80f0ee Mon Sep 17 00:00:00 2001 From: Marco Donadoni Date: Mon, 5 Feb 2024 10:24:54 +0100 Subject: [PATCH 1/2] feat(helm): add value to customise PostgreSQL docker image (#774) Closes #773 --- helm/reana/README.md | 1 + helm/reana/templates/reana-db.yaml | 2 +- helm/reana/values.yaml | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/helm/reana/README.md b/helm/reana/README.md index 15a0dd46..151c408e 100644 --- a/helm/reana/README.md +++ b/helm/reana/README.md @@ -9,6 +9,7 @@ This Helm automatically prefixes all names using the release name to avoid colli | Parameter | Description | Default value | |----------------------------------------------------------|--------------------------------------------------------------------------------------|-------------------------------------------------| | `components.reana_db.enabled` | Instantiate a PostgreSQL database inside the cluster | true | +| `components.reana_db.image` | [PostgreSQL image](https://hub.docker.com/_/postgres) to use | `docker.io/library/postgres:12.13` | | `components.reana_job_controller.image` | [REANA-Job-Controller image](https://hub.docker.com/r/reanahub/reana-job-controller) to use | `docker.io/reanahub/reana-job-controller:` | | `components.reana_message_broker.image` | [REANA-Message-Broker image](https://hub.docker.com/r/reanahub/reana-message-broker) to use | `docker.io/reanahub/reana-message-broker:` | | `components.reana_message_broker.imagePullPolicy` | REANA-Message-Broker image pull policy | IfNotPresent | diff --git a/helm/reana/templates/reana-db.yaml b/helm/reana/templates/reana-db.yaml index a827f26d..84ad8b4e 100644 --- a/helm/reana/templates/reana-db.yaml +++ b/helm/reana/templates/reana-db.yaml @@ -31,7 +31,7 @@ spec: spec: containers: - name: db - image: docker.io/library/postgres:12.13 + image: {{ .Values.components.reana_db.image }} args: - -c - max_connections=300 diff --git a/helm/reana/values.yaml b/helm/reana/values.yaml index a760ba6b..7633ed44 100644 --- a/helm/reana/values.yaml +++ b/helm/reana/values.yaml @@ -80,6 +80,7 @@ components: image: docker.io/reanahub/reana-ui:0.9.3 reana_db: enabled: true + image: docker.io/library/postgres:12.13 reana_server: imagePullPolicy: IfNotPresent image: docker.io/reanahub/reana-server:0.9.2 From 43ead8ab3d2167458ffa590259b614ade233e853 Mon Sep 17 00:00:00 2001 From: Marco Donadoni Date: Mon, 5 Feb 2024 10:26:43 +0100 Subject: [PATCH 2/2] feat(helm): use PostgreSQL 14.10 in local dev deployment (#774) Closes #744 --- helm/configurations/values-dev.yaml | 2 ++ reana/config.py | 2 +- reana/reana_dev/python.py | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/helm/configurations/values-dev.yaml b/helm/configurations/values-dev.yaml index 41535ee0..9526e068 100644 --- a/helm/configurations/values-dev.yaml +++ b/helm/configurations/values-dev.yaml @@ -1,6 +1,8 @@ # REANA components pointing to `latest`, locally built master branch components: + reana_db: + image: docker.io/library/postgres:14.10 reana_server: image: docker.io/reanahub/reana-server environment: diff --git a/reana/config.py b/reana/config.py index eedda0a1..9da9bf6b 100644 --- a/reana/config.py +++ b/reana/config.py @@ -223,7 +223,7 @@ DOCKER_PREFETCH_IMAGES = { "reana": [ - "docker.io/library/postgres:12.13", + "docker.io/library/postgres:14.10", "docker.io/kozea/wdb:3.2.5", "docker.io/maildev/maildev:1.1.0", "docker.io/library/redis:5.0.5", diff --git a/reana/reana_dev/python.py b/reana/reana_dev/python.py index 6dadd70b..08ffb1dd 100644 --- a/reana/reana_dev/python.py +++ b/reana/reana_dev/python.py @@ -140,7 +140,7 @@ def python_unit_tests( run_command( f"docker stop postgres__{component}\n" f"docker run --rm --name postgres__{component} -p 5432:5432 " - "-e POSTGRES_PASSWORD=mysecretpassword -d docker.io/library/postgres:12.13" + "-e POSTGRES_PASSWORD=mysecretpassword -d docker.io/library/postgres:14.10" ) env_pytestarg = ""