mirror of
https://github.com/techno-tim/k3s-ansible.git
synced 2026-10-23 20:22:03 +02:00
fix(metallb): verify the metallb-system namespace actually exists
- change the Test metallb-system namespace task to run k3s kubectl get namespace metallb-system instead of the bare -n metallb-system, which printed kubectl usage and always exited 0 - add a regression test that asserts the task uses an explicit get and fails if it ever regresses to the usage-only form - wire the new test into pre-commit
This commit is contained in:
1 parent
287d8b7a27
commit
e0ac53dba3
3 files changed
+81
-1
No files matched your search
@@ -40,7 +40,7 @@
|
||||
|
||||
- name: Test metallb-system namespace
|
||||
ansible.builtin.command: >-
|
||||
{{ k3s_kubectl_binary | default('k3s kubectl') }} -n metallb-system
|
||||
{{ k3s_kubectl_binary | default('k3s kubectl') }} get namespace metallb-system
|
||||
changed_when: false
|
||||
with_items: "{{ groups[group_name_master | default('master')] }}"
|
||||
run_once: true
|
||||
|
||||
Reference in new issue
Block a user