This commit is contained in:
alessandro
2026-09-21 10:00:05 +02:00
parent 48f3f1ff22
commit d190719c5e
3 changed files with 541 additions and 38 deletions
+5 -1
View File
@@ -50,11 +50,15 @@ printf '\nenv=%s\n' "$ENV" >> "$TMP_VALUES_FILE"
printf 'namespace=%s\n' "$NAMESPACE" >> "$TMP_VALUES_FILE"
printf 'project=%s\n' "$PROJECT_NAME" >> "$TMP_VALUES_FILE"
# Ricava endpoint se presente e genera endpoint-nodot sostituendo '.' con '-'
# Ricava endpoint se presente e genera le variabili derivate per le sostituzioni YAML.
ENDPOINT_VAL=$(grep -E '^[[:space:]]*endpoint[[:space:]]*=' "$TMP_VALUES_FILE" "$PROPERTIES_FILE" 2>/dev/null | tail -n 1 | sed -E 's/.*endpoint[[:space:]]*=[[:space:]]*//' | tr -d '\r\n[:space:]"' || true)
if [ -n "$ENDPOINT_VAL" ]; then
ENDPOINT_NODOT=$(echo "$ENDPOINT_VAL" | tr '.' '-')
ENDPOINT_NOSPACE=$(echo "$ENDPOINT_VAL" | tr -d '.')
printf 'endpoint-nodot=%s\n' "$ENDPOINT_NODOT" >> "$TMP_VALUES_FILE"
printf 'endpoint-nospace=%s\n' "$ENDPOINT_NOSPACE" >> "$TMP_VALUES_FILE"
fi
# Trova tutti i file .yaml nella directory kubernetes e sottodirectory