diff --git a/pkg/genericapiserver/options/server_run_options.go b/pkg/genericapiserver/options/server_run_options.go index 96d4d14f358..845b65c304f 100644 --- a/pkg/genericapiserver/options/server_run_options.go +++ b/pkg/genericapiserver/options/server_run_options.go @@ -80,6 +80,10 @@ func NewServerRunOptions() *ServerRunOptions { } } +// DefaultAdvertiseAddress sets the field AdvertiseAddress if +// unset. The field will be set based on the SecureServingOptions. If +// the SecureServingOptions is not present, DefaultExternalAddress +// will fall back to the insecure ServingOptions. func (s *ServerRunOptions) DefaultAdvertiseAddress(secure *SecureServingOptions, insecure *ServingOptions) error { if s.AdvertiseAddress == nil || s.AdvertiseAddress.IsUnspecified() { switch {