Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore:Updated k8s crd manipulation script #843

Merged
merged 1 commit into from
Oct 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading