From d1acf7f19250ec7216855f80f560b359284ce4dc Mon Sep 17 00:00:00 2001
From: Steven Reitsma <steven@properchaos.nl>
Date: Wed, 26 Feb 2020 22:03:19 +0100
Subject: [PATCH] Add additional configuration options to external Openstack
 CCM (#5661)

- Add support for manage-security-groups flag
- Add support for internal-lb flag
---
 inventory/sample/group_vars/all/openstack.yml             | 2 ++
 .../templates/external-openstack-cloud-config.j2          | 8 +++++++-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/inventory/sample/group_vars/all/openstack.yml b/inventory/sample/group_vars/all/openstack.yml
index a3e588833..c4761188f 100644
--- a/inventory/sample/group_vars/all/openstack.yml
+++ b/inventory/sample/group_vars/all/openstack.yml
@@ -26,6 +26,8 @@
 # external_openstack_lbaas_monitor_delay: "1m"
 # external_openstack_lbaas_monitor_timeout: "30s"
 # external_openstack_lbaas_monitor_max_retries: "3"
+# external_openstack_lbaas_manage_security_groups: false
+# external_openstack_lbaas_internal_lb: false
 
 ## The tag of the external OpenStack Cloud Controller image
 # external_openstack_cloud_controller_image_tag: "latest"
diff --git a/roles/kubernetes-apps/external_cloud_controller/openstack/templates/external-openstack-cloud-config.j2 b/roles/kubernetes-apps/external_cloud_controller/openstack/templates/external-openstack-cloud-config.j2
index c7b2476cd..fc05d0587 100644
--- a/roles/kubernetes-apps/external_cloud_controller/openstack/templates/external-openstack-cloud-config.j2
+++ b/roles/kubernetes-apps/external_cloud_controller/openstack/templates/external-openstack-cloud-config.j2
@@ -36,6 +36,12 @@ subnet-id={{ external_openstack_lbaas_subnet_id }}
 {% if external_openstack_lbaas_floating_network_id is defined %}
 floating-network-id={{ external_openstack_lbaas_floating_network_id }}
 {% endif %}
-{% if external_openstack_lbaas_flaoting_subnet_id is defined %}
+{% if external_openstack_lbaas_floating_subnet_id is defined %}
 floating-subnet-id={{ external_openstack_lbaas_floating_subnet_id }}
 {% endif %}
+{% if external_openstack_lbaas_manage_security_groups is defined %}
+manage-security-groups={{ external_openstack_lbaas_manage_security_groups }}
+{% endif %}
+{% if external_openstack_lbaas_internal_lb is defined %}
+internal-lb={{ external_openstack_internal_lb }}
+{% endif %}
-- 
GitLab