File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -101,6 +101,10 @@ type Options struct {
101
101
// TLSOpts is used to allow configuring the TLS config used for the server.
102
102
// This also allows providing a certificate via GetCertificate.
103
103
TLSOpts []func (* tls.Config )
104
+
105
+ // ListenConfig contains options for listening to an address on the metric server.
106
+ // Note: This does not work with SecureServing=true
107
+ ListenConfig net.ListenConfig
104
108
}
105
109
106
110
// Filter is a func that is added around metrics and extra handlers on the metrics server.
@@ -249,7 +253,7 @@ func (s *defaultServer) Start(ctx context.Context) error {
249
253
250
254
func (s * defaultServer ) createListener (ctx context.Context , log logr.Logger ) (net.Listener , error ) {
251
255
if ! s .options .SecureServing {
252
- return net . Listen ("tcp" , s .options .BindAddress )
256
+ return s . options . ListenConfig . Listen (context . Background (), "tcp" , s .options .BindAddress )
253
257
}
254
258
255
259
cfg := & tls.Config { //nolint:gosec
You can’t perform that action at this time.
0 commit comments