[EPM] Use higher priority than default templates (#70640)

* Use higher priority than default templates

* Fixing the jest tests
This commit is contained in:
Jonathan Buttner 2020-07-02 18:40:39 -04:00 committed by GitHub
parent 23ea7acb15
commit 20237b8d5b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 5 deletions

View file

@ -2,7 +2,7 @@
exports[`tests loading base.yml: base.yml 1`] = `
{
"priority": 1,
"priority": 200,
"index_patterns": [
"foo-*"
],
@ -105,7 +105,7 @@ exports[`tests loading base.yml: base.yml 1`] = `
exports[`tests loading coredns.logs.yml: coredns.logs.yml 1`] = `
{
"priority": 1,
"priority": 200,
"index_patterns": [
"foo-*"
],
@ -208,7 +208,7 @@ exports[`tests loading coredns.logs.yml: coredns.logs.yml 1`] = `
exports[`tests loading system.yml: system.yml 1`] = `
{
"priority": 1,
"priority": 200,
"index_patterns": [
"whatsthis-*"
],

View file

@ -247,8 +247,11 @@ function getBaseTemplate(
packageName: string
): IndexTemplate {
return {
// This takes precedence over all index templates installed with the 'base' package
priority: 1,
// This takes precedence over all index templates installed by ES by default (logs-*-* and metrics-*-*)
// if this number is lower than the ES value (which is 100) this template will never be applied when a data stream
// is created. I'm using 200 here to give some room for users to create their own template and fit it between the
// default and the one the ingest manager uses.
priority: 200,
// To be completed with the correct index patterns
index_patterns: [`${templateName}-*`],
template: {