1 # Copyright © 2018 Amdocs, Bell Canada, AT&T
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
15 apiVersion: extensions/v1beta1
18 name: {{ include "common.fullname" . }}
19 namespace: {{ include "common.namespace" . }}
21 app: {{ include "common.name" . }}
22 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
23 release: {{ .Release.Name }}
24 heritage: {{ .Release.Service }}
26 replicas: {{ .Values.replicaCount }}
29 app: {{ include "common.name" . }}
33 app: {{ include "common.name" . }}
34 release: {{ .Release.Name }}
35 name: {{ include "common.name" . }}
37 hostname: {{ include "common.name" . }}
43 sysctl -w vm.max_map_count=262144
44 mkdir -p /logroot/elasticsearch/logs
45 mkdir -p /logroot/elasticsearch/data
46 chmod -R 777 /logroot/elasticsearch
47 chown -R 1000:1000 /logroot
53 fieldPath: metadata.namespace
56 image: {{ .Values.global.dockerhubRepository | default .Values.dockerhubRepository }}/{{ .Values.global.busyboxImage | default .Values.busyboxImage }}
57 imagePullPolicy: {{ .Values.pullPolicy | default .Values.global.pullPolicy }}
60 - name: elasticsearch-data
63 - name: {{ include "common.name" . }}
64 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
65 imagePullPolicy: {{ .Values.pullPolicy | default .Values.global.pullPolicy }}
67 - containerPort: {{ .Values.service.internalPort }}
68 - containerPort: {{ .Values.service.internalPort2 }}
69 # disable liveness probe when breakpoints set in debugger
70 # so K8s doesn't restart unresponsive container
71 {{- if eq .Values.liveness.enabled true }}
74 port: {{ .Values.service.internalPort }}
75 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
76 periodSeconds: {{ .Values.liveness.periodSeconds }}
80 port: {{ .Values.service.internalPort }}
81 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
82 periodSeconds: {{ .Values.readiness.periodSeconds }}
85 mountPath: /etc/localtime
87 - name: elasticsearch-config
88 subPath: elasticsearch.yml
89 mountPath: /usr/share/elasticsearch/config/elasticsearch.yml
90 - name: elasticsearch-config
92 mountPath: /usr/share/elasticsearch/config/jvm.options
93 - name: elasticsearch-config
94 subPath: log4j2.properties
95 mountPath: /usr/share/elasticsearch/config/log4j2.properties
96 - name: searchguard-scripts
98 mountPath: /usr/share/elasticsearch/bin/run.sh
99 - name: searchguard-scripts
100 subPath: wait_until_started.sh
101 mountPath: /usr/share/elasticsearch/bin/wait_until_started.sh
102 - name: searchguard-scripts
104 mountPath: /usr/share/elasticsearch/bin/init_sg.sh
105 - name: searchguard-config
106 mountPath: /usr/share/elasticsearch/config/sg
107 - name: searchguard-auth-config
108 mountPath: /usr/share/elasticsearch/config/sg/auth
109 - name: elasticsearch-data
110 mountPath: /usr/share/elasticsearch/data
112 {{ include "common.resources" . | indent 12 }}
113 {{- if .Values.nodeSelector }}
115 {{ toYaml .Values.nodeSelector | indent 8 }}
117 {{- if .Values.affinity }}
119 {{ toYaml .Values.affinity | indent 8 }}
126 - name: elasticsearch-config
128 name: {{ include "common.fullname" . }}-es-config
129 - name: searchguard-scripts
131 name: {{ include "common.fullname" . }}-sg-scripts
133 - name: searchguard-config
135 name: {{ include "common.fullname" . }}-sg-config
136 - name: searchguard-auth-config
138 secretName: {{ include "common.fullname" . }}-sg-auth
139 - name: elasticsearch-data
141 path: {{ .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }}
142 restartPolicy: {{ .Values.restartPolicy }}
144 - name: "{{ include "common.namespace" . }}-docker-registry-key"