Files
charts/bitnami/memcached/templates/svc-metrics.yaml
Alexandr Ovsyankin 49ddc92784 bitnami/memcached: hardcoded port of livenessProbe and readinessProbe was changed in favor using variables (#7719)
* hardcoded port of livenessProbe and readinessProbe was changed in favor using values

* hardcoded metrics and memcached portName of service, svs-metrics and servicemonitor was changed in favor using values

Co-authored-by: Alexandr Ovsyankin <reinstall.msk@gmail.com>
2021-10-07 08:34:14 +02:00

27 lines
1.0 KiB
YAML

{{- if .Values.metrics.enabled }}
apiVersion: v1
kind: Service
metadata:
name: {{ template "common.names.fullname" . }}-metrics
namespace: {{ .Release.Namespace }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/component: metrics
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
annotations:
{{- if .Values.commonAnnotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.metrics.service.annotations }}
{{- include "common.tplvalues.render" (dict "value" .Values.metrics.service.annotations "context" $) | nindent 4 }}
{{- end }}
spec:
type: {{ .Values.metrics.service.type }}
ports:
- name: metrics
port: {{ .Values.metrics.service.port }}
targetPort: {{ .Values.metrics.portName }}
selector: {{- include "common.labels.matchLabels" . | nindent 4 }}
{{- end }}