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

Commit

Permalink
Merge pull request #444 from naseemkullah/lifecycle-hook-example
Browse files Browse the repository at this point in the history
Add commented out example of a useful post start hook
  • Loading branch information
jmlrt authored Jan 20, 2020
2 parents e4a8560 + 7b73ecc commit 56cd637
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion elasticsearch/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,19 @@ lifecycle: {}
# command: ["/bin/sh", "-c", "echo Hello from the postStart handler > /usr/share/message"]
# postStart:
# exec:
# command: ["/bin/sh", "-c", "echo Hello from the postStart handler > /usr/share/message"]
# command:
# - bash
# - -c
# - |
# #!/bin/bash
# # Add a template to adjust number of shards/replicas
# TEMPLATE_NAME=my_template
# INDEX_PATTERN="logstash-*"
# SHARD_COUNT=8
# REPLICA_COUNT=1
# ES_URL=http://localhost:9200
# while [[ "$(curl -s -o /dev/null -w '%{http_code}\n' $ES_URL)" != "200" ]]; do sleep 1; done
# curl -XPUT "$ES_URL/_template/$TEMPLATE_NAME" -H 'Content-Type: application/json' -d'{"index_patterns":['\""$INDEX_PATTERN"\"'],"settings":{"number_of_shards":'$SHARD_COUNT',"number_of_replicas":'$REPLICA_COUNT'}}'

sysctlInitContainer:
enabled: true
Expand Down

0 comments on commit 56cd637

Please sign in to comment.