Skip to content

Commit

Permalink
Add external_openstack_lbaas_provider setting for occm (kubernetes-si…
Browse files Browse the repository at this point in the history
…gs#6566)

* Add external_openstack_lbaas_provider setting for occm

* Integrate with existing lbaas_provider block

* Refactor lbaas_provider config template block

* Remove external_openstack_lbaas_use_octavia from sample inventory
  • Loading branch information
piequi authored and LuckySB committed Jan 16, 2021
1 parent ff7d01d commit 73867ea
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion inventory/sample/group_vars/all/openstack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
# external_openstack_lbaas_subnet_id: "Neutron subnet ID to create LBaaS VIP"
# external_openstack_lbaas_floating_network_id: "Neutron network ID to get floating IP from"
# external_openstack_lbaas_floating_subnet_id: "Neutron subnet ID to get floating IP from"
# external_openstack_lbaas_use_octavia: true
# external_openstack_lbaas_method: "ROUND_ROBIN"
# external_openstack_lbaas_provider: "octavia"
# external_openstack_lbaas_create_monitor: false
# external_openstack_lbaas_monitor_delay: "1m"
# external_openstack_lbaas_monitor_timeout: "30s"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ ca-file="{{ kube_config_dir }}/external-openstack-cacert.pem"
{% endif %}

[LoadBalancer]
use-octavia={{ external_openstack_lbaas_use_octavia | string | lower }}
create-monitor={{ external_openstack_lbaas_create_monitor }}
monitor-delay={{ external_openstack_lbaas_monitor_delay }}
monitor-timeout={{ external_openstack_lbaas_monitor_timeout }}
Expand All @@ -56,8 +55,12 @@ manage-security-groups={{ external_openstack_lbaas_manage_security_groups }}
{% if external_openstack_lbaas_internal_lb is defined %}
internal-lb={{ external_openstack_lbaas_internal_lb }}
{% endif %}
{% if external_openstack_lbaas_use_octavia is defined and external_openstack_lbaas_use_octavia %}
{% if external_openstack_lbaas_provider is defined %}
lb-provider={{ external_openstack_lbaas_provider }}
use-octavia={{ external_openstack_lbaas_provider | lower == 'octavia' }}
{% else %}
lb-provider=octavia
use-octavia=true
{% endif %}

[Networking]
Expand All @@ -72,4 +75,4 @@ public-network-name="{{ network_name }}"
[Metadata]
{% if external_openstack_metadata_search_order is defined %}
search-order="{{ external_openstack_metadata_search_order }}"
{% endif %}
{% endif %}

0 comments on commit 73867ea

Please sign in to comment.