mirror of
https://github.com/techno-tim/k3s-ansible.git
synced 2026-08-09 07:23:19 +02:00
52c086d638
- roles/k3s_server_post/templates/metallb.crs.j2: render spec.interfaces in the L2Advertisement when metal_lb_interfaces is a non-empty list, so MetalLB only announces on the configured interfaces. Empty list (default) keeps announcing on all interfaces, preserving existing behavior. - roles/k3s_server_post/defaults/main.yml: add metal_lb_interfaces: [] default - roles/k3s_server_post/meta/main.yml: add metal_lb_interfaces argument_spec - inventory/sample/group_vars/all.yml: document the new sample variable - .github/scripts/test-metallb-interfaces.py: regression test rendering the template for empty/single/multiple interfaces and confirming the BGP path is unaffected - .pre-commit-config.yaml: wire the new test into pre-commit Co-authored-by: Leo <leo@kuboschek.me>
174 lines
4.3 KiB
YAML
174 lines
4.3 KiB
YAML
---
|
|
argument_specs:
|
|
main:
|
|
short_description: Configure k3s cluster
|
|
options:
|
|
apiserver_endpoint:
|
|
description: Virtual ip-address configured on each master
|
|
required: true
|
|
|
|
bpf_lb_algorithm:
|
|
description: BPF lb algorithm
|
|
default: maglev
|
|
|
|
bpf_lb_mode:
|
|
description: BPF lb mode
|
|
default: hybrid
|
|
|
|
calico_blockSize:
|
|
description: IP pool block size
|
|
type: int
|
|
default: 26
|
|
|
|
calico_ebpf:
|
|
description: Use eBPF dataplane instead of iptables
|
|
type: bool
|
|
default: false
|
|
|
|
calico_encapsulation:
|
|
description: IP pool encapsulation
|
|
default: VXLANCrossSubnet
|
|
|
|
calico_natOutgoing:
|
|
description: IP pool NAT outgoing
|
|
default: Enabled
|
|
|
|
calico_nodeSelector:
|
|
description: IP pool node selector
|
|
default: all()
|
|
|
|
calico_iface:
|
|
description: The network interface used for when Calico is enabled
|
|
default: ~
|
|
|
|
calico_tag:
|
|
description: Calico version tag
|
|
default: v3.32.1
|
|
|
|
cilium_bgp:
|
|
description:
|
|
- Enable cilium BGP control plane for LB services and pod cidrs.
|
|
- Disables the use of MetalLB.
|
|
type: bool
|
|
default: false
|
|
|
|
cilium_bgp_my_asn:
|
|
description: Local ASN for BGP peer
|
|
type: int
|
|
default: 64513
|
|
|
|
cilium_bgp_peer_asn:
|
|
description: BGP peer ASN
|
|
type: int
|
|
default: 64512
|
|
|
|
cilium_bgp_peer_address:
|
|
description: BGP peer address
|
|
default: ~
|
|
|
|
cilium_bgp_neighbors:
|
|
description: List of BGP peer ASN & address pairs
|
|
default: []
|
|
|
|
cilium_bgp_neighbors_groups:
|
|
description: Inventory group in which to search for additional cilium_bgp_neighbors parameters to merge.
|
|
default: ['k3s_all']
|
|
|
|
cilium_bgp_lb_cidr:
|
|
description: BGP load balancer IP range
|
|
default: 192.168.31.0/24
|
|
|
|
cilium_exportPodCIDR:
|
|
description: Export pod CIDR
|
|
type: bool
|
|
default: true
|
|
|
|
cilium_hubble:
|
|
description: Enable Cilium Hubble
|
|
type: bool
|
|
default: true
|
|
|
|
cilium_iface:
|
|
description: The network interface used for when Cilium is enabled
|
|
default: ~
|
|
|
|
cilium_mode:
|
|
description:
|
|
- Inner-node communication mode.
|
|
- Cilium accepts `native` or `tunnel`. `routed` is accepted as a
|
|
legacy alias and is mapped to `tunnel` at install time.
|
|
default: native
|
|
choices:
|
|
- native
|
|
- tunnel
|
|
- routed
|
|
|
|
cilium_tag:
|
|
description: Cilium version tag
|
|
default: v1.20.0
|
|
|
|
cilium_cli_tag:
|
|
description: Cilium CLI version tag
|
|
default: v0.19.7
|
|
|
|
cluster_cidr:
|
|
description: Inner-cluster IP range
|
|
default: 10.52.0.0/16
|
|
|
|
enable_bpf_masquerade:
|
|
description: Use IP masquerading
|
|
type: bool
|
|
default: true
|
|
|
|
group_name_master:
|
|
description: Name of the master group
|
|
default: master
|
|
|
|
kube_proxy_replacement:
|
|
description: Replace the native kube-proxy with Cilium
|
|
type: bool
|
|
default: true
|
|
|
|
kube_vip_lb_ip_range:
|
|
description: IP range for kube-vip load balancer
|
|
default: ~
|
|
|
|
metal_lb_available_timeout:
|
|
description: Wait for MetalLB resources
|
|
default: 240s
|
|
|
|
metal_lb_ip_range:
|
|
description: MetalLB ip range for load balancer
|
|
default: 192.168.30.80-192.168.30.90
|
|
|
|
metal_lb_interfaces:
|
|
description: >-
|
|
List of network interfaces on which MetalLB should announce the
|
|
load balancer IPs in layer2 mode. When empty (default), MetalLB
|
|
announces on all interfaces.
|
|
type: list
|
|
default: []
|
|
|
|
metal_lb_controller_tag_version:
|
|
description: Image tag for MetalLB
|
|
default: v0.16.0
|
|
|
|
metal_lb_mode:
|
|
description: Metallb mode
|
|
default: layer2
|
|
choices:
|
|
- bgp
|
|
- layer2
|
|
|
|
metal_lb_bgp_my_asn:
|
|
description: BGP ASN configurations
|
|
default: ~
|
|
|
|
metal_lb_bgp_peer_asn:
|
|
description: BGP peer ASN configurations
|
|
default: ~
|
|
|
|
metal_lb_bgp_peer_address:
|
|
description: BGP peer address
|
|
default: ~
|