mirror of https://github.com/k3s-io/k3s
commit
ba0abd0be6
|
@ -17,18 +17,10 @@ limitations under the License.
|
|||
package leaderelectionconfig
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/spf13/pflag"
|
||||
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
|
||||
func BindFlags(l *componentbaseconfig.LeaderElectionConfiguration, fs *pflag.FlagSet) {
|
||||
fs.BoolVar(&l.LeaderElect, "leader-elect", l.LeaderElect, ""+
|
||||
|
|
Loading…
Reference in New Issue