From 61c1e58e23647f9462c8a6a0bf4a67c8e8eda451 Mon Sep 17 00:00:00 2001 From: Angie Wang Date: Wed, 20 Feb 2019 15:42:15 -0500 Subject: [PATCH] Few updates for gnocchi chart Without setting the coordination driver, the gnocchi worker will battle against other workers for jobs. This commit updates to use memcached as gnocchi's coordinator. This commit also removes the gnocchi upgrade option "--create-legacy- resource-types" in the chart which creates ceilometer resource types. The resource types creation is done by the ceilometer side during ceilometer-upgrade. The option was already removed since gnocchi 4.0.0. The missing image for gnocchi_resources_cleaner is added in this commit. Change-Id: I19b6a4da21d1fe9816759b836b73a14bacd373a8 Signed-off-by: Angie Wang --- gnocchi/templates/bin/_db-sync.sh.tpl | 2 +- gnocchi/templates/configmap-etc.yaml | 6 ++++++ gnocchi/values.yaml | 3 ++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/gnocchi/templates/bin/_db-sync.sh.tpl b/gnocchi/templates/bin/_db-sync.sh.tpl index a32db4ec4..0693ee27f 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 83d3f148d..bdf6accd3 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 -}} diff --git a/gnocchi/values.yaml b/gnocchi/values.yaml index 386282328..2d5f48b31 100644 --- a/gnocchi/values.yaml +++ b/gnocchi/values.yaml @@ -50,6 +50,7 @@ images: gnocchi_api: quay.io/attcomdev/ubuntu-source-gnocchi-api:3.0.3 gnocchi_statsd: quay.io/attcomdev/ubuntu-source-gnocchi-statsd:3.0.3 gnocchi_metricd: quay.io/attcomdev/ubuntu-source-gnocchi-metricd:3.0.3 + gnocchi_resources_cleaner: quay.io/attcomdev/ubuntu-source-gnocchi-base:3.0.3 image_repo_sync: docker.io/docker:17.07.0 pull_policy: "IfNotPresent" local_registry: @@ -599,7 +600,7 @@ endpoints: # and memcache service. memcache_secret_key: null hosts: - default: memcache + default: memcached host_fqdn_override: default: null port: