aboutsummaryrefslogtreecommitdiffstats
path: root/vnfs/DAaaS/collectd-helm/templates
diff options
context:
space:
mode:
Diffstat (limited to 'vnfs/DAaaS/collectd-helm/templates')
-rw-r--r--vnfs/DAaaS/collectd-helm/templates/NOTES.txt3
-rw-r--r--vnfs/DAaaS/collectd-helm/templates/_helpers.tpl9
-rw-r--r--vnfs/DAaaS/collectd-helm/templates/service.yaml11
3 files changed, 16 insertions, 7 deletions
diff --git a/vnfs/DAaaS/collectd-helm/templates/NOTES.txt b/vnfs/DAaaS/collectd-helm/templates/NOTES.txt
index 3ad21a5b..d96bc7d2 100644
--- a/vnfs/DAaaS/collectd-helm/templates/NOTES.txt
+++ b/vnfs/DAaaS/collectd-helm/templates/NOTES.txt
@@ -1 +1,2 @@
-1. Collect Charts
+1. Collect Charts has been installed
+2. Collectd prometheus metrics endpoint {{ .Values.collectd_prometheus.service.port}}
diff --git a/vnfs/DAaaS/collectd-helm/templates/_helpers.tpl b/vnfs/DAaaS/collectd-helm/templates/_helpers.tpl
index f0d83d2e..b5e98086 100644
--- a/vnfs/DAaaS/collectd-helm/templates/_helpers.tpl
+++ b/vnfs/DAaaS/collectd-helm/templates/_helpers.tpl
@@ -14,3 +14,12 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
+
+{{/* Workaround for https://github.com/helm/helm/issues/3117 */}}
+{{- define "rangeskipempty" -}}
+{{- range $key, $value := . }}
+{{- if $value }}
+{{ $key }}: {{ $value }}
+{{- end }}
+{{- end }}
+{{- end }} \ No newline at end of file
diff --git a/vnfs/DAaaS/collectd-helm/templates/service.yaml b/vnfs/DAaaS/collectd-helm/templates/service.yaml
index 6ae6f098..b4231af3 100644
--- a/vnfs/DAaaS/collectd-helm/templates/service.yaml
+++ b/vnfs/DAaaS/collectd-helm/templates/service.yaml
@@ -8,10 +8,9 @@ metadata:
spec:
ports:
- name: collectd-prometheus
- port: {{ .Values.prometheus_port }}
- targetPort: collectd
+ port: {{ .Values.collectd_prometheus.service.port }}
+ protocol: TCP
+ targetPort: {{ .Values.collectd_prometheus.service.targetPort }}
selector:
- app: {{ template "name" . }}
- collector: collectd
- release: {{ .Release.Name }}
- type: ClusterIP
+{{ include "rangeskipempty" .Values.collectd_prometheus.service.selector | indent 4 }}
+ type: ClusterIP \ No newline at end of file