Skip to content

Commit b75eca8

Browse files
committed
Merge branch 'main' into dependabot/go_modules/sigs.k8s.io/controller-runtime-0.22.1
2 parents cde7b52 + 96e8f9e commit b75eca8

File tree

18 files changed

+110
-87
lines changed

18 files changed

+110
-87
lines changed

build/postgres-operator/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ COPY --from=go_builder /usr/local/bin/extension-installer /usr/local/bin
6262
COPY --from=go_builder /usr/local/bin/pgbackrest /usr/local/bin/
6363
COPY --from=go_builder /licenses /licenses
6464
COPY build/postgres-operator/install-extensions.sh /usr/local/bin
65+
COPY build/postgres-operator/relocate-extensions.sh /usr/local/bin
6566
COPY build/postgres-operator/init-entrypoint.sh /usr/local/bin
6667
COPY build/postgres-operator/postgres-entrypoint.sh /usr/local/bin
6768
COPY build/postgres-operator/postgres-liveness-check.sh /usr/local/bin

build/postgres-operator/init-entrypoint.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ install -o "$(id -u)" -g "$(id -g)" -m 0755 -D "/usr/local/bin/pgbackrest" "${CR
99
install -o "$(id -u)" -g "$(id -g)" -m 0755 -D "/usr/local/bin/postgres-entrypoint.sh" "${CRUNCHY_BINDIR}/bin/postgres-entrypoint.sh"
1010
install -o "$(id -u)" -g "$(id -g)" -m 0755 -D "/usr/local/bin/postgres-liveness-check.sh" "${CRUNCHY_BINDIR}/bin/postgres-liveness-check.sh"
1111
install -o "$(id -u)" -g "$(id -g)" -m 0755 -D "/usr/local/bin/postgres-readiness-check.sh" "${CRUNCHY_BINDIR}/bin/postgres-readiness-check.sh"
12+
install -o "$(id -u)" -g "$(id -g)" -m 0755 -D "/usr/local/bin/relocate-extensions.sh" "${CRUNCHY_BINDIR}/bin/relocate-extensions.sh"
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
set -e
3+
4+
PG_EXTENSIONS_DIR=/usr/pgsql-${PG_VERSION}/share/extension
5+
PG_LIB_DIR=/usr/pgsql-${PG_VERSION}/lib
6+
7+
PGDATA_EXTENSIONS_DIR=/pgdata/extension/${PG_VERSION}/usr/pgsql-${PG_VERSION}/share/extension
8+
PGDATA_LIB_DIR=/pgdata/extension/${PG_VERSION}/usr/pgsql-${PG_VERSION}/lib
9+
10+
mkdir -p "${PGDATA_EXTENSIONS_DIR}"
11+
mkdir -p "${PGDATA_LIB_DIR}"
12+
13+
cp -r "${PG_EXTENSIONS_DIR}"/* "${PGDATA_EXTENSIONS_DIR}/"
14+
cp -r "${PG_LIB_DIR}"/* "${PGDATA_LIB_DIR}/"

e2e-tests/tests/custom-extensions/02-assert.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,17 @@ spec:
1919
template:
2020
spec:
2121
initContainers:
22+
- command:
23+
- /usr/local/bin/init-entrypoint.sh
2224
- name: postgres-startup
2325
- command:
24-
- /usr/local/bin/relocate-extensions.sh
26+
- /opt/crunchy/bin/relocate-extensions.sh
2527
resources: {}
2628
volumeMounts:
2729
- mountPath: /pgdata
2830
name: postgres-data
31+
- mountPath: /opt/crunchy
32+
name: crunchy-bin
2933
- mountPath: /tmp
3034
name: tmp
3135
- command:
@@ -56,8 +60,6 @@ spec:
5660
- name: postgres-data
5761
- mountPath: /tmp
5862
name: tmp
59-
- command:
60-
- /usr/local/bin/init-entrypoint.sh
6163
- name: nss-wrapper-init
6264
status:
6365
observedGeneration: 2

e2e-tests/tests/custom-extensions/05-assert.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,17 @@ spec:
1919
template:
2020
spec:
2121
initContainers:
22+
- command:
23+
- /usr/local/bin/init-entrypoint.sh
2224
- name: postgres-startup
2325
- command:
24-
- /usr/local/bin/relocate-extensions.sh
26+
- /opt/crunchy/bin/relocate-extensions.sh
2527
resources: {}
2628
volumeMounts:
2729
- mountPath: /pgdata
2830
name: postgres-data
31+
- mountPath: /opt/crunchy
32+
name: crunchy-bin
2933
- mountPath: /tmp
3034
name: tmp
3135
- command:
@@ -56,8 +60,6 @@ spec:
5660
- name: postgres-data
5761
- mountPath: /tmp
5862
name: tmp
59-
- command:
60-
- /usr/local/bin/init-entrypoint.sh
6163
- name: nss-wrapper-init
6264
status:
6365
observedGeneration: 2

e2e-tests/tests/custom-extensions/06-assert.yaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apiVersion: kuttl.dev/v1beta1
22
kind: TestAssert
3-
timeout: 180
3+
timeout: 240
44
---
55
kind: StatefulSet
66
apiVersion: apps/v1
@@ -19,15 +19,19 @@ spec:
1919
template:
2020
spec:
2121
initContainers:
22+
- command:
23+
- /usr/local/bin/init-entrypoint.sh
2224
- name: postgres-startup
2325
- command:
24-
- /usr/local/bin/relocate-extensions.sh
26+
- /opt/crunchy/bin/relocate-extensions.sh
2527
env:
2628
- name: PG_VERSION
2729
resources: {}
2830
volumeMounts:
2931
- mountPath: /pgdata
3032
name: postgres-data
33+
- mountPath: /opt/crunchy
34+
name: crunchy-bin
3135
- mountPath: /tmp
3236
name: tmp
3337
- command:
@@ -58,8 +62,6 @@ spec:
5862
- name: postgres-data
5963
- mountPath: /tmp
6064
name: tmp
61-
- command:
62-
- /usr/local/bin/init-entrypoint.sh
6365
- name: nss-wrapper-init
6466
status:
6567
observedGeneration: 3

e2e-tests/tests/custom-extensions/07-assert.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ spec:
1919
template:
2020
spec:
2121
initContainers:
22+
- command:
23+
- /usr/local/bin/init-entrypoint.sh
2224
- name: postgres-startup
2325
- command:
24-
- /usr/local/bin/relocate-extensions.sh
26+
- /opt/crunchy/bin/relocate-extensions.sh
2527
- command:
2628
- /usr/local/bin/install-extensions.sh
27-
- command:
28-
- /usr/local/bin/init-entrypoint.sh
2929
- name: nss-wrapper-init
3030
status:
3131
observedGeneration: 3

e2e-tests/tests/custom-extensions/11-assert.yaml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,11 @@ spec:
1919
template:
2020
spec:
2121
initContainers:
22+
- command:
23+
- /usr/local/bin/init-entrypoint.sh
2224
- name: postgres-startup
2325
- command:
24-
- /usr/local/bin/relocate-extensions.sh
25-
resources: {}
26-
volumeMounts:
27-
- mountPath: /pgdata
28-
name: postgres-data
29-
- mountPath: /tmp
30-
name: tmp
26+
- /opt/crunchy/bin/relocate-extensions.sh
3127
- command:
3228
- /usr/local/bin/install-extensions.sh
3329
env:
@@ -52,8 +48,6 @@ spec:
5248
- name: postgres-data
5349
- mountPath: /tmp
5450
name: tmp
55-
- command:
56-
- /usr/local/bin/init-entrypoint.sh
5751
- name: nss-wrapper-init
5852
status:
5953
observedGeneration: 5

e2e-tests/tests/custom-extensions/14-assert.yaml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,11 @@ spec:
1919
template:
2020
spec:
2121
initContainers:
22+
- command:
23+
- /usr/local/bin/init-entrypoint.sh
2224
- name: postgres-startup
2325
- command:
24-
- /usr/local/bin/relocate-extensions.sh
25-
resources: {}
26-
volumeMounts:
27-
- mountPath: /pgdata
28-
name: postgres-data
29-
- mountPath: /tmp
30-
name: tmp
26+
- /opt/crunchy/bin/relocate-extensions.sh
3127
- command:
3228
- /usr/local/bin/install-extensions.sh
3329
env:
@@ -52,8 +48,6 @@ spec:
5248
- name: postgres-data
5349
- mountPath: /tmp
5450
name: tmp
55-
- command:
56-
- /usr/local/bin/init-entrypoint.sh
5751
- name: nss-wrapper-init
5852
status:
5953
observedGeneration: 5

e2e-tests/tests/custom-extensions/15-assert.yaml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,11 @@ spec:
1919
template:
2020
spec:
2121
initContainers:
22+
- command:
23+
- /usr/local/bin/init-entrypoint.sh
2224
- name: postgres-startup
2325
- command:
24-
- /usr/local/bin/relocate-extensions.sh
25-
resources: {}
26-
volumeMounts:
27-
- mountPath: /pgdata
28-
name: postgres-data
29-
- mountPath: /tmp
30-
name: tmp
26+
- /opt/crunchy/bin/relocate-extensions.sh
3127
- command:
3228
- /usr/local/bin/install-extensions.sh
3329
env:
@@ -52,8 +48,6 @@ spec:
5248
- name: postgres-data
5349
- mountPath: /tmp
5450
name: tmp
55-
- command:
56-
- /usr/local/bin/init-entrypoint.sh
5751
- name: nss-wrapper-init
5852
status:
5953
observedGeneration: 6

0 commit comments

Comments
 (0)