Skip to content

Commit

Permalink
Add option to disable MetalLB, for use w/ ext LBs
Browse files Browse the repository at this point in the history
  • Loading branch information
balazshasprai committed Oct 18, 2023
1 parent 505c2ee commit 47427ab
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions inventory/sample/group_vars/all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ extra_agent_args: >-
# image tag for kube-vip
kube_vip_tag_version: "v0.5.12"

# The default value is true.
# Only set this to false if you don't want to use MetalLB, and would like to use an external load balancer instead.
metal_lb_configure: true

# metallb type frr or native
metal_lb_type: "native"

Expand Down
1 change: 1 addition & 0 deletions roles/k3s_server/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

- name: Deploy metallb manifest
include_tasks: metallb.yml
when: metal_lb_configure

- name: Init cluster inside the transient k3s-init service
command:
Expand Down
1 change: 1 addition & 0 deletions roles/k3s_server_post/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
- name: Deploy metallb pool
include_tasks: metallb.yml
when: metal_lb_configure

- name: Remove tmp directory used for manifests
file:
Expand Down

0 comments on commit 47427ab

Please sign in to comment.