// VolumeConfigFlags is used to bind CLI flags to variables. This top-level struct contains *all* enumerated
// CLI flags meant to configure all volume plugins. From this config, the binary will create many instances
// of volume.VolumeConfig which are then passed to the appropriate plugin. The ControllerManager binary is the only
// part of the code which knows what plugins are supported and which CLI flags correspond to each plugin.
typeVolumeConfigFlagsstruct{
PersistentVolumeRecyclerTimeoutNFSint
}
// AddFlags adds flags for a specific CMServer to the specified FlagSet
// AddFlags adds flags for a specific CMServer to the specified FlagSet
func(s*CMServer)AddFlags(fs*pflag.FlagSet){
func(s*CMServer)AddFlags(fs*pflag.FlagSet){
fs.IntVar(&s.Port,"port",s.Port,"The port that the controller-manager's http service runs on")
fs.IntVar(&s.Port,"port",s.Port,"The port that the controller-manager's http service runs on")
...
@@ -125,6 +138,8 @@ func (s *CMServer) AddFlags(fs *pflag.FlagSet) {
...
@@ -125,6 +138,8 @@ func (s *CMServer) AddFlags(fs *pflag.FlagSet) {
fs.DurationVar(&s.ResourceQuotaSyncPeriod,"resource-quota-sync-period",s.ResourceQuotaSyncPeriod,"The period for syncing quota usage status in the system")
fs.DurationVar(&s.ResourceQuotaSyncPeriod,"resource-quota-sync-period",s.ResourceQuotaSyncPeriod,"The period for syncing quota usage status in the system")
fs.DurationVar(&s.NamespaceSyncPeriod,"namespace-sync-period",s.NamespaceSyncPeriod,"The period for syncing namespace life-cycle updates")
fs.DurationVar(&s.NamespaceSyncPeriod,"namespace-sync-period",s.NamespaceSyncPeriod,"The period for syncing namespace life-cycle updates")
fs.DurationVar(&s.PVClaimBinderSyncPeriod,"pvclaimbinder-sync-period",s.PVClaimBinderSyncPeriod,"The period for syncing persistent volumes and persistent volume claims")
fs.DurationVar(&s.PVClaimBinderSyncPeriod,"pvclaimbinder-sync-period",s.PVClaimBinderSyncPeriod,"The period for syncing persistent volumes and persistent volume claims")
// TODO markt -- make this example a working config item with Recycler Config PR.
// fs.MyExample(&s.VolumeConfig.PersistentVolumeRecyclerTimeoutNFS, "pv-recycler-timeout-nfs", s.VolumeConfig.PersistentVolumeRecyclerTimeoutNFS, "The minimum timeout for an NFS PV recycling operation")
fs.DurationVar(&s.HorizontalPodAutoscalerSyncPeriod,"horizontal-pod-autoscaler-sync-period",s.HorizontalPodAutoscalerSyncPeriod,"The period for syncing the number of pods in horizontal pod autoscaler.")
fs.DurationVar(&s.HorizontalPodAutoscalerSyncPeriod,"horizontal-pod-autoscaler-sync-period",s.HorizontalPodAutoscalerSyncPeriod,"The period for syncing the number of pods in horizontal pod autoscaler.")
fs.DurationVar(&s.PodEvictionTimeout,"pod-eviction-timeout",s.PodEvictionTimeout,"The grace period for deleting pods on failed nodes.")
fs.DurationVar(&s.PodEvictionTimeout,"pod-eviction-timeout",s.PodEvictionTimeout,"The grace period for deleting pods on failed nodes.")
fs.Float32Var(&s.DeletingPodsQps,"deleting-pods-qps",0.1,"Number of nodes per second on which pods are deleted in case of node failure.")
fs.Float32Var(&s.DeletingPodsQps,"deleting-pods-qps",0.1,"Number of nodes per second on which pods are deleted in case of node failure.")