45 lines
1.9 KiB
Diff
45 lines
1.9 KiB
Diff
From 5d78a8df854340225c32d025e921efd5c9dc2be1 Mon Sep 17 00:00:00 2001
|
|
From: Angie Wang <angie.wang@windriver.com>
|
|
Date: Wed, 26 Sep 2018 17:01:28 +0000
|
|
Subject: [PATCH 1/3] gnocchi: remove gnocchi upgrade option and set
|
|
coordination_url
|
|
|
|
- Remove the gnocchi upgrade option "--create-legacy-resource-types" as
|
|
it is deprecated since gnocchi 4.0.0
|
|
- Set the default coordination driver of gnocchi to memcached
|
|
---
|
|
gnocchi/templates/bin/_db-sync.sh.tpl | 2 +-
|
|
gnocchi/templates/configmap-etc.yaml | 6 ++++++
|
|
2 files changed, 7 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/gnocchi/templates/bin/_db-sync.sh.tpl b/gnocchi/templates/bin/_db-sync.sh.tpl
|
|
index a32db4e..0693ee2 100644
|
|
--- a/gnocchi/templates/bin/_db-sync.sh.tpl
|
|
+++ b/gnocchi/templates/bin/_db-sync.sh.tpl
|
|
@@ -18,4 +18,4 @@ limitations under the License.
|
|
|
|
set -ex
|
|
|
|
-exec gnocchi-upgrade --create-legacy-resource-types
|
|
+exec gnocchi-upgrade
|
|
diff --git a/gnocchi/templates/configmap-etc.yaml b/gnocchi/templates/configmap-etc.yaml
|
|
index 83d3f14..bdf6acc 100644
|
|
--- a/gnocchi/templates/configmap-etc.yaml
|
|
+++ b/gnocchi/templates/configmap-etc.yaml
|
|
@@ -50,6 +50,12 @@ limitations under the License.
|
|
{{- $_ := set .Values.conf.gnocchi.keystone_authtoken "password" .Values.endpoints.identity.auth.gnocchi.password -}}
|
|
{{- end -}}
|
|
|
|
+{{- if empty .Values.conf.gnocchi.DEFAULT.coordination_url -}}
|
|
+{{- $endpointUrl := tuple "oslo_cache" "internal" "memcache" . | include "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" }}
|
|
+{{- $driver := .Values.endpoints.oslo_cache.hosts.default -}}
|
|
+{{- $_ := printf "%s://%s" $driver $endpointUrl | set .Values.conf.gnocchi.DEFAULT "coordination_url" -}}
|
|
+{{- end -}}
|
|
+
|
|
{{- if empty .Values.conf.gnocchi.database.connection -}}
|
|
{{- $_ := tuple "oslo_db" "internal" "gnocchi" "mysql" . | include "helm-toolkit.endpoints.authenticated_endpoint_uri_lookup" | set .Values.conf.gnocchi.database "connection" -}}
|
|
{{- end -}}
|
|
--
|
|
1.8.3.1
|
|
|