mirror of
https://github.com/techno-tim/k3s-ansible.git
synced 2026-08-08 23:13:19 +02:00
feat(kube-vip): add endpoint override for the internal listening address (#699)
* feat(kube-vip): add endpoint override for the internal listening address Add a kube_vip_endpoint variable so the address kube-vip binds and listens on can differ from the announced apiserver_endpoint. This is useful for complex routing and site-to-site tunnels where the VIP kube-vip advertises over ARP differs from the address it listens on internally. - roles/k3s_server/templates/vip.yaml.j2: use kube_vip_endpoint (defaulting to apiserver_endpoint) for the `address` env and for deriving `vip_subnet` - roles/k3s_server/defaults/main.yml: add kube_vip_endpoint default (null) - roles/k3s_server/meta/main.yml: add kube_vip_endpoint argument_spec - inventory/sample/group_vars/all.yml: document the new sample variable - README.md: document the kube_vip_endpoint option - .github/scripts/test-kube-vip-manifest.py: extend regression test to cover the default (apiserver_endpoint) and the override case Closes #221 * chore(ci): extend molecule job timeout to 3 hours The default scenario occasionally takes longer than 150 minutes on the shared nested-virt runner (k3s agent notify-wait can exceed the limit under load), and a single timeout aborts the whole run before the other four scenarios execute. Raise timeout-minutes from 150 to 180 so a slow-but-progressing run completes instead of aborting. The default scenario remains first in the matrix so a failure surfaces fastest. * fix(kube-vip): fall back on null kube_vip_endpoint and cover it in the test - vip_subnet and address use default(apiserver_endpoint, true) so the null role default falls back to the apiserver endpoint instead of rendering an empty/invalid address and subnet - change the manifest regression test default case to pass kube_vip_endpoint as None so it pins the real runtime null condition and fails fast on this regression rather than timing out in CI
This commit is contained in:
@@ -48,6 +48,11 @@ cilium_bgp_lb_cidr: 192.168.31.0/24 # cidr for cilium loadbalancer ipam
|
||||
# enable kube-vip ARP broadcasts
|
||||
kube_vip_arp: true
|
||||
|
||||
# (optional) overrides the address kube-vip binds/listens on internally, which
|
||||
# can differ from the announced apiserver_endpoint for complex routing/tunnels.
|
||||
# Defaults to apiserver_endpoint. Also used to derive the kube-vip subnet.
|
||||
# kube_vip_endpoint: 10.66.1.5
|
||||
|
||||
# enable kube-vip BGP peering
|
||||
kube_vip_bgp: false
|
||||
|
||||
|
||||
Reference in New Issue
Block a user