chore(argo-cd): Rename metrics templates (#1556)

Signed-off-by: Petr Drastil <petr.drastil@gmail.com>

Signed-off-by: Petr Drastil <petr.drastil@gmail.com>
This commit is contained in:
Petr Drastil 2022-10-22 14:59:23 +02:00 committed by GitHub
parent 2626b31b69
commit 8c50158952
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 2 additions and 2 deletions

View file

@ -0,0 +1,30 @@
{{- $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:
{{- range $key, $value := . }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- 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 }}