blob: 834d63aa7c361c974d2e0ace5101a4ee4eb660f0 [file] [log] [blame]
Tinoj Josephdd1fd9d2022-08-01 23:59:26 +05301# Copyright 2022-present Open Networking Foundation
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15apiVersion: v1
16kind: Service
17metadata:
18 name: {{ template "redis.fullname" . }}-headless
19 namespace: {{ .Release.Namespace | quote }}
20 labels:
21 app: {{ template "redis.name" . }}
22 chart: {{ template "redis.chart" . }}
23 release: {{ .Release.Name }}
24 heritage: {{ .Release.Service }}
25spec:
26 type: ClusterIP
27 clusterIP: None
28 {{- if .Values.global.redis.sentinel.enabled }}
29 publishNotReadyAddresses: true
30 {{- end }}
31 ports:
32 - name: redis
33 port: {{ .Values.redisPort }}
34 targetPort: redis
35 {{- if .Values.global.redis.sentinel.enabled }}
36 - name: redis-sentinel
37 port: {{ .Values.sentinel.port }}
38 targetPort: redis-sentinel
39 {{- end }}
40 selector:
41 app: {{ template "redis.name" . }}
42 release: {{ .Release.Name }}