2 # Copyright © 2017 Amdocs, AT&T, Bell Canada
4 # # Licensed under the Apache License, Version 2.0 (the "License");
5 # # you may not use this file except in compliance with the License.
6 # # You may obtain a copy of the License at
8 # # http://www.apache.org/licenses/LICENSE-2.0
10 # # Unless required by applicable law or agreed to in writing, software
11 # # distributed under the License is distributed on an "AS IS" BASIS,
12 # # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # # See the License for the specific language governing permissions and
14 # # limitations under the License.
16 apiVersion: apps/v1beta1
19 name: {{ include "common.fullname" . }}
20 namespace: {{ include "common.namespace" . }}
22 app: {{ include "common.name" . }}
23 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
24 release: {{ .Release.Name }}
25 heritage: {{ .Release.Service }}
27 serviceName: {{ .Values.service.name }}
28 replicas: {{ .Values.replicaCount }}
32 app: {{ include "common.name" . }}
33 release: {{ .Release.Name }}
37 - name: {{ include "common.name" . }}
38 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
39 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
44 /opt/scripts/redis-cluster-config.sh
46 - containerPort: {{ .Values.service.internalPort }}
47 name: {{ .Values.service.name }}
48 - containerPort: {{ .Values.service.internalPort2 }}
49 name: {{ .Values.service.name2 }}
50 # disable liveness probe when breakpoints set in debugger
51 # so K8s doesn't restart unresponsive container
52 {{- if eq .Values.liveness.enabled true }}
58 - "redis-cli -h $(hostname) ping"
59 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
60 periodSeconds: {{ .Values.liveness.periodSeconds }}
61 timeoutSeconds: {{ .Values.liveness.timeoutSeconds }}
65 port: {{ .Values.service.internalPort }}
66 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
67 periodSeconds: {{ .Values.readiness.periodSeconds }}
70 - mountPath: /etc/localtime
74 name: {{ include "common.fullname" . }}-config
76 name: {{ include "common.fullname" . }}-data
77 - mountPath: /opt/scripts
78 name: {{ include "common.fullname" . }}-scripts
80 {{ include "common.resources" . | indent 12 }}
81 {{- if .Values.nodeSelector }}
83 {{ toYaml .Values.nodeSelector | indent 10 }}
85 {{- if .Values.affinity }}
87 {{ toYaml .Values.affinity | indent 10 }}
90 - name: {{ include "common.fullname" . }}-config
92 name: {{ include "common.fullname" . }}
96 - name: {{ include "common.fullname" . }}-scripts
98 name: {{ include "common.fullname" . }}-scripts
104 - name: "{{ include "common.namespace" . }}-docker-registry-key"
105 volumeClaimTemplates:
107 name: {{ include "common.fullname" . }}-data
109 name: {{ include "common.fullname" . }}
111 accessModes: [ {{ .Values.persistence.accessMode }} ]
112 storageClassName: manual
115 storage: {{ .Values.persistence.size }}