github.com/verrazzano/verrazzano@v1.7.0/platform-operator/thirdparty/charts/argo-cd/templates/argocd-notifications/metrics.yaml (about)

     1  {{- if and .Values.notifications.enabled .Values.notifications.metrics.enabled }}
     2  apiVersion: v1
     3  kind: Service
     4  metadata:
     5    name: {{ include "argo-cd.notifications.fullname" . }}-metrics
     6    namespace: {{ .Release.Namespace | quote }}
     7    labels:
     8      {{- include "argo-cd.labels" (dict "context" . "component" .Values.notifications.name "name" "metrics") | nindent 4 }}
     9      {{- with .Values.notifications.metrics.service.labels }}
    10        {{- toYaml . | nindent 4 }}
    11      {{- end }}
    12    {{- if or .Values.notifications.metrics.service.annotations .Values.global.addPrometheusAnnotations }}
    13    annotations:
    14      {{- if .Values.global.addPrometheusAnnotations }}
    15      prometheus.io/port: {{ .Values.notifications.metrics.port | quote }}
    16      prometheus.io/scrape: "true"
    17      {{- end }}
    18      {{- range $key, $value := .Values.notifications.metrics.service.annotations }}
    19      {{ $key }}: {{ $value | quote }}
    20      {{- end }}
    21    {{- end }}
    22  spec:
    23    type: {{ .Values.notifications.metrics.service.type }}
    24    {{- if and .Values.notifications.metrics.service.clusterIP (eq .Values.notifications.metrics.service.type "ClusterIP") }}
    25    clusterIP: {{ .Values.notifications.metrics.service.clusterIP }}
    26    {{- end }}
    27    selector:
    28      {{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.notifications.name) | nindent 6 }}
    29    ports:
    30    - name: {{ .Values.notifications.metrics.service.portName }}
    31      protocol: TCP
    32      port: {{ .Values.notifications.metrics.port }}
    33      targetPort: metrics
    34  {{- end }}