mirror of
https://github.com/kubernetes-sigs/external-dns.git
synced 2026-05-05 06:36:11 +02:00
Merge pull request #3870 from mloiseleur/fix/log
fix: remove useless warning log messages for instrumented_http.Transport
This commit is contained in:
commit
f17e24ff8a
4
go.mod
4
go.mod
@ -29,6 +29,7 @@ require (
|
||||
github.com/exoscale/egoscale v0.100.3
|
||||
github.com/ffledgling/pdns-go v0.0.0-20180219074714-524e7daccd99
|
||||
github.com/go-gandi/go-gandi v0.6.0
|
||||
github.com/go-logr/logr v1.2.4
|
||||
github.com/google/go-cmp v0.5.9
|
||||
github.com/google/uuid v1.3.0
|
||||
github.com/gophercloud/gophercloud v1.5.0
|
||||
@ -75,6 +76,7 @@ require (
|
||||
k8s.io/api v0.27.4
|
||||
k8s.io/apimachinery v0.27.4
|
||||
k8s.io/client-go v0.27.4
|
||||
k8s.io/klog/v2 v2.100.1
|
||||
sigs.k8s.io/gateway-api v0.7.1
|
||||
)
|
||||
|
||||
@ -104,7 +106,6 @@ require (
|
||||
github.com/fatih/structs v1.1.0 // indirect
|
||||
github.com/frankban/quicktest v1.14.4 // indirect
|
||||
github.com/fsnotify/fsnotify v1.6.0 // indirect
|
||||
github.com/go-logr/logr v1.2.4 // indirect
|
||||
github.com/go-openapi/errors v0.20.3 // indirect
|
||||
github.com/go-openapi/jsonpointer v0.19.6 // indirect
|
||||
github.com/go-openapi/jsonreference v0.20.1 // indirect
|
||||
@ -202,7 +203,6 @@ require (
|
||||
gopkg.in/resty.v1 v1.12.0 // indirect
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
k8s.io/klog/v2 v2.100.1 // indirect
|
||||
k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f // indirect
|
||||
k8s.io/utils v0.0.0-20230505201702-9f6742963106 // indirect
|
||||
moul.io/http2curl v1.0.0 // indirect
|
||||
|
||||
7
main.go
7
main.go
@ -30,10 +30,12 @@ import (
|
||||
"github.com/aws/aws-sdk-go/service/dynamodb"
|
||||
"github.com/aws/aws-sdk-go/service/route53"
|
||||
sd "github.com/aws/aws-sdk-go/service/servicediscovery"
|
||||
"github.com/go-logr/logr"
|
||||
"github.com/prometheus/client_golang/prometheus/promhttp"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
_ "k8s.io/client-go/plugin/pkg/client/auth"
|
||||
"k8s.io/klog/v2"
|
||||
|
||||
"sigs.k8s.io/external-dns/controller"
|
||||
"sigs.k8s.io/external-dns/endpoint"
|
||||
@ -106,6 +108,11 @@ func main() {
|
||||
}
|
||||
log.SetLevel(ll)
|
||||
|
||||
// Klog V2 is used by k8s.io/apimachinery/pkg/labels and can throw (a lot) of irrelevant logs
|
||||
// See https://github.com/kubernetes-sigs/external-dns/issues/2348
|
||||
defer klog.ClearLogger()
|
||||
klog.SetLogger(logr.Discard())
|
||||
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
|
||||
go serveMetrics(cfg.MetricsAddress)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user