Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion image/postgres/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG PG_VERSION=13
ARG PG_VERSION=15
FROM quay.io/sclorg/postgresql-${PG_VERSION}-c8s:latest AS final

USER root
Expand Down
2 changes: 1 addition & 1 deletion image/postgres/download.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -euo pipefail

postgres_major=13
postgres_major=15
pg_rhel_major=8

arch="$(uname -m)"
Expand Down
3 changes: 2 additions & 1 deletion image/postgres/konflux.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM registry.redhat.io/rhel8/postgresql-13:latest AS final
ARG PG_VERSION=15
FROM registry.redhat.io/rhel8/postgresql-${PG_VERSION}:latest AS final

USER root

Expand Down
2 changes: 1 addition & 1 deletion image/rhel/download.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ if [[ "$arch" == "s390x" ]]; then
mv /tmp/postgresql-private-libs-*.rpm "${output_dir}/rpms/postgres-libs.rpm"
mv /tmp/postgresql-*.rpm "${output_dir}/rpms/postgres.rpm"
else
postgres_major=13
postgres_major=15
pg_rhel_major=8
postgres_repo_url="https://download.postgresql.org/pub/repos/yum/reporpms/EL-${pg_rhel_major}-${arch}/pgdg-redhat-repo-latest.noarch.rpm"
dnf install --disablerepo='*' -y "${postgres_repo_url}"
Expand Down
4 changes: 3 additions & 1 deletion image/rhel/konflux.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
ARG FINAL_STAGE_PATH="/mnt/final"
ARG PG_VERSION=15

# TODO(ROX-20312): we can't pin image tag or digest because currently there's no mechanism to auto-update that.
FROM registry.access.redhat.com/ubi8/ubi:latest AS ubi-base
Expand All @@ -9,14 +10,15 @@ FROM registry.access.redhat.com/ubi8/ubi-minimal:latest AS final-base
FROM ubi-base AS rpm-installer

ARG FINAL_STAGE_PATH
ARG PG_VERSION
COPY --from=final-base / "$FINAL_STAGE_PATH"

COPY ./.konflux/scripts/subscription-manager/* /tmp/.konflux/
RUN /tmp/.konflux/subscription-manager-bro.sh register "$FINAL_STAGE_PATH"

# Install packages for the final stage.
RUN dnf -y --installroot="$FINAL_STAGE_PATH" upgrade --nobest && \
dnf -y --installroot="$FINAL_STAGE_PATH" module enable postgresql:13 && \
dnf -y --installroot="$FINAL_STAGE_PATH" module enable postgresql:${PG_VERSION} && \
# find is used in /stackrox/import-additional-cas \
dnf -y --installroot="$FINAL_STAGE_PATH" install findutils postgresql && \
# We can do usual cleanup while we're here: remove packages that would trigger violations. \
Expand Down
4 changes: 3 additions & 1 deletion tests/upgrade/postgres_run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,9 @@ force_rollback_to_previous_postgres() {

kubectl -n stackrox patch configmap/central-config -p "$config_patch"
kubectl -n stackrox set image deploy/central "central=$REGISTRY/main:$FORCE_ROLLBACK_VERSION"
kubectl -n stackrox set image deploy/central-db "*=$REGISTRY/central-db:$FORCE_ROLLBACK_VERSION"

# Do not rollback central-db image, since downgrade from PG15 to PG13 is
# not possible.
}

deploy_scaled_workload() {
Expand Down
Loading