diff --git a/elasticsearch/values.yaml b/elasticsearch/values.yaml index aad6899..d555971 100644 --- a/elasticsearch/values.yaml +++ b/elasticsearch/values.yaml @@ -179,7 +179,7 @@ extraContainers: - /bin/bash - -c - | - set -ex + set -ex echo "[template-loader] Waiting for Elasticsearch at $ES_URL..." for i in $(seq 1 ${MAX_RETRIES:-30}); do if curl -s "$ES_URL" >/dev/null; then @@ -189,12 +189,12 @@ extraContainers: echo "[template-loader] Attempt $i: ES not ready, sleeping..." sleep "${RETRY_INTERVAL:-5}" done - echo "[template-loader] Applying templates..." + echo "[template-loader] Applying index templates..." for idx in "chat:$TEMPLATE_PATH_1" "message:$TEMPLATE_PATH_2" "user:$TEMPLATE_PATH_3"; do name="${idx%%:*}" path="${idx##*:}" - echo "[template-loader] Applying $name from $path..." - curl -X PUT "$ES_URL/$name" \ + echo "[template-loader] Applying template: $name from $path..." + curl -X PUT "$ES_URL/_index_template/$name" \ -H 'Content-Type: application/json' \ --data-binary @"$path" done