c5121e5e1479def92721b01cc41a8c2f5c6ef42e
[ric-plt/ric-dep.git] / helm / 3rdparty / influxdb / templates / service.yaml
1 apiVersion: v1
2 kind: Service
3 metadata:
4 {{- if .Values.service.annotations }}
5   annotations:
6 {{ toYaml .Values.service.annotations | indent 4 }}
7 {{- end }}
8   name: {{ include "influxdb.fullname" . }}
9   labels:
10     {{- include "influxdb.labels" . | nindent 4 }}
11 spec:
12   type: {{ .Values.service.type }}
13   ports:
14   - name: api
15     port: {{ .Values.config.http.bind_address | default 8086 }}
16     targetPort: api
17   - name: rpc
18     port: {{ .Values.config.rpc.bind_address | default 8088 }}
19     targetPort: rpc
20   {{- if .Values.config.graphite.enabled }}
21   - name: graphite
22     port: {{ .Values.config.graphite.bind_address | default 2003 }}
23     targetPort: graphite
24   {{- end }}
25   {{- if .Values.config.collectd.enabled }}
26   - name: collectd
27     port: {{ .Values.config.collectd.bind_address | default 25826 }}
28     protocol: UDP
29     targetPort: collectd
30   {{- end }}
31   {{- if .Values.config.udp.enabled }}
32   - name: udp
33     port: {{ .Values.config.udp.bind_address | default 8089 }}
34     protocol: UDP
35     targetPort: udp
36   {{- end }}
37   {{- if .Values.config.opentsdb.enabled }}
38   - name: opentsdb
39     port: {{ .Values.config.opentsdb.bind_address | default 4242 }}
40     targetPort: opentsdb
41   {{- end }}
42   selector:
43     {{- include "influxdb.selectorLabels" . | nindent 4 }}
44 {{- if .Values.service.loadBalancerIP }}
45   loadBalancerIP: {{ .Values.service.loadBalancerIP }}
46 {{- end }}
47 {{- if .Values.service.externalIPs }}
48   externalIPs:
49 {{ toYaml .Values.service.externalIPs | indent 4 }}
50 {{- end }}
51 {{- if .Values.service.externalTrafficPolicy }}
52   externalTrafficPolicy: {{ .Values.service.externalTrafficPolicy }}
53 {{- end }}