values-override debug
This commit is contained in:
parent
6b1ad34a73
commit
6366d7c814
@ -438,25 +438,47 @@ spec:
|
|||||||
# Insert inline values block after valueFiles if user provided edited content
|
# Insert inline values block after valueFiles if user provided edited content
|
||||||
if [ "$INCLUDE_INLINE_VALUES" = "yes" ]; then
|
if [ "$INCLUDE_INLINE_VALUES" = "yes" ]; then
|
||||||
echo " Inserting edited values into Application manifest..."
|
echo " Inserting edited values into Application manifest..."
|
||||||
# Write the values block to a temp file (preserves newlines properly)
|
|
||||||
VALUES_TMP="/tmp/values_block_$$.txt"
|
# Debug: show what we're inserting
|
||||||
{
|
echo " DEBUG: EDITED_CONTENT length: ${#EDITED_CONTENT}"
|
||||||
echo " values: |"
|
echo " DEBUG: EDITED_CONTENT first 200 chars:"
|
||||||
echo "$EDITED_CONTENT" | sed 's/^/ /'
|
echo "$EDITED_CONTENT" | head -c 200
|
||||||
} > "$VALUES_TMP"
|
echo ""
|
||||||
# Use awk with getline to read from temp file (preserves multi-line content)
|
|
||||||
awk '
|
# Only insert if we have actual content
|
||||||
/valueFiles:/ {
|
if [ -n "$EDITED_CONTENT" ]; then
|
||||||
print
|
# Write the values block to a temp file (preserves newlines properly)
|
||||||
getline
|
VALUES_TMP="/tmp/values_block_$$.txt"
|
||||||
print
|
{
|
||||||
while ((getline line < "'"$VALUES_TMP"'") > 0) print line
|
echo " values: |"
|
||||||
next
|
echo "$EDITED_CONTENT" | sed 's/^/ /'
|
||||||
}
|
} > "$VALUES_TMP"
|
||||||
{ print }
|
|
||||||
' "manifests/$APP_NAME-application.yaml" > "manifests/$APP_NAME-application.yaml.tmp"
|
# Debug: show temp file content
|
||||||
mv "manifests/$APP_NAME-application.yaml.tmp" "manifests/$APP_NAME-application.yaml"
|
echo " DEBUG: Temp file content:"
|
||||||
rm -f "$VALUES_TMP"
|
cat "$VALUES_TMP"
|
||||||
|
echo " DEBUG: End of temp file"
|
||||||
|
|
||||||
|
# Use awk with getline to read from temp file (preserves multi-line content)
|
||||||
|
awk '
|
||||||
|
/valueFiles:/ {
|
||||||
|
print
|
||||||
|
getline
|
||||||
|
print
|
||||||
|
while ((getline line < "'"$VALUES_TMP"'") > 0) print line
|
||||||
|
next
|
||||||
|
}
|
||||||
|
{ print }
|
||||||
|
' "manifests/$APP_NAME-application.yaml" > "manifests/$APP_NAME-application.yaml.tmp"
|
||||||
|
mv "manifests/$APP_NAME-application.yaml.tmp" "manifests/$APP_NAME-application.yaml"
|
||||||
|
rm -f "$VALUES_TMP"
|
||||||
|
|
||||||
|
# Debug: show generated manifest
|
||||||
|
echo " DEBUG: Generated manifest helm section:"
|
||||||
|
grep -A 30 "helm:" "manifests/$APP_NAME-application.yaml" || true
|
||||||
|
else
|
||||||
|
echo " WARNING: EDITED_CONTENT is empty, skipping inline values insertion"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo " HTTPRoute URL: https://$HTTPROUTE_HOST"
|
echo " HTTPRoute URL: https://$HTTPROUTE_HOST"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user