[9.2] Add fleet policy revisions cleanup task (#242612)#245729
Merged
MichelLosier merged 1 commit intoelastic:9.2from Dec 9, 2025
Merged
[9.2] Add fleet policy revisions cleanup task (#242612)#245729MichelLosier merged 1 commit intoelastic:9.2from
MichelLosier merged 1 commit intoelastic:9.2from
Conversation
Resolves: elastic#119963 PR to add new Kibana config to allow list: elastic/cloud#149322 * Adds the background task `FleetPolicyRevisionsCleanupTask` which removes excess policy revisions from the `.fleet-policies` index * Enabled by default, disabled by new feature flag: ``` xpack.fleet.experimentalFeatures: enableFleetPolicyRevisionsCleanupTask: true ``` * Configurable with the following: ``` xpack.fleet.fleetPolicyRevisionsCleanup: interval: string // Time interval expression. Default: '1h' max_revisions: number // Maximum amount of policy revisions. Default: 10. max_policies_per_run: number // Maximum policies to delete revisions from per run. Default 100. ``` * Also adds an internal endpoint for the same operation: ``` POST kbn:/internal/fleet/agent_policies/_cleanup_revisions?apiVersion=1 { "maxRevisions": number, // max revisions a policy should have "maxPolicies": number, // max policies to process } ``` --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit d2e01dc) # Conflicts: # x-pack/platform/plugins/shared/fleet/common/experimental_features.ts # x-pack/platform/plugins/shared/fleet/moon.yml # x-pack/platform/test/fleet_api_integration/config.base.ts # x-pack/platform/test/plugin_api_integration/test_suites/task_manager/check_registered_task_types.ts
Contributor
|
Pinging @elastic/fleet (Team:Fleet) |
10 tasks
Contributor
💚 Build Succeeded
Metrics [docs]Public APIs missing comments
Page load bundle
|
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport
This will backport the following commits from
mainto9.2:Questions ?
Please refer to the Backport tool documentation