Skip to content

Commit

Permalink
egress_selector.go: register konnectivity-client metrics.
Browse files Browse the repository at this point in the history
This registers new metrics provided by kubernetes/kubernetes#114789.

Kubernetes-commit: 91228a5749ca4cc370fb6b0fbea6a2836cc93c10
  • Loading branch information
jkh52 authored and k8s-publishing-bot committed Jan 4, 2023
1 parent d9cb321 commit 0f14599
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/server/egressselector/egress_selector.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,18 @@ import (
utilnet "k8s.io/apimachinery/pkg/util/net"
"k8s.io/apiserver/pkg/apis/apiserver"
egressmetrics "k8s.io/apiserver/pkg/server/egressselector/metrics"
compbasemetrics "k8s.io/component-base/metrics"
"k8s.io/component-base/tracing"
"k8s.io/klog/v2"
client "sigs.k8s.io/apiserver-network-proxy/konnectivity-client/pkg/client"
)

var directDialer utilnet.DialFunc = http.DefaultTransport.(*http.Transport).DialContext

func init() {
client.Metrics.RegisterMetrics(compbasemetrics.NewKubeRegistry().Registerer())
}

// EgressSelector is the map of network context type to context dialer, for network egress.
type EgressSelector struct {
egressToDialer map[EgressType]utilnet.DialFunc
Expand Down

0 comments on commit 0f14599

Please sign in to comment.