Skip to content

Commit

Permalink
fix empty node selector issue
Browse files Browse the repository at this point in the history
the other way round


accept every selector
  • Loading branch information
tsebastiani authored and chaitanyaenr committed Aug 23, 2023
1 parent f37428c commit 461f952
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion common_run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,11 @@ setup_arcaflow_env(){
then
for selector in "${SELECTORS[@]}"
do
[[ ! $selector =~ ^.+\=.+ ]] && echo "$selector is not in the right format, node selectors must be in the format <selector>=<value>" && exit 1
# if the selector is in the format kubernetes.io/os= will become kubernetes.io/os=''
[[ $selector =~ ^.+\=$ ]] && selector="$selector''"
# if the selector is in the format kubernetes.io/os will become kubernetes.io/os=''
[[ ! $selector =~ ^.+\=.+ ]] && selector="$selector=''"

IFS='=' read -r -a SPLITTED_SELECTOR <<< $selector
export SELECTOR=${SPLITTED_SELECTOR[0]}
export SELECTOR_VALUE=${SPLITTED_SELECTOR[1]}
Expand Down

0 comments on commit 461f952

Please sign in to comment.