Skip to content

Commit 314683e

Browse files
committed
feat: Support Postgres 17, OTEL Collector and update other images
1 parent e026b44 commit 314683e

31 files changed

Lines changed: 160 additions & 217 deletions

File tree

.gitlab-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
image: null
22

33
variables:
4-
SG_CI_IMAGE_NAME: "ci:1.27"
4+
SG_CI_IMAGE_NAME: "ci:1.29"
55
BUILDER_IMAGE_NAME: "builder:1.9"
66
SKIP_NATIVE: "false"
77
SKIP_E2E: "false"

stackgres-k8s/ci/build/Dockerfile-ci

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,12 @@ FROM registry.access.redhat.com/ubi8-minimal:8.10-1018
146146
RUN wget https://github.com/norwoodj/helm-docs/releases/download/v1.12.0/helm-docs_1.12.0_Linux_$(uname -m | grep -qxF aarch64 && echo arm64 || echo x86_64).tar.gz -O -|tar xz -C /bin -f - helm-docs
147147
RUN wget https://github.com/gohugoio/hugo/releases/download/v0.81.0/hugo_0.81.0_Linux-$(uname -m | grep -qxF aarch64 && echo ARM64 || echo 64bit).tar.gz -O -|tar xz -C /bin -f - hugo
148148
RUN wget https://github.com/fybrik/crdoc/releases/download/v0.6.3/crdoc_Linux_$(uname -m | grep -qxF aarch64 && echo arm64 || echo x86_64).tar.gz -O -|tar xz -C /bin -f - crdoc
149-
RUN wget -O - "https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize/v5.3.0/kustomize_v5.3.0_$(uname -s | tr '[:upper:]' '[:lower:]')_$(uname -m | sed 's/x86_64/amd64/' | sed 's/aarch64/arm64/').tar.gz" | tar xzf - -C /bin
149+
RUN wget -O - "https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize/v5.4.3/kustomize_v5.4.3_$(uname -s | tr '[:upper:]' '[:lower:]')_$(uname -m | sed 's/x86_64/amd64/' | sed 's/aarch64/arm64/').tar.gz" | tar xzf - -C /bin
150150
RUN wget -O /bin/kind-0.23.0 "https://github.com/kubernetes-sigs/kind/releases/download/v0.23.0/kind-linux-$(uname -m | grep -qxF aarch64 && echo arm64 || echo amd64)"
151151
RUN chmod a+x /bin/kind-0.23.0
152152
RUN ln -s -f /bin/kind-0.23.0 /bin/kind
153+
# Older operator-sdk versions than 1.36 removed support for plugin quarkus.javaoperatorsdk.io/v1-beta but the bundle is generated only by operator-sdk version 1.32
154+
# another reason to use java-operator-sdk :/
155+
RUN wget https://github.com/operator-framework/operator-sdk/releases/download/v1.32.0/operator-sdk_linux_$(uname -m | grep -qxF aarch64 && echo arm64 || echo amd64) -O /bin/operator-sdk-1.32
156+
RUN chmod a+x /bin/operator-sdk-1.32
157+

stackgres-k8s/ci/build/config.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
.images:
2-
ci_image: &ci_image registry.gitlab.com/ongresinc/stackgres/ci:1.26
2+
ci_image: &ci_image registry.gitlab.com/ongresinc/stackgres/ci:1.29
33
jdk_build_image: &jdk_build_image registry.gitlab.com/ongresinc/stackgres/builder:1.9
4-
jdk_runtime_image: &jdk_runtime_image registry.access.redhat.com/ubi9/openjdk-21:1.20-2.1721752936
5-
ubi8_micro_image: &ubi8_micro_image registry.access.redhat.com/ubi8-micro:8.10-9
6-
ubi9_minimal_image: &ubi9_minimal_image registry.access.redhat.com/ubi9-minimal:9.4-1194
7-
admin_ui_build_image: &admin_ui_build_image registry.access.redhat.com/ubi8/nodejs-20:1-50.1720405266
8-
admin_ui_nginx_image: &admin_ui_nginx_image registry.access.redhat.com/ubi8/nginx-124:1-16
9-
pglambda_nodejs_image: &pglambda_nodejs_image registry.access.redhat.com/ubi8/nodejs-18:1-114.1720405264
4+
jdk_runtime_image: &jdk_runtime_image registry.access.redhat.com/ubi9/openjdk-21:1.20-2.1726695192
5+
ubi8_micro_image: &ubi8_micro_image registry.access.redhat.com/ubi8-micro:8.10-13
6+
ubi9_minimal_image: &ubi9_minimal_image registry.access.redhat.com/ubi9-minimal:9.4-1227.1726694542
7+
admin_ui_build_image: &admin_ui_build_image registry.access.redhat.com/ubi8/nodejs-20:1-63
8+
admin_ui_nginx_image: &admin_ui_nginx_image registry.access.redhat.com/ubi8/nginx-124:1-29
9+
pglambda_nodejs_image: &pglambda_nodejs_image registry.access.redhat.com/ubi8/nodejs-18:1-127
1010
platforms:
1111
- linux/x86_64
1212
- linux/aarch64

stackgres-k8s/e2e/utils/operator

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1125,6 +1125,7 @@ traceable_get_component_images() {
11251125
COMPONENT_FLUENTD_VERSIONS="$(get_component_versions "$VERSION" fluentd)"
11261126
COMPONENT_KUBECTL_VERSIONS="$(get_component_versions "$VERSION" kubectl)"
11271127
COMPONENT_BABELFISH_COMPASS_VERSIONS="$(get_component_versions "$VERSION" babelfish-compass)"
1128+
COMPONENT_OTEL_COLLECTOR_VERSIONS="$(get_component_versions "$VERSION" otel-collector)"
11281129
local VERSION
11291130
local SUBVERSION
11301131
for VERSION in $COMPONENT_PATRONI_VERSIONS
@@ -1176,6 +1177,10 @@ traceable_get_component_images() {
11761177
do
11771178
echo "quay.io/ongres/babelfish-compass:v$VERSION"
11781179
done
1180+
for VERSION in $COMPONENT_OTEL_COLLECTOR_VERSIONS
1181+
do
1182+
echo "quay.io/ongres/otel-collector:v$VERSION"
1183+
done
11791184
}
11801185
11811186
get_pom_url() {

stackgres-k8s/e2e/utils/repository

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,9 @@ cache_pulled_images_to_local_repository() {
209209
-lt "$(($(date +%s)-30))" ]
210210
then
211211
echo "Pulling image $IMAGE_NAME to cache"
212-
if docker pull -q "$IMAGE_NAME"
212+
local EXIT_CODE RESULT
213+
try_function docker_pull "$IMAGE_NAME"
214+
if "$RESULT"
213215
then
214216
echo "$(date +%s):$IMAGE_NAME" >> "$E2E_PULLED_IMAGES_PATH"
215217
else
@@ -230,12 +232,16 @@ load_failed_images_pull_from_local_repository() {
230232
while read IMAGE_NAME
231233
do
232234
echo "Detected failed to pull image $IMAGE_NAME to k8s env $E2E_ENV"
233-
if docker image inspect "$IMAGE_NAME" >/dev/null 2>&1 \
234-
|| docker pull -q "$IMAGE_NAME"
235+
if docker image inspect "$IMAGE_NAME" >/dev/null 2>&1
235236
then
236237
load_image_k8s "$IMAGE_NAME"
237238
else
238-
echo "Image $IMAGE_NAME not found in cache and can not be pulled!"
239+
local EXIT_CODE RESULT
240+
try_function docker_pull "$IMAGE_NAME"
241+
if ! "$RESULT"
242+
then
243+
echo "Image $IMAGE_NAME not found in cache and can not be pulled!"
244+
fi
239245
fi
240246
done
241247
)

stackgres-k8s/install/helm/stackgres-cluster/templates/sgpostgresconfig.yaml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,10 @@ metadata:
1313
{{- end }}
1414
spec:
1515
{{- if eq .Values.cluster.postgres.version "latest" }}
16-
{{- if .Values.cluster.postgres.flavor }}
17-
{{- if eq .Values.cluster.postgres.flavor "babelfish" }}
18-
postgresVersion: "15"
19-
{{- else }}
16+
{{- if eq .Values.cluster.postgres.flavor "babelfish" }}
2017
postgresVersion: "16"
21-
{{- end }}
2218
{{- else }}
23-
postgresVersion: "16"
19+
postgresVersion: "17"
2420
{{- end }}
2521
{{- else }}
2622
postgresVersion: "{{ index (.Values.cluster.postgres.version | splitList ".") 0 }}"

stackgres-k8s/install/helm/stackgres-operator/values.yaml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -120,14 +120,6 @@ adminui:
120120
collector:
121121
# -- OpenTelemetry Collector Deployment/DeamonSet base name
122122
name: stackgres-collector
123-
# Section to configure OpenTelemetry Collector image
124-
image:
125-
# -- OpenTelemetry Collector image name
126-
name: "docker.io/otel/opentelemetry-collector-contrib"
127-
# -- OpenTelemetry Collector image tag
128-
tag: "0.109.0"
129-
# -- OpenTelemetry Collector image pull policy
130-
pullPolicy: "IfNotPresent"
131123
# Section to configure OpenTelemetry Collector receivers
132124
#
133125
# By default a single instance of OpenTelemetry Collector will be created.

stackgres-k8s/install/operator-sdk/stackgres-operator/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ endif
6161
IMG ?= $(IMAGE_TAG_BASE):$(IMAGE_TAG)
6262

6363
KUSTOMIZE = kustomize
64-
OPERATOR_SDK = operator-sdk
64+
OPERATOR_SDK = operator-sdk-1.32
6565

6666
.PHONY: all
6767
all: bundle-build

stackgres-k8s/src/cluster-controller/src/main/docker/Dockerfile.jvm

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ ARG BASE_IMAGE
22

33
FROM quay.io/ongres/patroni:v3.0.2-pg15.0-build-6.22 AS patroni_3_0_2
44
FROM quay.io/ongres/patroni:v3.2.2-pg16.2-build-6.30 AS patroni_3_2_2
5-
FROM quay.io/ongres/patroni:v3.3.2-pg16.3-build-6.34 AS patroni_3_3_2
5+
FROM quay.io/ongres/patroni:v3.3.3-pg16.4-build-6.37 AS patroni_3_3_3
66

77
FROM "$BASE_IMAGE"
88
USER root:root
@@ -18,10 +18,10 @@ FROM "$BASE_IMAGE"
1818
COPY --from=patroni_3_2_2 /usr/lib64/python3.9/site-packages /usr/lib/patroni-3.2.2
1919
COPY --from=patroni_3_2_2 /usr/lib/python3.9/site-packages /usr/lib/patroni-3.2.2
2020

21-
COPY --from=patroni_3_3_2 /usr/bin/patronictl /usr/bin/patronictl-3.3.2
22-
RUN sed -i "5i sys.path.append('/usr/lib/patroni-3.3.2')" /usr/bin/patronictl-3.3.2
23-
COPY --from=patroni_3_3_2 /usr/lib64/python3.11/site-packages /usr/lib/patroni-3.3.2
24-
COPY --from=patroni_3_3_2 /usr/lib/python3.11/site-packages /usr/lib/patroni-3.3.2
21+
COPY --from=patroni_3_3_3 /usr/bin/patronictl /usr/bin/patronictl-3.3.3
22+
RUN sed -i "5i sys.path.append('/usr/lib/patroni-3.3.3')" /usr/bin/patronictl-3.3.3
23+
COPY --from=patroni_3_3_3 /usr/lib64/python3.11/site-packages /usr/lib/patroni-3.3.3
24+
COPY --from=patroni_3_3_3 /usr/lib/python3.11/site-packages /usr/lib/patroni-3.3.3
2525

2626
WORKDIR '/app/'
2727

stackgres-k8s/src/cluster-controller/src/main/docker/Dockerfile.native

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ ARG BASE_IMAGE
22

33
FROM quay.io/ongres/patroni:v3.0.2-pg15.0-build-6.22 AS patroni_3_0_2
44
FROM quay.io/ongres/patroni:v3.2.2-pg16.2-build-6.30 AS patroni_3_2_2
5-
FROM quay.io/ongres/patroni:v3.3.2-pg16.3-build-6.34 AS patroni_3_3_2
5+
FROM quay.io/ongres/patroni:v3.3.3-pg16.4-build-6.37 AS patroni_3_3_3
66

77
FROM "$BASE_IMAGE"
88
USER root:root
@@ -18,10 +18,10 @@ FROM "$BASE_IMAGE"
1818
COPY --from=patroni_3_2_2 /usr/lib64/python3.9/site-packages /usr/lib/patroni-3.2.2
1919
COPY --from=patroni_3_2_2 /usr/lib/python3.9/site-packages /usr/lib/patroni-3.2.2
2020

21-
COPY --from=patroni_3_3_2 /usr/bin/patronictl /usr/bin/patronictl-3.3.2
22-
RUN sed -i "5i sys.path.append('/usr/lib/patroni-3.3.2')" /usr/bin/patronictl-3.3.2
23-
COPY --from=patroni_3_3_2 /usr/lib64/python3.11/site-packages /usr/lib/patroni-3.3.2
24-
COPY --from=patroni_3_3_2 /usr/lib/python3.11/site-packages /usr/lib/patroni-3.3.2
21+
COPY --from=patroni_3_3_3 /usr/bin/patronictl /usr/bin/patronictl-3.3.3
22+
RUN sed -i "5i sys.path.append('/usr/lib/patroni-3.3.3')" /usr/bin/patronictl-3.3.3
23+
COPY --from=patroni_3_3_3 /usr/lib64/python3.11/site-packages /usr/lib/patroni-3.3.3
24+
COPY --from=patroni_3_3_3 /usr/lib/python3.11/site-packages /usr/lib/patroni-3.3.3
2525

2626
WORKDIR '/app/'
2727

0 commit comments

Comments
 (0)