data-service.yaml 1.42 KB
Newer Older
1 2 3 4 5 6 7 8
apiVersion: v1
kind: Service
metadata:
  name: {{ template "influxdb-enterprise.fullname" . }}-data
  labels:
    influxdb.influxdata.com/component: data
    {{- include "influxdb-enterprise.labels" . | nindent 4 }}
spec:
9 10
  type: {{ .Values.data.service.type }}
{{- if (eq "ClusterIP" .Values.data.service.type) }}
11
  clusterIP: None
12
{{- end }}
13 14
  publishNotReadyAddresses: true
  ports:
15 16 17
  - port: 8086
    protocol: TCP
    name: http
18 19 20
  - port: 8088
    protocol: TCP
    name: rpc
21 22 23 24 25 26 27
  - port: 2003
    # Graphite supports TCP and UDP,
    # so this should __maybe__ be configurable
    # Though most use TCP
    protocol: TCP
    name: graphite
  - port: 4242
28
    protocol: TCP
29
    name: opentsdb
30 31 32
    # LoadBalancer service type only allows for one protocol
    # disbaling UDP ports
{{- if (ne "LoadBalancer" .Values.data.service.type) }}
33 34 35
  - port: 25826
    protocol: UDP
    name: collectd
36 37 38 39
  - port: 8089
    protocol: UDP
    name: udp
{{- end }}
40 41
  selector:
    influxdb.influxdata.com/component: data
42 43 44 45 46 47 48 49 50 51 52
{{- include "influxdb-enterprise.selectorLabels" . | nindent 4 }}
{{- if .Values.data.service.loadBalancerIP }}
  loadBalancerIP: {{ .Values.data.service.loadBalancerIP }}
{{- end }}
{{- if .Values.data.service.externalIPs }}
  externalIPs:
{{ toYaml .Values.data.service.externalIPs | indent 4 }}
{{- end }}
{{- if .Values.data.service.externalTrafficPolicy }}
  externalTrafficPolicy: {{ .Values.data.service.externalTrafficPolicy }}
{{- end }}