set duration to second (#4231)

pull/4248/head
Brian Downs 3 years ago committed by GitHub
parent 0452f017c1
commit e11a4bf8bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,6 +1,8 @@
package cmds package cmds
import ( import (
"time"
"github.com/rancher/k3s/pkg/version" "github.com/rancher/k3s/pkg/version"
"github.com/urfave/cli" "github.com/urfave/cli"
) )
@ -84,9 +86,9 @@ var EtcdSnapshotFlags = []cli.Flag{
}, },
&cli.DurationFlag{ &cli.DurationFlag{
Name: "s3-timeout,etcd-s3-timeout", Name: "s3-timeout,etcd-s3-timeout",
Usage: "(db) S3 timeout in seconds", Usage: "(db) S3 timeout",
Destination: &ServerConfig.EtcdS3Timeout, Destination: &ServerConfig.EtcdS3Timeout,
Value: 30, Value: 30 * time.Second,
}, },
} }

@ -341,9 +341,9 @@ func NewServerCommand(action func(*cli.Context) error) cli.Command {
}, },
&cli.DurationFlag{ &cli.DurationFlag{
Name: "etcd-s3-timeout", Name: "etcd-s3-timeout",
Usage: "(db) S3 timeout in seconds", Usage: "(db) S3 timeout",
Destination: &ServerConfig.EtcdS3Timeout, Destination: &ServerConfig.EtcdS3Timeout,
Value: 30, Value: 30 * time.Second,
}, },
cli.StringFlag{ cli.StringFlag{
Name: "default-local-storage-path", Name: "default-local-storage-path",

Loading…
Cancel
Save