Skip to content

Commit

Permalink
fix(ci): skip ipv6 subnets when detecting kind cidr for metallb
Browse files Browse the repository at this point in the history
Signed-off-by: Utku Ozdemir <[email protected]>
  • Loading branch information
utkuozdemir committed Jul 3, 2024
1 parent a56b2ea commit a76fe6b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@ jobs:
run: |
MANIFESTS_PATH=/tmp/metallb-manifests.yaml
ADDRESS_RANGE_PREFIX=$(docker network inspect -f '{{(index .IPAM.Config 0).Subnet}}' kind | cut -d. -f1-3)
# Find the first IPv4 subnet of kind, e.g., 172.18.0.0/16, then trim it to remove last octet, e.g., 172.18.0
ADDRESS_RANGE_PREFIX=$(docker network inspect -f json kind | jq -r '.[0].IPAM.Config | map(select(.Subnet | test("^[0-9]+\\."))) | .[0].Subnet | split("/")[0] | split(".")[:3] | join(".")')
export ADDRESS_RANGE=${ADDRESS_RANGE_PREFIX}.240-${ADDRESS_RANGE_PREFIX}.255
envsubst < test/metallb-manifests.yaml > $MANIFESTS_PATH
Expand Down

0 comments on commit a76fe6b

Please sign in to comment.