From 6c36c0b9a98bd7741247fdc80db3c2e64fcbf432 Mon Sep 17 00:00:00 2001 From: makefunstuff Date: Sat, 29 Jun 2024 02:34:52 +0300 Subject: logstash connect --- tools/elasticsearch/values.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'tools') diff --git a/tools/elasticsearch/values.yaml b/tools/elasticsearch/values.yaml index 23cdd8a..0304196 100644 --- a/tools/elasticsearch/values.yaml +++ b/tools/elasticsearch/values.yaml @@ -31,6 +31,21 @@ logstash: logstash.yml: | http.host: "0.0.0.0" xpack.monitoring.elasticsearch.hosts: [ "http://elasticsearch-master:9200" ] + secretMounts: + - name: "elasticsearch-master-certs" + secretName: "elasticsearch-master-certs" + path: "/usr/share/logstash/config/elasticsearch-master-certs" + extraEnvs: + - name: "ELASTICSEARCH_USERNAME" + valueFrom: + secretKeyRef: + name: elasticsearch-master-credentials + key: username + - name: "ELASTICSEARCH_PASSWORD" + valueFrom: + secretKeyRef: + name: elasticsearch-master-credentials + key: password logstashPipeline: logstash.conf: | input { @@ -42,6 +57,9 @@ logstash: output { elasticsearch { hosts => ["http://elasticsearch-master.monitoring.svc.cluster.local:9200"] + cacert => /usr/share/logstash/config/elasticsearch-master-certs/ca.crt + user => '${ELASTICSEARCH_USERNAME}' + passwrod => '${ELASTICSEARCH_PASSWORD}' index => "logstash-%{+YYYY.MM.dd}" } } -- cgit 1.4.1-2-gfad0