Skip to content

Commit

Permalink
Merge pull request #878 from ajayk/prometheus-operator-update
Browse files Browse the repository at this point in the history
update prometheus-operator to version v0.75.2
  • Loading branch information
tariq1890 authored Aug 27, 2024
2 parents cacfb7b + e4383e0 commit 6d3b082
Show file tree
Hide file tree
Showing 9 changed files with 305 additions and 121 deletions.
9 changes: 7 additions & 2 deletions controllers/object_controls.go
Original file line number Diff line number Diff line change
Expand Up @@ -4552,9 +4552,14 @@ func ServiceMonitor(n ClusterPolicyController) (gpuv1.State, error) {
obj.ObjectMeta.Labels[key] = value
}
}

if serviceMonitor.Relabelings != nil {
obj.Spec.Endpoints[0].RelabelConfigs = serviceMonitor.Relabelings
relabelConfigs := make([]promv1.RelabelConfig, len(serviceMonitor.Relabelings))
for i, relabel := range serviceMonitor.Relabelings {
if relabel != nil {
relabelConfigs[i] = *relabel
}
}
obj.Spec.Endpoints[0].RelabelConfigs = relabelConfigs
}
}
if n.stateNames[state] == "state-operator-metrics" || n.stateNames[state] == "state-node-status-exporter" {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ require (
github.com/openshift/api v0.0.0-20240625084701-0689f006bcde
github.com/openshift/client-go v0.0.0-20240528061634-b054aa794d87
github.com/operator-framework/api v0.26.0
github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.73.2
github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.75.2
github.com/prometheus/client_golang v1.19.1
github.com/regclient/regclient v0.7.1
github.com/sirupsen/logrus v1.9.3
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -298,8 +298,8 @@ github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRI
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/poy/onpar v1.1.2 h1:QaNrNiZx0+Nar5dLgTVp5mXkyoVFIbepjyEoGSnhbAY=
github.com/poy/onpar v1.1.2/go.mod h1:6X8FLNoxyr9kkmnlqpK6LSoiOtrO6MICtWwEuWkLjzg=
github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.73.2 h1:GwlGJPK6vf1UIohpc72KJVkKYlzki1UgE3xC4bWbf20=
github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.73.2/go.mod h1:yJ3CawR/A5qEYFEeCOUVYLTwYxmacfHQhJS+b/2QiaM=
github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.75.2 h1:6UsAv+jAevuGO2yZFU/BukV4o9NKnFMOuoouSA4G0ns=
github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.75.2/go.mod h1:XYrdZw5dW12Cjkt4ndbeNZZTBp4UCHtW0ccR9+sTtPU=
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=
github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQP1xR9D75/vuwEF3g=
Expand Down

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.

Loading

0 comments on commit 6d3b082

Please sign in to comment.