Skip to content

Commit

Permalink
fix a typo in the "matallb_auto_assign" variable name (kubernetes-sig…
Browse files Browse the repository at this point in the history
…s#8949)

* fix a typo in the "matallb_auto_assign" variable name

* add metallb check to fail when deprecated "matallb_auto_assign" variable is defined
  • Loading branch information
orange-llajeanne authored and LuckySB committed Jul 1, 2023
1 parent 93e06bb commit 1acfe98
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion inventory/sample/group_vars/k8s_cluster/addons.yml
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ metallb_speaker_enabled: true
# metallb_ip_range:
# - "10.5.0.50-10.5.0.99"
# metallb_pool_name: "loadbalanced"
# matallb_auto_assign: true
# metallb_auto_assign: true
# metallb_speaker_nodeselector:
# kubernetes.io/os: "linux"
# metallb_controller_nodeselector:
Expand Down
2 changes: 1 addition & 1 deletion roles/kubernetes-apps/metallb/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ metallb_speaker_tolerations:
operator: Exists
metallb_controller_tolerations: []
metallb_pool_name: "loadbalanced"
matallb_auto_assign: true
metallb_auto_assign: true
6 changes: 6 additions & 0 deletions roles/kubernetes-apps/metallb/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@
- metallb_protocol == 'bgp' and metallb_speaker_enabled
- metallb_peers is not defined or not metallb_peers

- name: Kubernetes Apps | Check that the deprecated 'matallb_auto_assign' variable is not used anymore
fail:
msg: "'matallb_auto_assign' configuration variable is deprecated, please use 'metallb_auto_assign' instead"
when:
- matallb_auto_assign is defined

- name: Kubernetes Apps | Check AppArmor status
command: which apparmor_parser
register: apparmor_status
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ data:
{% for ip_range in metallb_ip_range %}
- {{ ip_range }}
{% endfor %}
{% if matallb_auto_assign == false %}
{% if metallb_auto_assign == false %}
auto-assign: false
{% endif %}
{% if metallb_additional_address_pools is defined %}{% for pool in metallb_additional_address_pools %}
Expand Down

0 comments on commit 1acfe98

Please sign in to comment.