Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update module github.com/prometheus-operator/prometheus-operator/pkg/client to v0.79.2 #480

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
3 changes: 2 additions & 1 deletion cmd/manager/operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -705,6 +705,7 @@ func getDefaultRoles(platform PlatformType) []string {

func generateOperatorServiceMonitor(service *v1.Service, namespace string) *monitoring.ServiceMonitor {
serviceMonitor := GenerateServiceMonitor(service)
m := "metrics." + namespace + ".svc"
for i := range serviceMonitor.Spec.Endpoints {
if serviceMonitor.Spec.Endpoints[i].Port == ctrlMetrics.ControllerMetricsServiceName {
serviceMonitor.Spec.Endpoints[i].Path = ctrlMetrics.HandlerPath
Expand All @@ -720,7 +721,7 @@ func generateOperatorServiceMonitor(service *v1.Service, namespace string) *moni
}
serviceMonitor.Spec.Endpoints[i].TLSConfig = &monitoring.TLSConfig{
SafeTLSConfig: monitoring.SafeTLSConfig{
ServerName: "metrics." + namespace + ".svc",
ServerName: &m,
},
CAFile: serviceMonitorTLSCAFile,
}
Expand Down
3 changes: 2 additions & 1 deletion cmd/manager/operator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,15 @@ var _ = Describe("Operator Startup Function tests", func() {
})
})
Context("Service Monitor Creation", func() {
m := "metrics.foobar.svc"
When("Installing to non-controlled namespace", func() {
It("ServiceMonitor is generated with the proper TLSConfig ServerName", func() {
metricService := operatorMetricService("foobar")
sm := generateOperatorServiceMonitor(metricService, "foobar")
controllerMetricServiceFound := false
for _, ep := range sm.Spec.Endpoints {
if ep.Port == metrics.ControllerMetricsServiceName && ep.TLSConfig != nil {
Expect(ep.TLSConfig.ServerName).To(BeEquivalentTo("metrics.foobar.svc"))
Expect(ep.TLSConfig.ServerName).To(BeEquivalentTo(&m))
controllerMetricServiceFound = true
}
}
Expand Down
23 changes: 11 additions & 12 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ require (
github.com/openshift/machine-config-operator v0.0.1-0.20230815171034-c2bb862bc08a
github.com/pborman/uuid v1.2.1
github.com/pkg/errors v0.9.1
github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.69.1
github.com/prometheus-operator/prometheus-operator/pkg/client v0.68.0
github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.79.2
github.com/prometheus-operator/prometheus-operator/pkg/client v0.79.2
github.com/prometheus/client_golang v1.19.1
github.com/prometheus/client_model v0.6.1
github.com/prometheus/common v0.55.0 // indirect
Expand All @@ -110,11 +110,11 @@ require (
go.uber.org/zap v1.27.0
golang.org/x/mod v0.22.0
golang.org/x/net v0.34.0
golang.org/x/oauth2 v0.23.0 // indirect
golang.org/x/oauth2 v0.24.0 // indirect
golang.org/x/sys v0.29.0 // indirect
golang.org/x/term v0.28.0 // indirect
golang.org/x/text v0.21.0 // indirect
golang.org/x/time v0.7.0 // indirect
golang.org/x/time v0.8.0 // indirect
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
google.golang.org/protobuf v1.36.1 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
Expand All @@ -126,12 +126,12 @@ require (
k8s.io/apiserver v0.32.0
k8s.io/component-base v0.32.0 // indirect
k8s.io/klog/v2 v2.130.1 // indirect
k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f // indirect
k8s.io/kube-openapi v0.0.0-20241212045625-5ad02ce6640f // indirect
k8s.io/pod-security-admission v0.31.0
k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 // indirect
k8s.io/utils v0.0.0-20241210054802-24370beab758 // indirect
sigs.k8s.io/controller-tools v0.17.1
sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.4.2 // indirect
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.5.0 // indirect
sigs.k8s.io/yaml v1.4.0
)

Expand All @@ -147,16 +147,16 @@ require (
github.com/coreos/ign-converter v0.0.0-20230417193809-cee89ea7d8ff // indirect
github.com/coreos/ignition v0.35.0 // indirect
github.com/coreos/vcontext v0.0.0-20230201181013-d72178a18687 // indirect
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
github.com/emicklei/go-restful/v3 v3.12.1 // indirect
github.com/evanphx/json-patch/v5 v5.9.0 // indirect
github.com/fatih/color v1.18.0 // indirect
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
github.com/ghodss/yaml v1.0.1-0.20190212211648-25d852aebe32 // indirect
github.com/go-openapi/jsonpointer v0.21.0 // indirect
github.com/go-openapi/jsonreference v0.20.4 // indirect
github.com/go-openapi/jsonreference v0.21.0 // indirect
github.com/go-openapi/swag v0.23.0 // indirect
github.com/gobuffalo/flect v1.0.3 // indirect
github.com/google/gnostic-models v0.6.8 // indirect
github.com/google/gnostic-models v0.6.9 // indirect
github.com/gookit/color v1.5.4 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/itchyny/timefmt-go v0.1.6 // indirect
Expand All @@ -167,7 +167,6 @@ require (
github.com/mattn/go-runewidth v0.0.15 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/olekukonko/tablewriter v0.0.5 // indirect
github.com/onsi/ginkgo/v2 v2.22.1 // indirect
github.com/openshift/client-go v0.0.0-20240528061634-b054aa794d87 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/prometheus v0.54.1
Expand Down
Loading
Loading