@@ -28,7 +28,7 @@ import (
28
28
29
29
type CustomMetricsAdapterServerOptions struct {
30
30
// genericoptions.ReccomendedOptions - EtcdOptions
31
- SecureServing * genericoptions.SecureServingOptions
31
+ SecureServing * genericoptions.SecureServingOptionsWithLoopback
32
32
Authentication * genericoptions.DelegatingAuthenticationOptions
33
33
Authorization * genericoptions.DelegatingAuthorizationOptions
34
34
Features * genericoptions.FeatureOptions
@@ -39,7 +39,7 @@ type CustomMetricsAdapterServerOptions struct {
39
39
40
40
func NewCustomMetricsAdapterServerOptions (out , errOut io.Writer ) * CustomMetricsAdapterServerOptions {
41
41
o := & CustomMetricsAdapterServerOptions {
42
- SecureServing : genericoptions .NewSecureServingOptions (),
42
+ SecureServing : genericoptions .WithLoopback ( genericoptions . NewSecureServingOptions () ),
43
43
Authentication : genericoptions .NewDelegatingAuthenticationOptions (),
44
44
Authorization : genericoptions .NewDelegatingAuthorizationOptions (),
45
45
Features : genericoptions .NewFeatureOptions (),
@@ -66,7 +66,7 @@ func (o CustomMetricsAdapterServerOptions) Config() (*apiserver.Config, error) {
66
66
}
67
67
68
68
serverConfig := genericapiserver .NewConfig (apiserver .Codecs )
69
- if err := o .SecureServing .ApplyTo (& serverConfig . SecureServing ); err != nil {
69
+ if err := o .SecureServing .ApplyTo (serverConfig ); err != nil {
70
70
return nil , err
71
71
}
72
72
0 commit comments