Commit ac49139c authored by chrislovecnm's avatar chrislovecnm

updates from review

parent a973c38c
...@@ -409,7 +409,7 @@ func StartControllers(controllers map[string]InitFunc, s *options.CMServer, root ...@@ -409,7 +409,7 @@ func StartControllers(controllers map[string]InitFunc, s *options.CMServer, root
time.Sleep(wait.Jitter(s.ControllerStartInterval.Duration, ControllerStartJitter)) time.Sleep(wait.Jitter(s.ControllerStartInterval.Duration, ControllerStartJitter))
if s.ReconcilerSyncLoopPeriod.Duration < time.Second { if s.ReconcilerSyncLoopPeriod.Duration < time.Second {
return fmt.Errorf("Duration time must be greater than one second as set via command line option reconcile-sync-loop-period. One minute is recommended.") return fmt.Errorf("Duration time must be greater than one second as set via command line option reconcile-sync-loop-period.")
} }
attachDetachController, attachDetachControllerErr := attachDetachController, attachDetachControllerErr :=
......
...@@ -182,8 +182,8 @@ func (s *CMServer) AddFlags(fs *pflag.FlagSet) { ...@@ -182,8 +182,8 @@ func (s *CMServer) AddFlags(fs *pflag.FlagSet) {
fs.Float32Var(&s.SecondaryNodeEvictionRate, "secondary-node-eviction-rate", 0.01, "Number of nodes per second on which pods are deleted in case of node failure when a zone is unhealthy (see --unhealthy-zone-threshold for definition of healthy/unhealthy). Zone refers to entire cluster in non-multizone clusters. This value is implicitly overridden to 0 if the cluster size is smaller than --large-cluster-size-threshold.") fs.Float32Var(&s.SecondaryNodeEvictionRate, "secondary-node-eviction-rate", 0.01, "Number of nodes per second on which pods are deleted in case of node failure when a zone is unhealthy (see --unhealthy-zone-threshold for definition of healthy/unhealthy). Zone refers to entire cluster in non-multizone clusters. This value is implicitly overridden to 0 if the cluster size is smaller than --large-cluster-size-threshold.")
fs.Int32Var(&s.LargeClusterSizeThreshold, "large-cluster-size-threshold", 50, "Number of nodes from which NodeController treats the cluster as large for the eviction logic purposes. --secondary-node-eviction-rate is implicitly overridden to 0 for clusters this size or smaller.") fs.Int32Var(&s.LargeClusterSizeThreshold, "large-cluster-size-threshold", 50, "Number of nodes from which NodeController treats the cluster as large for the eviction logic purposes. --secondary-node-eviction-rate is implicitly overridden to 0 for clusters this size or smaller.")
fs.Float32Var(&s.UnhealthyZoneThreshold, "unhealthy-zone-threshold", 0.55, "Fraction of Nodes in a zone which needs to be not Ready (minimum 3) for zone to be treated as unhealthy. ") fs.Float32Var(&s.UnhealthyZoneThreshold, "unhealthy-zone-threshold", 0.55, "Fraction of Nodes in a zone which needs to be not Ready (minimum 3) for zone to be treated as unhealthy. ")
fs.BoolVar(&s.DisableAttachDetachReconcilerSync, "disable-attach-detach-reconcile", false, "Disable volume attach detach reconciler sync. Disabling this may cause volumes to be mismatched with pods. Use wisely.") fs.BoolVar(&s.DisableAttachDetachReconcilerSync, "disable-attach-detach-reconcile-sync", false, "Disable volume attach detach reconciler sync. Disabling this may cause volumes to be mismatched with pods. Use wisely.")
fs.DurationVar(&s.ReconcilerSyncLoopPeriod.Duration, "attach-detach-reconcile-period", s.ReconcilerSyncLoopPeriod.Duration, "The reconciler sync wait time between volume attach detach. This duration must be larger than one second, and increasing this value from the default my allow for volume mismatches.") fs.DurationVar(&s.ReconcilerSyncLoopPeriod.Duration, "attach-detach-reconcile-sync-period", s.ReconcilerSyncLoopPeriod.Duration, "The reconciler sync wait time between volume attach detach. This duration must be larger than one second, and increasing this value from the default may allow for volumes to be mismatched with pods.")
leaderelection.BindFlags(&s.LeaderElection, fs) leaderelection.BindFlags(&s.LeaderElection, fs)
config.DefaultFeatureGate.AddFlag(fs) config.DefaultFeatureGate.AddFlag(fs)
......
...@@ -635,5 +635,5 @@ garbage-collector-enabled ...@@ -635,5 +635,5 @@ garbage-collector-enabled
viper-config viper-config
log-lines-total log-lines-total
run-duration run-duration
disable-attach-detach-reconcile attach-detach-reconcile-sync-period
attach-detach-reconcile-period disable-attach-detach-reconcile-sync
...@@ -777,7 +777,7 @@ type KubeControllerManagerConfiguration struct { ...@@ -777,7 +777,7 @@ type KubeControllerManagerConfiguration struct {
// This flag enables or disables reconcile. Is false by default, and thus enabled. // This flag enables or disables reconcile. Is false by default, and thus enabled.
DisableAttachDetachReconcilerSync bool DisableAttachDetachReconcilerSync bool
// ReconcilerSyncLoopPeriod is the amount of time the reconciler sync states loop // ReconcilerSyncLoopPeriod is the amount of time the reconciler sync states loop
// wait between successive executions. Is set to 5 min by default. // wait between successive executions. Is set to 5 sec by default.
ReconcilerSyncLoopPeriod metav1.Duration ReconcilerSyncLoopPeriod metav1.Duration
} }
......
...@@ -75,7 +75,7 @@ func NewAttachDetachController( ...@@ -75,7 +75,7 @@ func NewAttachDetachController(
pvInformer kcache.SharedInformer, pvInformer kcache.SharedInformer,
cloud cloudprovider.Interface, cloud cloudprovider.Interface,
plugins []volume.VolumePlugin, plugins []volume.VolumePlugin,
disableReconciliation bool, disableReconciliationSync bool,
reconcilerSyncDuration time.Duration) (AttachDetachController, error) { reconcilerSyncDuration time.Duration) (AttachDetachController, error) {
// TODO: The default resyncPeriod for shared informers is 12 hours, this is // TODO: The default resyncPeriod for shared informers is 12 hours, this is
// unacceptable for the attach/detach controller. For example, if a pod is // unacceptable for the attach/detach controller. For example, if a pod is
...@@ -135,7 +135,7 @@ func NewAttachDetachController( ...@@ -135,7 +135,7 @@ func NewAttachDetachController(
reconcilerLoopPeriod, reconcilerLoopPeriod,
reconcilerMaxWaitForUnmountDuration, reconcilerMaxWaitForUnmountDuration,
reconcilerSyncDuration, reconcilerSyncDuration,
disableReconciliation, disableReconciliationSync,
adc.desiredStateOfWorld, adc.desiredStateOfWorld,
adc.actualStateOfWorld, adc.actualStateOfWorld,
adc.attacherDetacher, adc.attacherDetacher,
......
...@@ -57,7 +57,7 @@ func NewReconciler( ...@@ -57,7 +57,7 @@ func NewReconciler(
loopPeriod time.Duration, loopPeriod time.Duration,
maxWaitForUnmountDuration time.Duration, maxWaitForUnmountDuration time.Duration,
syncDuration time.Duration, syncDuration time.Duration,
disableReconciliation bool, disableReconciliationSync bool,
desiredStateOfWorld cache.DesiredStateOfWorld, desiredStateOfWorld cache.DesiredStateOfWorld,
actualStateOfWorld cache.ActualStateOfWorld, actualStateOfWorld cache.ActualStateOfWorld,
attacherDetacher operationexecutor.OperationExecutor, attacherDetacher operationexecutor.OperationExecutor,
...@@ -66,7 +66,7 @@ func NewReconciler( ...@@ -66,7 +66,7 @@ func NewReconciler(
loopPeriod: loopPeriod, loopPeriod: loopPeriod,
maxWaitForUnmountDuration: maxWaitForUnmountDuration, maxWaitForUnmountDuration: maxWaitForUnmountDuration,
syncDuration: syncDuration, syncDuration: syncDuration,
disableReconciliation: disableReconciliation, disableReconciliationSync: disableReconciliationSync,
desiredStateOfWorld: desiredStateOfWorld, desiredStateOfWorld: desiredStateOfWorld,
actualStateOfWorld: actualStateOfWorld, actualStateOfWorld: actualStateOfWorld,
attacherDetacher: attacherDetacher, attacherDetacher: attacherDetacher,
...@@ -84,7 +84,7 @@ type reconciler struct { ...@@ -84,7 +84,7 @@ type reconciler struct {
attacherDetacher operationexecutor.OperationExecutor attacherDetacher operationexecutor.OperationExecutor
nodeStatusUpdater statusupdater.NodeStatusUpdater nodeStatusUpdater statusupdater.NodeStatusUpdater
timeOfLastSync time.Time timeOfLastSync time.Time
disableReconciliation bool disableReconciliationSync bool
} }
func (rc *reconciler) Run(stopCh <-chan struct{}) { func (rc *reconciler) Run(stopCh <-chan struct{}) {
...@@ -99,7 +99,7 @@ func (rc *reconciler) reconciliationLoopFunc() func() { ...@@ -99,7 +99,7 @@ func (rc *reconciler) reconciliationLoopFunc() func() {
rc.reconcile() rc.reconcile()
if rc.disableReconciliation { if rc.disableReconciliationSync {
glog.V(5).Info("Skipping reconciling attached volumes still attached since it is disabled via the command line.") glog.V(5).Info("Skipping reconciling attached volumes still attached since it is disabled via the command line.")
} else if rc.syncDuration < time.Second { } else if rc.syncDuration < time.Second {
glog.V(5).Info("Skipping reconciling attached volumes still attached since it is set to less than one second via the command line.") glog.V(5).Info("Skipping reconciling attached volumes still attached since it is set to less than one second via the command line.")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment