Add flags to the run command for configuring cAdvisor housekeeping
#4686
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.
PR Description
Goal of this PR is to make cAdvisor housekeeping configurable in grafana alloy (see #4685).
cAdvisor handles the configuration of its housekeeping exclusively via flags. See cAdvisor housekeeping docs and cAdvisor source code. The variable in the source code is also global - so we cannot configure this on an alloy config block level. We would need to keep this setting also global in grafana alloy. Following options:
I've went with passing through the flags since most grafana alloy users already pass custom flags to alloy and it's less hassle than a new config option in the config files.
The
runcli command has now the following flags:I've also made dynamic housekeeping configurable while I'm at it (cAdvisor source code).
The defaults match the defaults of cAdvisor - so this shouldn't be a breaking change.
Which issue(s) this PR fixes
Fixes #4685
Notes to the Reviewer
PR Checklist