mirror of
https://github.com/rubenhensen/k8scd.git
synced 2026-09-18 18:42:56 +02:00
Sogo: change config 2
This commit is contained in:
@@ -19,13 +19,16 @@ spec:
|
|||||||
spec:
|
spec:
|
||||||
initContainers:
|
initContainers:
|
||||||
- name: config-init
|
- name: config-init
|
||||||
image: bhgedigital/envsubst:latest
|
image: alpine:latest
|
||||||
command:
|
command:
|
||||||
- sh
|
- sh
|
||||||
- -c
|
- -c
|
||||||
- |
|
- |
|
||||||
envsubst < /config-template/sogo.yaml > /config/sogo.yaml
|
apk add --no-cache python3
|
||||||
echo "Configuration file prepared"
|
ENCODED_PASSWORD=$(python3 -c "import urllib.parse; print(urllib.parse.quote('${POSTGRES_PASSWORD}', safe=''))")
|
||||||
|
export POSTGRES_PASSWORD="${ENCODED_PASSWORD}"
|
||||||
|
cat /config-template/sogo.yaml | sed "s|\${POSTGRES_PASSWORD}|${POSTGRES_PASSWORD}|g" > /config/sogo.yaml
|
||||||
|
echo "Configuration file prepared with URL-encoded password"
|
||||||
env:
|
env:
|
||||||
- name: POSTGRES_PASSWORD
|
- name: POSTGRES_PASSWORD
|
||||||
valueFrom:
|
valueFrom:
|
||||||
|
|||||||
Reference in New Issue
Block a user