feat(argo-cd): Add ability to add prometheus.io/scrape annotations (#2037)
This commit is contained in:
parent
f6d44750b8
commit
8402303bf8
9 changed files with 96 additions and 16 deletions
|
|
@ -9,13 +9,21 @@ metadata:
|
|||
{{- with .Values.controller.metrics.service.labels }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- with .Values.controller.metrics.service.annotations }}
|
||||
{{- if or .Values.controller.metrics.service.annotations .Values.global.addPrometheusAnnotations }}
|
||||
annotations:
|
||||
{{- range $key, $value := . }}
|
||||
{{- if .Values.global.addPrometheusAnnotations }}
|
||||
prometheus.io/port: {{ .Values.controller.metrics.service.servicePort | quote }}
|
||||
prometheus.io/scrape: "true"
|
||||
{{- end }}
|
||||
{{- range $key, $value := .Values.controller.metrics.service.annotations }}
|
||||
{{ $key }}: {{ $value | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
spec:
|
||||
type: {{ .Values.controller.metrics.service.type }}
|
||||
{{- if and .Values.controller.metrics.service.clusterIP (eq .Values.controller.metrics.service.type "ClusterIP") }}
|
||||
clusterIP: {{ .Values.controller.metrics.service.clusterIP }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: {{ .Values.controller.metrics.service.portName }}
|
||||
protocol: TCP
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue