From d1fbf4ac145ae6a658123516b9f3ae1be598059e Mon Sep 17 00:00:00 2001 From: Robert Church Date: Thu, 28 Feb 2019 20:04:49 -0500 Subject: [PATCH] Add resource_filters.json to Cinder's configmap During the Stein development cycle, Cinder removed the deprecated query_volume_filters configuration option with Icd311db7f88c3c274d9a362eb96519e46c7e4d17. This chart update will add resource_filters.json to the configmap and provides the default values for the filter keys to enable filtering in the list APIs. Change-Id: I31263e9ce06d31773e961ae5d1252e062a38a4e5 Signed-off-by: Robert Church --- cinder/templates/configmap-etc.yaml | 1 + cinder/templates/deployment-api.yaml | 4 +++ cinder/values.yaml | 39 ++++++++++++++++++++++++++++ 3 files changed, 44 insertions(+) diff --git a/cinder/templates/configmap-etc.yaml b/cinder/templates/configmap-etc.yaml index 88d9fa07cf..5ed73db66d 100644 --- a/cinder/templates/configmap-etc.yaml +++ b/cinder/templates/configmap-etc.yaml @@ -121,6 +121,7 @@ data: policy.json: {{ toJson .Values.conf.policy | b64enc }} cinder_sudoers: {{ $envAll.Values.conf.cinder_sudoers | b64enc }} rootwrap.conf: {{ $envAll.Values.conf.rootwrap | b64enc }} + resource_filters.json: {{ toJson .Values.conf.resource_filters | b64enc }} {{- range $key, $value := $envAll.Values.conf.rootwrap_filters }} {{- $filePrefix := replace "_" "-" $key }} {{ printf "%s.filters" $filePrefix }}: {{ $value.content | b64enc }} diff --git a/cinder/templates/deployment-api.yaml b/cinder/templates/deployment-api.yaml index ad9c300a6c..bddba4744e 100644 --- a/cinder/templates/deployment-api.yaml +++ b/cinder/templates/deployment-api.yaml @@ -119,6 +119,10 @@ spec: mountPath: /etc/cinder/policy.json subPath: policy.json readOnly: true + - name: cinder-etc + mountPath: {{ .Values.conf.cinder.DEFAULT.resource_query_filters_file }} + subPath: resource_filters.json + readOnly: true {{- if eq ( split "://" .Values.conf.cinder.coordination.backend_url )._0 "file" }} - name: cinder-coordination mountPath: {{ ( split "://" .Values.conf.cinder.coordination.backend_url )._1 }} diff --git a/cinder/values.yaml b/cinder/values.yaml index 31cc2bec48..7e77b5b573 100644 --- a/cinder/values.yaml +++ b/cinder/values.yaml @@ -721,6 +721,7 @@ conf: chunk_size: 8 cinder: DEFAULT: + resource_query_filters_file: /etc/cinder/resource_filters.json log_config_append: /etc/cinder/logging.conf use_syslog: false use_stderr: true @@ -871,6 +872,44 @@ conf: sla: failure_rate: max: 0 + resource_filters: + volume: + - name + - status + - metadata + - bootable + - migration_status + - availability_zone + - group_id + backup: + - name + - status + - volume_id + snapshot: + - name + - status + - volume_id + - metadata + - availability_zone + group: [] + group_snapshot: + - status + - group_id + attachment: + - volume_id + - status + - instance_id + - attach_status + message: + - resource_uuid + - resource_type + - event_id + - request_id + - message_level + pool: + - name + - volume_type + volume_type: [] backup: external_ceph_rbd: