You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Logstash keystore init container slows down the startup process. To update the keystore, logstash-keystore command starts and stops jvm for each key. The process is proportion to the number of keys. In the local env, adding 10 keys takes six minutes to get Logstash ready.
Logstash keystore command should allow adding keys in a batch.
Fixes: #7027
Logstash has performance issue when init container creates keystore with a couple of keys.
Since Logstash 8.12.0, `logstash-keystore` command supports adding multiple keys in one operation.
This PR uses the command to add keys in a batch. The minimum version of Logstash currently running in ECK is 8.12.0
The steps to create keystore in Logstash
```bash
# create keystore without password
echo 'y' | bin/logstash-keystore create
# add keys one and two
bin/logstash-keystore add one two
Enter value for one: # input ASCII and non-empty string, and then press <enter>
Added 'one' to the Logstash keystore.
Enter value for two:
Added 'two' to the Logstash keystore.
```
The following resources should start approximately in a minute
```yaml
apiVersion: v1
kind: Secret
metadata:
name: logstash-secure-settings
stringData:
HELLO: HALLO
A: "1"
B: "2"
C: "3"
D: "4"
E: "5"
F: "6"
G: "7"
H: "8"
I: "9"
J: "10"
---
apiVersion: logstash.k8s.elastic.co/v1alpha1
kind: Logstash
metadata:
name: logstash-sample
spec:
version: 8.12.0
count: 1
pipelines:
- pipeline.id: main
config.string: |-
input { exec { command => 'uptime' interval => 10 } }
filter {
if ("${HELLO:}" != "") {
mutate { add_tag => ["${A}", "${B}", "${C}", "${D}", "${E}", "${F}", "${G}", "${H}", "${I}", "${J}"] }
}
}
secureSettings:
- secretName: logstash-secure-settings
```
---------
Co-authored-by: Rob Bavey <rob.bavey@elastic.co>
Logstash keystore init container slows down the startup process. To update the keystore,
logstash-keystore
command starts and stops jvm for each key. The process is proportion to the number of keys. In the local env, adding 10 keys takes six minutes to get Logstash ready.Logstash keystore command should allow adding keys in a batch.
Config to reproduce the issue
relates: elastic/logstash#15186
The text was updated successfully, but these errors were encountered: