openstack-armada-app/openstack-helm-infra/files/0003-Revert-gnocchi-use-of-...

145 lines
5.3 KiB
Diff

From 4c2dd3b4e64a898613106c82dddaffd5e5ab09a0 Mon Sep 17 00:00:00 2001
From: Gerry Kopec <gerry.kopec@windriver.com>
Date: Wed, 3 Oct 2018 22:32:13 +0000
Subject: [PATCH 3/3] Revert gnocchi use of k8s secret to store config
To allow per host overrides to work we need to temporarily revert secrets
related changes. In the original secrets commit:
83b91e6e Openstack: Use k8s secret to store config
gnocchi was in openstack-helm, but was subsequently moved to
openstack-helm-infra. This commit reverts the gnocchi specific changes.
This commit should be put back once upstream has fixed the issue:
https://storyboard.openstack.org/#!/story/2003873
Reviewed by Angie.
---
gnocchi/templates/configmap-etc.yaml | 14 ++++++++------
gnocchi/templates/daemonset-metricd.yaml | 4 ++--
gnocchi/templates/daemonset-statsd.yaml | 4 ++--
gnocchi/templates/deployment-api.yaml | 4 ++--
gnocchi/templates/job-db-init-indexer.yaml | 4 ++--
gnocchi/templates/job-db-sync.yaml | 4 ++--
gnocchi/templates/pod-gnocchi-test.yaml | 4 ++--
7 files changed, 20 insertions(+), 18 deletions(-)
diff --git a/gnocchi/templates/configmap-etc.yaml b/gnocchi/templates/configmap-etc.yaml
index bdf6acc..eb2fd1f 100644
--- a/gnocchi/templates/configmap-etc.yaml
+++ b/gnocchi/templates/configmap-etc.yaml
@@ -91,13 +91,15 @@ limitations under the License.
{{- $envAll := . }}
---
apiVersion: v1
-kind: Secret
+kind: ConfigMap
metadata:
name: gnocchi-etc
-type: Opaque
data:
- gnocchi.conf: {{ include "helm-toolkit.utils.to_oslo_conf" .Values.conf.gnocchi | b64enc }}
- api-paste.ini: {{ include "helm-toolkit.utils.to_ini" .Values.conf.paste | b64enc }}
- policy.json: {{ toJson .Values.conf.policy | b64enc }}
-{{- include "helm-toolkit.snippets.values_template_renderer" (dict "envAll" $envAll "template" .Values.conf.apache "key" "wsgi-gnocchi.conf" "format" "Secret" ) | indent 2 }}
+ gnocchi.conf: |
+{{ include "helm-toolkit.utils.to_oslo_conf" .Values.conf.gnocchi | indent 4 }}
+ api-paste.ini: |
+{{ include "helm-toolkit.utils.to_ini" .Values.conf.paste | indent 4 }}
+ policy.json: |
+{{ toJson .Values.conf.policy | indent 4 }}
+{{- include "helm-toolkit.snippets.values_template_renderer" (dict "envAll" $envAll "template" .Values.conf.apache "key" "wsgi-gnocchi.conf") | indent 2 }}
{{- end }}
diff --git a/gnocchi/templates/daemonset-metricd.yaml b/gnocchi/templates/daemonset-metricd.yaml
index ccd6b0f..057fb95 100644
--- a/gnocchi/templates/daemonset-metricd.yaml
+++ b/gnocchi/templates/daemonset-metricd.yaml
@@ -98,8 +98,8 @@ spec:
- name: pod-etc-gnocchi
emptyDir: {}
- name: gnocchi-etc
- secret:
- secretName: gnocchi-etc
+ configMap:
+ name: gnocchi-etc
defaultMode: 0444
- name: gnocchi-bin
configMap:
diff --git a/gnocchi/templates/daemonset-statsd.yaml b/gnocchi/templates/daemonset-statsd.yaml
index 343073e..9560a16 100644
--- a/gnocchi/templates/daemonset-statsd.yaml
+++ b/gnocchi/templates/daemonset-statsd.yaml
@@ -104,8 +104,8 @@ spec:
- name: pod-etc-gnocchi
emptyDir: {}
- name: gnocchi-etc
- secret:
- secretName: gnocchi-etc
+ configMap:
+ name: gnocchi-etc
defaultMode: 0444
- name: gnocchi-bin
configMap:
diff --git a/gnocchi/templates/deployment-api.yaml b/gnocchi/templates/deployment-api.yaml
index 6425d46..b26a508 100644
--- a/gnocchi/templates/deployment-api.yaml
+++ b/gnocchi/templates/deployment-api.yaml
@@ -123,8 +123,8 @@ spec:
- name: pod-etc-gnocchi
emptyDir: {}
- name: gnocchi-etc
- secret:
- secretName: gnocchi-etc
+ configMap:
+ name: gnocchi-etc
defaultMode: 0444
- name: gnocchi-bin
configMap:
diff --git a/gnocchi/templates/job-db-init-indexer.yaml b/gnocchi/templates/job-db-init-indexer.yaml
index ad47290..19abe9d 100644
--- a/gnocchi/templates/job-db-init-indexer.yaml
+++ b/gnocchi/templates/job-db-init-indexer.yaml
@@ -66,8 +66,8 @@ spec:
readOnly: true
volumes:
- name: gnocchi-etc
- secret:
- secretName: gnocchi-etc
+ configMap:
+ name: gnocchi-etc
defaultMode: 0444
- name: pod-etc-gnocchi
emptyDir: {}
diff --git a/gnocchi/templates/job-db-sync.yaml b/gnocchi/templates/job-db-sync.yaml
index bdb0f95..5ee99ae 100644
--- a/gnocchi/templates/job-db-sync.yaml
+++ b/gnocchi/templates/job-db-sync.yaml
@@ -76,8 +76,8 @@ spec:
readOnly: true
volumes:
- name: gnocchi-etc
- secret:
- secretName: gnocchi-etc
+ configMap:
+ name: gnocchi-etc
defaultMode: 0444
- name: gnocchi-bin
configMap:
diff --git a/gnocchi/templates/pod-gnocchi-test.yaml b/gnocchi/templates/pod-gnocchi-test.yaml
index df02983..2835c0e 100644
--- a/gnocchi/templates/pod-gnocchi-test.yaml
+++ b/gnocchi/templates/pod-gnocchi-test.yaml
@@ -70,8 +70,8 @@ spec:
{{ if $mounts_gnocchi_tests.volumeMounts }}{{ toYaml $mounts_gnocchi_tests.volumeMounts | indent 8 }}{{ end }}
volumes:
- name: gnocchi-etc
- secret:
- secretName: gnocchi-etc
+ configMap:
+ name: gnocchi-etc
defaultMode: 0444
- name: gnocchi-bin
configMap:
--
1.8.3.1