See https://istio.io/latest/docs/ops/configuration/traffic-management/protocol-selection/#explicit-protocol-selection Signed-off-by: Mathieu Parent <math.parent@gmail.com> Co-authored-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com>
23 lines
779 B
YAML
23 lines
779 B
YAML
{{- $redisHa := (index .Values "redis-ha") -}}
|
|
{{- if and .Values.redis.enabled (not $redisHa.enabled) -}}
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: {{ template "argo-cd.redis.fullname" . }}
|
|
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:
|
|
{{- toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
spec:
|
|
ports:
|
|
- name: redis
|
|
port: {{ .Values.redis.servicePort }}
|
|
targetPort: {{ .Values.redis.containerPort }}
|
|
selector:
|
|
{{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.redis.name) | nindent 4 }}
|
|
{{- end }}
|