diff --git a/roles/kubernetes-apps/external_cloud_controller/openstack/defaults/main.yml b/roles/kubernetes-apps/external_cloud_controller/openstack/defaults/main.yml index 71af4b4d8..706c83c05 100644 --- a/roles/kubernetes-apps/external_cloud_controller/openstack/defaults/main.yml +++ b/roles/kubernetes-apps/external_cloud_controller/openstack/defaults/main.yml @@ -21,4 +21,8 @@ external_openstack_cacert: "{{ lookup('env','OS_CACERT') }}" ## arg1: "value1" ## arg2: "value2" external_openstack_cloud_controller_extra_args: {} +## By default the value of cluster_name variable is taken. +## If you want to give the OCCM identifier a different value, +## you can set the external_openstack_cloud_controller_cluster_name. +## external_openstack_cloud_controller_cluster_name: "cluster-name" external_openstack_cloud_controller_image_tag: "v1.25.3" diff --git a/roles/kubernetes-apps/external_cloud_controller/openstack/templates/external-openstack-cloud-controller-manager-ds.yml.j2 b/roles/kubernetes-apps/external_cloud_controller/openstack/templates/external-openstack-cloud-controller-manager-ds.yml.j2 index 4596f92f7..0998a2c9f 100644 --- a/roles/kubernetes-apps/external_cloud_controller/openstack/templates/external-openstack-cloud-controller-manager-ds.yml.j2 +++ b/roles/kubernetes-apps/external_cloud_controller/openstack/templates/external-openstack-cloud-controller-manager-ds.yml.j2 @@ -44,7 +44,11 @@ spec: - --v=1 - --cloud-config=$(CLOUD_CONFIG) - --cloud-provider=openstack +{% if external_openstack_cloud_controller_cluster_name is defined %} + - --cluster-name={{ external_openstack_cloud_controller_cluster_name }} +{% else %} - --cluster-name={{ cluster_name }} +{% endif %} - --use-service-account-credentials=true - --bind-address=127.0.0.1 {% for key, value in external_openstack_cloud_controller_extra_args.items() %}