abb5e0f713
This begins to split the fluent-logging chart into two separate charts, one for fluentbit and one for fluentd. This is to help isolate each chart and its dependencies better, and to treat each service as its own entity. This also moves the job for creating Elasticsearch templates to the Elasticsearch chart, as the elasticsearch chart should have ownership of creating the templates for its indices. This also performs some general cleanup of values keys that are not currently used Change-Id: I827277d5faa62b8b59c5960330703d23c297ca47 Signed-off-by: Steve Wilkerson <sw5822@att.com>
18 lines
525 B
Smarty
18 lines
525 B
Smarty
#!/bin/bash
|
|
|
|
set -ex
|
|
|
|
{{ range $template, $fields := .Values.conf.templates }}
|
|
|
|
result=$(curl -K- <<< "--user ${ELASTICSEARCH_USERNAME}:${ELASTICSEARCH_PASSWORD}" \
|
|
-XPUT "${ELASTICSEARCH_HOST}:${ELASTICSEARCH_PORT}/_template/{{$template}}" \
|
|
-H 'Content-Type: application/json' -d @/tmp/{{$template}}.json \
|
|
| python -c "import sys, json; print json.load(sys.stdin)['acknowledged']")
|
|
if [ "$result" == "True" ]; then
|
|
echo "{{$template}} template created!"
|
|
else
|
|
echo "{{$template}} template not created!"
|
|
fi
|
|
|
|
{{ end }}
|