diff --git a/pkg/genericapiserver/options/server_run_options.go b/pkg/genericapiserver/options/server_run_options.go index 65d025d0b15..6b8b7a3d317 100644 --- a/pkg/genericapiserver/options/server_run_options.go +++ b/pkg/genericapiserver/options/server_run_options.go @@ -85,6 +85,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 {