Available with limitations inSE, SE+, CSE Lite (1.67)

Available without limitations in:  EE

The module lifecycle stageGeneral Availability

The module has 7 alerts.

The module is not enabled by default in any bundles.

How to explicitly enable the module…

You may explicitly enable or disable the module in one of the following ways:

  • Via Deckhouse web UI. In the “System” → “System Management” → “Deckhouse” → “Modules” section, open the metallb module and enable (or disable) the “Module enabled” toggle. Save changes.

    Example:

    Module enable/disable interface

  • Via Deckhouse CLI (d8).

    Use the d8 system module enable command for enabling, or d8 system module disable command for disabling the module (you need Deckhouse CLI (d8), configured to work with the cluster).

    Example of enabling the module:

    d8 system module enable metallb
    
  • Using ModuleConfig metallb.

    Set spec.enabled to true or false in ModuleConfig metallb (create it if necessary);

    Example of a manifest to enable module metallb:

    apiVersion: deckhouse.io/v1alpha1
    kind: ModuleConfig
    metadata:
      name: metallb
    spec:
      enabled: true
    

How to configure the module…

You can configure the module in one of the following ways:

  • Via Deckhouse web UI.

    In the “System” → “System Management” → “Deckhouse” → “Modules” section, open the metallb module and enable the “Advanced Settings” switch. Fill in the required fields in the “Configuration” tab or specify the module settings in YAML format on the “YAML” tab, excluding the settings section. Save the changes.

    Example:

    Module Setup Interface

    You can also edit the ModuleConfig object metallb on the “YAML” tab in the module settings window (“System” → “System Management” → “Deckhouse” → “Modules”, open the module metallb) by specifying the schema version in the spec.version parameter and the necessary module parameters in the spec.settings section.

  • Via Deckhouse CLI (d8) (requires Deckhouse CLI (d8) configured to work with the cluster).

    Edit the existing ModuleConfig metallb (for more details on configuring Deckhouse, see the documentation) by executing the following command:

    d8 k edit mc metallb
    

    Make the necessary changes in the spec.settings section. If necessary, specify the schema version in the spec.version parameter. Save the changes.

    You can also create a file with manifest for ModuleConfig metallb using the example below. Fill in the spec.settings section with the required module parameters. If necessary, specify the schema version in the spec.version parameter.

    Apply the manifest using the following command (indicate the manifest file name):

    d8 k apply -f <FILENAME>
    

    Example of a manifest for ModuleConfig metallb:

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

Conversions

The module is configured using the ModuleConfig resource, the schema of which contains a version number. When you apply an old version of the ModuleConfig schema in a cluster, automatic transformations are performed. To manually update the ModuleConfig schema version, the following steps must be completed sequentially for each version :

  • Updates from version 1 to 2:

    Remove all addressPool elements with the layer2 protocol.

Parameters

Schema version: 2

Example:

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
  • settings
    object
    • settings.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: []

      • settings.addressPools.addresses
        array of strings

        Required value

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

      • settings.addressPools.auto-assign
        boolean

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

        Default: true

      • settings.addressPools.avoid-buggy-ips
        boolean

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

        Default: false

      • settings.addressPools.bgp-advertisements
        array of objects

        Defines BGP advertisements.

        • settings.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

        • settings.addressPools.bgp-advertisements.communities
          array of strings

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

          Example:

          communities:
          - no-advertise
          
        • settings.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.

      • settings.addressPools.name
        string

        Required value

        The name of the pool. 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])?)*$

      • settings.addressPools.protocol
        string

        Required value

        The protocol used by the speaker to announce services.

        Allowed values: bgp, layer2

    • settings.bgpCommunities
      object

      Available in editions: EE

      The BGP communities list.

      Example:

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

      Available in editions: EE

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

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

      Default: []

      • settings.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)?)$

      • settings.bgpPeers.my-asn
        integer

        Required value

        The AS number in the cluster.

        Allowed values: 0 <= X <= 4294967295

      • settings.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.

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

        Authentication password for BGP-routers enforcing TCP MD5 authenticated sessions.

      • settings.bgpPeers.peer-address
        string

        Required value

        The IP address of the external BGP router.

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

      • settings.bgpPeers.peer-asn
        integer

        Required value

        The AS number on the external BGP router.

        Allowed values: 0 <= X <= 4294967295

      • settings.bgpPeers.peer-port
        integer

        Port to dial when establishing the session.

        Default: 179

        Allowed values: 0 <= X <= 16384

      • settings.bgpPeers.router-id
        string

        BGP router ID to advertise to the peer.

      • settings.bgpPeers.source-address
        string

        The source IP address for outbound connections.

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

    • settings.loadBalancerClass
      string

      An optional field describing the LoadBalancer class. The LoadBalancerClass field should be used in L2 LoadBalancer mode to specify the MetalLoadBalancerClass that defines the balancer parameters for the Service.

    • settings.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.

    • settings.speaker
      object

      Settings for the speaker component that implements the LoadBalancer’s IPs publishing protocol for external infrastructure.

      • settings.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.

      • settings.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.

        • settings.speaker.tolerations.effect
          string
        • settings.speaker.tolerations.key
          string
        • settings.speaker.tolerations.operator
          string
        • settings.speaker.tolerations.tolerationSeconds
          integer
        • settings.speaker.tolerations.value
          string
    • settings.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.

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