diff --git a/common/templates/_funcs.tpl b/common/templates/_funcs.tpl index 87646f8c..86c2bd30 100644 --- a/common/templates/_funcs.tpl +++ b/common/templates/_funcs.tpl @@ -1,3 +1,7 @@ +{{- define "joinListWithColon" -}} +{{ range $k, $v := . }}{{ if $k }},{{ end }}{{ $v }}{{ end }} +{{- end -}} + {{- define "template" -}} {{- $name := index . 0 -}} {{- $context := index . 1 -}} diff --git a/horizon/templates/deployment.yaml b/horizon/templates/deployment.yaml index cb78e70b..76b6288a 100644 --- a/horizon/templates/deployment.yaml +++ b/horizon/templates/deployment.yaml @@ -21,7 +21,7 @@ spec: }, { "name": "DEPENDENCY_SERVICE", - "value": "memcached,keystone-api" + "value": "{{ include "joinListWithColon" .Values.dependencies.dashboard.service }}" }, { "name": "COMMAND", diff --git a/horizon/values.yaml b/horizon/values.yaml index 45570fd9..be34ef7f 100644 --- a/horizon/values.yaml +++ b/horizon/values.yaml @@ -21,6 +21,12 @@ local_settings: horizon_secret_key: 9aee62c0-5253-4a86-b189-e0fb71fa503c debug: "True" +dependencies: + dashboard: + service: + - memcached + - keystone-api + # typically overriden by environmental # values, but should include all endpoints # required by this chart @@ -34,3 +40,4 @@ endpoints: port: admin: 35356 public: 5000 +