gateway.recover_after_master_nodes: ${RECOVER_AFTER_MASTER_NODES:3}
gateway.recover_after_data_nodes: ${RECOVER_AFTER_DATA_NODES:3}
- log4j2.properties: |-
- status = error
- appender.console.type = Console
- appender.console.name = console
- appender.console.layout.type = PatternLayout
- appender.console.layout.pattern = [%d{ISO8601}][%-5p][%-25c{1.}] %marker%m%n
- rootLogger.level = info
- rootLogger.appenderRef.console.ref = console
- logger.searchguard.name = com.floragunn
- logger.searchguard.level = info
-
supervisord.conf: |
[unix_http_server]
file=/run/supervisord.sock ; (the path to the socket file)
username = dummy
password = dummy
- ;[inet_http_server] ; inet (TCP) server disabled by default
-
[supervisord]
user=root
logfile=/dev/null
stdout_logfile_maxbytes=0
[program:setindex]
- command=/usr/share/elasticsearch/elasticsearch-setindex
+ command=/usr/share/elasticsearch/elasticsearch-setindex.sh
startsecs=3
startretries=1
stopwaitsecs = 3
redirect_stderr=true
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
-
- elasticsearch-logrotate: |
- #!/bin/bash
- # Copyright 2019 Nokia
- #
- # Licensed under the Apache License, Version 2.0 (the "License");
- # you may not use this file except in compliance with the License.
- # You may obtain a copy of the License at
- #
- # http://www.apache.org/licenses/LICENSE-2.0
- #
- # Unless required by applicable law or agreed to in writing, software
- # distributed under the License is distributed on an "AS IS" BASIS,
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- # See the License for the specific language governing permissions and
- # limitations under the License.
-
- FS_LIMIT=80
- declare -i pcent=100
- while [ $pcent -ge $FS_LIMIT ]
- do
- pcent=`df --output=pcent /usr/share/elasticsearch/data | tail -n1 | tr -d '%'`
- if [ $pcent -le $FS_LIMIT ]; then exit; fi
- oldest=`curl -s -XGET 'localhost:{{ .Values.elasticsearch.port }}/_cat/indices' | awk '{print $3}' | egrep '^.+-[[:digit:]]{4}\.[[:digit:]]{2}\.[[:digit:]]{2}$' | sort -t'-' -k2 | head -n1`
- curl -XDELETE "localhost:{{ .Values.elasticsearch.port }}/$oldest" >/dev/null
- done
{{ end }}
cpu: "100m"
memory: "{{ .Values.elasticsearch.memory_request }}"
readinessProbe:
- tcpSocket:
+ httpGet:
+ path: /_cluster/health?local=true
port: {{ .Values.elasticsearch.port }}
initialDelaySeconds: 5
livenessProbe:
- tcpSocket:
+ httpGet:
+ path: /_cluster/health?local=true
port: {{ .Values.elasticsearch.port }}
initialDelaySeconds: 60
timeoutSeconds: 5
- mountPath: /etc/supervisord.conf
name: supervisord-config
subPath: supervisord.conf
- - mountPath: /etc/cron.hourly/elasticsearch-logrotate
- name: elasticsearch-logrotate
- subPath: elasticsearch-logrotate
terminationGracePeriodSeconds: {{ .Values.elasticsearch.data.terminationGracePeriodSeconds }}
volumes:
- name: time-mount
- key: supervisord.conf
path: supervisord.conf
mode: 0644
- - name: elasticsearch-logrotate
- configMap:
- name: elasticsearch
- items:
- - key: elasticsearch-logrotate
- path: elasticsearch-logrotate
- mode: 0755
- name: data
hostPath:
path: /var/log/elasticsearch