Chandrasekaran Ramachandran | b515b96 | 2021-06-11 16:07:09 +0530 | [diff] [blame^] | 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 | ################################################################################ |
Chandru | 22ebf74 | 2021-06-02 17:16:37 +0530 | [diff] [blame] | 16 | apiVersion: v1 |
| 17 | kind: Service |
| 18 | metadata: |
| 19 | {{- if .Values.service.annotations }} |
| 20 | annotations: |
| 21 | {{ toYaml .Values.service.annotations | indent 4 }} |
| 22 | {{- end }} |
Chandrasekaran Ramachandran | b515b96 | 2021-06-11 16:07:09 +0530 | [diff] [blame^] | 23 | name: {{ include "common.fullname.influxdb" . }} |
Chandru | 22ebf74 | 2021-06-02 17:16:37 +0530 | [diff] [blame] | 24 | labels: |
Chandrasekaran Ramachandran | b515b96 | 2021-06-11 16:07:09 +0530 | [diff] [blame^] | 25 | {{- include "common.influxdb.labels" . | nindent 4 }} |
Chandru | 22ebf74 | 2021-06-02 17:16:37 +0530 | [diff] [blame] | 26 | spec: |
| 27 | type: {{ .Values.service.type }} |
| 28 | ports: |
| 29 | - name: api |
Chandrasekaran Ramachandran | b515b96 | 2021-06-11 16:07:09 +0530 | [diff] [blame^] | 30 | port: {{ include "common.serviceport.influxdb.http.bind_address" . | default 8086 }} |
Chandru | 22ebf74 | 2021-06-02 17:16:37 +0530 | [diff] [blame] | 31 | targetPort: api |
| 32 | - name: rpc |
Chandrasekaran Ramachandran | b515b96 | 2021-06-11 16:07:09 +0530 | [diff] [blame^] | 33 | port: {{ include "common.serviceport.influxdb.rpc.bind_address" . | default 8088 }} |
Chandru | 22ebf74 | 2021-06-02 17:16:37 +0530 | [diff] [blame] | 34 | targetPort: rpc |
| 35 | {{- if .Values.config.graphite.enabled }} |
| 36 | - name: graphite |
Chandrasekaran Ramachandran | b515b96 | 2021-06-11 16:07:09 +0530 | [diff] [blame^] | 37 | port: {{ include "common.serviceport.influxdb.graphite.bind_address" . | default 2003 }} |
Chandru | 22ebf74 | 2021-06-02 17:16:37 +0530 | [diff] [blame] | 38 | targetPort: graphite |
| 39 | {{- end }} |
| 40 | {{- if .Values.config.collectd.enabled }} |
| 41 | - name: collectd |
Chandrasekaran Ramachandran | b515b96 | 2021-06-11 16:07:09 +0530 | [diff] [blame^] | 42 | port: {{ include "common.serviceport.influxdb.collectd.bind_address" . | default 25826 }} |
Chandru | 22ebf74 | 2021-06-02 17:16:37 +0530 | [diff] [blame] | 43 | protocol: UDP |
| 44 | targetPort: collectd |
| 45 | {{- end }} |
| 46 | {{- if .Values.config.udp.enabled }} |
| 47 | - name: udp |
Chandrasekaran Ramachandran | b515b96 | 2021-06-11 16:07:09 +0530 | [diff] [blame^] | 48 | port: {{ include "common.serviceport.influxdb.udp.bind_address" . | default 8089 }} |
Chandru | 22ebf74 | 2021-06-02 17:16:37 +0530 | [diff] [blame] | 49 | protocol: UDP |
| 50 | targetPort: udp |
| 51 | {{- end }} |
| 52 | {{- if .Values.config.opentsdb.enabled }} |
| 53 | - name: opentsdb |
Chandrasekaran Ramachandran | b515b96 | 2021-06-11 16:07:09 +0530 | [diff] [blame^] | 54 | port: {{ include "common.serviceport.influxdb.opentsdb.bind_address" . | default 4242 }} |
Chandru | 22ebf74 | 2021-06-02 17:16:37 +0530 | [diff] [blame] | 55 | targetPort: opentsdb |
| 56 | {{- end }} |
| 57 | selector: |
Chandrasekaran Ramachandran | b515b96 | 2021-06-11 16:07:09 +0530 | [diff] [blame^] | 58 | {{- include "common.influxdb.selectorLabels" . | nindent 4 }} |
Chandru | 22ebf74 | 2021-06-02 17:16:37 +0530 | [diff] [blame] | 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 }} |