1 ################################################################################
2 # Copyright (c) 2019 AT&T Intellectual Property. #
3 # Copyright (c) 2019 Nokia. #
5 # Licensed under the Apache License, Version 2.0 (the "License"); #
6 # you may not use this file except in compliance with the License. #
7 # You may obtain a copy of the License at #
9 # http://www.apache.org/licenses/LICENSE-2.0 #
11 # Unless required by applicable law or agreed to in writing, software #
12 # distributed under the License is distributed on an "AS IS" BASIS, #
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
14 # See the License for the specific language governing permissions and #
15 # limitations under the License. #
16 ################################################################################
17 {{- $ctx := dict "ctx" . "defaultregistry" .Values.dbaasha.image.registry }}
22 name: {{ include "common.statefulsetname.dbaasha" . }}-server
23 namespace: {{ include "common.namespace.platform" . }}
25 app: {{ include "common.namespace.platform" . }}-{{ include "common.name.dbaasha" . }}
26 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
27 release: {{ .Release.Name }}
28 heritage: {{ .Release.Service }}
32 app: {{ include "common.namespace.platform" . }}-{{ include "common.name.dbaasha" . }}
33 release: {{ .Release.Name }}
34 serviceName: {{ template "common.servicename.dbaasha.tcp" . }}
35 replicas: {{ .Values.dbaasha.replicas }}
36 podManagementPolicy: OrderedReady
42 app: {{ include "common.namespace.platform" . }}-{{ include "common.name.dbaasha" . }}
43 release: {{ .Release.Name }}
45 {{- if .Values.dbaasha.nodeSelector }}
47 {{ toYaml .Values.dbaasha.nodeSelector | indent 8 }}
49 {{- with .Values.dbaasha.affinity }}
51 {{ tpl . $ | indent 8 }}
54 {{- $ctx := dict "ctx" . "defaultregistry" .Values.dbaasha.image.registry }}
55 - name: {{ include "common.dockerregistry.credential" $ctx }}
57 {{- if .Values.dbaasha.sysctlImage.enabled }}
59 image: {{ include "common.dockerregistry.url" $ctx }}/{{ .Values.dbaasha.image.name }}:{{ .Values.dbaasha.image.tag }}
60 imagePullPolicy: {{ include "common.dockerregistry.pullpolicy" $ctx }}
61 {{ if .Values.dbaasha.sysctlImage.mountHostSys }}
67 {{ toYaml .Values.dbaasha.sysctlImage.command | indent 10 }}
74 image: {{ include "common.dockerregistry.url" $ctx }}/{{ .Values.dbaasha.image.name }}:{{ .Values.dbaasha.image.tag }}
75 imagePullPolicy: {{ include "common.dockerregistry.pullpolicy" $ctx }}
79 - /readonly-config/init.sh
82 mountPath: /readonly-config
87 - name: {{ include "common.containername.dbaasha.redis" . }}
88 image: {{ include "common.dockerregistry.url" $ctx }}/{{ .Values.dbaasha.image.name }}:{{ .Values.dbaasha.image.tag }}
89 imagePullPolicy: {{ include "common.dockerregistry.pullpolicy" $ctx }}
93 - /data/conf/redis.conf
96 command: [ "sh", "/probes/readiness.sh", {{ include "common.serviceport.dbaasha.redis" . | quote }}, {{ .Values.dbaasha.probeTimeout | quote }}]
97 initialDelaySeconds: 15
101 command: [ "sh", "/probes/readiness.sh", {{ include "common.serviceport.dbaasha.redis" . | quote }}, {{ .Values.dbaasha.probeTimeout | quote }}]
102 initialDelaySeconds: 15
106 containerPort: {{ include "common.serviceport.dbaasha.redis" . }}
112 - name: {{ include "common.containername.dbaasha.sentinel" . }}
113 image: {{ include "common.dockerregistry.url" $ctx }}/{{ .Values.dbaasha.image.name }}:{{ .Values.dbaasha.image.tag }}
114 imagePullPolicy: {{ include "common.dockerregistry.pullpolicy" $ctx }}
118 - /data/conf/sentinel.conf
122 command: [ "sh", "/probes/readiness.sh", {{ include "common.serviceport.dbaasha.redis" . | quote }}, {{ .Values.dbaasha.probeTimeout | quote }}]
123 initialDelaySeconds: 15
127 command: [ "sh", "/probes/readiness.sh", {{ include "common.serviceport.dbaasha.redis" . | quote }}, {{ .Values.dbaasha.probeTimeout | quote }}]
128 initialDelaySeconds: 15
132 containerPort: {{ include "common.serviceport.dbaasha.sentinel" . }}
141 name: {{ template "common.configmapname.dbaasha" . }}-config
144 name: {{ template "common.configmapname.dbaasha" . }}-probes
145 {{- if .Values.dbaasha.sysctlImage.mountHostSys }}