options

package
v0.29.0-alpha.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 11, 2023 License: Apache-2.0 Imports: 35 Imported by: 81

Documentation

Index

Constants

View Source
const (
	// CloudControllerManagerUserAgent is the userAgent name when starting cloud-controller managers.
	CloudControllerManagerUserAgent = "cloud-controller-manager"
)
View Source
const (
	CloudControllerManagerWebhookPort = 10260
)

Variables

This section is empty.

Functions

func NewDefaultComponentConfig

func NewDefaultComponentConfig() (*ccmconfig.CloudControllerManagerConfiguration, error)

NewDefaultComponentConfig returns cloud-controller manager configuration object.

Types

type CloudControllerManagerOptions

type CloudControllerManagerOptions struct {
	Generic           *cmoptions.GenericControllerManagerConfigurationOptions
	KubeCloudShared   *KubeCloudSharedOptions
	ServiceController *ServiceControllerOptions
	NodeController    *NodeControllerOptions

	SecureServing  *apiserveroptions.SecureServingOptionsWithLoopback
	Authentication *apiserveroptions.DelegatingAuthenticationOptions
	Authorization  *apiserveroptions.DelegatingAuthorizationOptions

	Master string

	WebhookServing *WebhookServingOptions
	Webhook        *WebhookOptions

	// NodeStatusUpdateFrequency is the frequency at which the controller updates nodes' status
	NodeStatusUpdateFrequency metav1.Duration
}

CloudControllerManagerOptions is the main context object for the controller manager.

func NewCloudControllerManagerOptions

func NewCloudControllerManagerOptions() (*CloudControllerManagerOptions, error)

NewCloudControllerManagerOptions creates a new ExternalCMServer with a default config.

func NewCloudControllerManagerOptionsWithProviderDefaults added in v0.27.0

func NewCloudControllerManagerOptionsWithProviderDefaults(defaults ProviderDefaults) (*CloudControllerManagerOptions, error)

NewCloudControllerManagerOptionsWithProviderDefaults creates a new ExternalCMServer with a default config, but allows the cloud provider to override a select number of default option values.

func (*CloudControllerManagerOptions) ApplyTo

func (o *CloudControllerManagerOptions) ApplyTo(c *config.Config, allControllers []string, disabledByDefaultControllers []string, controllerAliases map[string]string, userAgent string) error

ApplyTo fills up cloud controller manager config with options.

func (*CloudControllerManagerOptions) Config

func (o *CloudControllerManagerOptions) Config(allControllers []string, disabledByDefaultControllers []string, controllerAliases map[string]string, allWebhooks, disabledByDefaultWebhooks []string) (*config.Config, error)

Config return a cloud controller manager config objective

func (*CloudControllerManagerOptions) Flags

func (o *CloudControllerManagerOptions) Flags(allControllers []string, disabledByDefaultControllers []string, controllerAliases map[string]string, allWebhooks, disabledByDefaultWebhooks []string) cliflag.NamedFlagSets

Flags returns flags for a specific CloudController by section name

func (*CloudControllerManagerOptions) Validate

func (o *CloudControllerManagerOptions) Validate(allControllers []string, disabledByDefaultControllers []string, controllerAliases map[string]string, allWebhooks, disabledByDefaultWebhooks []string) error

Validate is used to validate config before launching the cloud controller manager

type CloudProviderOptions

type CloudProviderOptions struct {
	*cpconfig.CloudProviderConfiguration
}

CloudProviderOptions holds the cloudprovider options.

func (*CloudProviderOptions) AddFlags

func (s *CloudProviderOptions) AddFlags(fs *pflag.FlagSet)

AddFlags adds flags related to cloudprovider for controller manager to the specified FlagSet.

func (*CloudProviderOptions) ApplyTo

ApplyTo fills up cloudprovider config with options.

func (*CloudProviderOptions) Validate

func (s *CloudProviderOptions) Validate() []error

Validate checks validation of cloudprovider options.

type KubeCloudSharedOptions

type KubeCloudSharedOptions struct {
	*cpconfig.KubeCloudSharedConfiguration
	CloudProvider *CloudProviderOptions
}

KubeCloudSharedOptions holds the options shared between kube-controller-manager and cloud-controller-manager.

func NewKubeCloudSharedOptions

func NewKubeCloudSharedOptions(cfg *cpconfig.KubeCloudSharedConfiguration) *KubeCloudSharedOptions

NewKubeCloudSharedOptions returns common/default configuration values for both the kube-controller-manager and the cloud-contoller-manager. Any common changes should be made here. Any individual changes should be made in that controller.

func (*KubeCloudSharedOptions) AddFlags

func (o *KubeCloudSharedOptions) AddFlags(fs *pflag.FlagSet)

AddFlags adds flags related to shared variable for controller manager to the specified FlagSet.

func (*KubeCloudSharedOptions) ApplyTo

ApplyTo fills up KubeCloudShared config with options.

func (*KubeCloudSharedOptions) Validate

func (o *KubeCloudSharedOptions) Validate() []error

Validate checks validation of KubeCloudSharedOptions.

type NodeControllerOptions added in v0.27.0

type NodeControllerOptions struct {
	*nodeconfig.NodeControllerConfiguration
}

NodeControllerOptions holds the ServiceController options.

func (*NodeControllerOptions) AddFlags added in v0.27.0

func (o *NodeControllerOptions) AddFlags(fs *pflag.FlagSet)

AddFlags adds flags related to ServiceController for controller manager to the specified FlagSet.

func (*NodeControllerOptions) ApplyTo added in v0.27.0

ApplyTo fills up ServiceController config with options.

func (*NodeControllerOptions) Validate added in v0.27.0

func (o *NodeControllerOptions) Validate() []error

Validate checks validation of NodeControllerOptions.

type ProviderDefaults added in v0.27.0

type ProviderDefaults struct {
	// WebhookBindAddress is the default address.  It can be overridden by "--webhook-bind-address".
	WebhookBindAddress *net.IP
	// WebhookBindPort is the default port.  It can be overridden by "--webhook-bind-port".
	WebhookBindPort *int
}

ProviderDefaults are provided by the consumer when calling NewCloudControllerManagerOptions(), so that they can customize certain flag default values.

type ServiceControllerOptions

type ServiceControllerOptions struct {
	*serviceconfig.ServiceControllerConfiguration
}

ServiceControllerOptions holds the ServiceController options.

func (*ServiceControllerOptions) AddFlags

func (o *ServiceControllerOptions) AddFlags(fs *pflag.FlagSet)

AddFlags adds flags related to ServiceController for controller manager to the specified FlagSet.

func (*ServiceControllerOptions) ApplyTo

ApplyTo fills up ServiceController config with options.

func (*ServiceControllerOptions) Validate

func (o *ServiceControllerOptions) Validate() []error

Validate checks validation of ServiceControllerOptions.

type WebhookOptions added in v0.27.0

type WebhookOptions struct {
	// Webhooks is the list of webhook names that should be enabled or disabled
	Webhooks []string
}

func NewWebhookOptions added in v0.27.0

func NewWebhookOptions() *WebhookOptions

func (*WebhookOptions) AddFlags added in v0.27.0

func (o *WebhookOptions) AddFlags(fs *pflag.FlagSet, allWebhooks, disabledByDefaultWebhooks []string)

func (*WebhookOptions) ApplyTo added in v0.27.0

func (*WebhookOptions) Validate added in v0.27.0

func (o *WebhookOptions) Validate(allWebhooks, disabledByDefaultWebhooks []string) []error

type WebhookServingOptions added in v0.27.0

type WebhookServingOptions struct {
	*apiserveroptions.SecureServingOptions
}

func NewWebhookServingOptions added in v0.27.0

func NewWebhookServingOptions(defaults ProviderDefaults) *WebhookServingOptions

func (*WebhookServingOptions) AddFlags added in v0.27.0

func (o *WebhookServingOptions) AddFlags(fs *pflag.FlagSet)

func (*WebhookServingOptions) ApplyTo added in v0.27.0

func (*WebhookServingOptions) Validate added in v0.27.0

func (o *WebhookServingOptions) Validate() []error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL