From 3faa8d1c9405a99bf32d8d472bc23d79ef1331a7 Mon Sep 17 00:00:00 2001 From: Ruben Hensen Date: Mon, 26 Jan 2026 17:50:17 +0100 Subject: [PATCH] Add init container sogo 2 --- sogo/templates/deployment.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sogo/templates/deployment.yaml b/sogo/templates/deployment.yaml index ec55e68..1e5b382 100644 --- a/sogo/templates/deployment.yaml +++ b/sogo/templates/deployment.yaml @@ -32,10 +32,10 @@ spec: - -c - | # Copy config files from ConfigMap and substitute environment variables + # Use awk to avoid sed regex issues with special characters for file in /config-template/*; do filename=$(basename "$file") - # Use sed to replace ${POSTGRES_PASSWORD} with actual value - sed "s|\${POSTGRES_PASSWORD}|${POSTGRES_PASSWORD}|g" "$file" > "/config/$filename" + awk -v pwd="$POSTGRES_PASSWORD" '{gsub(/\$\{POSTGRES_PASSWORD\}/, pwd); print}' "$file" > "/config/$filename" done echo "Configuration files generated successfully" volumeMounts: