aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--vnfs/DAaaS/collectd-helm/Chart.yaml1
-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
-rw-r--r--vnfs/DAaaS/collectd-helm/values.yaml8
5 files changed, 24 insertions, 8 deletions
diff --git a/vnfs/DAaaS/collectd-helm/Chart.yaml b/vnfs/DAaaS/collectd-helm/Chart.yaml
index 9b514796..2206284c 100644
--- a/vnfs/DAaaS/collectd-helm/Chart.yaml
+++ b/vnfs/DAaaS/collectd-helm/Chart.yaml
@@ -13,6 +13,7 @@
# limitations under the License.
apiVersion: v1
+appVersion: "0.1.0"
description: Collectd Helm Chart
name: collectd
version: 0.1.0
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
diff --git a/vnfs/DAaaS/collectd-helm/values.yaml b/vnfs/DAaaS/collectd-helm/values.yaml
index 6a1138d1..7c2eb669 100644
--- a/vnfs/DAaaS/collectd-helm/values.yaml
+++ b/vnfs/DAaaS/collectd-helm/values.yaml
@@ -17,4 +17,10 @@ resources: {}
# requests:
# cpu: 100m
# memory: 128Mi
-prometheus_port: 9103
+collectd_prometheus:
+ service:
+ port: 9103
+ targetPort: 9103
+ selector:
+ app: collectd
+ collector: collectd