Skip to content

Commit 37ab2af

Browse files
committed
deprecate combining ILM injection with user-provided template
1 parent 1bb2161 commit 37ab2af

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

docs/index.asciidoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1082,6 +1082,9 @@ the *$JDK_HOME/conf/security/java.security* configuration file. That is, `TLSv1.
10821082
You can set the path to your own template here, if you so desire.
10831083
If not set, the included template will be used.
10841084

1085+
WARNING: Injecting ILM configuration into a custom `template` is deprecated.
1086+
If you are providing your own template, your ILM configuration should be a part of the template you provide.
1087+
10851088
[id="plugins-{type}s-{plugin}-template_api"]
10861089
===== `template_api`
10871090

lib/logstash/outputs/elasticsearch/template_manager.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ def self.install(client, template_endpoint, template_name, template, template_ov
4242
end
4343

4444
def self.add_ilm_settings_to_template(plugin, template)
45+
if plugin.template
46+
plugin.deprecation_logger.deprecated("Injecting Index Lifecycle Management configuration into a provided `template` is deprecated, and support will be removed in a future version. Please add the configuration directly to your template.")
47+
end
4548
# Overwrite any index patterns, and use the rollover alias. Use 'index_patterns' rather than 'template' for pattern
4649
# definition - remove any existing definition of 'template'
4750
template.delete('template') if template_endpoint(plugin) == LEGACY_TEMPLATE_ENDPOINT

0 commit comments

Comments
 (0)