From a25ae06c422479ab42bfd4ab7e0caddbd794a0ad Mon Sep 17 00:00:00 2001 From: Konstantin Kornienko Date: Fri, 14 Jun 2024 13:32:30 +0300 Subject: [PATCH 1/4] Added support for metallb >= 0.14.4 --- roles/k3s_server_post/tasks/metallb.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/roles/k3s_server_post/tasks/metallb.yml b/roles/k3s_server_post/tasks/metallb.yml index 07a23b0f2..7699fb4d2 100644 --- a/roles/k3s_server_post/tasks/metallb.yml +++ b/roles/k3s_server_post/tasks/metallb.yml @@ -83,9 +83,23 @@ loop_control: label: "{{ item.description }}" +- name: Set metallb webhook service name + set_fact: + metallb_webhook_service_name: >- + {{ + ( + (metal_lb_controller_tag_version | regex_replace('^v', '')) + is + version('0.14.4', '<', version_type='semver') + ) | ternary( + 'webhook-service', + 'metallb-webhook-service' + ) + }} + - name: Test metallb-system webhook-service endpoint command: >- - k3s kubectl -n metallb-system get endpoints webhook-service + k3s kubectl -n metallb-system get endpoints {{ metallb_webhook_service_name }} changed_when: false with_items: "{{ groups[group_name_master | default('master')] }}" run_once: true From c0ac4c0c4fa1797ea5a7ba173a423a29bc065426 Mon Sep 17 00:00:00 2001 From: Konstantin Kornienko Date: Fri, 14 Jun 2024 18:06:11 +0300 Subject: [PATCH 2/4] update gpg --- roles/k3s_server_post/tasks/metallb.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/k3s_server_post/tasks/metallb.yml b/roles/k3s_server_post/tasks/metallb.yml index 7699fb4d2..e96834fe5 100644 --- a/roles/k3s_server_post/tasks/metallb.yml +++ b/roles/k3s_server_post/tasks/metallb.yml @@ -89,7 +89,7 @@ {{ ( (metal_lb_controller_tag_version | regex_replace('^v', '')) - is + is version('0.14.4', '<', version_type='semver') ) | ternary( 'webhook-service', From ab40aa0d10a02de1470bc3aac6e59e72c7ead62c Mon Sep 17 00:00:00 2001 From: Konstantin Kornienko Date: Fri, 14 Jun 2024 18:06:36 +0300 Subject: [PATCH 3/4] Added support for metallb >= 0.14.4 --- .python-version | 1 + roles/k3s_server_post/tasks/metallb.yml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 .python-version diff --git a/.python-version b/.python-version new file mode 100644 index 000000000..8ea0675cd --- /dev/null +++ b/.python-version @@ -0,0 +1 @@ +pgpro-ansible diff --git a/roles/k3s_server_post/tasks/metallb.yml b/roles/k3s_server_post/tasks/metallb.yml index e96834fe5..7699fb4d2 100644 --- a/roles/k3s_server_post/tasks/metallb.yml +++ b/roles/k3s_server_post/tasks/metallb.yml @@ -89,7 +89,7 @@ {{ ( (metal_lb_controller_tag_version | regex_replace('^v', '')) - is + is version('0.14.4', '<', version_type='semver') ) | ternary( 'webhook-service', From 67b13a825e7064cf8cd354769b546a6a0f5c6913 Mon Sep 17 00:00:00 2001 From: Konstantin Kornienko Date: Wed, 19 Jun 2024 15:12:43 +0300 Subject: [PATCH 4/4] remove extra file --- .python-version | 1 - 1 file changed, 1 deletion(-) delete mode 100644 .python-version diff --git a/.python-version b/.python-version deleted file mode 100644 index 8ea0675cd..000000000 --- a/.python-version +++ /dev/null @@ -1 +0,0 @@ -pgpro-ansible