Skip to content

Commit

Permalink
docker-network-ipaddresspool.sh: IP address range that lives in the k…
Browse files Browse the repository at this point in the history
…ind network
  • Loading branch information
eguzki committed Feb 15, 2024
1 parent 8bf2d55 commit c831a70
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion utils/docker-network-ipaddresspool.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ if [[ -z "$SUBNET" ]]; then
exit 1
fi

cat <<EOF | ADDRESS=$SUBNET ${YQ} '(select(.kind == "IPAddressPool") | .spec.addresses[0]) = env(ADDRESS)'
# shellcheck disable=SC2206
subnetParts=(${SUBNET//./ })
cidr="${subnetParts[0]}.${subnetParts[1]}.200.0/24"

cat <<EOF | ADDRESS=$cidr ${YQ} '(select(.kind == "IPAddressPool") | .spec.addresses[0]) = env(ADDRESS)'
---
apiVersion: metallb.io/v1beta1
kind: IPAddressPool
Expand Down

0 comments on commit c831a70

Please sign in to comment.