Merge "Support both json and yaml RBAC Policy Format"

This commit is contained in:
Zuul 2021-11-22 22:58:42 +00:00 committed by Gerrit Code Review
commit 311fb5bf69
4 changed files with 16 additions and 5 deletions

View File

@ -14,7 +14,7 @@ apiVersion: v1
appVersion: v1.0.0
description: OpenStack-Helm Horizon
name: horizon
version: 0.2.11
version: 0.2.12
home: https://docs.openstack.org/horizon/latest/
icon: https://www.openstack.org/themes/openstack/images/project-mascots/Horizon/OpenStack_Project_Horizon_vertical.png
sources:

View File

@ -27,6 +27,9 @@ data:
{{- include "helm-toolkit.snippets.values_template_renderer" (dict "envAll" $envAll "template" .Values.conf.horizon.security "key" "security.conf" "format" "Secret" ) | indent 2 }}
{{- end }}
{{- range $key, $value := .Values.conf.horizon.policy }}
{{ printf "%s_policy.yaml" $key }}: {{ $value | toPrettyJson | b64enc }}
{{ printf "%s_policy.json" $key }}: {{ $value | toPrettyJson | b64enc }}
{{- end }}
{{- range $key, $value := .Values.conf.horizon.policy }}
{{ printf "%s_policy.yaml" $key }}: {{ toYaml $value | b64enc }}
{{- end }}
{{- end }}

View File

@ -123,10 +123,17 @@ spec:
subPath: local_settings
readOnly: true
{{- range $key, $value := $envAll.Values.conf.horizon.policy }}
{{- $policyFile := printf "/etc/openstack-dashboard/%s_policy.yaml" $key }}
{{- $policyYamlFile := printf "/etc/openstack-dashboard/%s_policy.yaml" $key }}
- name: horizon-etc
mountPath: {{ $policyFile }}
subPath: {{ base $policyFile }}
mountPath: {{ $policyYamlFile }}
subPath: {{ base $policyYamlFile }}
readOnly: true
{{- end }}
{{- range $key, $value := $envAll.Values.conf.horizon.policy }}
{{- $policyJsonFile := printf "/etc/openstack-dashboard/%s_policy.json" $key }}
- name: horizon-etc
mountPath: {{ $policyJsonFile }}
subPath: {{ base $policyJsonFile }}
readOnly: true
{{- end }}
{{- dict "enabled" $envAll.Values.manifests.certificates "name" $envAll.Values.secrets.tls.dashboard.dashboard.internal "path" "/etc/openstack-dashboard/certs" | include "helm-toolkit.snippets.tls_volume_mount" | indent 12 }}

View File

@ -21,4 +21,5 @@ horizon:
- 0.2.9 Removed default policy in chart in favor of default policy in code
- 0.2.10 Helm 3 - Fix Job Labels
- 0.2.11 Update htk requirements repo
- 0.2.12 Support both json and yaml RBAC Policy Format
...