Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ require (
github.com/onsi/ginkgo/v2 v2.27.5
github.com/onsi/gomega v1.39.0
github.com/openshift/api v0.0.0-20250707164913-2cd5821c9080
github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.86.2
github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.87.0
github.com/prometheus/common v0.67.5
github.com/sirupsen/logrus v1.9.4
github.com/stretchr/testify v1.11.1
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ github.com/pelletier/go-toml/v2 v2.2.4/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.86.2 h1:VRXUgbGmpmjZgFYiUnTwlC+JjfCUs5KKFsorJhI1ZKQ=
github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.86.2/go.mod h1:nPk0OteXBkbT0CRCa2oZQL1jRLW6RJ2fuIijHypeJdk=
github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.87.0 h1:QK37j5ZUtBwbyZkF4BBAs3bQQ1gYKG8e+g1BdNZBr/M=
github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.87.0/go.mod h1:WHiLZmOWVop/MoYvRD58LfnPeyE+dcITby/jQjg83Hw=
github.com/prometheus/client_golang v1.23.2 h1:Je96obch5RDVy3FDMndoUsjAhG5Edi49h0RJWRi/o0o=
github.com/prometheus/client_golang v1.23.2/go.mod h1:Tb1a6LWHB3/SPIzCoaDXI4I8UHKeFTEQ1YCr+0Gyqmg=
github.com/prometheus/client_model v0.6.2 h1:oBsgwpGs7iVziMvrGhE53c/GrLUsZdHnqNwqPLxwZyk=
Expand Down
2 changes: 1 addition & 1 deletion internal/controller/consoleplugin/consoleplugin_objects.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ func (b *builder) serviceMonitor() *monitoringv1.ServiceMonitor {
{
Port: metricsPortName,
Interval: "15s",
Scheme: "https",
Scheme: ptr.To(monitoringv1.SchemeHTTPS),
TLSConfig: &monitoringv1.TLSConfig{
SafeTLSConfig: monitoringv1.SafeTLSConfig{
ServerName: ptr.To(serverName),
Expand Down
2 changes: 1 addition & 1 deletion internal/controller/ebpf/agent_metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ func (c *AgentController) promServiceMonitoring(target *flowslatest.FlowCollecto
{
Port: "metrics",
Interval: "30s",
Scheme: scheme,
Scheme: &scheme,
TLSConfig: smTLS,
},
},
Expand Down
2 changes: 1 addition & 1 deletion internal/controller/flp/flp_common_objects.go
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ func serviceMonitor(desired *flowslatest.FlowCollectorSpec, smName, svcName, nam
{
Port: prometheusPortName,
Interval: "15s",
Scheme: scheme,
Scheme: &scheme,
TLSConfig: smTLS,
HonorLabels: true,
// Relabel for Thanos multi-tenant endpoint, which requires having the namespace label
Expand Down
3 changes: 2 additions & 1 deletion internal/controller/flp/flp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (
"github.com/netobserv/network-observability-operator/internal/pkg/helper"
"github.com/netobserv/network-observability-operator/internal/pkg/manager/status"
"github.com/netobserv/network-observability-operator/internal/pkg/metrics/alerts"
v1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1"

"github.com/stretchr/testify/assert"
appsv1 "k8s.io/api/apps/v1"
Expand Down Expand Up @@ -555,7 +556,7 @@ func TestServiceMonitorChanged(t *testing.T) {
// Check scheme changed
b, _ = newMonolithBuilder(info.NewInstance(image2, status.Instance{}), &cfg, b.flowMetrics, nil, nil)
fourth := b.serviceMonitor()
fourth.Spec.Endpoints[0].Scheme = "https"
fourth.Spec.Endpoints[0].Scheme = ptr.To(v1.SchemeHTTPS)

report = helper.NewChangeReport("")
assert.True(helper.ServiceMonitorChanged(third, fourth, &report))
Expand Down
10 changes: 5 additions & 5 deletions internal/pkg/helper/monitoring.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,18 @@ func GetSecretOrConfigMap(file *flowslatest.FileReference) monitoringv1.SecretOr
}
}

func GetServiceMonitorTLSConfig(tls *flowslatest.ServerTLS, serverName string, isDownstream bool) (string, *monitoringv1.TLSConfig) {
func GetServiceMonitorTLSConfig(tls *flowslatest.ServerTLS, serverName string, isDownstream bool) (monitoringv1.Scheme, *monitoringv1.TLSConfig) {
if tls.Type == flowslatest.ServerTLSAuto {
if isDownstream {
return "https", &monitoringv1.TLSConfig{
return monitoringv1.SchemeHTTPS, &monitoringv1.TLSConfig{
SafeTLSConfig: monitoringv1.SafeTLSConfig{
ServerName: ptr.To(serverName),
},
CAFile: "/etc/prometheus/configmaps/serving-certs-ca-bundle/service-ca.crt",
}
}
// Upstream prometheus disallows CAFile
return "https", &monitoringv1.TLSConfig{
return monitoringv1.SchemeHTTPS, &monitoringv1.TLSConfig{
SafeTLSConfig: monitoringv1.SafeTLSConfig{
ServerName: ptr.To(serverName),
CA: monitoringv1.SecretOrConfigMap{
Expand All @@ -64,8 +64,8 @@ func GetServiceMonitorTLSConfig(tls *flowslatest.ServerTLS, serverName string, i
if !tls.InsecureSkipVerify && tls.ProvidedCaFile != nil && tls.ProvidedCaFile.File != "" {
tlsOut.SafeTLSConfig.CA = GetSecretOrConfigMap(tls.ProvidedCaFile)
}
return "https", &tlsOut
return monitoringv1.SchemeHTTPS, &tlsOut
}

return "http", nil
return monitoringv1.SchemeHTTP, nil
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ github.com/openshift/api/security/v1/zz_generated.crd-manifests
# github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2
## explicit
github.com/pmezard/go-difflib/difflib
# github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.86.2
# github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.87.0
## explicit; go 1.24.0
github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring
github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1
Expand Down