Skip to content

Commit e61f72f

Browse files
authored
Merge pull request kubernetes-sigs#18 from DirectXMan12/deps/fix-1.10-new-params
Populate Loopback Options
2 parents 102f5e8 + 140087d commit e61f72f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/cmd/server/start.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import (
2828

2929
type CustomMetricsAdapterServerOptions struct {
3030
// genericoptions.ReccomendedOptions - EtcdOptions
31-
SecureServing *genericoptions.SecureServingOptions
31+
SecureServing *genericoptions.SecureServingOptionsWithLoopback
3232
Authentication *genericoptions.DelegatingAuthenticationOptions
3333
Authorization *genericoptions.DelegatingAuthorizationOptions
3434
Features *genericoptions.FeatureOptions
@@ -39,7 +39,7 @@ type CustomMetricsAdapterServerOptions struct {
3939

4040
func NewCustomMetricsAdapterServerOptions(out, errOut io.Writer) *CustomMetricsAdapterServerOptions {
4141
o := &CustomMetricsAdapterServerOptions{
42-
SecureServing: genericoptions.NewSecureServingOptions(),
42+
SecureServing: genericoptions.WithLoopback(genericoptions.NewSecureServingOptions()),
4343
Authentication: genericoptions.NewDelegatingAuthenticationOptions(),
4444
Authorization: genericoptions.NewDelegatingAuthorizationOptions(),
4545
Features: genericoptions.NewFeatureOptions(),
@@ -66,7 +66,7 @@ func (o CustomMetricsAdapterServerOptions) Config() (*apiserver.Config, error) {
6666
}
6767

6868
serverConfig := genericapiserver.NewConfig(apiserver.Codecs)
69-
if err := o.SecureServing.ApplyTo(&serverConfig.SecureServing); err != nil {
69+
if err := o.SecureServing.ApplyTo(serverConfig); err != nil {
7070
return nil, err
7171
}
7272

0 commit comments

Comments
 (0)