add helm charts
This commit is contained in:
33
backing-services/redis/templates/headless-svc.yaml
Normal file
33
backing-services/redis/templates/headless-svc.yaml
Normal file
@@ -0,0 +1,33 @@
|
||||
{{- /*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ printf "%s-headless" (include "common.names.fullname" .) }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
annotations:
|
||||
{{- if or .Values.sentinel.service.headless.annotations .Values.commonAnnotations }}
|
||||
{{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.sentinel.service.headless.annotations .Values.commonAnnotations ) "context" . ) }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- include "redis.externalDNS.annotations" . | nindent 4 }}
|
||||
spec:
|
||||
type: ClusterIP
|
||||
clusterIP: None
|
||||
{{- if .Values.sentinel.enabled }}
|
||||
publishNotReadyAddresses: true
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: tcp-redis
|
||||
port: {{ if .Values.sentinel.enabled }}{{ .Values.sentinel.service.ports.redis }}{{ else }}{{ .Values.master.service.ports.redis }}{{ end }}
|
||||
targetPort: redis
|
||||
{{- if .Values.sentinel.enabled }}
|
||||
- name: tcp-sentinel
|
||||
port: {{ .Values.sentinel.service.ports.sentinel }}
|
||||
targetPort: redis-sentinel
|
||||
{{- end }}
|
||||
selector: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
Reference in New Issue
Block a user