argocd-helm/charts/argocd-applicationset/templates/metrics-service.yaml

26 lines
722 B
YAML
Raw Normal View History

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