aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDileep Ranganathan <dileep.ranganathan@intel.com>2019-02-13 05:18:56 -0800
committerDileep Ranganathan <dileep.ranganathan@intel.com>2019-02-13 05:18:56 -0800
commit1dcbaf358f82777ccee965b3e3556250270eaed2 (patch)
tree34da72fee1f096c179a75d25d985bce1338fb171
parent9ab9b4283bd8688c5d4c0e8636520a358df97e67 (diff)
Fix collectd helm chart
Fix collectd prometheus integration by adding correct labels. Added template helper function for helm chart. Updated Chart appVersion, NOTES. Initial Helm charts for CollectD, Prometheus Operator, Kafka Strimzi operator, Rook Ceph Operator. Change-Id: I511fc415bf2f2ab4b92d7501f3d3a1e6b6f82581 Issue-ID: ONAPARC-366 Signed-off-by: Dileep Ranganathan <dileep.ranganathan@intel.com>
-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