Skip to content

Commit

Permalink
Merge pull request #843 from TrekkieCoder/main
Browse files Browse the repository at this point in the history
chore:Updated k8s crd manipulation script
  • Loading branch information
UltraInstinct14 authored Oct 17, 2024
2 parents a1f2174 + 1967cb4 commit 367765e
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions tools/k8s/mkllb-url
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

usage() {
echo "Usage: $0 -a <ip-addr> -z <zone> -t <type>"
echo " $0 -a <ip-addr> -z <zone> -t <type> -d"
echo " $0 -a <ip-addr> -z <zone> -t <type> -x"
}

if [[ $# -gt 7 ]] || [[ $# -lt 6 ]]; then
Expand Down Expand Up @@ -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
Expand All @@ -48,7 +54,7 @@ kind: LoxiURL
metadata:
name: llb-${addr}
spec:
loxiURL: http://${addr}:11111
loxiURL: $url
zone: llb
type: ${utype}
EOF

0 comments on commit 367765e

Please sign in to comment.