Skip to content

Commit

Permalink
Revert "feat: add metric relabeling so namespace label has the correc…
Browse files Browse the repository at this point in the history
…t value (which is the same as container_namespace) applied after scraping"

This reverts commit 05f3ac1.

Signed-off-by: Bastien Grasnick <[email protected]>
  • Loading branch information
BGrasnick committed Nov 20, 2023
1 parent 1e395b7 commit 49559f5
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions pkg/components/exporter/exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -489,14 +489,6 @@ func NewServiceMonitor() *monv1.ServiceMonitor {
TargetLabel: "instance",
}}

metricRelabelings := []*monv1.RelabelConfig{{
Action: "replace",
SourceLabels: []monv1.LabelName{
"container_namespace",
},
TargetLabel: "namespace",
}}

return &monv1.ServiceMonitor{
TypeMeta: metav1.TypeMeta{
APIVersion: monv1.SchemeGroupVersion.String(),
Expand All @@ -509,11 +501,10 @@ func NewServiceMonitor() *monv1.ServiceMonitor {
},
Spec: monv1.ServiceMonitorSpec{
Endpoints: []monv1.Endpoint{{
Port: ServicePortName,
Interval: "3s",
Scheme: "http",
RelabelConfigs: relabelings,
MetricRelabelConfigs: metricRelabelings,
Port: ServicePortName,
Interval: "3s",
Scheme: "http",
RelabelConfigs: relabelings,
}},
JobLabel: "app.kubernetes.io/name",
Selector: metav1.LabelSelector{
Expand Down

0 comments on commit 49559f5

Please sign in to comment.