...
1
16
17 package options
18
19 import (
20 "github.com/spf13/pflag"
21
22 deploymentconfig "k8s.io/kubernetes/pkg/controller/deployment/config"
23 )
24
25
26 type DeploymentControllerOptions struct {
27 *deploymentconfig.DeploymentControllerConfiguration
28 }
29
30
31 func (o *DeploymentControllerOptions) AddFlags(fs *pflag.FlagSet) {
32 if o == nil {
33 return
34 }
35
36 fs.Int32Var(&o.ConcurrentDeploymentSyncs, "concurrent-deployment-syncs", o.ConcurrentDeploymentSyncs, "The number of deployment objects that are allowed to sync concurrently. Larger number = more responsive deployments, but more CPU (and network) load")
37 }
38
39
40 func (o *DeploymentControllerOptions) ApplyTo(cfg *deploymentconfig.DeploymentControllerConfiguration) error {
41 if o == nil {
42 return nil
43 }
44
45 cfg.ConcurrentDeploymentSyncs = o.ConcurrentDeploymentSyncs
46
47 return nil
48 }
49
50
51 func (o *DeploymentControllerOptions) Validate() []error {
52 if o == nil {
53 return nil
54 }
55
56 errs := []error{}
57 return errs
58 }
59
View as plain text