From c7a6a9608057231d4bc30f2dbcf641a72f07fae1 Mon Sep 17 00:00:00 2001 From: Hyunkook Cho Date: Tue, 2 Apr 2019 20:11:01 +0900 Subject: [PATCH] Ceph: fix overriding ceph monitor hosts value all other charts that related with ceph have the logic to override the ceph monitor hosts. but storage class chart only has no logic to override the value. to use external ceph, it must be able to set manually the ceph host. Change-Id: Ib788e339606a2f7336a688aa276082503a18b04f Signed-off-by: Hyunkook Cho --- helm-toolkit/templates/manifests/_ceph-storageclass.tpl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/helm-toolkit/templates/manifests/_ceph-storageclass.tpl b/helm-toolkit/templates/manifests/_ceph-storageclass.tpl index 6266b37d0..1bd0a8c7f 100644 --- a/helm-toolkit/templates/manifests/_ceph-storageclass.tpl +++ b/helm-toolkit/templates/manifests/_ceph-storageclass.tpl @@ -87,6 +87,10 @@ examples: {{- define "helm-toolkit.manifests.ceph-storageclass" -}} {{- $envAll := index . "envAll" -}} +{{- $monHost := $envAll.Values.conf.ceph.global.mon_host -}} +{{- if empty $monHost -}} +{{- $monHost = tuple "ceph_mon" "internal" "mon" $envAll | include "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" -}} +{{- end -}} {{- $storageclassData := index . "storageclass_data" -}} --- {{- if $storageclassData.provision_storage_class }} @@ -100,7 +104,7 @@ metadata: name: {{ $storageclassData.metadata.name }} provisioner: {{ $storageclassData.provisioner }} parameters: - monitors: {{ tuple "ceph_mon" "internal" "mon" $envAll | include "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" }} + monitors: {{ $monHost }} {{- range $attr, $value := $storageclassData.parameters }} {{ $attr }}: {{ $value | quote }} {{- end }}