1
0
Fork 0
mirror of https://github.com/dragonflydb/dragonfly.git synced 2024-12-14 11:58:02 +00:00
dragonflydb-dragonfly/contrib/charts/dragonfly/templates/servicemonitor.yaml
Fabiano Arruda 30ec81c456
Improve Helm chart to be rendered locally and on machines where is not the application target (#2706)
* fix(helm): add issuer group to create the certificate without wait for the previous created issuer

Signed-off-by: Fabiano Arruda Ferreira das Graças <fafg@fafg-mbm1.fritz.box>

* fix(helm): remove condition that can prevent the helm chart be rendered on machines where monitoring.coreos.com is not installed or is not the end target of the helm template command

Signed-off-by: fafg <fabiano.arruda@hotmail.com>

* fix(helm): lint - remove blank line

Signed-off-by: fafg <fabiano.arruda@hotmail.com>

* add(helm): missing service monitor test files

Signed-off-by: fafg <fabiano.arruda@hotmail.com>

* add(helm): add missing cert-manager test files

Signed-off-by: fafg <fabiano.arruda@hotmail.com>

* fix(helm): lint - add missing blank lines

Signed-off-by: fafg <fabiano.arruda@hotmail.com>

* fix(helm): rebase

Signed-off-by: fafg <fabiano.arruda@hotmail.com>

* Revert "fix(helm): rebase"

This reverts commit c4ce16b76e.

* fix(helm): fix service monitor namespace rendering

Signed-off-by: fafg <fabiano.arruda@hotmail.com>

* fix(helm): add missing up to date golden file

Signed-off-by: fafg <fabiano.arruda@hotmail.com>

* fix(helm): merge upstream

Signed-off-by: fafg <fabiano.arruda@hotmail.com>

* update golden files

* also install prom operator dependencies

* also install cert-manager

* skip cert-manager chart

* skip cert-manager value

* remove CI TLS files

* fix formatting

* fix formatting

* fix actions

---------

Signed-off-by: Fabiano Arruda Ferreira das Graças <fafg@fafg-mbm1.fritz.box>
Signed-off-by: fafg <fabiano.arruda@hotmail.com>
Co-authored-by: Tarun Pothulapati <tarun@dragonflydb.io>
Co-authored-by: Tarun Pothulapati <tarunpothulapati@outlook.com>
2024-03-25 12:29:42 +05:30

44 lines
1.2 KiB
YAML

{{- if .Values.serviceMonitor.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ template "dragonfly.fullname" . }}-metrics
{{- if .Values.serviceMonitor.namespace }}
namespace: {{ .Values.serviceMonitor.namespace }}
{{- else }}
namespace: {{ .Release.Namespace }}
{{- end }}
{{- with .Values.serviceMonitor.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
labels:
{{- with .Values.serviceMonitor.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- include "dragonfly.labels" . | nindent 4 }}
spec:
endpoints:
- interval: {{ .Values.serviceMonitor.interval }}
{{- with .Values.serviceMonitor.scrapeTimeout }}
scrapeTimeout: {{ . }}
{{- end }}
honorLabels: true
port: {{ default "metrics" .Values.service.metrics.portName }}
path: /metrics
{{- if .Values.tls.enabled }}
scheme: https
tlsConfig:
insecureSkipVerify: true
{{- else }}
scheme: http
{{- end }}
jobLabel: "{{ .Release.Name }}"
selector:
matchLabels:
{{- include "dragonfly.selectorLabels" . | nindent 6 }}
type: metrics
namespaceSelector:
matchNames:
- {{ .Release.Namespace }}
{{- end }}