blob: 5c7cb8aae605043dee3c4e0ba2c236be0e321fc6 [file] [log] [blame]
Oleksandr Kozachenkob0093492023-09-06 21:43:47 +02001{{- /*
2Copyright VMware, Inc.
3SPDX-License-Identifier: APACHE-2.0
4*/}}
5
6{{- if .Values.metrics.enabled }}
7apiVersion: v1
8kind: Service
9metadata:
10 name: {{ printf "%s-metrics" (include "common.names.fullname" .) }}
11 namespace: {{ include "common.names.namespace" . | quote }}
12 labels: {{- include "common.labels.standard" . | nindent 4 }}
13 app.kubernetes.io/component: metrics
14 {{- if .Values.commonLabels }}
15 {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
16 {{- end }}
17 {{- if or .Values.metrics.service.annotations .Values.commonAnnotations }}
18 annotations:
19 {{- if .Values.metrics.service.annotations }}
20 {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.service.annotations "context" $ ) | nindent 4 }}
21 {{- end }}
22 {{- if .Values.commonAnnotations }}
23 {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
24 {{- end }}
25 {{- end }}
26spec:
27 type: ClusterIP
28 ports:
29 - name: http
30 port: {{ coalesce .Values.metrics.service.ports.http .Values.metrics.service.port }}
31 protocol: TCP
32 targetPort: http
33 selector: {{- include "common.labels.matchLabels" . | nindent 4 }}
34 app.kubernetes.io/component: keycloak
35{{- end }}