remove unused DefaultLeaseDuration

This commit is contained in:
danielqsj 2019-02-12 11:38:11 +08:00
parent 903cdff633
commit e62dfea99b

View File

@ -17,18 +17,10 @@ limitations under the License.
package leaderelectionconfig package leaderelectionconfig
import ( import (
"time"
"github.com/spf13/pflag" "github.com/spf13/pflag"
componentbaseconfig "k8s.io/component-base/config" componentbaseconfig "k8s.io/component-base/config"
) )
const (
// DefaultLeaseDuration defines a default duration of lease.
// TODO: This constant should move to the k8s.io/component-base/config package
DefaultLeaseDuration = 15 * time.Second
)
// BindFlags binds the LeaderElectionConfiguration struct fields to a flagset // BindFlags binds the LeaderElectionConfiguration struct fields to a flagset
func BindFlags(l *componentbaseconfig.LeaderElectionConfiguration, fs *pflag.FlagSet) { func BindFlags(l *componentbaseconfig.LeaderElectionConfiguration, fs *pflag.FlagSet) {
fs.BoolVar(&l.LeaderElect, "leader-elect", l.LeaderElect, ""+ fs.BoolVar(&l.LeaderElect, "leader-elect", l.LeaderElect, ""+