kibana/x-pack/test
John Schulz 868ae59c93
[Fleet] Support user overrides in composable templates (#101769)
## Summary
Closes #90454
Closes https://github.com/elastic/kibana/issues/72959

 * Rename the component templates which are [installed for some packages](https://github.com/elastic/kibana/blob/master/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/install.ts#L197-L213) from `${templateName}-mappings` and `${templateName}-settings` to `${templateName}@mappings` and `${templateName}@settings`
 * When any package is installed, add a component template named `${templateName}@custom`
 * Any of above templates also include a `_meta` property with `{ package: { name: packageName } }`
 * On package installation, add any installed component templates to the `installed_es` property of the `epm-packages` saved object
 * On package removal, remove any installed component templates from the `installed_es` property of the `epm-packages` saved object

<details><summary>Kibana logs showing component templates added for package</summary>

```
   │ info [o.e.c.m.MetadataIndexTemplateService] [JFSIII.local] adding component template [logs-endpoint.events.file@mappings]
   │ info [o.e.c.m.MetadataIndexTemplateService] [JFSIII.local] adding component template [logs-endpoint.events.registry@mappings]
   │ info [o.e.c.m.MetadataIndexTemplateService] [JFSIII.local] adding component template [.logs-endpoint.diagnostic.collection@mappings]
   │ info [o.e.c.m.MetadataIndexTemplateService] [JFSIII.local] adding component template [logs-endpoint.events.library@mappings]
   │ info [o.e.c.m.MetadataIndexTemplateService] [JFSIII.local] adding component template [logs-endpoint.events.security@mappings]
   │ info [o.e.c.m.MetadataIndexTemplateService] [JFSIII.local] adding component template [logs-endpoint.events.network@mappings]
   │ info [o.e.c.m.MetadataIndexTemplateService] [JFSIII.local] adding component template [logs-endpoint.alerts@mappings]
   │ info [o.e.c.m.MetadataIndexTemplateService] [JFSIII.local] adding component template [metrics-endpoint.metrics@mappings]
   │ info [o.e.c.m.MetadataIndexTemplateService] [JFSIII.local] adding component template [logs-endpoint.events.process@mappings]
   │ info [o.e.c.m.MetadataIndexTemplateService] [JFSIII.local] adding component template [metrics-endpoint.policy@mappings]
   │ info [o.e.c.m.MetadataIndexTemplateService] [JFSIII.local] adding component template [metrics-endpoint.metadata@mappings]
   │ info [o.e.c.m.MetadataIndexTemplateService] [JFSIII.local] adding component template [logs-endpoint.events.registry@custom]
   │ info [o.e.c.m.MetadataIndexTemplateService] [JFSIII.local] adding component template [.logs-endpoint.diagnostic.collection@custom]
   │ info [o.e.c.m.MetadataIndexTemplateService] [JFSIII.local] adding component template [logs-endpoint.events.security@custom]
   │ info [o.e.c.m.MetadataIndexTemplateService] [JFSIII.local] adding component template [logs-endpoint.events.file@custom]
   │ info [o.e.c.m.MetadataIndexTemplateService] [JFSIII.local] adding component template [logs-endpoint.events.library@custom]
   │ info [o.e.c.m.MetadataIndexTemplateService] [JFSIII.local] adding component template [logs-endpoint.events.network@custom]
   │ info [o.e.c.m.MetadataIndexTemplateService] [JFSIII.local] adding component template [logs-endpoint.alerts@custom]
   │ info [o.e.c.m.MetadataIndexTemplateService] [JFSIII.local] adding component template [metrics-endpoint.metrics@custom]
   │ info [o.e.c.m.MetadataIndexTemplateService] [JFSIII.local] adding component template [metrics-endpoint.policy@custom]
   │ info [o.e.c.m.MetadataIndexTemplateService] [JFSIII.local] adding component template [logs-endpoint.events.process@custom]
   │ info [o.e.c.m.MetadataIndexTemplateService] [JFSIII.local] adding component template [metrics-endpoint.metadata@custom]
```

</details>

<details><summary>screenshot - component templates are editable in the Stack Management UI</summary>
<img width="1342" alt="Screen Shot 2021-06-17 at 4 06 24 PM" src="https://user-images.githubusercontent.com/57655/122465421-1502bb80-cf86-11eb-94f4-9880cb3ea844.png">
</details>


### Checklist

Delete any items that are not applicable to this PR.

- [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials
- [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
2021-06-23 06:57:39 -04:00
..
accessibility [canvas] New Home Page (#102446) 2021-06-22 14:11:15 -05:00
alerting_api_integration Revert "[alerting][actions] add task scheduled date and delay to event log (#102252)" 2021-06-22 21:55:29 -05:00
api_integration [ML] Functional tests - temporarily skip close_jobs API tests 2021-06-23 09:42:09 +02:00
api_integration_basic [esArchiver] drop support for --dir, use repo-relative paths instead (#101345) 2021-06-08 17:37:42 -04:00
apm_api_integration [APM] Remove omitEsFieldValue and update parseEnvironmentUrlParam (#101876) 2021-06-17 15:54:05 +02:00
banners_functional [esArchiver] drop support for --dir, use repo-relative paths instead (#101345) 2021-06-08 17:37:42 -04:00
case_api_integration [Security Solution] show case names in isolation success message (#102664) 2021-06-22 14:01:24 -04:00
common [kbn/test] move types/ftr into src (#99555) 2021-05-17 09:51:53 -07:00
detection_engine_api_integration [Security Solution] adds wrapSequences method (RAC) (#102106) 2021-06-17 16:54:38 -04:00
encrypted_saved_objects_api_integration [esArchiver] drop support for --dir, use repo-relative paths instead (#101345) 2021-06-08 17:37:42 -04:00
endpoint_api_integration_no_ingest [esArchiver] drop support for --dir, use repo-relative paths instead (#101345) 2021-06-08 17:37:42 -04:00
examples [esArchiver] drop support for --dir, use repo-relative paths instead (#101345) 2021-06-08 17:37:42 -04:00
fleet_api_integration [Fleet] Support user overrides in composable templates (#101769) 2021-06-23 06:57:39 -04:00
fleet_functional [Fleet + Integrations UI] Migrate Fleet UI to new tabbed layout (#101828) 2021-06-16 10:29:38 -07:00
functional skip flaky suite (#84440) 2021-06-23 11:28:08 +01:00
functional_basic Change file data visualizer links to point to new location in home application (#101393) 2021-06-09 08:30:40 -06:00
functional_cors [kbn/test] move types/ftr into src (#99555) 2021-05-17 09:51:53 -07:00
functional_embedded [kbn/test] move types/ftr into src (#99555) 2021-05-17 09:51:53 -07:00
functional_enterprise_search [esArchiver] drop support for --dir, use repo-relative paths instead (#101345) 2021-06-08 17:37:42 -04:00
functional_vis_wizard [esArchiver] drop support for --dir, use repo-relative paths instead (#101345) 2021-06-08 17:37:42 -04:00
functional_with_es_ssl [Uptime] Refactor cert alerts from batched to individual (#102138) 2021-06-22 20:56:43 -04:00
licensing_plugin [kbn/test] move types/ftr into src (#99555) 2021-05-17 09:51:53 -07:00
lists_api_integration [esArchiver] drop support for --dir, use repo-relative paths instead (#101345) 2021-06-08 17:37:42 -04:00
load [esArchiver] drop support for --dir, use repo-relative paths instead (#101345) 2021-06-08 17:37:42 -04:00
observability_api_integration [Kuery] Move json utils (#102058) 2021-06-16 18:15:47 +03:00
plugin_api_integration [Task Manager] adds capacity estimation to the TM health endpoint (#100475) 2021-06-14 13:52:30 +01:00
plugin_api_perf [esArchiver] drop support for --dir, use repo-relative paths instead (#101345) 2021-06-08 17:37:42 -04:00
plugin_functional [RAC] T-Grid is moving to a new home (#100265) 2021-06-22 18:56:33 -04:00
reporting_api_integration Replacing es_archives/reporting/ecommerce_kibana with kbn_archiver/reporting/ecommerce.json as part of migrating to kbn_archiver (#102825) 2021-06-22 19:16:53 -04:00
reporting_functional Replacing es_archives/reporting/ecommerce_kibana with kbn_archiver/reporting/ecommerce.json as part of migrating to kbn_archiver (#102825) 2021-06-22 19:16:53 -04:00
saved_object_api_integration Allow initialNamespaces to be used for isolated types (#102585) 2021-06-22 20:36:04 +02:00
saved_object_tagging [esArchiver] drop support for --dir, use repo-relative paths instead (#101345) 2021-06-08 17:37:42 -04:00
saved_objects_field_count [kbn/test] move types/ftr into src (#99555) 2021-05-17 09:51:53 -07:00
search_sessions_integration [esArchiver] drop support for --dir, use repo-relative paths instead (#101345) 2021-06-08 17:37:42 -04:00
security_api_integration Update @elastic/elasticsearch to 8.0.0-canary13 (#98266) 2021-06-08 15:06:06 +02:00
security_functional Fix AppContainer layout (#101793) 2021-06-10 14:18:35 -04:00
security_solution_cypress [esArchiver] drop support for --dir, use repo-relative paths instead (#101345) 2021-06-08 17:37:42 -04:00
security_solution_endpoint [Fleet] Improve performance of Fleet setup (#102219) 2021-06-17 11:58:41 -07:00
security_solution_endpoint_api_int [Fleet] Improve performance of Fleet setup (#102219) 2021-06-17 11:58:41 -07:00
security_solution_ftr/page_objects/detections [ts] migrate x-pack/test to composite ts project (#101441) 2021-06-08 12:54:05 -04:00
spaces_api_integration Cleanup outdated @elastic/elasticsearch client type errors (#101741) 2021-06-21 10:03:00 -04:00
stack_functional_integration [QA] Changes the telemetry banner dismiss location (#102721) 2021-06-21 14:33:12 -04:00
ui_capabilities [esArchiver] drop support for --dir, use repo-relative paths instead (#101345) 2021-06-08 17:37:42 -04:00
upgrade Upgrade functional test fixes (#100306) 2021-05-19 13:08:41 -06:00
upgrade_assistant_integration [esArchiver] drop support for --dir, use repo-relative paths instead (#101345) 2021-06-08 17:37:42 -04:00
usage_collection [kbn/test] move types/ftr into src (#99555) 2021-05-17 09:51:53 -07:00
visual_regression [esArchiver] drop support for --dir, use repo-relative paths instead (#101345) 2021-06-08 17:37:42 -04:00
tsconfig.json Revert "[xpack/test] restore incremental: false in ts project" 2021-06-08 14:26:26 -07:00