argocd-helm/charts/argo-cd/templates/argocd-applicationset/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
1,012 B
YAML

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