File tree Expand file tree Collapse file tree 16 files changed +78
-55
lines changed Expand file tree Collapse file tree 16 files changed +78
-55
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,7 @@ COPY --from=go_builder /usr/local/bin/extension-installer /usr/local/bin
6262COPY --from=go_builder /usr/local/bin/pgbackrest /usr/local/bin/
6363COPY --from=go_builder /licenses /licenses
6464COPY build/postgres-operator/install-extensions.sh /usr/local/bin
65+ COPY build/postgres-operator/relocate-extensions.sh /usr/local/bin
6566COPY build/postgres-operator/init-entrypoint.sh /usr/local/bin
6667COPY build/postgres-operator/postgres-entrypoint.sh /usr/local/bin
6768COPY build/postgres-operator/postgres-liveness-check.sh /usr/local/bin
Original file line number Diff line number Diff line change @@ -9,3 +9,4 @@ install -o "$(id -u)" -g "$(id -g)" -m 0755 -D "/usr/local/bin/pgbackrest" "${CR
99install -o " $( id -u) " -g " $( id -g) " -m 0755 -D " /usr/local/bin/postgres-entrypoint.sh" " ${CRUNCHY_BINDIR} /bin/postgres-entrypoint.sh"
1010install -o " $( id -u) " -g " $( id -g) " -m 0755 -D " /usr/local/bin/postgres-liveness-check.sh" " ${CRUNCHY_BINDIR} /bin/postgres-liveness-check.sh"
1111install -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"
Original file line number Diff line number Diff line change 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} /"
Original file line number Diff line number Diff 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 :
5660 - name : postgres-data
5761 - mountPath : /tmp
5862 name : tmp
59- - command :
60- - /usr/local/bin/init-entrypoint.sh
6163 - name : nss-wrapper-init
6264status :
6365 observedGeneration : 2
Original file line number Diff line number Diff 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 :
5660 - name : postgres-data
5761 - mountPath : /tmp
5862 name : tmp
59- - command :
60- - /usr/local/bin/init-entrypoint.sh
6163 - name : nss-wrapper-init
6264status :
6365 observedGeneration : 2
Original file line number Diff line number Diff line change 11apiVersion : kuttl.dev/v1beta1
22kind : TestAssert
3- timeout : 180
3+ timeout : 240
44---
55kind : StatefulSet
66apiVersion : 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 :
5862 - name : postgres-data
5963 - mountPath : /tmp
6064 name : tmp
61- - command :
62- - /usr/local/bin/init-entrypoint.sh
6365 - name : nss-wrapper-init
6466status :
6567 observedGeneration : 3
Original file line number Diff line number Diff 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
3030status :
3131 observedGeneration : 3
Original file line number Diff line number Diff 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 :
5248 - name : postgres-data
5349 - mountPath : /tmp
5450 name : tmp
55- - command :
56- - /usr/local/bin/init-entrypoint.sh
5751 - name : nss-wrapper-init
5852status :
5953 observedGeneration : 5
Original file line number Diff line number Diff 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 :
5248 - name : postgres-data
5349 - mountPath : /tmp
5450 name : tmp
55- - command :
56- - /usr/local/bin/init-entrypoint.sh
5751 - name : nss-wrapper-init
5852status :
5953 observedGeneration : 5
Original file line number Diff line number Diff 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 :
5248 - name : postgres-data
5349 - mountPath : /tmp
5450 name : tmp
55- - command :
56- - /usr/local/bin/init-entrypoint.sh
5751 - name : nss-wrapper-init
5852status :
5953 observedGeneration : 6
You can’t perform that action at this time.
0 commit comments