Skip to content

Commit

Permalink
Add support for Kind OVNK IPV6 deployment
Browse files Browse the repository at this point in the history
This PR depends on ovn-kubernetes PR [1]

[1]
ovn-kubernetes/ovn-kubernetes#4955

Signed-off-by: Yossi Boaron <yboaron@redhat.com>
  • Loading branch information
yboaron committed Jan 12, 2025
1 parent f97ed8c commit 8702d60
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package/Dockerfile.shipyard-dapper-base
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ FROM fedora:41
# good balance between compression time and resulting image size.
ARG UPX_LEVEL=-5
ENV DAPPER_HOST_ARCH=amd64 SHIPYARD_DIR=/opt/shipyard SHELL=/bin/bash \
DAPPER_RUN_ARGS="--net=kind"
DAPPER_RUN_ARGS="--net=kind --cap-add=NET_ADMIN --privileged=true"
ENV HOST_ARCH=${DAPPER_HOST_ARCH} ARCH=${DAPPER_HOST_ARCH} PATH=/go/bin:/root/.local/bin:/usr/local/go/bin:$PATH \
GOLANG_ARCH_amd64=amd64 GOLANG_ARCH_arm=armv6l GOLANG_ARCH=GOLANG_ARCH_${DAPPER_HOST_ARCH} \
GOPATH=/go GO111MODULE=on GOPROXY=https://proxy.golang.org \
Expand Down
16 changes: 14 additions & 2 deletions scripts/shared/lib/clusters_kind
Original file line number Diff line number Diff line change
Expand Up @@ -196,12 +196,24 @@ EOF

function deploy_kind_ovn(){
export K8S_VERSION
export NET_CIDR_IPV4="${cluster_CIDRs[${cluster}]}"
export SVC_CIDR_IPV4="${service_CIDRs[${cluster}]}"
export SVC_CIDR_IPV4
export NET_CIDR_IPV4
export SVC_CIDR_IPV6
export NET_CIDR_IPV6
export KIND_CLUSTER_NAME="${cluster}"

local ovn_flags=()
[[ "$OVN_IC" != true ]] || ovn_flags=( -ic -npz 1 -wk 3 )

if [[ "$IPV6_STACK" ]]; then
ovn_flags+=( -n4 -i6 -sw)
SVC_CIDR_IPV6="${service_IPv6_CIDRs[${cluster}]}"
NET_CIDR_IPV6="${cluster_IPv6_CIDRs[${cluster}]}"
else
NET_CIDR_IPV4="${cluster_CIDRs[${cluster}]}"
SVC_CIDR_IPV4="${service_CIDRs[${cluster}]}"
fi

delete_cluster_on_fail ./ovn-kubernetes/contrib/kind.sh -ov "$OVN_IMAGE" -cn "${KIND_CLUSTER_NAME}" -ric "${ovn_flags[@]}" -lr -dd "${KIND_CLUSTER_NAME}.local" --disable-ovnkube-identity

[[ "$AIR_GAPPED" = true ]] && air_gap_iptables
Expand Down

0 comments on commit 8702d60

Please sign in to comment.