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.
17 apiVersion: apps/v1beta1
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 }}
33 app: {{ include "common.name" . }}
34 release: {{ include "common.release" . }}
37 - name: {{ include "common.name" . }}
38 image: "{{ .Values.dockerHubRepository }}/{{ .Values.image }}"
39 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
41 - name: MONGO_INITDB_DATABASE
42 value: "{{ .Values.config.dbName }}"
44 - containerPort: {{ .Values.service.internalPort }}
45 # disable liveness probe when breakpoints set in debugger
46 # so K8s doesn't restart unresponsive container
47 {{- if eq .Values.liveness.enabled true }}
53 - "db.adminCommand('ping')"
54 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
55 periodSeconds: {{ .Values.liveness.periodSeconds }}
56 timeoutSeconds: {{ .Values.liveness.timeoutSeconds }}
60 port: {{ .Values.service.internalPort }}
61 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
62 periodSeconds: {{ .Values.readiness.periodSeconds }}
64 - name: {{ include "common.fullname" . }}-data
65 mountPath: /var/lib/mongo
67 {{ include "common.resources" . | indent 12 }}
68 {{- if .Values.nodeSelector }}
70 {{ toYaml .Values.nodeSelector | indent 10 }}
72 {{- if .Values.affinity }}
74 {{ toYaml .Values.affinity | indent 10 }}
80 {{- if .Values.persistence.enabled }}
83 name: {{ include "common.fullname" . }}-data
85 name: {{ include "common.fullname" . }}
86 chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
87 release: "{{ include "common.release" . }}"
88 heritage: "{{ .Release.Service }}"
91 - {{ .Values.persistence.accessMode | quote }}
92 storageClassName: {{ include "common.storageClass" . }}
95 storage: {{ .Values.persistence.size | quote }}
98 - name: {{ include "common.fullname" . }}-data