c12s-kubespray/roles/kubernetes-apps/external_cloud_controller/openstack/templates/external-openstack-cloud-config.j2
Marc-Antoine 5a8b68a429
Add support for openstack application credentials (#6534)
* Add support for openstack application credentials

* Add some lines for readability

* Update external_openstack_tenant_id check

Do not check external_openstack_tenant_id when application credentials are defined

* Add check for external_openstack_domain_id

* Fix typo
2020-08-31 03:30:28 -07:00

75 lines
No EOL
3.5 KiB
Django/Jinja

[Global]
auth-url="{{ external_openstack_auth_url }}"
{% if external_openstack_application_credential_id is not defined and external_openstack_application_credential_name is not defined %}
username="{{ external_openstack_username }}"
password="{{ external_openstack_password }}"
{% endif %}
{% if external_openstack_application_credential_id is defined and external_openstack_application_credential_id != "" %}
application-credential-id={{ external_openstack_application_credential_id }}
{% endif %}
{% if external_openstack_application_credential_name is defined and external_openstack_application_credential_name != "" %}
application-credential-name={{ external_openstack_application_credential_name }}
{% endif %}
{% if external_openstack_application_credential_secret is defined and external_openstack_application_credential_secret != "" %}
application-credential-secret={{ external_openstack_application_credential_secret }}
{% endif %}
region="{{ external_openstack_region }}"
{% if external_openstack_tenant_id is defined and external_openstack_tenant_id != "" %}
tenant-id="{{ external_openstack_tenant_id }}"
{% endif %}
{% if external_openstack_tenant_name is defined and external_openstack_tenant_name != "" %}
tenant-name="{{ external_openstack_tenant_name }}"
{% endif %}
{% if external_openstack_domain_name is defined and external_openstack_domain_name != "" %}
domain-name="{{ external_openstack_domain_name }}"
{% elif external_openstack_domain_id is defined and external_openstack_domain_id != "" %}
domain-id ="{{ external_openstack_domain_id }}"
{% endif %}
{% if external_openstack_cacert is defined and external_openstack_cacert != "" %}
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 }}
monitor-max-retries={{ external_openstack_lbaas_monitor_max_retries }}
{% if external_openstack_lbaas_method is defined %}
lb-method={{ external_openstack_lbaas_method }}
{% endif %}
{% if external_openstack_lbaas_network_id is defined %}
network-id={{ external_openstack_lbaas_network_id }}
{% endif %}
{% if external_openstack_lbaas_subnet_id is defined %}
subnet-id={{ external_openstack_lbaas_subnet_id }}
{% endif %}
{% if external_openstack_lbaas_floating_network_id is defined %}
floating-network-id={{ external_openstack_lbaas_floating_network_id }}
{% endif %}
{% 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_lbaas_internal_lb }}
{% endif %}
{% if external_openstack_lbaas_use_octavia is defined and external_openstack_lbaas_use_octavia %}
lb-provider=octavia
{% endif %}
[Networking]
ipv6-support-disabled={{ external_openstack_network_ipv6_disabled | string | lower }}
{% for network_name in external_openstack_network_internal_networks %}
internal-network-name="{{ network_name }}"
{% endfor %}
{% for network_name in external_openstack_network_public_networks %}
public-network-name="{{ network_name }}"
{% endfor %}
[Metadata]
{% if external_openstack_metadata_search_order is defined %}
search-order="{{ external_openstack_metadata_search_order }}"
{% endif %}