feat(helm): add configurable relabelings to PodMonitor resources#14678
Open
bezarsnba wants to merge 7 commits intolinkerd:mainfrom
Open
feat(helm): add configurable relabelings to PodMonitor resources#14678bezarsnba wants to merge 7 commits intolinkerd:mainfrom
bezarsnba wants to merge 7 commits intolinkerd:mainfrom
Conversation
**Problem** Currently, PodMonitor resources for linkerd-control-plane components (controller, serviceMirror, and proxy-injector) have fixed metricRelabelings that cannot be customized. This limits operational flexibility for: - Adding organizational/environment-specific labels - Implementing cardinality control strategies - Customizing metric routing and processing **Solution** - Added configurable metricRelabelings to PodMonitor templates - Added additionalRelabelings configuration option to extend default rules - Maintained backward compatibility with existing configurations - Enhanced values.yaml with comprehensive configuration examples - Created debug infrastructure for testing and validation **Validation** - Verified helm template rendering with various configurations - Tested additionalRelabelings functionality with sample rules - Ensured backward compatibility with existing deployments - Added comprehensive debug.values.yaml for development testing Signed-off-by: Beza <[email protected]>
Signed-off-by: Beza <[email protected]>
Signed-off-by: Beza <[email protected]>
Signed-off-by: Beza <[email protected]>
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.
Problem
The current PodMonitor templates have hardcoded
metricRelabelingsthat cannot be customized. This prevents users from:Somes scenarios require custom metric labels to meet regulatory compliance or internal governance policies.
Solution
Add new configuration options to the Helm chart:
podMonitor.*.metricRelabelings- Replace default relabelings entirelypodMonitor.*.additionalRelabelings- Extend existing relabelingsChanges Made
podmonitor.yamltemplate to support configurable relabelingsvalues.yamlwith documentation and examplesdebug.values.yamlExample Usage
Testing
✅ Helm template renders correctly
✅ Deploys successfully to Kubernetes
✅ Prometheus processes custom relabelings
✅ Backward compatibility confirmed