Skip to content

feat(matcher): add custom matcher to handle regexp/glob/etc for startupcpuboost containerName#150

Open
ggiacobazzi wants to merge 2 commits into
google:mainfrom
ggiacobazzi:feat/custom-matcher-container-name
Open

feat(matcher): add custom matcher to handle regexp/glob/etc for startupcpuboost containerName#150
ggiacobazzi wants to merge 2 commits into
google:mainfrom
ggiacobazzi:feat/custom-matcher-container-name

Conversation

@ggiacobazzi
Copy link
Copy Markdown

This pull request adds support for pattern matching in the containerName field of StartupCPUBoost resource policies, allowing policies to target multiple containers dynamically.

Enhancements for container policy matching:

  • Added a custom pattern.Matcher to support exact strings, glob wildcards (e.g., web-*), and regular expressions (e.g., ^(app|api).*$), enabling broader targeting of containers.

  • Updated the core StartupCPUBoostImpl to evaluate container policies based on pattern specificity (Exact > Glob > Regex > Wildcard). The first matching policy according to this precedence order is applied.

  • Included new examples and precedence order documentation in the README.md and added a pattern-matching-examples.yaml manifest to demonstrate the new configuration options.


This pull request solves #129

p.s great tool :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant