blob: d226f2d117168b4b1c917e17a1aa59e72adb35e0 [file] [log] [blame]
Chandrasekaran Ramachandranb515b962021-06-11 16:07:09 +05301################################################################################
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################################################################################
Chandru22ebf742021-06-02 17:16:37 +053016apiVersion: v1
17kind: Service
18metadata:
19{{- if .Values.service.annotations }}
20 annotations:
21{{ toYaml .Values.service.annotations | indent 4 }}
22{{- end }}
Chandrasekaran Ramachandranb515b962021-06-11 16:07:09 +053023 name: {{ include "common.fullname.influxdb" . }}
Chandru22ebf742021-06-02 17:16:37 +053024 labels:
Chandrasekaran Ramachandranb515b962021-06-11 16:07:09 +053025 {{- include "common.influxdb.labels" . | nindent 4 }}
Chandru22ebf742021-06-02 17:16:37 +053026spec:
27 type: {{ .Values.service.type }}
28 ports:
29 - name: api
Chandrasekaran Ramachandranb515b962021-06-11 16:07:09 +053030 port: {{ include "common.serviceport.influxdb.http.bind_address" . | default 8086 }}
Chandru22ebf742021-06-02 17:16:37 +053031 targetPort: api
32 - name: rpc
Chandrasekaran Ramachandranb515b962021-06-11 16:07:09 +053033 port: {{ include "common.serviceport.influxdb.rpc.bind_address" . | default 8088 }}
Chandru22ebf742021-06-02 17:16:37 +053034 targetPort: rpc
35 {{- if .Values.config.graphite.enabled }}
36 - name: graphite
Chandrasekaran Ramachandranb515b962021-06-11 16:07:09 +053037 port: {{ include "common.serviceport.influxdb.graphite.bind_address" . | default 2003 }}
Chandru22ebf742021-06-02 17:16:37 +053038 targetPort: graphite
39 {{- end }}
40 {{- if .Values.config.collectd.enabled }}
41 - name: collectd
Chandrasekaran Ramachandranb515b962021-06-11 16:07:09 +053042 port: {{ include "common.serviceport.influxdb.collectd.bind_address" . | default 25826 }}
Chandru22ebf742021-06-02 17:16:37 +053043 protocol: UDP
44 targetPort: collectd
45 {{- end }}
46 {{- if .Values.config.udp.enabled }}
47 - name: udp
Chandrasekaran Ramachandranb515b962021-06-11 16:07:09 +053048 port: {{ include "common.serviceport.influxdb.udp.bind_address" . | default 8089 }}
Chandru22ebf742021-06-02 17:16:37 +053049 protocol: UDP
50 targetPort: udp
51 {{- end }}
52 {{- if .Values.config.opentsdb.enabled }}
53 - name: opentsdb
Chandrasekaran Ramachandranb515b962021-06-11 16:07:09 +053054 port: {{ include "common.serviceport.influxdb.opentsdb.bind_address" . | default 4242 }}
Chandru22ebf742021-06-02 17:16:37 +053055 targetPort: opentsdb
56 {{- end }}
57 selector:
Chandrasekaran Ramachandranb515b962021-06-11 16:07:09 +053058 {{- include "common.influxdb.selectorLabels" . | nindent 4 }}
Chandru22ebf742021-06-02 17:16:37 +053059{{- 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 }}