diff --git a/apps/opencloud/opencloud-deployment.yaml b/apps/opencloud/opencloud-deployment.yaml index a1c29dc..dcaf2ca 100644 --- a/apps/opencloud/opencloud-deployment.yaml +++ b/apps/opencloud/opencloud-deployment.yaml @@ -70,22 +70,25 @@ spec: runAsGroup: 1000 runAsNonRoot: true - name: init-config - image: alpine:3.18 + image: busybox:1.36 command: - sh - -c - | - # Install envsubst - apk add --no-cache gettext - # Create output directory mkdir -p /etc/opencloud-processed - # Process the config template, expanding environment variables - envsubst < /etc/opencloud-template/opencloud.yaml > /etc/opencloud-processed/opencloud.yaml + # Simple variable expansion using shell + # Read template and expand ${VAR} patterns + while IFS= read -r line; do + # Expand ${OPENLDAP_ADMIN_PASSWORD} + line=$(echo "$line" | sed "s|\${OPENLDAP_ADMIN_PASSWORD}|$OPENLDAP_ADMIN_PASSWORD|g") + echo "$line" + done < /etc/opencloud-template/opencloud.yaml > /etc/opencloud-processed/opencloud.yaml echo "Config file processed successfully" - cat /etc/opencloud-processed/opencloud.yaml | head -20 + echo "First 20 lines:" + head -20 /etc/opencloud-processed/opencloud.yaml env: # Pass all environment variables needed for substitution - name: OC_GRAPH_LDAP_BIND_PASSWORD