Issue-ID: RICAPP-169 - Inclusion of InfluxDB helm chart for KPIMON, AD, TS, QP xApps 16/6216/2
authorChandru <chandrasekaran-r@hcl.com>
Thu, 3 Jun 2021 11:00:33 +0000 (16:30 +0530)
committerChandru <chandrasekaran-r@hcl.com>
Thu, 10 Jun 2021 12:10:13 +0000 (17:40 +0530)
updated _influxdb.tpl into the common templates for it/dep repo

Signed-off-by: Chandru <chandrasekaran-r@hcl.com>
Change-Id: I396236007a63e783226ec3fe16a179cda934ef43

ric-common/Common-Template/helm/ric-common/templates/_influxdb.tpl

index 6801cee..c6be83c 100644 (file)
   {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}}\r
 {{- end -}}\r
 \r
-\r
-{{- define "common.deploymentname.influxdb" -}}\r
-  {{- $name := ( include "common.fullname.influxdb" . ) -}}\r
-  {{- printf "deployment-%s" $name | trunc 63 | trimSuffix "-" -}}\r
+{{- define "common.influxdb.chart" -}}\r
+{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}\r
 {{- end -}}\r
 \r
-{{- define "common.configmapname.influxdb" -}}\r
-  {{- $name := ( include "common.fullname.influxdb" . ) -}}\r
-  {{- printf "configmap-%s" $name | trunc 63 | trimSuffix "-" -}}\r
+{{- define "common.influxdb.labels" -}}\r
+helm.sh/chart: {{ include "common.influxdb.chart" . }}\r
+{{ include "common.influxdb.selectorLabels" . }}\r
+{{- if .Chart.AppVersion }}\r
+app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}\r
+{{- end }}\r
+app.kubernetes.io/managed-by: {{ .Release.Service }}\r
 {{- end -}}\r
 \r
-{{- define "common.containername.influxdb" -}}\r
-  {{- $name := ( include "common.fullname.influxdb" . ) -}}\r
-  {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}}\r
+{{- define "common.influxdb.selectorLabels" -}}\r
+app.kubernetes.io/name: {{ include "common.name.influxdb" . }}\r
+app.kubernetes.io/instance: {{ .Release.Name }}\r
 {{- end -}}\r
 \r
-\r
-{{- define "common.pvname.influxdb" -}}\r
-  {{- $name := ( include "common.fullname.influxdb" . ) -}}\r
-  {{- printf "pv-%s" $name | trunc 63 | trimSuffix "-" -}}\r
-{{- end -}}\r
-\r
-{{- define "common.pvcname.influxdb" -}}\r
-  {{- $name := ( include "common.fullname.influxdb" . ) -}}\r
-  {{- printf "pvc-%s" $name | trunc 63 | trimSuffix "-" -}}\r
-{{- end -}}\r
-\r
-\r
-{{- define "common.servicename.influxdb.http" -}}\r
+{{- define "common.influxdb.serviceAccountName" -}}\r
   {{- $name := ( include "common.fullname.influxdb" . ) -}}\r
   {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}}\r
 {{- end -}}\r
 \r
-\r
 {{- define "common.serviceport.influxdb.http" -}}8086{{- end -}}\r
 {{- define "common.serviceport.influxdb.meta.bind_address" -}}8091{{- end -}}\r
 {{- define "common.serviceport.influxdb.http.bind_address" -}}8086{{- end -}}\r
 {{- define "common.serviceport.influxdb.udp.bind_address" -}}8089{{- end -}}\r
 {{- define "common.serviceport.influxdb.opentsdb.bind_address" -}}4242{{- end -}}\r
 {{- define "common.serviceport.influxdb.collectd.bind_address" -}}25826{{- end -}}\r
-\r
-\r
-{{- define "common.serviceaccountname.influxdb" -}}\r
-  {{- $name := ( include "common.fullname.influxdb" . ) -}}\r
-  {{- printf "svcacct-%s" $name | trunc 63 | trimSuffix "-" -}}\r
-{{- end -}}\r
-\r
-\r
-{{- define "common.ingressname.influxdb" -}}\r
-  {{- $name := ( include "common.fullname.influxdb" . ) -}}\r
-  {{- printf "ingress-%s" $name | trunc 63 | trimSuffix "-" -}}\r
-{{- end -}}\r