chore(deps): Bump prometheus from v1.8.2 to v2.42.0 (#13225)

Dependency version 0.42.0 corresponds to release version 2.42.0 see [prometheus versioning description](https://github.com/prometheus/prometheus#prometheus-code-base) for details.
This commit is contained in:
Luke Winikates 2023-05-03 00:47:00 -07:00 committed by GitHub
parent 0dd837852d
commit e9f55a848f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 146 additions and 304 deletions

86
go.mod
View File

@ -4,7 +4,7 @@ go 1.20
require (
cloud.google.com/go/bigquery v1.45.0
cloud.google.com/go/monitoring v1.8.0
cloud.google.com/go/monitoring v1.12.0
cloud.google.com/go/pubsub v1.28.0
cloud.google.com/go/storage v1.29.0
collectd.org v0.5.0
@ -79,6 +79,7 @@ require (
github.com/golang-jwt/jwt/v4 v4.5.0
github.com/golang/geo v0.0.0-20190916061304-5b978397cfec
github.com/golang/snappy v0.0.4
github.com/google/cel-go v0.14.1-0.20230424164844-d39523c445fc
github.com/google/gnxi v0.0.0-20221016143401-2aeceb5a2901
github.com/google/go-cmp v0.5.9
github.com/google/go-github/v32 v32.1.0
@ -92,7 +93,7 @@ require (
github.com/grid-x/modbus v0.0.0-20211113184042-7f2251c342c9
github.com/gwos/tcg/sdk v0.0.0-20220621192633-df0eac0a1a4c
github.com/harlow/kinesis-consumer v0.3.6-0.20211204214318-c2b9f79d7ab6
github.com/hashicorp/consul/api v1.18.0
github.com/hashicorp/consul/api v1.20.0
github.com/hashicorp/go-uuid v1.0.3
github.com/influxdata/go-syslog/v3 v3.0.0
github.com/influxdata/influxdb-observability/common v0.3.3
@ -114,14 +115,14 @@ require (
github.com/kardianos/service v1.2.2
github.com/karrick/godirwalk v1.16.2
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51
github.com/kolo/xmlrpc v0.0.0-20201022064351-38db28db192b
github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b
github.com/linkedin/goavro/v2 v2.12.0
github.com/logzio/azure-monitor-metrics-receiver v1.0.0
github.com/lxc/lxd v0.0.0-20220920163450-e9b4b514106a
github.com/matttproud/golang_protobuf_extensions v1.0.4
github.com/mdlayher/apcupsd v0.0.0-20220319200143-473c7b5f3c6a
github.com/microsoft/ApplicationInsights-Go v0.4.4
github.com/miekg/dns v1.1.50
github.com/miekg/dns v1.1.51
github.com/moby/ipvs v1.1.0
github.com/multiplay/go-ts3 v1.1.0
github.com/nats-io/nats-server/v2 v2.9.9
@ -143,7 +144,7 @@ require (
github.com/prometheus/client_model v0.3.0
github.com/prometheus/common v0.42.0
github.com/prometheus/procfs v0.9.0
github.com/prometheus/prometheus v1.8.2-0.20210430082741-2a4b8e12bbf2
github.com/prometheus/prometheus v0.42.0
github.com/rabbitmq/amqp091-go v1.8.0
github.com/riemann/riemann-go-client v0.5.1-0.20211206220514-f58f10cdce16
github.com/robbiet480/go.nut v0.0.0-20220219091450-bd8f121e1fa1
@ -170,13 +171,13 @@ require (
github.com/x448/float16 v0.8.4
github.com/xdg/scram v1.0.5
github.com/yuin/goldmark v1.5.4
go.mongodb.org/mongo-driver v1.11.1
go.mongodb.org/mongo-driver v1.11.2
go.opentelemetry.io/collector/pdata v1.0.0-rc7
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.35.0
go.opentelemetry.io/otel/sdk/metric v0.37.0
go.starlark.net v0.0.0-20220328144851-d1966c6b9fcd
golang.org/x/crypto v0.6.0
golang.org/x/mod v0.8.0
golang.org/x/crypto v0.7.0
golang.org/x/mod v0.9.0
golang.org/x/net v0.9.0
golang.org/x/oauth2 v0.7.0
golang.org/x/sync v0.1.0
@ -185,32 +186,27 @@ require (
golang.org/x/text v0.9.0
golang.zx2c4.com/wireguard/wgctrl v0.0.0-20211230205640-daad0b7ba671
gonum.org/v1/gonum v0.12.0
google.golang.org/api v0.106.0
google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f
google.golang.org/api v0.111.0
google.golang.org/grpc v1.53.0
google.golang.org/protobuf v1.30.0
gopkg.in/gorethink/gorethink.v3 v3.0.5
gopkg.in/olivere/elastic.v5 v5.0.86
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7
gopkg.in/yaml.v2 v2.4.0
k8s.io/api v0.25.3
k8s.io/apimachinery v0.25.6
k8s.io/client-go v0.25.0
k8s.io/api v0.26.2
k8s.io/apimachinery v0.26.2
k8s.io/client-go v0.26.2
layeh.com/radius v0.0.0-20221205141417-e7fbddd11d68
modernc.org/sqlite v1.21.0
)
require (
github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df // indirect
github.com/google/cel-go v0.14.1-0.20230424164844-d39523c445fc
github.com/stoewer/go-strcase v1.2.0 // indirect
)
require google.golang.org/genproto v0.0.0-20230223222841-637eb2293923
require (
cloud.google.com/go v0.107.0 // indirect
cloud.google.com/go/compute v1.15.1 // indirect
cloud.google.com/go v0.110.0 // indirect
cloud.google.com/go/compute v1.18.0 // indirect
cloud.google.com/go/compute/metadata v0.2.3 // indirect
cloud.google.com/go/iam v0.8.0 // indirect
cloud.google.com/go/iam v0.12.0 // indirect
code.cloudfoundry.org/clock v1.0.0 // indirect
github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect
github.com/Azure/azure-amqp-common-go/v4 v4.0.0 // indirect
@ -234,11 +230,12 @@ require (
github.com/AzureAD/microsoft-authentication-library-for-go v0.4.0 // indirect
github.com/Masterminds/goutils v1.1.1 // indirect
github.com/Masterminds/semver v1.5.0 // indirect
github.com/Microsoft/go-winio v0.5.2 // indirect
github.com/Microsoft/go-winio v0.6.0 // indirect
github.com/alecthomas/participle v0.4.1 // indirect
github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df // indirect
github.com/apache/arrow/go/arrow v0.0.0-20211112161151-bc219186db40 // indirect
github.com/aristanetworks/glog v0.0.0-20191112221043-67e8567f59f3 // indirect
github.com/armon/go-metrics v0.3.10 // indirect
github.com/armon/go-metrics v0.4.1 // indirect
github.com/awnumar/memcall v0.1.2 // indirect
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.10 // indirect
github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue v1.2.0 // indirect
@ -278,7 +275,7 @@ require (
github.com/eapache/go-xerial-snappy v0.0.0-20230111030713-bf00bc1b83b6 // indirect
github.com/eapache/queue v1.1.0 // indirect
github.com/echlebek/timeproxy v1.0.0 // indirect
github.com/emicklei/go-restful/v3 v3.8.0 // indirect
github.com/emicklei/go-restful/v3 v3.10.1 // indirect
github.com/flosch/pongo2 v0.0.0-20200913210552-0d938eb266f3 // indirect
github.com/form3tech-oss/jwt-go v3.2.5+incompatible // indirect
github.com/gabriel-vasile/mimetype v1.4.0 // indirect
@ -286,9 +283,9 @@ require (
github.com/go-logr/logr v1.2.3 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-macaroon-bakery/macaroonpb v1.0.0 // indirect
github.com/go-openapi/jsonpointer v0.19.5 // indirect
github.com/go-openapi/jsonreference v0.20.0 // indirect
github.com/go-openapi/swag v0.22.1 // indirect
github.com/go-openapi/jsonpointer v0.19.6 // indirect
github.com/go-openapi/jsonreference v0.20.2 // indirect
github.com/go-openapi/swag v0.22.3 // indirect
github.com/go-stack/stack v1.8.1 // indirect
github.com/goburrow/modbus v0.1.0 // indirect
github.com/goburrow/serial v0.1.1-0.20211022031912-bfb69110f8dd // indirect
@ -300,27 +297,27 @@ require (
github.com/golang-sql/sqlexp v0.1.0 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/flatbuffers v2.0.0+incompatible // indirect
github.com/google/gnostic v0.5.7-v3refs // indirect
github.com/google/go-querystring v1.0.0 // indirect
github.com/google/flatbuffers v2.0.8+incompatible // indirect
github.com/google/gnostic v0.6.9 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.2.1 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect
github.com/googleapis/gax-go/v2 v2.7.0 // indirect
github.com/grid-x/serial v0.0.0-20211107191517-583c7356b3aa // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.15.2 // indirect
github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect
github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-hclog v1.2.2 // indirect
github.com/hashicorp/go-hclog v1.4.0 // indirect
github.com/hashicorp/go-immutable-radix v1.3.1 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-rootcerts v1.0.2 // indirect
github.com/hashicorp/golang-lru v0.5.4 // indirect
github.com/hashicorp/golang-lru v0.6.0 // indirect
github.com/hashicorp/packer-plugin-sdk v0.3.1 // indirect
github.com/hashicorp/serf v0.10.1 // indirect
github.com/huandu/xstrings v1.3.2 // indirect
github.com/imdario/mergo v0.3.12 // indirect
github.com/imdario/mergo v0.3.13 // indirect
github.com/jackc/chunkreader/v2 v2.0.1 // indirect
github.com/jackc/pgpassfile v1.0.0 // indirect
github.com/jackc/pgproto3/v2 v2.3.1 // indirect
@ -399,6 +396,7 @@ require (
github.com/signalfx/gohistogram v0.0.0-20160107210732-1ccfd2ff5083 // indirect
github.com/signalfx/sapm-proto v0.7.2 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/stoewer/go-strcase v1.2.0 // indirect
github.com/stretchr/objx v0.5.0 // indirect
github.com/tidwall/match v1.1.1 // indirect
github.com/tidwall/pretty v1.2.0 // indirect
@ -426,7 +424,7 @@ require (
go.opentelemetry.io/collector/featuregate v0.73.0 // indirect
go.opentelemetry.io/collector/semconv v0.73.0 // indirect
go.opentelemetry.io/otel v1.14.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.12.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.14.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.35.0 // indirect
go.opentelemetry.io/otel/metric v0.37.0 // indirect
go.opentelemetry.io/otel/sdk v1.14.0 // indirect
@ -435,9 +433,9 @@ require (
go.uber.org/atomic v1.10.0 // indirect
go.uber.org/multierr v1.9.0 // indirect
go.uber.org/zap v1.24.0 // indirect
golang.org/x/exp v0.0.0-20230202163644-54bba9f4231b
golang.org/x/time v0.1.0 // indirect
golang.org/x/tools v0.6.0 // indirect
golang.org/x/exp v0.0.0-20230307190834-24139beb5833
golang.org/x/time v0.3.0 // indirect
golang.org/x/tools v0.7.0 // indirect
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
golang.zx2c4.com/wireguard v0.0.0-20211209221555-9c9e7e272434 // indirect
google.golang.org/appengine v1.6.7 // indirect
@ -453,9 +451,9 @@ require (
gopkg.in/tomb.v2 v2.0.0-20161208151619-d5d1b5820637 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
honnef.co/go/tools v0.2.2 // indirect
k8s.io/klog/v2 v2.70.1 // indirect
k8s.io/kube-openapi v0.0.0-20220803164354-a70c9af30aea // indirect
k8s.io/utils v0.0.0-20220728103510-ee6ede2d64ed // indirect
k8s.io/klog/v2 v2.90.1 // indirect
k8s.io/kube-openapi v0.0.0-20230303024457-afdc3dddf62d // indirect
k8s.io/utils v0.0.0-20230308161112-d77c459e9343 // indirect
lukechampine.com/uint128 v1.2.0 // indirect
modernc.org/cc/v3 v3.40.0 // indirect
modernc.org/ccgo/v3 v3.16.13 // indirect
@ -465,7 +463,7 @@ require (
modernc.org/opt v0.1.3 // indirect
modernc.org/strutil v1.1.3 // indirect
modernc.org/token v1.0.1 // indirect
sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
sigs.k8s.io/yaml v1.2.0 // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
)

341
go.sum

File diff suppressed because it is too large Load Diff

View File

@ -4,7 +4,6 @@ import (
"testing"
"time"
v1 "k8s.io/api/core/v1"
netv1 "k8s.io/api/networking/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@ -42,8 +41,8 @@ func TestIngress(t *testing.T) {
Items: []netv1.Ingress{
{
Status: netv1.IngressStatus{
LoadBalancer: v1.LoadBalancerStatus{
Ingress: []v1.LoadBalancerIngress{
LoadBalancer: netv1.IngressLoadBalancerStatus{
Ingress: []netv1.IngressLoadBalancerIngress{
{
Hostname: "chron-1",
IP: "1.0.0.127",
@ -117,8 +116,8 @@ func TestIngress(t *testing.T) {
Items: []netv1.Ingress{
{
Status: netv1.IngressStatus{
LoadBalancer: v1.LoadBalancerStatus{
Ingress: []v1.LoadBalancerIngress{
LoadBalancer: netv1.IngressLoadBalancerStatus{
Ingress: []netv1.IngressLoadBalancerIngress{
{
Hostname: "chron-1",
IP: "1.0.0.127",
@ -157,8 +156,8 @@ func TestIngress(t *testing.T) {
Items: []netv1.Ingress{
{
Status: netv1.IngressStatus{
LoadBalancer: v1.LoadBalancerStatus{
Ingress: []v1.LoadBalancerIngress{
LoadBalancer: netv1.IngressLoadBalancerStatus{
Ingress: []netv1.IngressLoadBalancerIngress{
{
Hostname: "chron-1",
IP: "1.0.0.127",

View File

@ -90,7 +90,10 @@ func (p *Prometheus) startK8s(ctx context.Context) error {
p.Log.Errorf("Unable to monitor pods with node scrape scope: %s", err.Error())
}
} else {
p.watchPod(ctx, client)
err = p.watchPod(ctx, client)
if err != nil {
p.Log.Warnf("Error while attempting to watch pod: %s", err.Error())
}
}
}
}
@ -125,7 +128,7 @@ var informerfactory informers.SharedInformerFactory
// (without the scrape annotations). K8s may re-assign the old pod ip to the non-scrape
// pod, causing errors in the logs. This is only true if the pod going offline is not
// directed to do so by K8s.
func (p *Prometheus) watchPod(ctx context.Context, clientset *kubernetes.Clientset) {
func (p *Prometheus) watchPod(ctx context.Context, clientset *kubernetes.Clientset) error {
var resyncinterval time.Duration
if p.CacheRefreshInterval != 0 {
@ -145,7 +148,7 @@ func (p *Prometheus) watchPod(ctx context.Context, clientset *kubernetes.Clients
p.nsStore = informerfactory.Core().V1().Namespaces().Informer().GetStore()
podinformer := informerfactory.Core().V1().Pods()
podinformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
_, err := podinformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
AddFunc: func(newObj interface{}) {
newPod, ok := newObj.(*corev1.Pod)
if !ok {
@ -192,6 +195,7 @@ func (p *Prometheus) watchPod(ctx context.Context, clientset *kubernetes.Clients
informerfactory.WaitForCacheSync(wait.NeverStop)
<-ctx.Done()
return err
}
func (p *Prometheus) cAdvisor(ctx context.Context, bearerToken string) error {