This feature is available in Enterprise Edition only.

The module has 3 alerts.

The module is not enabled by default in any bundles.

How to explicitly enable the module…

Set the spec.enabled module parameter to true or false in the ModuleConfig/metallb resource (create it, if necessary) to explicitly enable or disable the module, or use the deckhouse-controller module command in the d8-system/deckhouse pod.

Example of enabling the module:

  • by using the ModuleConfig resource:

    apiVersion: deckhouse.io/v1alpha1
    kind: ModuleConfig
    metadata:
      name: metallb
    spec:
      enabled: true
    
  • by using the deckhouse-controller command (you need a kubectl, configured to work with the cluster):

    kubectl -ti -n d8-system exec svc/deckhouse-leader -c deckhouse -- deckhouse-controller module enable metallb
    

Example of disabling the module:

  • by using the ModuleConfig resource:

    apiVersion: deckhouse.io/v1alpha1
    kind: ModuleConfig
    metadata:
      name: metallb
    spec:
      enabled: false
    
  • by using the deckhouse-controller command (you need a kubectl, configured to work with the cluster):

    kubectl -ti -n d8-system exec svc/deckhouse-leader -c deckhouse -- deckhouse-controller module disable metallb
    

The module is configured using the ModuleConfig custom resource named metallb (learn more about setting up Deckhouse…).

Example of the ModuleConfig/metallb resource for configuring the module:

apiVersion: deckhouse.io/v1alpha1
kind: ModuleConfig
metadata:
  name: metallb
spec:
  version: 1
  enabled: true
  settings: # <-- Module parameters from the "Parameters" section below.

Parameters

Schema version: 1

Examples:

bgpPeers:
- peer-address: 192.168.1.1
  peer-asn: 1111
  my-asn: 2222
  source-address: 192.168.1.2
  hold-time: 10s
  node-selector:
    matchLabels:
      node: test
addressPools:
- name: my-pool-bgp
  protocol: bgp
  addresses:
  - 192.168.100.1-192.168.100.10
  - 192.168.101.0/24
  bgp-advertisements:
  - aggregation-length: 32
    localpref: 100
    communities:
    - no-advertise
bgpCommunities:
  no-advertise: 65535:65282
speaker:
  nodeSelector:
    mylabel: speaker
addressPools:
- name: my-pool-l2
  protocol: layer2
  addresses:
  - 192.168.100.1-192.168.100.10
  - 192.168.101.0/24
speaker:
  nodeSelector:
    mylabel: speaker
  tolerations:
  - key: dedicated
    operator: Equal
    value: speaker
  • addressPools
    array of objects

    Required value

    A list of IP ranges to assign to services.

    Format — a data array similar to that of MetalLB’s.

    Default: []

    • addressPools.addresses
      array of strings

      A list of ranges, where each range can look like a subnet/mask or a numeric address range (with “-“ as a delimiter).

    • addressPools.auto-assign
      boolean

      Auto-assign flag used to prevent MetalLB from automatic allocation for a pool.

      Default: true

    • addressPools.avoid-buggy-ips
      boolean

      Prevents addresses ending with .0 and .255 to be used by a pool.

      Default: false

    • addressPools.bgp-advertisements
      array of objects

      Defines BGP advertisements.

      • addressPools.bgp-advertisements.aggregation-length
        integer

        The aggregation-length advertisement option lets you “roll up” prefix into a larger one.

        Works for IPv4 addresses.

        Default: 32

        Allowed values: 1 <= X

      • addressPools.bgp-advertisements.communities
        array of strings

        Keys from the bgpCommunities parameter to be associated with the announcement.

        Example:

        communities:
        - no-advertise
        
      • addressPools.bgp-advertisements.localpref
        integer

        The BGP LOCAL_PREF attribute which is used by BGP best path algorithm.

        Path with higher localpref is preferred over one with lower localpref.

    • addressPools.name
      string

      The name of the pool (you can specify it using the service annotation as follows: metallb.universe.tf/address-pool: <name>). It should conform to RFC 1123: dot-separated parts in lowercase, consists of alphanumeric characters, ‘-‘. Each part must start and end with an alphanumeric character.

      Pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$

    • addressPools.protocol
      string

      The protocol used by the speaker to announce services.

      Allowed values: bgp, layer2

  • bgpCommunities
    object

    The BGP communities list.

    Example:

    bgpCommunities:
      no-advertise: 65535:65282
    
  • bgpPeers
    array of objects

    A list of external BGP routers to use with the module.

    Format — a data array similar to that of MetalLB’s.

    The parameter is optional if only the layer2 mode is used to announce services.

    Default: []

    • bgpPeers.hold-time
      integer or string

      The timeout after which the neighboring BGP peer is considered dead. This value is divided by three to get the keep-alive interval.

      The recommended value is 3s (i.e., keep-alive packets are sent once per second). Note that the BGP protocol does not support values lower than this. By default, the parameter is set to 90s (i.e., keep-alive packets are sent every 30 seconds).

      Pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$

    • bgpPeers.my-asn
      integer

      Required value

      The AS number in the cluster.

      Allowed values: 0 <= X <= 4294967295

    • bgpPeers.node-selector
      object

      The additional pseudo-selector implemented by the speaker application. It selects nodes that are allowed to connect to external BGP routers. Do not confuse it with speaker.nodeSelector and nodeSelector.

      An optional parameter.

      The format is matchLabels or matchExpressions.

      • bgpPeers.node-selector.matchExpressions
        array of objects
        • bgpPeers.node-selector.matchExpressions.key
          string
        • bgpPeers.node-selector.matchExpressions.operator
          string
        • bgpPeers.node-selector.matchExpressions.values
          array of strings
      • bgpPeers.node-selector.matchLabels
        object
    • bgpPeers.password
      string

      Authentication password for routers enforcing TCP MD5 authenticated sessions.

    • bgpPeers.peer-address
      string

      Required value

      The IP address of the external BGP router.

      Pattern: ^([0-9]{1,3}\.){3}[0-9]{1,3}$

    • bgpPeers.peer-asn
      integer

      Required value

      The AS number on the external BGP router.

      Allowed values: 0 <= X <= 4294967295

    • bgpPeers.peer-port
      integer

      Port to dial when establishing the session.

      Default: 179

      Allowed values: 0 <= X <= 16384

    • bgpPeers.router-id
      string

      BGP router ID to advertise to the peer.

    • bgpPeers.source-address
      string

      The source IP address for outbound connections.

      Pattern: ^(?:[0-9]{1,3}\.){3}[0-9]{1,3}$

  • loadBalancerClass
    string

    Optional field specifying the class of the LoadBalancer. The LoadBalancerClass field is mandatory when using both the metallb and l2-load-balancer modules simultaneously. It is also recommended to fill it in if there are third-party controllers in the cluster that manage Service resources with the LoadBalancer type.

  • nodeSelector
    object

    A selector for the main controller. It is the same as the Pod’s spec.nodeSelector parameter in Kubernetes.

    If the parameter is omitted or false, it will be determined automatically.

  • speaker
    object

    Parameters of the speaker component, which announces services (using bgp or layer2 (LVS) routing protocol) and routes application traffic to its node.

    • speaker.nodeSelector
      object

      Required value

      A selector for the speaker DaemonSet. It is the same as the Pod’s spec.nodeSelector parameter in Kubernetes.

      If the parameter is omitted or false, it will be determined automatically.

    • speaker.tolerations
      array of objects

      Tolerations for the speaker DaemonSet. They are the same as the Pod’s spec.tolerations parameter in Kubernetes.

      If the parameter is omitted or false, it will be determined automatically.

      • speaker.tolerations.effect
        string
      • speaker.tolerations.key
        string
      • speaker.tolerations.operator
        string
      • speaker.tolerations.tolerationSeconds
        integer
      • speaker.tolerations.value
        string
  • tolerations
    array of objects

    Tolerations for the main controller. They are the same as the Pod’s spec.tolerations parameter in Kubernetes.

    If the parameter is omitted or false, it will be determined automatically.

    • tolerations.effect
      string
    • tolerations.key
      string
    • tolerations.operator
      string
    • tolerations.tolerationSeconds
      integer
    • tolerations.value
      string