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.
19 metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
21 selector: {{- include "common.selectors" . | nindent 4 }}
22 serviceName: {{ include "common.servicename" . }}
23 replicas: {{ .Values.replicaCount }}
25 metadata: {{- include "common.templateMetadata" . | nindent 6 }}
27 {{ include "common.podSecurityContext" . | indent 6 }}
29 - name: "{{ include "common.namespace" . }}-docker-registry-key"
31 # we shouldn't need this but for unknown reason, it's fsGroup is not
33 - name: fix-permission
39 chown -R {{ .Values.securityContext.user_id }}:{{ .Values.securityContext.group_id }} /data
40 image: {{ include "repositoryGenerator.image.busybox" . }}
41 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
45 - name: {{ include "common.fullname" . }}-data
48 - name: {{ include "common.name" . }}
49 image: {{ include "repositoryGenerator.dockerHubRepository" . }}/{{ .Values.image }}
50 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
52 - docker-entrypoint.sh
56 - name: MONGO_INITDB_DATABASE
57 value: "{{ .Values.config.dbName }}"
59 - containerPort: {{ .Values.service.internalPort }}
60 name: {{ .Values.service.portName }}
61 # disable liveness probe when breakpoints set in debugger
62 # so K8s doesn't restart unresponsive container
63 {{- if eq .Values.liveness.enabled true }}
69 - "db.adminCommand('ping')"
70 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
71 periodSeconds: {{ .Values.liveness.periodSeconds }}
72 timeoutSeconds: {{ .Values.liveness.timeoutSeconds }}
76 port: {{ .Values.service.internalPort }}
77 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
78 periodSeconds: {{ .Values.readiness.periodSeconds }}
80 - name: {{ include "common.fullname" . }}-data
82 resources: {{ include "common.resources" . | nindent 12 }}
83 {{ include "common.containerSecurityContext" . | indent 10 }}
84 {{- if .Values.nodeSelector }}
86 {{ toYaml .Values.nodeSelector | indent 10 }}
88 {{- if .Values.affinity }}
90 {{ toYaml .Values.affinity | indent 10 }}
96 {{- if .Values.persistence.enabled }}
99 name: {{ include "common.fullname" . }}-data
101 name: {{ include "common.fullname" . }}
102 chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
103 release: "{{ include "common.release" . }}"
104 heritage: "{{ .Release.Service }}"
107 - {{ .Values.persistence.accessMode | quote }}
108 storageClassName: {{ include "common.storageClass" . }}
111 storage: {{ .Values.persistence.size | quote }}
114 - name: {{ include "common.fullname" . }}-data