Skip to content

[FEATURE] Use index templates for tenant_template #1222

@AMoo-Miki

Description

@AMoo-Miki

Is your feature request related to a problem?

await esClient.indices.putTemplate({
name: 'tenant_template',
body: {
index_patterns: [
opensearchDashboardsIndex + '_-*_*',
opensearchDashboardsIndex + '_0*_*',
opensearchDashboardsIndex + '_1*_*',
opensearchDashboardsIndex + '_2*_*',
opensearchDashboardsIndex + '_3*_*',
opensearchDashboardsIndex + '_4*_*',
opensearchDashboardsIndex + '_5*_*',
opensearchDashboardsIndex + '_6*_*',
opensearchDashboardsIndex + '_7*_*',
opensearchDashboardsIndex + '_8*_*',
opensearchDashboardsIndex + '_9*_*',
],
settings: {
number_of_shards: 1,
},
mappings,
},
});

Since the legacy template currently being used can be overridden by index templates, it would be better to have tenant_template created as an index template and with the highest possible priority to protect all .kibana* system indices from being corrupted simply because their mapping was overridden by some overzealous index template.

What solution would you like?
Use client.indices.putIndexTemplate and set priority to perhaps 263-1.

What alternatives have you considered?
None

Do you have any additional context?
No

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions