swarm
This commit is contained in:
28
helm/redis/templates/headless-svc.yaml
Normal file
28
helm/redis/templates/headless-svc.yaml
Normal file
@ -0,0 +1,28 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ printf "%s-headless" (include "common.names.fullname" .) }}
|
||||
namespace: {{ .Release.Namespace | quote }}
|
||||
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
||||
{{- if .Values.commonLabels }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.commonAnnotations }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
type: ClusterIP
|
||||
clusterIP: None
|
||||
{{- if .Values.sentinel.enabled }}
|
||||
publishNotReadyAddresses: true
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: tcp-redis
|
||||
port: {{ if .Values.sentinel.enabled }}{{ .Values.sentinel.service.port }}{{ else }}{{ .Values.master.service.port }}{{ end }}
|
||||
targetPort: redis
|
||||
{{- if .Values.sentinel.enabled }}
|
||||
- name: tcp-sentinel
|
||||
port: {{ .Values.sentinel.service.sentinelPort }}
|
||||
targetPort: redis-sentinel
|
||||
{{- end }}
|
||||
selector: {{- include "common.labels.matchLabels" . | nindent 4 }}
|
Reference in New Issue
Block a user