summaryrefslogtreecommitdiffstats
path: root/deployments/helm/v2/onap4k8s/fluentd/templates/metrics-svc.yaml
blob: 2b0c92f1d40d538b37d05cc0646cab0deaa2a679 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{{- if .Values.metrics.enabled }}
apiVersion: v1
kind: Service
metadata:
  name: {{ include "fluentd.fullname" . }}-metrics
  labels: {{- include "fluentd.labels" . | nindent 4 }}
  annotations: {{- include "fluentd.tplValue" (dict "value" .Values.metrics.service.annotations "context" $) | nindent 4 }}
spec:
  type: {{ .Values.metrics.service.type }}
  {{- if and (eq .Values.metrics.service.type "LoadBalancer") .Values.metrics.service.loadBalancerIP }}
  loadBalancerIP: {{ .Values.metrics.service.loadBalancerIP }}
  {{- end }}
  ports:
    - name: metrics
      port: {{ .Values.metrics.service.port }}
      targetPort: metrics
  selector: {{- include "fluentd.matchLabels" . | nindent 4 }}
{{- end }}