4242
4343echo " Found version for $SERVICE_NAME_DEFAULT : $SERVICE_VERSION "
4444
45- # --- Kube-OVN specific logic to determine masters and replica count ---
46- MASTER_NODES=$( kubectl get nodes -l kube-ovn/role=master -o json | jq -r ' [.items[].status.addresses[] | select(.type == "InternalIP") | .address] | join(",")' | sed ' s/,/\\,/g' )
47- MASTER_NODE_COUNT=$( kubectl get nodes -l kube-ovn/role=master -o json | jq -r ' .items[].status.addresses[] | select(.type=="InternalIP") | .address' | wc -l)
48-
49- if [ " ${MASTER_NODE_COUNT} " -eq 0 ]; then
50- echo " Error: No master nodes found labeled with 'kube-ovn/role=master'" >&2
51- echo " Be sure to label your master nodes with 'kube-ovn/role=master' before running this script." >&2
52- exit 1
53- fi
54- echo " Found $MASTER_NODE_COUNT master node(s) with IPs: ${MASTER_NODES// \\ ,/ } ."
55- # --------------------------------------------------------------------
56-
5745# Load chart metadata from custom override YAML if defined
5846for yaml_file in " ${SERVICE_CUSTOM_OVERRIDES} " /* .yaml; do
5947 if [ -f " $yaml_file " ]; then
@@ -94,7 +82,6 @@ overrides_args=()
9482# NOTE: Files in this directory are included first.
9583if [[ -d " $SERVICE_BASE_OVERRIDES " ]]; then
9684 echo " Including base overrides from directory: $SERVICE_BASE_OVERRIDES "
97- # Include YAML files directly in the base directory (e.g., specific overrides)
9885 for file in " $SERVICE_BASE_OVERRIDES " /* .yaml; do
9986 # Check that there is at least one match
10087 if [[ -e " $file " ]]; then
135122
136123echo
137124
138- # Collect all --set arguments (none in the original script)
125+ # Collect all --set arguments, executing commands and quoting safely
139126set_args=()
140127
141128
@@ -161,4 +148,4 @@ printf '%q ' "${helm_command[@]}"
161148echo
162149
163150# Execute the command directly from the array
164- " ${helm_command[@]} "
151+ " ${helm_command[@]} "
0 commit comments