2 # Copyright © 2018 Orange
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.
20 name: {{ include "common.fullname" . }}
21 namespace: {{ include "common.namespace" . }}
23 app: {{ include "common.name" . }}
24 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
25 release: {{ include "common.release" . }}
26 heritage: {{ .Release.Service }}
28 serviceName: {{ .Values.service.name }}
29 replicas: {{ .Values.replicaCount }}
32 app: {{ include "common.name" . }}
36 app: {{ include "common.name" . }}
37 release: {{ include "common.release" . }}
39 {{ include "common.podSecurityContext" . | indent 6 }}
41 - name: "{{ include "common.namespace" . }}-docker-registry-key"
43 - name: {{ include "common.name" . }}
44 image: {{ include "repositoryGenerator.dockerHubRepository" . }}/{{ .Values.image }}
45 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
47 - docker-entrypoint.sh
51 - name: MONGO_INITDB_DATABASE
52 value: "{{ .Values.config.dbName }}"
54 - containerPort: {{ .Values.service.internalPort }}
55 # disable liveness probe when breakpoints set in debugger
56 # so K8s doesn't restart unresponsive container
57 {{- if eq .Values.liveness.enabled true }}
63 - "db.adminCommand('ping')"
64 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
65 periodSeconds: {{ .Values.liveness.periodSeconds }}
66 timeoutSeconds: {{ .Values.liveness.timeoutSeconds }}
70 port: {{ .Values.service.internalPort }}
71 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
72 periodSeconds: {{ .Values.readiness.periodSeconds }}
74 - name: {{ include "common.fullname" . }}-data
75 mountPath: /var/lib/mongo
76 resources: {{ include "common.resources" . | nindent 12 }}
77 {{ include "common.containerSecurityContext" . | indent 10 }}
78 {{- if .Values.nodeSelector }}
80 {{ toYaml .Values.nodeSelector | indent 10 }}
82 {{- if .Values.affinity }}
84 {{ toYaml .Values.affinity | indent 10 }}
90 {{- if .Values.persistence.enabled }}
93 name: {{ include "common.fullname" . }}-data
95 name: {{ include "common.fullname" . }}
96 chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
97 release: "{{ include "common.release" . }}"
98 heritage: "{{ .Release.Service }}"
101 - {{ .Values.persistence.accessMode | quote }}
102 storageClassName: {{ include "common.storageClass" . }}
105 storage: {{ .Values.persistence.size | quote }}
108 - name: {{ include "common.fullname" . }}-data