Handle the hardcoded configuration values
This patch allows to customize the hardcoded configuration values,
as well as introduce new configuration options for manila services
by configmap template
Change-Id: I2ed771daa3a64e135b881e18117fbba5f75cbec9
Related-Prod: PROD-29627
diff --git a/README.rst b/README.rst
index d4578dd..4fa35ec 100644
--- a/README.rst
+++ b/README.rst
@@ -160,6 +160,22 @@
You can read more about it here:
https://docs.openstack.org/security-guide/databases/database-access-control.html
+Configmap configuration:
+----------------
+
+.. code-block:: yaml
+
+ manila:
+ common:
+ configmap:
+ DEFAULT:
+ default_share_type: default_share_type
+ share_name_template: share-%s
+ rootwrap_config: '/etc/manila/rootwrap.conf'
+ api_paste_config: '/etc/manila/api-paste.ini'
+ oslo_concurrency:
+ lock_path: '/var/lock/manila'
+
More information
================
diff --git a/manila/files/pike/manila.conf b/manila/files/pike/manila.conf
index c8ed3cf..edf5387 100644
--- a/manila/files/pike/manila.conf
+++ b/manila/files/pike/manila.conf
@@ -132,3 +132,7 @@
{%- endfor %}
{%- endif %}
+{%- if cfg.configmap is defined %}
+{%- set _data = cfg.configmap %}
+{%- include "oslo_templates/files/configmap/configmap.conf" %}
+{%- endif %}
diff --git a/manila/files/queens/manila.conf b/manila/files/queens/manila.conf
index 2d9352a..cb2bb56 100644
--- a/manila/files/queens/manila.conf
+++ b/manila/files/queens/manila.conf
@@ -1742,3 +1742,8 @@
[cache]
{%- include "oslo_templates/files/"+ cfg.version +"/oslo/_cache.conf" %}
{%- endif %}
+
+{%- if cfg.configmap is defined %}
+{%- set _data = cfg.configmap %}
+{%- include "oslo_templates/files/configmap/configmap.conf" %}
+{%- endif %}
diff --git a/manila/files/rocky/manila.conf b/manila/files/rocky/manila.conf
index 137e50a..b93fcf3 100644
--- a/manila/files/rocky/manila.conf
+++ b/manila/files/rocky/manila.conf
@@ -1798,3 +1798,8 @@
[cache]
{%- include "oslo_templates/files/"+ cfg.version +"/oslo/_cache.conf" %}
{%- endif %}
+
+{%- if cfg.configmap is defined %}
+{%- set _data = cfg.configmap %}
+{%- include "oslo_templates/files/configmap/configmap.conf" %}
+{%- endif %}
diff --git a/tests/pillar/server_cluster.sls b/tests/pillar/server_cluster.sls
index 4e6ab2c..3905557 100644
--- a/tests/pillar/server_cluster.sls
+++ b/tests/pillar/server_cluster.sls
@@ -47,6 +47,14 @@
enabled: false
ossyslog:
enabled: false
+ configmap:
+ DEFAULT:
+ default_share_type: default_share_type
+ share_name_template: share-%s
+ rootwrap_config: '/etc/manila/rootwrap.conf'
+ api_paste_config: '/etc/manila/api-paste.ini'
+ oslo_concurrency:
+ lock_path: '/var/lock/manila'
apache:
server:
enabled: true