From a3634176a69d82a584dc95f511bb06510a1568bb Mon Sep 17 00:00:00 2001 From: Chandru Date: Thu, 3 Jun 2021 16:30:33 +0530 Subject: [PATCH] Issue-ID: RICAPP-169 - Inclusion of InfluxDB helm chart for KPIMON, AD, TS, QP xApps updated _influxdb.tpl into the common templates for it/dep repo Signed-off-by: Chandru Change-Id: I396236007a63e783226ec3fe16a179cda934ef43 --- .../helm/ric-common/templates/_influxdb.tpl | 49 ++++++---------------- 1 file changed, 13 insertions(+), 36 deletions(-) diff --git a/ric-common/Common-Template/helm/ric-common/templates/_influxdb.tpl b/ric-common/Common-Template/helm/ric-common/templates/_influxdb.tpl index 6801ceef..c6be83cb 100644 --- a/ric-common/Common-Template/helm/ric-common/templates/_influxdb.tpl +++ b/ric-common/Common-Template/helm/ric-common/templates/_influxdb.tpl @@ -24,40 +24,29 @@ {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}} {{- end -}} - -{{- define "common.deploymentname.influxdb" -}} - {{- $name := ( include "common.fullname.influxdb" . ) -}} - {{- printf "deployment-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- define "common.influxdb.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} {{- end -}} -{{- define "common.configmapname.influxdb" -}} - {{- $name := ( include "common.fullname.influxdb" . ) -}} - {{- printf "configmap-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- define "common.influxdb.labels" -}} +helm.sh/chart: {{ include "common.influxdb.chart" . }} +{{ include "common.influxdb.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} {{- end -}} -{{- define "common.containername.influxdb" -}} - {{- $name := ( include "common.fullname.influxdb" . ) -}} - {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- define "common.influxdb.selectorLabels" -}} +app.kubernetes.io/name: {{ include "common.name.influxdb" . }} +app.kubernetes.io/instance: {{ .Release.Name }} {{- end -}} - -{{- define "common.pvname.influxdb" -}} - {{- $name := ( include "common.fullname.influxdb" . ) -}} - {{- printf "pv-%s" $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{- define "common.pvcname.influxdb" -}} - {{- $name := ( include "common.fullname.influxdb" . ) -}} - {{- printf "pvc-%s" $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} - - -{{- define "common.servicename.influxdb.http" -}} +{{- define "common.influxdb.serviceAccountName" -}} {{- $name := ( include "common.fullname.influxdb" . ) -}} {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}} {{- end -}} - {{- define "common.serviceport.influxdb.http" -}}8086{{- end -}} {{- define "common.serviceport.influxdb.meta.bind_address" -}}8091{{- end -}} {{- define "common.serviceport.influxdb.http.bind_address" -}}8086{{- end -}} @@ -66,15 +55,3 @@ {{- define "common.serviceport.influxdb.udp.bind_address" -}}8089{{- end -}} {{- define "common.serviceport.influxdb.opentsdb.bind_address" -}}4242{{- end -}} {{- define "common.serviceport.influxdb.collectd.bind_address" -}}25826{{- end -}} - - -{{- define "common.serviceaccountname.influxdb" -}} - {{- $name := ( include "common.fullname.influxdb" . ) -}} - {{- printf "svcacct-%s" $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} - - -{{- define "common.ingressname.influxdb" -}} - {{- $name := ( include "common.fullname.influxdb" . ) -}} - {{- printf "ingress-%s" $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -- 2.16.6