Skip to content

Commit

Permalink
Squash with "KIND improvements"
Browse files Browse the repository at this point in the history
Use original method of detecting API Address, but use Antonio's API_URL to pass
to daemonset.sh.

Signed-off-by: Billy McFall <22157057+Billy99@users.noreply.github.com>
  • Loading branch information
Billy99 committed Jul 25, 2020
1 parent 5ac5267 commit 6c8dc84
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
15 changes: 12 additions & 3 deletions contrib/kind.sh
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,13 @@ if [ "$KIND_IPV6_SUPPORT" == true ]; then
API_IPV6=$(ip -6 addr | grep "inet6" | awk -F' ' '{print $2}' | \
sed 's@/.*@@g' | grep -v "^::1$" | sed '/^fe80:/ d' | head -n 1)
if [ -z "$API_IPV6" ]; then
echo "Error detecting machine IPv6 to use as API server"
exit 1
# No IPv6 global addresses, Repeat but allow local address
API_IPV6=$(ip -6 addr | grep "inet6" | awk -F' ' '{print $2}' | \
sed 's@/.*@@g' | grep -v "^::1$" | head -n 1)
if [ -z "$API_IPV6" ]; then
echo "Error detecting machine IPv6 to use as API server"
exit 1
fi
fi
fi

Expand Down Expand Up @@ -313,6 +318,10 @@ docker build -t ovn-daemonset-f:dev -f Dockerfile.fedora .
# and since OVN has to provide the connectivity to service
# it can not be bootstrapped

# This is the address of the node with the control-plane
# If HA, multiple control-plane nodes, KIND deploys
API_URL=$(kind get kubeconfig --internal --name ${KIND_CLUSTER_NAME} | grep server | awk '{ print $2 }')

# Create ovn-kube manifests
./daemonset.sh \
--image=docker.io/library/ovn-daemonset-f:dev \
Expand All @@ -321,7 +330,7 @@ docker build -t ovn-daemonset-f:dev -f Dockerfile.fedora .
--gateway-mode=${OVN_GATEWAY_MODE} \
--hybrid-enabled=${OVN_HYBRID_OVERLAY_ENABLE} \
--multicast-enabled=${OVN_MULTICAST_ENABLE} \
--k8s-apiserver=https://[${API_IP}]:11337 \
--k8s-apiserver=${API_URL} \
--ovn-master-count=${KIND_NUM_MASTER} \
--kind \
--master-loglevel=5
Expand Down
2 changes: 1 addition & 1 deletion contrib/kind.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: kind.x-k8s.io/v1alpha4
networking:
# the default CNI will not be installed
disableDefaultCNI: true
apiServerAddress: {{ ovn_apiServerAddress | default('11.12.13.1') }}
apiServerAddress: {{ ovn_apiServerAddress | default('0.0.0.0') }}
apiServerPort: 11337
{%- if ovn_ip_family %}
ipFamily: {{ ovn_ip_family }}
Expand Down

0 comments on commit 6c8dc84

Please sign in to comment.