feat(argo-cd): Add ability to scrape redis metrics (#892)
* feat(argo-cd): Add ability to scrape redis metrics Signed-off-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com> * Bump chart version Signed-off-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com>
This commit is contained in:
parent
489443e387
commit
7477b33cba
7 changed files with 144 additions and 2 deletions
28
charts/argo-cd/templates/redis/metrics-service.yaml
Normal file
28
charts/argo-cd/templates/redis/metrics-service.yaml
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{{- $redisHa := (index .Values "redis-ha") -}}
|
||||
{{- if and .Values.redis.enabled (not $redisHa.enabled) .Values.redis.metrics.enabled -}}
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ template "argo-cd.redis.fullname" . }}-metrics
|
||||
{{- with .Values.redis.metrics.service.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "argo-cd.labels" (dict "context" . "component" .Values.redis.name "name" .Values.redis.name) | nindent 4 }}
|
||||
{{- with .Values.redis.metrics.service.labels }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- with .Values.redis.metrics.service.clusterIP }}
|
||||
clusterIP: {{ . }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: {{ .Values.redis.metrics.service.portName }}
|
||||
protocol: TCP
|
||||
port: {{ .Values.redis.metrics.service.servicePort }}
|
||||
targetPort: metrics
|
||||
selector:
|
||||
{{- include "argo-cd.selectorLabels" (dict "context" . "component" .Values.redis.name "name" .Values.redis.name) | nindent 4 }}
|
||||
type: {{ .Values.redis.metrics.service.type }}
|
||||
{{- end }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue