1 ################################################################################
2 # Copyright (c) 2021 HCL Technologies Limited. #
4 # Licensed under the Apache License, Version 2.0 (the "License"); #
5 # you may not use this file except in compliance with the License. #
6 # You may obtain a copy of the License at #
8 # http://www.apache.org/licenses/LICENSE-2.0 #
10 # Unless required by applicable law or agreed to in writing, software #
11 # distributed under the License is distributed on an "AS IS" BASIS, #
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
13 # See the License for the specific language governing permissions and #
14 # limitations under the License. #
15 ################################################################################
17 {{- define "common.name.influxdb" -}}
18 {{- printf "influxdb" -}}
21 {{- define "common.fullname.influxdb" -}}
22 {{- $name := ( include "common.name.influxdb" . ) -}}
23 {{- $namespace := ( include "common.namespace.platform" . ) -}}
24 {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}}
27 {{- define "common.influxdb.chart" -}}
28 {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
31 {{- define "common.influxdb.labels" -}}
32 helm.sh/chart: {{ include "common.influxdb.chart" . }}
33 {{ include "common.influxdb.selectorLabels" . }}
34 {{- if .Chart.AppVersion }}
35 app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
37 app.kubernetes.io/managed-by: {{ .Release.Service }}
40 {{- define "common.influxdb.selectorLabels" -}}
41 app.kubernetes.io/name: {{ include "common.name.influxdb" . }}
42 app.kubernetes.io/instance: {{ .Release.Name }}
45 {{- define "common.influxdb.serviceAccountName" -}}
46 {{- $name := ( include "common.fullname.influxdb" . ) -}}
47 {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}}
50 {{- define "common.serviceport.influxdb.http" -}}8086{{- end -}}
51 {{- define "common.serviceport.influxdb.meta.bind_address" -}}8091{{- end -}}
52 {{- define "common.serviceport.influxdb.http.bind_address" -}}8086{{- end -}}
53 {{- define "common.serviceport.influxdb.rpc.bind_address" -}}8088{{- end -}}
54 {{- define "common.serviceport.influxdb.graphite.bind_address" -}}2003{{- end -}}
55 {{- define "common.serviceport.influxdb.udp.bind_address" -}}8089{{- end -}}
56 {{- define "common.serviceport.influxdb.opentsdb.bind_address" -}}4242{{- end -}}
57 {{- define "common.serviceport.influxdb.collectd.bind_address" -}}25826{{- end -}}