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: "{{ .Values.repository | default .Values.repository }}/{{ .Values.image }}"
39 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
44 /opt/scripts/redis-cluster-config.sh &
45 /usr/local/bin/redis-server-config.sh
47 - containerPort: {{ .Values.service.internalPort }}
48 name: {{ .Values.service.name }}
49 - containerPort: {{ .Values.service.internalPort2 }}
50 name: {{ .Values.service.name2 }}
51 # disable liveness probe when breakpoints set in debugger
52 # so K8s doesn't restart unresponsive container
53 {{- if eq .Values.liveness.enabled true }}
59 - "redis-cli -h $(hostname) ping"
60 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
61 periodSeconds: {{ .Values.liveness.periodSeconds }}
62 timeoutSeconds: {{ .Values.liveness.timeoutSeconds }}
66 port: {{ .Values.service.internalPort }}
67 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
68 periodSeconds: {{ .Values.readiness.periodSeconds }}
71 - mountPath: /etc/localtime
75 name: {{ include "common.fullname" . }}-config
77 name: {{ include "common.fullname" . }}-data
78 - mountPath: /opt/scripts
79 name: {{ include "common.fullname" . }}-scripts
81 {{ toYaml .Values.resources | indent 12 }}
82 {{- if .Values.nodeSelector }}
84 {{ toYaml .Values.nodeSelector | indent 10 }}
86 {{- if .Values.affinity }}
88 {{ toYaml .Values.affinity | indent 10 }}
91 - name: {{ include "common.fullname" . }}-config
93 name: {{ include "common.fullname" . }}
97 - name: {{ include "common.fullname" . }}-scripts
99 name: {{ include "common.fullname" . }}-scripts
105 - name: "{{ include "common.namespace" . }}-docker-registry-key"
106 volumeClaimTemplates:
108 name: {{ include "common.fullname" . }}-data
110 name: {{ include "common.fullname" . }}
112 accessModes: [ {{ .Values.persistence.accessMode }} ]
113 storageClassName: manual
116 storage: {{ .Values.persistence.size }}