Exemplo n.º 1
0
// NewServerRunOptions creates a new ServerRunOptions object with default parameters
func NewServerRunOptions() *ServerRunOptions {
	s := ServerRunOptions{
		GenericServerRunOptions: genericoptions.NewServerRunOptions(),
		Etcd:            genericoptions.NewEtcdOptions(),
		SecureServing:   genericoptions.NewSecureServingOptions(),
		InsecureServing: genericoptions.NewInsecureServingOptions(),
		Authentication:  genericoptions.NewBuiltInAuthenticationOptions().WithAll(),
		Authorization:   genericoptions.NewBuiltInAuthorizationOptions(),

		EventTTL:    1 * time.Hour,
		MasterCount: 1,
		KubeletConfig: kubeletclient.KubeletClientConfig{
			Port: ports.KubeletPort,
			PreferredAddressTypes: []string{
				string(api.NodeHostName),
				string(api.NodeInternalIP),
				string(api.NodeExternalIP),
				string(api.NodeLegacyHostIP),
			},
			EnableHttps: true,
			HTTPTimeout: time.Duration(5) * time.Second,
		},
		ServiceNodePortRange: DefaultServiceNodePortRange,
	}
	return &s
}
Exemplo n.º 2
0
func NewServerRunOptions() *ServerRunOptions {
	s := ServerRunOptions{
		GenericServerRunOptions: genericoptions.NewServerRunOptions(),
		Etcd:            genericoptions.NewEtcdOptions(),
		SecureServing:   genericoptions.NewSecureServingOptions(),
		InsecureServing: genericoptions.NewInsecureServingOptions(),
		Authentication:  genericoptions.NewBuiltInAuthenticationOptions().WithAll(),
	}
	s.InsecureServing.BindPort = InsecurePort
	s.SecureServing.ServingOptions.BindPort = SecurePort

	return &s
}
Exemplo n.º 3
0
// NewServerRunOptions creates a new ServerRunOptions object with default values.
func NewServerRunOptions() *ServerRunOptions {
	s := ServerRunOptions{
		GenericServerRunOptions: genericoptions.NewServerRunOptions(),
		Etcd:            genericoptions.NewEtcdOptions(),
		SecureServing:   genericoptions.NewSecureServingOptions(),
		InsecureServing: genericoptions.NewInsecureServingOptions(),
		Authentication:  genericoptions.NewBuiltInAuthenticationOptions().WithAll(),
		Authorization:   genericoptions.NewBuiltInAuthorizationOptions(),

		EventTTL: 1 * time.Hour,
	}
	return &s
}