2023-07-17 16:53:41 +00:00
|
|
|
{{- /*
|
|
|
|
Copyright VMware, Inc.
|
|
|
|
SPDX-License-Identifier: APACHE-2.0
|
|
|
|
*/}}
|
|
|
|
|
2022-10-26 15:53:33 +00:00
|
|
|
{{- if .Values.metrics.enabled }}
|
|
|
|
apiVersion: v1
|
|
|
|
kind: Service
|
|
|
|
metadata:
|
|
|
|
name: {{ template "common.names.fullname" . }}-metrics
|
|
|
|
namespace: {{ template "zookeeper.namespace" . }}
|
2023-08-24 14:41:28 +00:00
|
|
|
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
|
2022-10-26 15:53:33 +00:00
|
|
|
app.kubernetes.io/component: metrics
|
|
|
|
{{- if or .Values.metrics.service.annotations .Values.commonAnnotations }}
|
2023-09-13 13:36:39 +00:00
|
|
|
{{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.metrics.service.annotations .Values.commonAnnotations ) "context" . ) }}
|
2023-08-24 14:41:28 +00:00
|
|
|
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
|
2022-10-26 15:53:33 +00:00
|
|
|
{{- end }}
|
|
|
|
spec:
|
|
|
|
type: {{ .Values.metrics.service.type }}
|
|
|
|
ports:
|
|
|
|
- name: tcp-metrics
|
|
|
|
port: {{ .Values.metrics.service.port }}
|
|
|
|
targetPort: metrics
|
2023-09-13 13:36:39 +00:00
|
|
|
{{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.podLabels .Values.commonLabels ) "context" . ) }}
|
2023-08-24 14:41:28 +00:00
|
|
|
selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }}
|
2022-10-26 15:53:33 +00:00
|
|
|
app.kubernetes.io/component: zookeeper
|
|
|
|
{{- end }}
|