package options
import "k8s.io/cloud-provider/options"
Index ¶
- Constants
- func NewDefaultComponentConfig() (*ccmconfig.CloudControllerManagerConfiguration, error)
- type CloudControllerManagerOptions
- func NewCloudControllerManagerOptions() (*CloudControllerManagerOptions, error)
- func NewCloudControllerManagerOptionsWithProviderDefaults(defaults ProviderDefaults) (*CloudControllerManagerOptions, error)
- func (o *CloudControllerManagerOptions) ApplyTo(c *config.Config, allControllers []string, disabledByDefaultControllers []string, controllerAliases map[string]string, userAgent string) error
- func (o *CloudControllerManagerOptions) Config(allControllers []string, disabledByDefaultControllers []string, controllerAliases map[string]string, allWebhooks, disabledByDefaultWebhooks []string) (*config.Config, error)
- func (o *CloudControllerManagerOptions) Flags(allControllers []string, disabledByDefaultControllers []string, controllerAliases map[string]string, allWebhooks, disabledByDefaultWebhooks []string) cliflag.NamedFlagSets
- func (o *CloudControllerManagerOptions) Validate(allControllers []string, disabledByDefaultControllers []string, controllerAliases map[string]string, allWebhooks, disabledByDefaultWebhooks []string) error
- type CloudProviderOptions
- func (s *CloudProviderOptions) AddFlags(fs *pflag.FlagSet)
- func (s *CloudProviderOptions) ApplyTo(cfg *cpconfig.CloudProviderConfiguration) error
- func (s *CloudProviderOptions) Validate() []error
- type KubeCloudSharedOptions
- func NewKubeCloudSharedOptions(cfg *cpconfig.KubeCloudSharedConfiguration) *KubeCloudSharedOptions
- func (o *KubeCloudSharedOptions) AddFlags(fs *pflag.FlagSet)
- func (o *KubeCloudSharedOptions) ApplyTo(cfg *cpconfig.KubeCloudSharedConfiguration) error
- func (o *KubeCloudSharedOptions) Validate() []error
- type NodeControllerOptions
- func (o *NodeControllerOptions) AddFlags(fs *pflag.FlagSet)
- func (o *NodeControllerOptions) ApplyTo(cfg *nodeconfig.NodeControllerConfiguration) error
- func (o *NodeControllerOptions) Validate() []error
- type ProviderDefaults
- type ServiceControllerOptions
- func (o *ServiceControllerOptions) AddFlags(fs *pflag.FlagSet)
- func (o *ServiceControllerOptions) ApplyTo(cfg *serviceconfig.ServiceControllerConfiguration) error
- func (o *ServiceControllerOptions) Validate() []error
- type WebhookOptions
- func NewWebhookOptions() *WebhookOptions
- func (o *WebhookOptions) AddFlags(fs *pflag.FlagSet, allWebhooks, disabledByDefaultWebhooks []string)
- func (o *WebhookOptions) ApplyTo(cfg *config.WebhookConfiguration) error
- func (o *WebhookOptions) Validate(allWebhooks, disabledByDefaultWebhooks []string) []error
- type WebhookServingOptions
- func NewWebhookServingOptions(defaults ProviderDefaults) *WebhookServingOptions
- func (o *WebhookServingOptions) AddFlags(fs *pflag.FlagSet)
- func (o *WebhookServingOptions) ApplyTo(cfg **server.SecureServingInfo, webhookCfg config.WebhookConfiguration) error
- func (o *WebhookServingOptions) Validate() []error
Constants ¶
const ( // CloudControllerManagerUserAgent is the userAgent name when starting cloud-controller managers. CloudControllerManagerUserAgent = "cloud-controller-manager" )
const (
CloudControllerManagerWebhookPort = 10260
)
Functions ¶
func NewDefaultComponentConfig ¶
func NewDefaultComponentConfig() (*ccmconfig.CloudControllerManagerConfiguration, error)
NewDefaultComponentConfig returns cloud-controller manager configuration object.
Types ¶
type CloudControllerManagerOptions ¶
type CloudControllerManagerOptions struct { Generic *cmoptions.GenericControllerManagerConfigurationOptions *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 ¶
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 ¶
func (s *CloudProviderOptions) ApplyTo(cfg *cpconfig.CloudProviderConfiguration) error
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 *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 ¶
func (o *KubeCloudSharedOptions) ApplyTo(cfg *cpconfig.KubeCloudSharedConfiguration) error
ApplyTo fills up KubeCloudShared config with options.
func (*KubeCloudSharedOptions) Validate ¶
func (o *KubeCloudSharedOptions) Validate() []error
Validate checks validation of KubeCloudSharedOptions.
type NodeControllerOptions ¶
type NodeControllerOptions struct { *nodeconfig.NodeControllerConfiguration }
NodeControllerOptions holds the ServiceController options.
func (*NodeControllerOptions) AddFlags ¶
func (o *NodeControllerOptions) AddFlags(fs *pflag.FlagSet)
AddFlags adds flags related to ServiceController for controller manager to the specified FlagSet.
func (*NodeControllerOptions) ApplyTo ¶
func (o *NodeControllerOptions) ApplyTo(cfg *nodeconfig.NodeControllerConfiguration) error
ApplyTo fills up ServiceController config with options.
func (*NodeControllerOptions) Validate ¶
func (o *NodeControllerOptions) Validate() []error
Validate checks validation of NodeControllerOptions.
type ProviderDefaults ¶
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 ¶
func (o *ServiceControllerOptions) ApplyTo(cfg *serviceconfig.ServiceControllerConfiguration) error
ApplyTo fills up ServiceController config with options.
func (*ServiceControllerOptions) Validate ¶
func (o *ServiceControllerOptions) Validate() []error
Validate checks validation of ServiceControllerOptions.
type WebhookOptions ¶
type WebhookOptions struct { // Webhooks is the list of webhook names that should be enabled or disabled Webhooks []string }
func NewWebhookOptions ¶
func NewWebhookOptions() *WebhookOptions
func (*WebhookOptions) AddFlags ¶
func (o *WebhookOptions) AddFlags(fs *pflag.FlagSet, allWebhooks, disabledByDefaultWebhooks []string)
func (*WebhookOptions) ApplyTo ¶
func (o *WebhookOptions) ApplyTo(cfg *config.WebhookConfiguration) error
func (*WebhookOptions) Validate ¶
func (o *WebhookOptions) Validate(allWebhooks, disabledByDefaultWebhooks []string) []error
type WebhookServingOptions ¶
type WebhookServingOptions struct { *apiserveroptions.SecureServingOptions }
func NewWebhookServingOptions ¶
func NewWebhookServingOptions(defaults ProviderDefaults) *WebhookServingOptions
func (*WebhookServingOptions) AddFlags ¶
func (o *WebhookServingOptions) AddFlags(fs *pflag.FlagSet)
func (*WebhookServingOptions) ApplyTo ¶
func (o *WebhookServingOptions) ApplyTo(cfg **server.SecureServingInfo, webhookCfg config.WebhookConfiguration) error
func (*WebhookServingOptions) Validate ¶
func (o *WebhookServingOptions) Validate() []error
Source Files ¶
cloudprovider.go kubecloudshared.go nodecontroller.go options.go servicecontroller.go webhook.go
- Version
- v0.32.2 (latest)
- Published
- Feb 13, 2025
- Platform
- linux/amd64
- Imports
- 35 packages
- Last checked
- 2 months ago –
Tools for package owners.