Issue-ID: RICAPP-169 - Inclusion of InfluxDB helm chart for KPIMON, AD, TS, QP xApps
[ric-plt/ric-dep.git] / helm / 3rdparty / influxdb / templates / service.yaml
1 ################################################################################
2 #   Copyright (c) 2021 HCL Technolgies Limited.                                #
3 #                                                                              #
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                                    #
7 #                                                                              #
8 #       http://www.apache.org/licenses/LICENSE-2.0                             #
9 #                                                                              #
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 ################################################################################
16 apiVersion: v1
17 kind: Service
18 metadata:
19 {{- if .Values.service.annotations }}
20   annotations:
21 {{ toYaml .Values.service.annotations | indent 4 }}
22 {{- end }}
23   name: {{ include "common.fullname.influxdb" . }}
24   labels:
25     {{- include "common.influxdb.labels" . | nindent 4 }}
26 spec:
27   type: {{ .Values.service.type }}
28   ports:
29   - name: api
30     port: {{ include "common.serviceport.influxdb.http.bind_address" . | default 8086 }}
31     targetPort: api
32   - name: rpc
33     port: {{ include "common.serviceport.influxdb.rpc.bind_address" . | default 8088 }}
34     targetPort: rpc
35   {{- if .Values.config.graphite.enabled }}
36   - name: graphite
37     port: {{ include "common.serviceport.influxdb.graphite.bind_address" . | default 2003 }}
38     targetPort: graphite
39   {{- end }}
40   {{- if .Values.config.collectd.enabled }}
41   - name: collectd
42     port: {{ include "common.serviceport.influxdb.collectd.bind_address" . | default 25826 }}
43     protocol: UDP
44     targetPort: collectd
45   {{- end }}
46   {{- if .Values.config.udp.enabled }}
47   - name: udp
48     port: {{ include "common.serviceport.influxdb.udp.bind_address" . | default 8089 }}
49     protocol: UDP
50     targetPort: udp
51   {{- end }}
52   {{- if .Values.config.opentsdb.enabled }}
53   - name: opentsdb
54     port: {{ include "common.serviceport.influxdb.opentsdb.bind_address" . | default 4242 }}
55     targetPort: opentsdb
56   {{- end }}
57   selector:
58     {{- include "common.influxdb.selectorLabels" . | nindent 4 }}
59 {{- if .Values.service.loadBalancerIP }}
60   loadBalancerIP: {{ .Values.service.loadBalancerIP }}
61 {{- end }}
62 {{- if .Values.service.externalIPs }}
63   externalIPs:
64 {{ toYaml .Values.service.externalIPs | indent 4 }}
65 {{- end }}
66 {{- if .Values.service.externalTrafficPolicy }}
67   externalTrafficPolicy: {{ .Values.service.externalTrafficPolicy }}
68 {{- end }}