Files
homelab/tmp/acm-hub-bootstrap/common/scripts/determine-main-clustergroup.sh
2025-05-19 11:18:25 -05:00

17 lines
294 B
Bash
Executable File

#!/bin/bash
PATTERN_DIR="$1"
if [ -z "$PATTERN_DIR" ]; then
PATTERN_DIR="."
fi
CGNAME=$(yq '.main.clusterGroupName' "$PATTERN_DIR/values-global.yaml")
if [ -z "$CGNAME" ] || [ "$CGNAME" == "null" ]; then
echo "Error - cannot detrmine clusterGroupName"
exit 1
fi
echo "$CGNAME"