service.yaml 758 Bytes
Newer Older
shanewxy's avatar
shanewxy committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
{{- if .Values.service }}
apiVersion: v1
kind: Service
metadata:
  name: {{ template "fluentd.fullname" . }}
  labels:
    app: {{ template "fluentd.name" . }}
    chart: {{ template "fluentd.version" . }}
    release: {{ .Release.Name }}
    heritage: {{ .Release.Service }}
spec:
  type: {{ .Values.service.type }}
  ports:
  {{- range $port := .Values.service.ports }}
    - name: {{ $port.name }}
      port: {{ $port.port }}
      targetPort: {{ $port.port }}
      {{- if $port.nodePort }}
      nodePort: {{ $port.nodePort }}
      {{- end }}
      {{- if $port.protocol }}
      protocol: {{ $port.protocol }}
      {{- end }}
  {{- end }}
  selector:
    app: {{ template "fluentd.name" . }}
    chart: {{ template "fluentd.version" . }}
{{- end }}