argocd-helm/charts/argo-cd/templates/argocd-notifications/metrics.yaml
Petr Drastil 8c50158952
chore(argo-cd): Rename metrics templates (#1556)
Signed-off-by: Petr Drastil <petr.drastil@gmail.com>

Signed-off-by: Petr Drastil <petr.drastil@gmail.com>
2022-10-22 13:59:23 +01:00

25 lines
977 B
YAML

{{- if and .Values.notifications.enabled .Values.notifications.metrics.enabled }}
apiVersion: v1
kind: Service
metadata:
name: {{ template "argo-cd.notifications.fullname" . }}-metrics
labels:
{{- include "argo-cd.labels" (dict "context" . "component" .Values.notifications.name "name" "metrics") | nindent 4 }}
{{- if .Values.notifications.metrics.service.labels }}
{{- toYaml .Values.notifications.metrics.service.labels | nindent 4 }}
{{- end }}
{{- if .Values.notifications.metrics.service.annotations }}
annotations:
{{- range $key, $value := .Values.notifications.metrics.service.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
spec:
selector:
{{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.notifications.name) | nindent 6 }}
ports:
- name: {{ .Values.notifications.metrics.service.portName }}
protocol: TCP
port: {{ .Values.notifications.metrics.port }}
targetPort: metrics
{{- end }}