Commit a643ed2
fix(kube-stack): extend MetricRelabeling schema (#2071)
* fix(kube-stack): extend MetricRelabeling schema to support full Prometheus relabel_config
The MetricRelabeling schema was too restrictive, only allowing action, regex,
and sourceLabels properties. This prevented using standard Prometheus
relabel_config features like targetLabel and replacement for label
transformation use cases.
Changes:
- Add missing fields to MetricRelabeling: targetLabel, replacement, separator, modulus
- Remove incorrect required constraint (different actions need different fields)
- Align KubeServiceMonitor relabeling fields to use MetricRelabeling schema
- Align Monitor.relabelings to use MetricRelabeling schema for consistency
This enables use cases like:
metricRelabelings:
- sourceLabels: [namespace]
targetLabel: k8s.namespace.name
action: replace
Affected components now properly support full relabel_config:
- kube-state-metrics.prometheus.monitor.metricRelabelings
- kubeApiServer.serviceMonitor.metricRelabelings
- prometheus-node-exporter.prometheus.monitor.metricRelabelings
- All KubeServiceMonitor relabeling fields
- All Monitor relabeling fields
* chore(kube-stack): bump chart version to 0.13.2
---------
Co-authored-by: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com>1 parent 6118b15 commit a643ed2
2 files changed
Lines changed: 28 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3819 | 3819 | | |
3820 | 3820 | | |
3821 | 3821 | | |
3822 | | - | |
| 3822 | + | |
| 3823 | + | |
| 3824 | + | |
3823 | 3825 | | |
3824 | 3826 | | |
3825 | 3827 | | |
3826 | | - | |
| 3828 | + | |
| 3829 | + | |
| 3830 | + | |
3827 | 3831 | | |
3828 | 3832 | | |
3829 | 3833 | | |
| |||
3860 | 3864 | | |
3861 | 3865 | | |
3862 | 3866 | | |
3863 | | - | |
| 3867 | + | |
| 3868 | + | |
| 3869 | + | |
3864 | 3870 | | |
3865 | 3871 | | |
3866 | 3872 | | |
3867 | | - | |
| 3873 | + | |
| 3874 | + | |
| 3875 | + | |
3868 | 3876 | | |
3869 | 3877 | | |
3870 | 3878 | | |
| |||
3982 | 3990 | | |
3983 | 3991 | | |
3984 | 3992 | | |
3985 | | - | |
| 3993 | + | |
| 3994 | + | |
| 3995 | + | |
3986 | 3996 | | |
3987 | 3997 | | |
3988 | 3998 | | |
| |||
4022 | 4032 | | |
4023 | 4033 | | |
4024 | 4034 | | |
| 4035 | + | |
| 4036 | + | |
| 4037 | + | |
| 4038 | + | |
| 4039 | + | |
| 4040 | + | |
| 4041 | + | |
| 4042 | + | |
| 4043 | + | |
| 4044 | + | |
| 4045 | + | |
| 4046 | + | |
4025 | 4047 | | |
4026 | 4048 | | |
4027 | | - | |
4028 | | - | |
4029 | | - | |
4030 | | - | |
4031 | | - | |
4032 | 4049 | | |
4033 | 4050 | | |
4034 | 4051 | | |
| |||
0 commit comments