Skip to content

Commit 00d2a04

Browse files
committed
Fixed e2e test
Signed-off-by: Yuri Sa <[email protected]>
1 parent fc03579 commit 00d2a04

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

internal/manifests/manifestutils/labels.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
package manifestutils
1616

1717
import (
18-
"fmt"
1918
"regexp"
2019
"strings"
2120

@@ -90,6 +89,6 @@ func SelectorMatchLabels(instance metav1.ObjectMeta, component string) map[strin
9089
"app.kubernetes.io/instance": naming.Truncate("%s.%s", 63, instance.Namespace, instance.Name),
9190
"app.kubernetes.io/part-of": "opentelemetry",
9291
"app.kubernetes.io/component": component,
93-
"app.kubernetes.io/name": fmt.Sprintf("%s-monitoring", instance.Name),
92+
"app.kubernetes.io/name": naming.ServiceMonitorSelectorName(instance.Name),
9493
}
9594
}

internal/naming/main.go

+4
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,10 @@ func ServiceAccount(otelcol string) string {
159159
func ServiceMonitor(otelcol string) string {
160160
return DNSName(Truncate("%s-collector", 63, otelcol))
161161
}
162+
// ServiceMonitorSelectorName builds the service Monitor name based on the instance.
163+
func ServiceMonitorSelectorName(otelcol string) string {
164+
return DNSName(Truncate("%s-monitoring", 63, otelcol))
165+
}
162166

163167
// PodMonitor builds the pod Monitor name based on the instance.
164168
func PodMonitor(otelcol string) string {

0 commit comments

Comments
 (0)