Skip to content

Document how to configure source-based routing for MetalLB #278

Closed as not planned

Description

@kvaps

While Talos Linux itself does not support setting source-based routing, we have to provide the information how to configure it using DaemonSet.

We have to add reference on article https://blog.aenix.io/configuring-routing-for-metallb-in-l2-mode-7ea26e19219e, and configuration like this:

---
apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: routes
  namespace: cozy-metallb
spec:
  selector:
    matchLabels:
      app: routes
  template:
    metadata:
      labels:
        app: routes
    spec:
      hostNetwork: true
      containers:
      - name: routes
        image: alpine
        command:
        - /bin/sh
        - -c
        args:
        - |
          set -xe
          ip_rule_replace() {
            ip rule del $@ || true
            ip rule add $@
          }

          # Setup custom routing table
          ip route replace 1.2.3.0/24 dev bond0.100 table 100
          ip route replace default via 1.2.3.4 table 100

          # Setup policy based routing
          ip_rule_replace from 1.2.3.0/24 lookup 100
          ip_rule_replace from 1.2.3.0/24 to 10.244.0.0/16 lookup main

          exec sleep infinity
        securityContext:
          privileged: true
      terminationGracePeriodSeconds: 0
      tolerations:
      - operator: Exists

upstream issues:

Activity

  1. dosubot commented on Oct 18, 2025

    @dosubot

    Hi, Andrei Kvapil (@kvaps). I'm Dosu, and I'm helping the cozystack team manage their backlog and am marking this issue as stale.

    Issue Summary:

    • You requested documentation for configuring source-based routing with MetalLB deployed as a DaemonSet.
    • This is particularly relevant for environments like Talos Linux that lack native support.
    • You suggested including an external article reference and a sample DaemonSet YAML for custom and policy-based routing.
    • The issue includes links to related upstream discussions for additional context.
    • There has been no further activity or comments since your initial request.

    Next Steps:

    • Please let me know if this issue is still relevant to the latest version of the cozystack repository by commenting here.
    • If I do not hear back within 7 days, this issue will be automatically closed.

    Thank you for your understanding and contribution!

  2. added
    lifecycle/staleDenotes an issue or PR has remained open with no activity and has become stale
    on Oct 18, 2025
  3. removed
    lifecycle/staleDenotes an issue or PR has remained open with no activity and has become stale
    on Oct 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/documentationCategorizes issue or PR as related to documentation

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions