diff --git a/tools/k8s/mkllb-url b/tools/k8s/mkllb-url index 6e0c0a279..f76900128 100755 --- a/tools/k8s/mkllb-url +++ b/tools/k8s/mkllb-url @@ -2,7 +2,7 @@ usage() { echo "Usage: $0 -a -z -t " - echo " $0 -a -z -t -d" + echo " $0 -a -z -t -x" } if [[ $# -gt 7 ]] || [[ $# -lt 6 ]]; then @@ -33,10 +33,16 @@ do esac done +url="http://${addr}:11111" + +if [[ ${utype} == "hostcidr" ]]; then + url=${addr} +fi + echo "============" echo "Applying CRD" echo "============" -echo addr $addr +echo url $url echo zone $zone echo utype $utype echo cmd $cmd @@ -48,7 +54,7 @@ kind: LoxiURL metadata: name: llb-${addr} spec: - loxiURL: http://${addr}:11111 + loxiURL: $url zone: llb type: ${utype} EOF