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 # we shouldn't need this but for unknown reason, it's fsGroup is not
45 - name: fix-permission
51 chown -R {{ .Values.securityContext.user_id }}:{{ .Values.securityContext.group_id }} /data
52 image: {{ include "repositoryGenerator.image.busybox" . }}
53 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
57 - name: {{ include "common.fullname" . }}-data
60 - name: {{ include "common.name" . }}
61 image: {{ include "repositoryGenerator.dockerHubRepository" . }}/{{ .Values.image }}
62 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
64 - docker-entrypoint.sh
68 - name: MONGO_INITDB_DATABASE
69 value: "{{ .Values.config.dbName }}"
71 - containerPort: {{ .Values.service.internalPort }}
72 # disable liveness probe when breakpoints set in debugger
73 # so K8s doesn't restart unresponsive container
74 {{- if eq .Values.liveness.enabled true }}
80 - "db.adminCommand('ping')"
81 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
82 periodSeconds: {{ .Values.liveness.periodSeconds }}
83 timeoutSeconds: {{ .Values.liveness.timeoutSeconds }}
87 port: {{ .Values.service.internalPort }}
88 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
89 periodSeconds: {{ .Values.readiness.periodSeconds }}
91 - name: {{ include "common.fullname" . }}-data
93 resources: {{ include "common.resources" . | nindent 12 }}
94 {{ include "common.containerSecurityContext" . | indent 10 }}
95 {{- if .Values.nodeSelector }}
97 {{ toYaml .Values.nodeSelector | indent 10 }}
99 {{- if .Values.affinity }}
101 {{ toYaml .Values.affinity | indent 10 }}
107 {{- if .Values.persistence.enabled }}
108 volumeClaimTemplates:
110 name: {{ include "common.fullname" . }}-data
112 name: {{ include "common.fullname" . }}
113 chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
114 release: "{{ include "common.release" . }}"
115 heritage: "{{ .Release.Service }}"
118 - {{ .Values.persistence.accessMode | quote }}
119 storageClassName: {{ include "common.storageClass" . }}
122 storage: {{ .Values.persistence.size | quote }}
125 - name: {{ include "common.fullname" . }}-data