We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f12b8d2 commit 846f4b4Copy full SHA for 846f4b4
kustomize/components/clairpgupgrade/base/clair-pg-old.deployment.yaml
@@ -57,3 +57,18 @@ spec:
57
requests:
58
cpu: 500m
59
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