aboutsummaryrefslogtreecommitdiffstats
path: root/deployments/helm/v2/onap4k8s/fluentd/templates/aggregator-svc.yaml
blob: 4ae43793a460065bc0e3b780d7f376cdd82e7fbf (plain)
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
29
30
31
32
{{- if and .Values.aggregator.enabled .Values.aggregator.service.ports }}
apiVersion: v1
kind: Service
metadata:
  name: {{ include "fluentd.fullname" . }}-aggregator
  labels: {{- include "fluentd.labels" . | nindent 4 }}
    app.kubernetes.io/component: aggregator
  {{- if .Values.aggregator.service.annotations }}
  annotations: {{- include "fluentd.tplValue" (dict "value" .Values.aggregator.service.annotations "context" $) | nindent 4 }}
  {{- end }}
spec:
  type: {{ .Values.aggregator.service.type }}
  {{- if and .Values.aggregator.service.loadBalancerIP (eq .Values.aggregator.service.type "LoadBalancer") }}
  loadBalancerIP: {{ .Values.aggregator.service.loadBalancerIP }}
  {{- end }}
  {{- if and .Values.aggregator.service.loadBalancerSourceRanges (eq .Values.aggregator.service.type "LoadBalancer") }}
  loadBalancerSourceRanges:
  {{- with .Values.aggregator.service.loadBalancerSourceRanges }}
    {{ toYaml . | nindent 4 }}
  {{- end }}
  {{- end }}
  {{- if and (eq .Values.aggregator.service.type "ClusterIP") .Values.aggregator.service.clusterIP }}
  clusterIP: {{ .Values.aggregator.service.clusterIP }}
  {{- end }}
  ports:
  {{- range $key, $value := .Values.aggregator.service.ports }}
    - name: {{ $key }}
      {{ toYaml $value | nindent 6 }}
  {{- end }}
  selector: {{ include "fluentd.matchLabels" . | nindent 4 }}
    app.kubernetes.io/component: aggregator
{{- end }}