2020-04-09 16:31:13 +00:00
|
|
|
{{- $redisHa := (index .Values "redis-ha") -}}
|
|
|
|
{{- if and .Values.redis.enabled (not $redisHa.enabled) -}}
|
2019-04-09 17:49:15 +00:00
|
|
|
apiVersion: v1
|
|
|
|
kind: Service
|
|
|
|
metadata:
|
2019-11-05 00:17:25 +00:00
|
|
|
name: {{ template "argo-cd.redis.fullname" . }}
|
2024-05-14 15:17:31 +00:00
|
|
|
namespace: {{ include "argo-cd.namespace" . }}
|
2019-04-09 17:49:15 +00:00
|
|
|
labels:
|
2021-03-22 20:15:37 +00:00
|
|
|
{{- include "argo-cd.labels" (dict "context" . "component" .Values.redis.name "name" .Values.redis.name) | nindent 4 }}
|
2021-10-04 22:19:30 +00:00
|
|
|
{{- with .Values.redis.service.labels }}
|
|
|
|
{{- toYaml . | nindent 4 }}
|
|
|
|
{{- end }}
|
|
|
|
{{- with .Values.redis.service.annotations }}
|
|
|
|
annotations:
|
2022-01-31 19:26:04 +00:00
|
|
|
{{- range $key, $value := . }}
|
|
|
|
{{ $key }}: {{ $value | quote }}
|
|
|
|
{{- end }}
|
2021-10-04 22:19:30 +00:00
|
|
|
{{- end }}
|
2019-04-09 17:49:15 +00:00
|
|
|
spec:
|
2024-05-31 12:04:50 +00:00
|
|
|
{{- include "argo-cd.dualStack" . | indent 2 }}
|
2019-04-09 17:49:15 +00:00
|
|
|
ports:
|
2021-10-06 22:12:44 +00:00
|
|
|
- name: redis
|
|
|
|
port: {{ .Values.redis.servicePort }}
|
2023-01-21 19:11:02 +00:00
|
|
|
targetPort: redis
|
2019-04-09 17:49:15 +00:00
|
|
|
selector:
|
2021-03-23 12:28:23 +00:00
|
|
|
{{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.redis.name) | nindent 4 }}
|
2021-10-06 22:12:44 +00:00
|
|
|
{{- end }}
|