diff --git a/elasticsearch/templates/deployment-client.yaml b/elasticsearch/templates/deployment-client.yaml index 9cd02372..4ca28905 100644 --- a/elasticsearch/templates/deployment-client.yaml +++ b/elasticsearch/templates/deployment-client.yaml @@ -104,7 +104,7 @@ spec: mountPath: /usr/share/elasticsearch/config/log4j2.properties subPath: log4j2.properties readOnly: true - - mountPath: /var/lib/elasticsearch/data + - mountPath: {{ .Values.conf.elasticsearch.path.data }} name: storage volumes: - name: elastic-bin diff --git a/elasticsearch/templates/deployment-master.yaml b/elasticsearch/templates/deployment-master.yaml index 4e1e65af..0e4cdbd0 100644 --- a/elasticsearch/templates/deployment-master.yaml +++ b/elasticsearch/templates/deployment-master.yaml @@ -100,15 +100,11 @@ spec: mountPath: /usr/share/elasticsearch/config/elasticsearch.yml subPath: elasticsearch.yml readOnly: true - - name: elastic-etc - mountPath: /usr/share/elasticsearch/config/logging.yml - subPath: logging.yml - readOnly: true - name: elastic-etc mountPath: /usr/share/elasticsearch/config/log4j2.properties subPath: log4j2.properties readOnly: true - - mountPath: /var/lib/elasticsearch/data + - mountPath: {{ .Values.conf.elasticsearch.path.data }} name: storage volumes: - name: elastic-bin diff --git a/elasticsearch/templates/etc/_log4j2.properties.tpl b/elasticsearch/templates/etc/_log4j2.properties.tpl index bfc58626..9b2a1088 100644 --- a/elasticsearch/templates/etc/_log4j2.properties.tpl +++ b/elasticsearch/templates/etc/_log4j2.properties.tpl @@ -12,23 +12,24 @@ # See the License for the specific language governing permissions and # limitations under the License. -appender.rolling.type = RollingFile -appender.rolling.name = rolling -appender.rolling.fileName = ${sys:es.logs.base_path}${sys:file.separator}${sys:es.logs.cluster_name}.log -appender.rolling.layout.type = PatternLayout -appender.rolling.layout.pattern = [%d{ISO8601}][%-5p][%-25c] %.10000m%n -appender.rolling.filePattern = ${sys:es.logs.base_path}${sys:file.separator}${sys:es.logs.cluster_name}-%d{yyyy-MM-dd}.log -appender.rolling.policies.type = Policies -appender.rolling.policies.time.type = TimeBasedTriggeringPolicy -appender.rolling.policies.time.interval = 1 -appender.rolling.policies.time.modulate = true - -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 +appender.rolling.type = RollingFile +appender.rolling.name = rolling +appender.rolling.fileName = ${sys:es.logs.base_path}${sys:file.separator}${hostName}.log +appender.rolling.filePattern = ${sys:es.logs.base_path}${sys:file.separator}${hostName}.log.%i +appender.rolling.layout.type = PatternLayout +appender.rolling.layout.pattern = [%d{DEFAULT}][%-5p][%-25c] %.10000m%n +appender.rolling.policies.type = Policies +appender.rolling.policies.size.type = SizeBasedTriggeringPolicy +appender.rolling.policies.size.size=100MB +appender.rolling.strategy.type = DefaultRolloverStrategy +appender.rolling.strategy.max = 5 +appender.rolling.strategy.fileIndex = min + rootLogger.level = info rootLogger.appenderRef.console.ref = console +rootLogger.appenderRef.rolling.ref = rolling diff --git a/elasticsearch/templates/statefulset-data.yaml b/elasticsearch/templates/statefulset-data.yaml index e2f2f388..f104ae92 100644 --- a/elasticsearch/templates/statefulset-data.yaml +++ b/elasticsearch/templates/statefulset-data.yaml @@ -100,7 +100,7 @@ spec: subPath: log4j2.properties readOnly: true - name: storage - mountPath: /var/lib/elasticsearch/data + mountPath: {{ .Values.conf.elasticsearch.path.data }} volumes: - name: elastic-bin configMap: