Skip to content

Commit

Permalink
auto-match kind network in metallb
Browse files Browse the repository at this point in the history
  • Loading branch information
Xtigyro committed Nov 8, 2020
1 parent cb9d148 commit 63e3799
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion helmfiles/apps/default/metallb/metallb.yaml.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ configInline:
- name: default
protocol: layer2
addresses:
- 172.17.0.1-172.17.255.255
- {{ requiredEnv "KINDADM_KIND_NETW_SHORT" }}.0.1-{{ requiredEnv "KINDADM_KIND_NETW_SHORT" }}.255.255
3 changes: 3 additions & 0 deletions kindadm
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,9 @@ if [[ "$HELM_VER" == 2.*.* ]]; then
echo -e "\n${LIGHT_GREEN}\u2713${NC} Tiller Server - ${LIGHT_GREEN}deployed and ready${NC}."
fi

# Get KinD network
export KINDADM_KIND_NETW_SHORT=$(docker network inspect kind -f "{{(index .IPAM.Config 0).Subnet}}" | cut -d '.' -f1,2)

# Deploy default apps
echo -e "\n${LIGHT_GREEN}Deploying default apps...${NC}"
create_k8s_ns "default"
Expand Down

0 comments on commit 63e3799

Please sign in to comment.