From 859647060900e3524a424a37b145b2506f7d2f4d Mon Sep 17 00:00:00 2001 From: Mohammed Naser Date: Thu, 2 Dec 2021 12:43:32 +0400 Subject: [PATCH] Added cluster/temp_cache_dir When using Barbican with a large number of clusters, this option can allow Magnum to cache the certificates locally to avoid hitting the API excessively. It is enabled out of the box however since we don't have that folder, it is not working. Change-Id: I63cb35798b82460f7addd4ec719c157e2c1c4fd9 --- magnum/Chart.yaml | 2 +- magnum/templates/statefulset-conductor.yaml | 4 ++++ magnum/values.yaml | 2 ++ releasenotes/notes/magnum.yaml | 1 + 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/magnum/Chart.yaml b/magnum/Chart.yaml index 3e81f98d..75aef1ae 100644 --- a/magnum/Chart.yaml +++ b/magnum/Chart.yaml @@ -14,7 +14,7 @@ apiVersion: v1 appVersion: v1.0.0 description: OpenStack-Helm Magnum name: magnum -version: 0.2.3 +version: 0.2.4 home: https://docs.openstack.org/magnum/latest/ icon: https://www.openstack.org/themes/openstack/images/project-mascots/Magnum/OpenStack_Project_Magnum_vertical.png sources: diff --git a/magnum/templates/statefulset-conductor.yaml b/magnum/templates/statefulset-conductor.yaml index 49621a07..44d8b027 100644 --- a/magnum/templates/statefulset-conductor.yaml +++ b/magnum/templates/statefulset-conductor.yaml @@ -108,6 +108,8 @@ spec: mountPath: /tmp/pod-shared - name: magnum-lock-path mountPath: {{ .Values.conf.magnum.oslo_concurrency.lock_path }} + - name: magnum-certificate-cache + mountPath: {{ .Values.conf.magnum.cluster.temp_cache_dir }} {{ if $mounts_magnum_conductor.volumeMounts }}{{ toYaml $mounts_magnum_conductor.volumeMounts | indent 12 }}{{ end }} volumes: - name: pod-tmp @@ -126,5 +128,7 @@ spec: defaultMode: 0444 - name: magnum-lock-path emptyDir: {} + - name: magnum-certificate-cache + emptyDir: {} {{ if $mounts_magnum_conductor.volumes }}{{ toYaml $mounts_magnum_conductor.volumes | indent 8 }}{{ end }} {{- end }} diff --git a/magnum/values.yaml b/magnum/values.yaml index 66fe791c..544472a8 100644 --- a/magnum/values.yaml +++ b/magnum/values.yaml @@ -115,6 +115,8 @@ conf: DEFAULT: log_config_append: /etc/magnum/logging.conf transport_url: null + cluster: + temp_cache_dir: /var/lib/magnum/certificate-cache oslo_messaging_notifications: driver: messaging oslo_concurrency: diff --git a/releasenotes/notes/magnum.yaml b/releasenotes/notes/magnum.yaml index 1e74af9b..88a4226f 100644 --- a/releasenotes/notes/magnum.yaml +++ b/releasenotes/notes/magnum.yaml @@ -7,4 +7,5 @@ magnum: - 0.2.1 Use policies in yaml format - 0.2.2 Fix restarting of magnum-conductor pods - 0.2.3 Update htk requirements repo + - 0.2.4 Mount empty temp_cache_dir for performance ...