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

Allow setting metallb CIDR value for local env #1110

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
6 changes: 4 additions & 2 deletions make/development-environments.mk
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@ uninstall: manifests kustomize ## Uninstall CRDs from the K8s cluster specified
$(KUSTOMIZE) build config/crd | kubectl delete -f -

.PHONY: install-metallb
install-metallb: SUBNET_OFFSET=1
install-metallb: SUBNET_OFFSET=0
install-metallb: CIDR=28
install-metallb: NUM_IPS=16
install-metallb: kustomize yq ## Installs the metallb load balancer allowing use of an LoadBalancer type with a gateway
$(KUSTOMIZE) build config/metallb | kubectl apply -f -
kubectl -n metallb-system wait --for=condition=Available deployments controller --timeout=300s
kubectl -n metallb-system wait --for=condition=ready pod --selector=app=metallb --timeout=60s
./utils/docker-network-ipaddresspool.sh kind $(YQ) ${SUBNET_OFFSET} | kubectl apply -n metallb-system -f -
./utils/docker-network-ipaddresspool.sh kind $(YQ) ${SUBNET_OFFSET} ${CIDR} ${NUM_IPS} | kubectl apply -n metallb-system -f -

.PHONY: uninstall-metallb
uninstall-metallb: $(KUSTOMIZE)
Expand Down
4 changes: 2 additions & 2 deletions utils/docker-network-ipaddresspool.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ set -euo pipefail
networkName=$1
YQ="${2:-yq}"
offset=${3:-0}
cidr=28
numIPs=16
cidr=${4:-28}
numIPs=${5:-16}

## Parse kind network subnet
## Take only IPv4 subnets, exclude IPv6
Expand Down
Loading