Skip to content

Commit

Permalink
fix: ignore full tunnel routes from a remote cluster
Browse files Browse the repository at this point in the history
  • Loading branch information
tinyzimmer committed Oct 16, 2023
1 parent 6958ec6 commit 8d4ede9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 3 additions & 2 deletions examples/multi-cluster/scripts/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,12 @@ DOCKER_IP=$(docker inspect \
${CLUSTER_NAME_PREFIX}-two-control-plane)
sed -i "s/127\.0\.0\.1:.*$/${DOCKER_IP}:6443/g" ${KUBECONFIG_TWO}

# Install each kubernetes configuration to the opposite cluster
# Install each kubernetes configuration to the opposite cluster.
# In a real world situation this should be a kubeconfig with
# credentials restricted to webmesh objects only. For an example
# see the RBAC manifests in the bundle. These are the the objects
# provided by the bundle in the storage-provider and the CNI APIs.
# provided by the bundles for the storage-provider and CNI APIs.
# RBAC-only manifests can be found in each repository.

kubectl --kubeconfig ${KUBECONFIG_ONE} --namespace kube-system \
create secret generic cluster-two-credentials --from-file=kubeconfig=${KUBECONFIG_TWO}
Expand Down
6 changes: 5 additions & 1 deletion internal/controllers/remotenetwork_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,11 @@ func (r *RemoteNetworkReconciler) connectWithKubeconfig(ctx context.Context, nw
ZoneAwarenessID: r.Host.NodeID,
DisableIPv4: nw.Spec.Network.DisableIPv4,
DisableIPv6: nw.Spec.Network.DisableIPv6,
ListenPort: nw.Spec.Network.WireGuardPort,
// We don't want to use the full gateway routes broadcasted by
// the remote cluster because they will likely collide with our
// own.
DisableFullTunnel: true,
ListenPort: nw.Spec.Network.WireGuardPort,
MTU: func() int {
if nw.Spec.Network.MTU > 0 {
return nw.Spec.Network.MTU
Expand Down

0 comments on commit 8d4ede9

Please sign in to comment.