kubeasz/manifests/redis-cluster/redis-ha/templates/redis-ha-service.yaml

26 lines
587 B
YAML

apiVersion: v1
kind: Service
metadata:
name: {{ template "redis-ha.fullname" . }}
labels:
{{ include "labels.standard" . | indent 4 }}
annotations:
{{- if .Values.serviceAnnotations }}
{{ toYaml .Values.serviceAnnotations | indent 4 }}
{{- end }}
spec:
type: ClusterIP
clusterIP: None
ports:
- name: server
port: {{ .Values.redis.port }}
protocol: TCP
targetPort: redis
- name: sentinel
port: {{ .Values.sentinel.port }}
protocol: TCP
targetPort: sentinel
selector:
release: {{ .Release.Name }}
app: {{ template "redis-ha.name" . }}