From 1967cb4e9e1d02d1fff864eaf297cb659d0523c0 Mon Sep 17 00:00:00 2001 From: Trekkie Coder Date: Thu, 17 Oct 2024 20:59:47 +0900 Subject: [PATCH] chore:Updated k8s crd manipulation script --- tools/k8s/mkllb-url | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) 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