1 # Copyright © 2018 Amdocs, Bell Canada, AT&T
2 # Modifications Copyright © 2020 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 name: {{ include "common.fullname" . }}
20 namespace: {{ include "common.namespace" . }}
22 app: {{ include "common.name" . }}
23 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
24 release: {{ include "common.release" . }}
25 heritage: {{ .Release.Service }}
27 replicas: {{ .Values.replicaCount }}
30 app: {{ include "common.name" . }}
34 app: {{ include "common.name" . }}
35 release: {{ include "common.release" . }}
36 name: {{ include "common.name" . }}
38 hostname: {{ include "common.name" . }}
44 sysctl -w vm.max_map_count=262144
45 mkdir -p /logroot/elasticsearch/logs
46 mkdir -p /logroot/elasticsearch/data
47 chmod -R 777 /logroot/elasticsearch
48 chown -R 1000:1000 /logroot
54 fieldPath: metadata.namespace
57 image: {{ include "repositoryGenerator.image.busybox" . }}
58 imagePullPolicy: {{ .Values.pullPolicy | default .Values.global.pullPolicy }}
61 - name: elasticsearch-data
64 - name: {{ include "common.name" . }}
65 image: {{ include "repositoryGenerator.elasticRepository" . }}/{{ .Values.image }}
66 imagePullPolicy: {{ .Values.pullPolicy | default .Values.global.pullPolicy }}
68 - containerPort: {{ .Values.service.internalPort }}
69 - containerPort: {{ .Values.service.internalPort2 }}
70 # disable liveness probe when breakpoints set in debugger
71 # so K8s doesn't restart unresponsive container
72 {{- if eq .Values.liveness.enabled true }}
75 port: {{ .Values.service.internalPort }}
76 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
77 periodSeconds: {{ .Values.liveness.periodSeconds }}
81 port: {{ .Values.service.internalPort }}
82 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
83 periodSeconds: {{ .Values.readiness.periodSeconds }}
86 mountPath: /etc/localtime
88 - name: elasticsearch-config
89 subPath: elasticsearch.yml
90 mountPath: /usr/share/elasticsearch/config/elasticsearch.yml
91 - name: elasticsearch-config
93 mountPath: /usr/share/elasticsearch/config/jvm.options
94 - name: elasticsearch-config
95 subPath: log4j2.properties
96 mountPath: /usr/share/elasticsearch/config/log4j2.properties
97 - name: elasticsearch-data
98 mountPath: /usr/share/elasticsearch/data
100 {{ include "common.resources" . | indent 12 }}
101 {{- if .Values.nodeSelector }}
103 {{ toYaml .Values.nodeSelector | indent 8 }}
105 {{- if .Values.affinity }}
107 {{ toYaml .Values.affinity | indent 8 }}
113 - name: elasticsearch-config
115 name: {{ include "common.fullname" . }}-es-config
116 - name: elasticsearch-data
117 persistentVolumeClaim:
118 claimName: {{ include "common.fullname" . }}-data
119 restartPolicy: {{ .Values.restartPolicy }}
121 - name: "{{ include "common.namespace" . }}-docker-registry-key"