Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tinkerbell LoadBalancerInterface doesn't set tink-stack srcInterface #9035

Open
MatiasLyyra opened this issue Nov 29, 2024 · 0 comments
Open

Comments

@MatiasLyyra
Copy link

In the release v0.21.0 it became possible to set Tinkerbell loadBalancerInterface. While it sets the vip_interface in kube-vip correctly to the specified interface, it doesn't change srcInterface variable from tink-stack deployment.

Snippet from the tink-stack deployment:

      - command:
        - /bin/sh
        - -c
        - |
          # This script allows us to listen and respond to DHCP requests on a host network interface and interact with Smee properly.
          # This is used instead of `hostNetwork: true` because the dhcp relay requires clear paths for listening for broadcast traffic
          # and sending/receiving unicast traffic to/from Smee.
          set -xe
          # if sourceInterface is not set use the interface from the default route
          srcInterface=""
          if [ -z "$srcInterface" ]; then
            srcInterface=$(nsenter -t1 -n ip route | awk '/default/ {print $5}' | head -n1)
          fi
          # Create the interface. TODO: If this fails, try again with a different name?
          nsenter -t1 -n ip link add macvlan0 link ${srcInterface} type macvlan mode bridge
          # Move the interface into the POD.
          pid=$(echo $$)
          nsenter -t1 -n ip link set macvlan0 netns ${pid} || nsenter -t1 -n ip link delete macvlan0
          # Set the interface up
          ip link set macvlan0 up
          # Set the IP address
          ip addr add 127.1.1.1/32 dev macvlan0 noprefixroute || true

If the srcInterface in that script is not set, it defaults to the interface with default route, which breaks DHCP relaying unless it is changed manually.

What happened:
Variable srcInterface is not set to the same interface as Tinkerbell loadBalancerInterface variable.

What you expected to happen:
Variable srcInterface in tink-stack deployment config is set to the same value as Tinkerbell loadBalancerInterface variable.

How to reproduce it (as minimally and precisely as possible):

  1. Create cluster with Tinkerbell loadBalancerInterface set.
  2. Observe the resulting tink-stack deployment config: kubectl get deployments.apps -n eksa-system tink-stack -o yaml.

Environment:

  • EKS Anywhere Release: v0.21.1
  • EKS Distro Release: 1.30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant