1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- package options
- import (
- "github.com/spf13/pflag"
- serviceconfig "k8s.io/kubernetes/pkg/controller/service/config"
- )
- type ServiceControllerOptions struct {
- *serviceconfig.ServiceControllerConfiguration
- }
- func (o *ServiceControllerOptions) AddFlags(fs *pflag.FlagSet) {
- if o == nil {
- return
- }
- fs.Int32Var(&o.ConcurrentServiceSyncs, "concurrent-service-syncs", o.ConcurrentServiceSyncs, "The number of services that are allowed to sync concurrently. Larger number = more responsive service management, but more CPU (and network) load")
- }
- func (o *ServiceControllerOptions) ApplyTo(cfg *serviceconfig.ServiceControllerConfiguration) error {
- if o == nil {
- return nil
- }
- cfg.ConcurrentServiceSyncs = o.ConcurrentServiceSyncs
- return nil
- }
- func (o *ServiceControllerOptions) Validate() []error {
- if o == nil {
- return nil
- }
- errs := []error{}
- return errs
- }
|