configure pve frr to use bgp with router and kube workers

This commit is contained in:
2025-08-01 22:42:30 +03:00
parent 7f25838dea
commit 486a05e865
9 changed files with 77 additions and 5 deletions

View File

@@ -54,7 +54,9 @@ all:
ansible_host: 172.21.20.92 ansible_host: 172.21.20.92
pve93: pve93:
ansible_host: 172.21.20.93 ansible_host: 172.21.20.93
bgp:
children:
proxmox:
# Kubernetes cluster setup documented at # Kubernetes cluster setup documented at
# https://git.k-space.ee/k-space/kube # https://git.k-space.ee/k-space/kube
kubernetes: kubernetes:

View File

@@ -8,6 +8,10 @@
- pve93 - pve93
gather_facts: false gather_facts: false
tasks: tasks:
- name: Load secrets
ansible.builtin.include_vars:
file: ../secrets/bgp.yaml
- name: configure mesh network - name: configure mesh network
ansible.builtin.template: ansible.builtin.template:
src: templates/ceph.interfaces.j2 src: templates/ceph.interfaces.j2

View File

@@ -0,0 +1,22 @@
---
bgp:
as: "64512"
interface: vmbr1
peers:
- 172.21.255.254
- 172.21.3.51
- 172.21.3.52
- 172.21.3.53
- 172.21.3.81
- 172.21.3.82
- 172.21.3.83
- 172.21.3.84
peers_ipv6:
- 2001:bb8:4008:21:ffff:ffff:ffff:fffe
- 2001:bb8:4008:21::3:51
- 2001:bb8:4008:21::3:52
- 2001:bb8:4008:21::3:53
- 2001:bb8:4008:21::3:81
- 2001:bb8:4008:21::3:82
- 2001:bb8:4008:21::3:83
- 2001:bb8:4008:21::3:84

View File

@@ -4,4 +4,6 @@ ceph_mesh:
openfabric_net: 49.0000.0000.0090.00 openfabric_net: 49.0000.0000.0090.00
interfaces: interfaces:
- enp161s0 - enp161s0
- enp161s0d1 - enp161s0d1
bgp_router_id: 172.21.20.90

View File

@@ -4,4 +4,6 @@ ceph_mesh:
openfabric_net: 49.0000.0000.0091.00 openfabric_net: 49.0000.0000.0091.00
interfaces: interfaces:
- enp161s0 - enp161s0
- enp161s0d1 - enp161s0d1
bgp_router_id: 172.21.20.91

View File

@@ -4,4 +4,6 @@ ceph_mesh:
openfabric_net: 49.0000.0000.0092.00 openfabric_net: 49.0000.0000.0092.00
interfaces: interfaces:
- enp161s0 - enp161s0
- enp161s0d1 - enp161s0d1
bgp_router_id: 172.21.20.92

View File

@@ -4,4 +4,6 @@ ceph_mesh:
openfabric_net: 49.0000.0000.0093.00 openfabric_net: 49.0000.0000.0093.00
interfaces: interfaces:
- enp161s0 - enp161s0
- enp161s0d1 - enp161s0d1
bgp_router_id: 172.21.20.93

View File

@@ -28,3 +28,28 @@ router openfabric 1
lsp-gen-interval 5 lsp-gen-interval 5
exit exit
! !
!
router bgp {{ bgp.as }}
bgp router-id {{ bgp_router_id }}
bgp default ipv4-unicast
bgp default ipv6-unicast
neighbor k6-infra peer-group
neighbor k6-infra remote-as {{ bgp.as }}
neighbor k6-infra password {{ bgp_password }}
neighbor k6-infra update-source {{ bgp.interface }}
{% for peer in bgp.peers %}
neighbor {{ peer }} peer-group k6-infra
{% endfor %}
{% for peer in bgp.peers_ipv6 %}
neighbor {{ peer }} peer-group k6-infra
{% endfor %}
!
address-family ipv6 unicast
neighbor k6-infra activate
redistribute openfabric
exit-address-family
!

11
secrets.yaml Normal file
View File

@@ -0,0 +1,11 @@
---
- name: Checkout secrets
hosts: localhost
gather_facts: false
tasks:
- name: Checkout secrets
ansible.builtin.git:
repo: 'git@git.k-space.ee:secretspace/ansible.git'
dest: secrets
update: yes
version: main