summaryrefslogtreecommitdiff
path: root/astroshop-platform/argocd-helmchart/templates/redis/service.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'astroshop-platform/argocd-helmchart/templates/redis/service.yaml')
-rw-r--r--astroshop-platform/argocd-helmchart/templates/redis/service.yaml27
1 files changed, 27 insertions, 0 deletions
diff --git a/astroshop-platform/argocd-helmchart/templates/redis/service.yaml b/astroshop-platform/argocd-helmchart/templates/redis/service.yaml
new file mode 100644
index 0000000..a60cf77
--- /dev/null
+++ b/astroshop-platform/argocd-helmchart/templates/redis/service.yaml
@@ -0,0 +1,27 @@
+{{- $redisHa := (index .Values "redis-ha") -}}
+{{- if and .Values.redis.enabled (not $redisHa.enabled) -}}
+apiVersion: v1
+kind: Service
+metadata:
+ name: {{ template "argo-cd.redis.fullname" . }}
+ namespace: {{ include "argo-cd.namespace" . }}
+ labels:
+ {{- include "argo-cd.labels" (dict "context" . "component" .Values.redis.name "name" .Values.redis.name) | nindent 4 }}
+ {{- with .Values.redis.service.labels }}
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
+ {{- with .Values.redis.service.annotations }}
+ annotations:
+ {{- range $key, $value := . }}
+ {{ $key }}: {{ $value | quote }}
+ {{- end }}
+ {{- end }}
+spec:
+ {{- include "argo-cd.dualStack" . | indent 2 }}
+ ports:
+ - name: redis
+ port: {{ .Values.redis.servicePort }}
+ targetPort: redis
+ selector:
+ {{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.redis.name) | nindent 4 }}
+{{- end }}