Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

Commit

Permalink
[logstash] using https to connect to elasticsearch (#1623)
Browse files Browse the repository at this point in the history
* Adding support to Ingress networking.k8s.io/v1

* Adjusting ES service name

* Removing ingress typo & adjusting python test

* Adjusting python tests to use the new ingress version

* fixing conflict

* Adding support to kubernetes ingress v1 & ClassName

* Adding reformatted files

* fixing conflict

* Adding ClassName & Pathtype on ingress settings

* Performing syntax adjustments and removing comments

* adjusting logstash to connect to elasticsearch using https

* Adjusting cert generation on es and adding proper logstash settings

* Update logstash/values.yaml

* Update logstash/values.yaml

Co-authored-by: Julien Mailleret <8582351+jmlrt@users.noreply.github.com>
  • Loading branch information
framsouza and jmlrt committed Mar 21, 2022
1 parent f5669c1 commit fb00805
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
5 changes: 3 additions & 2 deletions logstash/examples/elasticsearch/test/goss.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ http:
- '"workers" : 1'
- '"batch_size" : 125'
- '"batch_delay" : 50'
http://elasticsearch-master:9200/_cat/indices:
https://elasticsearch-master:9200/_cat/indices:
allow-insecure: true
status: 200
timeout: 2000
username: "{{ .Env.ELASTICSEARCH_USERNAME }}"
Expand All @@ -53,5 +54,5 @@ file:
filetype: file
contains:
- 'input { exec { command => "uptime" interval => 30 } }'
- 'hosts => ["http://elasticsearch-master:9200"]'
- 'hosts => ["https://elasticsearch-master:9200"]'
- 'index => "logstash"'
8 changes: 7 additions & 1 deletion logstash/examples/elasticsearch/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ logstashPipeline:
input { exec { command => "uptime" interval => 30 } }
output {
elasticsearch {
hosts => ["http://elasticsearch-master:9200"]
hosts => ["https://elasticsearch-master:9200"]
user => '${ELASTICSEARCH_USERNAME}'
cacert => '/usr/share/logstash/config/certs/ca.crt'
password => '${ELASTICSEARCH_PASSWORD}'
index => "logstash"
}
Expand All @@ -29,3 +30,8 @@ extraEnvs:
secretKeyRef:
name: elasticsearch-master-credentials
key: password

secretMounts:
- name: elasticsearch-master-certs
secretName: elasticsearch-master-certs
path: /usr/share/logstash/config/certs

0 comments on commit fb00805

Please sign in to comment.