github.com/verrazzano/verrazzano@v1.7.0/platform-operator/thirdparty/charts/argo-cd/templates/argocd-applicationset/servicemonitor.yaml (about) 1 {{- if .Values.applicationSet.enabled }} 2 {{- if and (.Capabilities.APIVersions.Has "monitoring.coreos.com/v1") .Values.applicationSet.metrics.enabled .Values.applicationSet.metrics.serviceMonitor.enabled }} 3 apiVersion: monitoring.coreos.com/v1 4 kind: ServiceMonitor 5 metadata: 6 name: {{ template "argo-cd.applicationSet.fullname" . }} 7 namespace: {{ default .Release.Namespace .Values.applicationSet.metrics.serviceMonitor.namespace | quote }} 8 labels: 9 {{- include "argo-cd.labels" (dict "context" . "component" .Values.applicationSet.name "name" .Values.applicationSet.name) | nindent 4 }} 10 {{- with .Values.applicationSet.metrics.serviceMonitor.selector }} 11 {{- toYaml . | nindent 4 }} 12 {{- end }} 13 {{- with .Values.applicationSet.metrics.serviceMonitor.additionalLabels }} 14 {{- toYaml . | nindent 4 }} 15 {{- end }} 16 {{- with .Values.applicationSet.metrics.serviceMonitor.annotations }} 17 annotations: 18 {{- toYaml . | nindent 4 }} 19 {{- end }} 20 spec: 21 endpoints: 22 - port: {{ .Values.applicationSet.metrics.service.portName }} 23 {{- with .Values.applicationSet.metrics.serviceMonitor.interval }} 24 interval: {{ . }} 25 {{- end }} 26 path: /metrics 27 {{- with .Values.applicationSet.metrics.serviceMonitor.relabelings }} 28 relabelings: 29 {{- toYaml . | nindent 8 }} 30 {{- end }} 31 {{- with .Values.applicationSet.metrics.serviceMonitor.metricRelabelings }} 32 metricRelabelings: 33 {{- toYaml . | nindent 8 }} 34 {{- end }} 35 {{- with .Values.applicationSet.metrics.serviceMonitor.scheme }} 36 scheme: {{ . }} 37 {{- end }} 38 {{- with .Values.applicationSet.metrics.serviceMonitor.tlsConfig }} 39 tlsConfig: 40 {{- toYaml . | nindent 8 }} 41 {{- end }} 42 namespaceSelector: 43 matchNames: 44 - {{ .Release.Namespace }} 45 selector: 46 matchLabels: 47 {{- include "argo-cd.selectorLabels" (dict "context" . "component" .Values.applicationSet.name "name" "metrics") | nindent 6 }} 48 {{- end }} 49 {{- end }}