Skip to content

Commit 846f4b4

Browse files
shudeshpopenshift-merge-bot[bot]
authored andcommitted
fips: Modified the postStart lifecycle hook to reference to sha256
1 parent f12b8d2 commit 846f4b4

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

kustomize/components/clairpgupgrade/base/clair-pg-old.deployment.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,18 @@ spec:
5757
requests:
5858
cpu: 500m
5959
memory: 2Gi
60+
lifecycle:
61+
postStart:
62+
exec:
63+
command: ["/bin/sh", "-c", "
64+
until pg_isready; do
65+
echo 'Waiting for PostgreSQL to start...';
66+
sleep 2;
67+
done;
68+
echo 'password_encryption = scram-sha-256' >> $PGDATA/postgresql.conf;
69+
echo 'host all all 0.0.0.0/0 scram-sha-256' >> $PGDATA/pg_hba.conf;
70+
pg_ctl reload;
71+
psql -c \"ALTER SYSTEM SET password_encryption TO 'scram-sha-256';\";
72+
psql -c \"SELECT pg_reload_conf();\";
73+
psql -c \"ALTER USER postgres WITH PASSWORD 'postgres';\"
74+
"]

0 commit comments

Comments
 (0)