Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[8.x] [Fleet] Add <type>@Custom component template to integrati…
…ons index te… (#192731) (#198808) # Backport This will backport the following commits from `main` to `8.x`: - [[Fleet] Add <type>@Custom component template to integrations index te… (#192731)](#192731) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Jill Guyonnet","email":"jill.guyonnet@elastic.co"},"sourceCommit":{"committedDate":"2024-09-20T13:28:23Z","message":"[Fleet] Add <type>@Custom component template to integrations index te… (#192731)\n\n## Summary\r\n\r\nRelates https://github.com/elastic/kibana/issues/190730\r\n\r\nThis PR adds a `<type>@Custom `component template to integrations index\r\ntemplate's `composed_of` array.\r\n\r\n### Testing\r\n\r\nIntegration install/update should be tested.\r\n\r\nFrom my manual testing, Fleet seems to behave normally and the new\r\ncomponent template is added to the `composed_of` array. For example, the\r\noutput of `GET /_index_template/logs-system.auth` is:\r\n```json\r\n{\r\n \"index_templates\": [\r\n {\r\n \"name\": \"logs-system.auth\",\r\n \"index_template\": {\r\n \"index_patterns\": [\r\n \"logs-system.auth-*\"\r\n ],\r\n \"template\": {\r\n \"settings\": {},\r\n \"mappings\": {\r\n \"_meta\": {\r\n \"package\": {\r\n \"name\": \"system\"\r\n },\r\n \"managed_by\": \"fleet\",\r\n \"managed\": true\r\n }\r\n }\r\n },\r\n \"composed_of\": [\r\n \"logs@mappings\",\r\n \"logs@settings\",\r\n \"logs-system.auth@package\",\r\n \"logs@custom\",\r\n \"logs-system.auth@custom\",\r\n \"ecs@mappings\",\r\n \".fleet_globals-1\",\r\n \".fleet_agent_id_verification-1\"\r\n ],\r\n \"priority\": 200,\r\n \"_meta\": {\r\n \"package\": {\r\n \"name\": \"system\"\r\n },\r\n \"managed_by\": \"fleet\",\r\n \"managed\": true\r\n },\r\n \"data_stream\": {\r\n \"hidden\": false,\r\n \"allow_custom_routing\": false,\r\n \"failure_store\": false\r\n },\r\n \"ignore_missing_component_templates\": [\r\n \"logs@custom\",\r\n \"logs-system.auth@custom\"\r\n ]\r\n }\r\n }\r\n ]\r\n}\r\n```\r\n\r\n### Screenshot\r\n\r\n<img width=\"956\" alt=\"Screenshot 2024-09-19 at 16 44 57\"\r\nsrc=\"https://github.com/user-attachments/assets/7e1d8e67-1d78-45a7-bc8d-8e509f1a2533\">\r\n\r\n<img width=\"956\" alt=\"Screenshot 2024-09-19 at 17 04 45\"\r\nsrc=\"https://github.com/user-attachments/assets/8b6bbaf3-34b7-4169-8ca8-2bc6a38fe60d\">\r\n\r\n### Checklist\r\n\r\n- [ ]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas added for features that require explanation or tutorials\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n- [ ] [Flaky Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\r\nused on any tests changed","sha":"c8ff7ea27ab02548c25c3c295bbd988e3adfbba4","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:enhancement","Team:Fleet","v9.0.0","backport:prev-minor"],"title":"[Fleet] Add <type>@Custom component template to integrations index te…","number":192731,"url":"https://github.com/elastic/kibana/pull/192731","mergeCommit":{"message":"[Fleet] Add <type>@Custom component template to integrations index te… (#192731)\n\n## Summary\r\n\r\nRelates https://github.com/elastic/kibana/issues/190730\r\n\r\nThis PR adds a `<type>@Custom `component template to integrations index\r\ntemplate's `composed_of` array.\r\n\r\n### Testing\r\n\r\nIntegration install/update should be tested.\r\n\r\nFrom my manual testing, Fleet seems to behave normally and the new\r\ncomponent template is added to the `composed_of` array. For example, the\r\noutput of `GET /_index_template/logs-system.auth` is:\r\n```json\r\n{\r\n \"index_templates\": [\r\n {\r\n \"name\": \"logs-system.auth\",\r\n \"index_template\": {\r\n \"index_patterns\": [\r\n \"logs-system.auth-*\"\r\n ],\r\n \"template\": {\r\n \"settings\": {},\r\n \"mappings\": {\r\n \"_meta\": {\r\n \"package\": {\r\n \"name\": \"system\"\r\n },\r\n \"managed_by\": \"fleet\",\r\n \"managed\": true\r\n }\r\n }\r\n },\r\n \"composed_of\": [\r\n \"logs@mappings\",\r\n \"logs@settings\",\r\n \"logs-system.auth@package\",\r\n \"logs@custom\",\r\n \"logs-system.auth@custom\",\r\n \"ecs@mappings\",\r\n \".fleet_globals-1\",\r\n \".fleet_agent_id_verification-1\"\r\n ],\r\n \"priority\": 200,\r\n \"_meta\": {\r\n \"package\": {\r\n \"name\": \"system\"\r\n },\r\n \"managed_by\": \"fleet\",\r\n \"managed\": true\r\n },\r\n \"data_stream\": {\r\n \"hidden\": false,\r\n \"allow_custom_routing\": false,\r\n \"failure_store\": false\r\n },\r\n \"ignore_missing_component_templates\": [\r\n \"logs@custom\",\r\n \"logs-system.auth@custom\"\r\n ]\r\n }\r\n }\r\n ]\r\n}\r\n```\r\n\r\n### Screenshot\r\n\r\n<img width=\"956\" alt=\"Screenshot 2024-09-19 at 16 44 57\"\r\nsrc=\"https://github.com/user-attachments/assets/7e1d8e67-1d78-45a7-bc8d-8e509f1a2533\">\r\n\r\n<img width=\"956\" alt=\"Screenshot 2024-09-19 at 17 04 45\"\r\nsrc=\"https://github.com/user-attachments/assets/8b6bbaf3-34b7-4169-8ca8-2bc6a38fe60d\">\r\n\r\n### Checklist\r\n\r\n- [ ]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas added for features that require explanation or tutorials\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n- [ ] [Flaky Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\r\nused on any tests changed","sha":"c8ff7ea27ab02548c25c3c295bbd988e3adfbba4"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/192731","number":192731,"mergeCommit":{"message":"[Fleet] Add <type>@Custom component template to integrations index te… (#192731)\n\n## Summary\r\n\r\nRelates https://github.com/elastic/kibana/issues/190730\r\n\r\nThis PR adds a `<type>@Custom `component template to integrations index\r\ntemplate's `composed_of` array.\r\n\r\n### Testing\r\n\r\nIntegration install/update should be tested.\r\n\r\nFrom my manual testing, Fleet seems to behave normally and the new\r\ncomponent template is added to the `composed_of` array. For example, the\r\noutput of `GET /_index_template/logs-system.auth` is:\r\n```json\r\n{\r\n \"index_templates\": [\r\n {\r\n \"name\": \"logs-system.auth\",\r\n \"index_template\": {\r\n \"index_patterns\": [\r\n \"logs-system.auth-*\"\r\n ],\r\n \"template\": {\r\n \"settings\": {},\r\n \"mappings\": {\r\n \"_meta\": {\r\n \"package\": {\r\n \"name\": \"system\"\r\n },\r\n \"managed_by\": \"fleet\",\r\n \"managed\": true\r\n }\r\n }\r\n },\r\n \"composed_of\": [\r\n \"logs@mappings\",\r\n \"logs@settings\",\r\n \"logs-system.auth@package\",\r\n \"logs@custom\",\r\n \"logs-system.auth@custom\",\r\n \"ecs@mappings\",\r\n \".fleet_globals-1\",\r\n \".fleet_agent_id_verification-1\"\r\n ],\r\n \"priority\": 200,\r\n \"_meta\": {\r\n \"package\": {\r\n \"name\": \"system\"\r\n },\r\n \"managed_by\": \"fleet\",\r\n \"managed\": true\r\n },\r\n \"data_stream\": {\r\n \"hidden\": false,\r\n \"allow_custom_routing\": false,\r\n \"failure_store\": false\r\n },\r\n \"ignore_missing_component_templates\": [\r\n \"logs@custom\",\r\n \"logs-system.auth@custom\"\r\n ]\r\n }\r\n }\r\n ]\r\n}\r\n```\r\n\r\n### Screenshot\r\n\r\n<img width=\"956\" alt=\"Screenshot 2024-09-19 at 16 44 57\"\r\nsrc=\"https://github.com/user-attachments/assets/7e1d8e67-1d78-45a7-bc8d-8e509f1a2533\">\r\n\r\n<img width=\"956\" alt=\"Screenshot 2024-09-19 at 17 04 45\"\r\nsrc=\"https://github.com/user-attachments/assets/8b6bbaf3-34b7-4169-8ca8-2bc6a38fe60d\">\r\n\r\n### Checklist\r\n\r\n- [ ]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas added for features that require explanation or tutorials\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n- [ ] [Flaky Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\r\nused on any tests changed","sha":"c8ff7ea27ab02548c25c3c295bbd988e3adfbba4"}}]}] BACKPORT--> Co-authored-by: Jill Guyonnet <jill.guyonnet@elastic.co>
- Loading branch information