-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Fleet] Add <type>@custom component template to integrations index te… #192731
[Fleet] Add <type>@custom component template to integrations index te… #192731
Conversation
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
7f5819c
to
441808f
Compare
Pinging @elastic/fleet (Team:Fleet) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested locally and work as expected, LGTM 🚀
@@ -48,6 +48,7 @@ export const GLOBAL_DATA_TAG_EXCLUDED_INPUTS = new Set<string>([ | |||
|
|||
export const PACKAGE_TEMPLATE_SUFFIX = '@package'; | |||
export const USER_SETTINGS_TEMPLATE_SUFFIX = '@custom'; | |||
export const CUSTOM_TEMPLATE_SUFFIX = '@custom'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: could we use the same variable for USER_SETTINGS_TEMPLATE_SUFFIX
and CUSTOM_TEMPLATE_SUFFIX
We have a mechanism to reinstall all integrations when upgrading the stack https://github.com/elastic/kibana/blob/main/x-pack/plugins/fleet/server/constants/fleet_es_assets.ts#L14 do we want to bump it? |
Thanks for pointing this out @nchaulet! Making the feature available after upgrade makes sense - I've bumped |
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]
History
To update your PR or re-run it, just comment with: |
Starting backport for target branches: 8.x https://github.com/elastic/kibana/actions/runs/11667303817 |
Starting backport for target branches: 8.x https://github.com/elastic/kibana/actions/runs/11667303749 |
elastic#192731) ## Summary Relates elastic#190730 This PR adds a `<type>@Custom `component template to integrations index template's `composed_of` array. ### Testing Integration install/update should be tested. From my manual testing, Fleet seems to behave normally and the new component template is added to the `composed_of` array. For example, the output of `GET /_index_template/logs-system.auth` is: ```json { "index_templates": [ { "name": "logs-system.auth", "index_template": { "index_patterns": [ "logs-system.auth-*" ], "template": { "settings": {}, "mappings": { "_meta": { "package": { "name": "system" }, "managed_by": "fleet", "managed": true } } }, "composed_of": [ "logs@mappings", "logs@settings", "logs-system.auth@package", "logs@custom", "logs-system.auth@custom", "ecs@mappings", ".fleet_globals-1", ".fleet_agent_id_verification-1" ], "priority": 200, "_meta": { "package": { "name": "system" }, "managed_by": "fleet", "managed": true }, "data_stream": { "hidden": false, "allow_custom_routing": false, "failure_store": false }, "ignore_missing_component_templates": [ "logs@custom", "logs-system.auth@custom" ] } } ] } ``` ### Screenshot <img width="956" alt="Screenshot 2024-09-19 at 16 44 57" src="https://github.com/user-attachments/assets/7e1d8e67-1d78-45a7-bc8d-8e509f1a2533"> <img width="956" alt="Screenshot 2024-09-19 at 17 04 45" src="https://github.com/user-attachments/assets/8b6bbaf3-34b7-4169-8ca8-2bc6a38fe60d"> ### Checklist - [ ] [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 - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed (cherry picked from commit c8ff7ea)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
elastic#192731) ## Summary Relates elastic#190730 This PR adds a `<type>@Custom `component template to integrations index template's `composed_of` array. ### Testing Integration install/update should be tested. From my manual testing, Fleet seems to behave normally and the new component template is added to the `composed_of` array. For example, the output of `GET /_index_template/logs-system.auth` is: ```json { "index_templates": [ { "name": "logs-system.auth", "index_template": { "index_patterns": [ "logs-system.auth-*" ], "template": { "settings": {}, "mappings": { "_meta": { "package": { "name": "system" }, "managed_by": "fleet", "managed": true } } }, "composed_of": [ "logs@mappings", "logs@settings", "logs-system.auth@package", "logs@custom", "logs-system.auth@custom", "ecs@mappings", ".fleet_globals-1", ".fleet_agent_id_verification-1" ], "priority": 200, "_meta": { "package": { "name": "system" }, "managed_by": "fleet", "managed": true }, "data_stream": { "hidden": false, "allow_custom_routing": false, "failure_store": false }, "ignore_missing_component_templates": [ "logs@custom", "logs-system.auth@custom" ] } } ] } ``` ### Screenshot <img width="956" alt="Screenshot 2024-09-19 at 16 44 57" src="https://github.com/user-attachments/assets/7e1d8e67-1d78-45a7-bc8d-8e509f1a2533"> <img width="956" alt="Screenshot 2024-09-19 at 17 04 45" src="https://github.com/user-attachments/assets/8b6bbaf3-34b7-4169-8ca8-2bc6a38fe60d"> ### Checklist - [ ] [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 - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed (cherry picked from commit c8ff7ea)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…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>
Summary
Relates #190730
This PR adds a
<type>@custom
component template to integrations index template'scomposed_of
array.Testing
Integration install/update should be tested.
From my manual testing, Fleet seems to behave normally and the new component template is added to the
composed_of
array. For example, the output ofGET /_index_template/logs-system.auth
is:Screenshot
Checklist