forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Fleet] Cascade agent policy's namespace to package policies (elastic…
…#174776) ## Summary Cascade agent policy's namespace to package policies. This change introduces a new behavior for package policies namespace, mirroring the way outputs work: - Allow leaving namespace blank when creating/updating a package policy. Agent policies namespace keeps being mandatory. - If a package policy has a namespace defined, that's used to compile the inputs in the full agent policy. - If a package policy has blank namespace, use the agent policy one. - Namespace "default" is no longer used as default for package policy namespace across the code - All the checks for the namespace are now moved to full agent policy handler. ## UI The only change in the UI is that the namespace in the policy creation can now be left blank: ![Screenshot 2024-01-16 at 16 55 07](https://github.com/elastic/kibana/assets/16084106/ed1be524-c4e6-49ac-8b53-39b07240d204) I think that the text is still relevant, as nothing has changed from that point of view. ## Testing ### Creation - Inherit namespace - Create agent policy with namespace `agentpolicyspace` - Create package policy with blank namespace - Generate full agent policy; package policy should have namespace `agentpolicyspace` ### Creation - Package policy custom namespace - Create agent policy with namespace `agentpolicyspace` - Create package policy with namespace `packagepolicyspace` - Generate full agent policy; package policy should have namespace `packagepolicyspace` ### Update - Change default namespace - Create agent policy with namespace `agentpolicyspace` - Create package policy with blank namespace - Generate full agent policy; Package policy should have namespace `agentpolicyspace` - Change agent policy namespace to `newspace` - Package policy should have namespace `newspace` as well ### Update - Don't override custom namespace - Create agent policy with namespace `agentpolicyspace` - Create package policy with namespace `packagepolicyspace` - Change agent policy namespace to `newspace` ### Check full agent policy - namespace should be correct; check inputs for the package policies and output permissions as well ### Checklist - [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [ ] [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 --------- Co-authored-by: Kibana Machine <[email protected]>
- Loading branch information
1 parent
1a51e61
commit 4e41582
Showing
28 changed files
with
416 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,6 +59,5 @@ properties: | |
type: boolean | ||
required: | ||
- name | ||
- namespace | ||
- policy_id | ||
- enabled |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.