From 8401db0e77901949be4a866f0a20c782c45ea998 Mon Sep 17 00:00:00 2001 From: Gayathri Devi Kathiri Date: Thu, 13 Feb 2020 14:02:17 +0000 Subject: [PATCH] Modify incorrect format of Cinder policy file Cinder default format of policy file is changed from "json" to "yaml" in stein. This patch set modifies Cinder chart templates to load policies in yaml format. Change-Id: I28f3d5be6609cd28bbc1ce8e5fc1d1cf4730b760 --- cinder/templates/configmap-etc.yaml | 2 +- cinder/templates/deployment-api.yaml | 4 ++-- cinder/templates/deployment-scheduler.yaml | 4 ++-- cinder/values.yaml | 2 ++ 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/cinder/templates/configmap-etc.yaml b/cinder/templates/configmap-etc.yaml index 6f21b5882a..cc9c78f961 100644 --- a/cinder/templates/configmap-etc.yaml +++ b/cinder/templates/configmap-etc.yaml @@ -115,7 +115,7 @@ data: logging.conf: {{ include "helm-toolkit.utils.to_oslo_conf" .Values.conf.logging | b64enc }} backends.conf: {{ include "helm-toolkit.utils.to_ini" .Values.conf.backends | b64enc }} api-paste.ini: {{ include "helm-toolkit.utils.to_ini" .Values.conf.paste | b64enc }} - policy.json: {{ toJson .Values.conf.policy | b64enc }} + policy.yaml: {{ toYaml .Values.conf.policy | b64enc }} api_audit_map.conf: {{ include "helm-toolkit.utils.to_oslo_conf" .Values.conf.api_audit_map | b64enc }} cinder_sudoers: {{ $envAll.Values.conf.cinder_sudoers | b64enc }} rootwrap.conf: {{ $envAll.Values.conf.rootwrap | b64enc }} diff --git a/cinder/templates/deployment-api.yaml b/cinder/templates/deployment-api.yaml index cabbbdc4d6..85fd4a401e 100644 --- a/cinder/templates/deployment-api.yaml +++ b/cinder/templates/deployment-api.yaml @@ -120,8 +120,8 @@ spec: subPath: api-paste.ini readOnly: true - name: cinder-etc - mountPath: /etc/cinder/policy.json - subPath: policy.json + mountPath: /etc/cinder/policy.yaml + subPath: policy.yaml readOnly: true - name: cinder-etc mountPath: /etc/cinder/api_audit_map.conf diff --git a/cinder/templates/deployment-scheduler.yaml b/cinder/templates/deployment-scheduler.yaml index 9ff91f8198..813ab1b237 100644 --- a/cinder/templates/deployment-scheduler.yaml +++ b/cinder/templates/deployment-scheduler.yaml @@ -98,8 +98,8 @@ spec: subPath: api-paste.ini readOnly: true - name: cinder-etc - mountPath: /etc/cinder/policy.json - subPath: policy.json + mountPath: /etc/cinder/policy.yaml + subPath: policy.yaml readOnly: true {{- if eq ( split "://" .Values.conf.cinder.coordination.backend_url )._0 "file" }} - name: cinder-coordination diff --git a/cinder/values.yaml b/cinder/values.yaml index f6d1c93621..2282b2e85f 100644 --- a/cinder/values.yaml +++ b/cinder/values.yaml @@ -856,6 +856,8 @@ conf: keystone_authtoken: auth_version: v3 auth_type: password + oslo_policy: + policy_file: /etc/cinder/policy.yaml oslo_concurrency: lock_path: "/var/lib/cinder/tmp" oslo_messaging_notifications: