mirror of
https://github.com/k3s-io/k3s.git
synced 2024-06-07 19:41:36 +00:00
Move snapshot-retention to EtcdSnapshotFlags in order to support loading from config
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
This commit is contained in:
parent
3576ed4327
commit
0b3593205a
@ -37,6 +37,12 @@ var EtcdSnapshotFlags = []cli.Flag{
|
||||
Usage: "(db) Compress etcd snapshot",
|
||||
Destination: &ServerConfig.EtcdSnapshotCompress,
|
||||
},
|
||||
&cli.IntFlag{
|
||||
Name: "snapshot-retention,etcd-snapshot-retention",
|
||||
Usage: "(db) Number of snapshots to retain.",
|
||||
Destination: &ServerConfig.EtcdSnapshotRetention,
|
||||
Value: defaultSnapshotRentention,
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "s3,etcd-s3",
|
||||
Usage: "(db) Enable backup to S3",
|
||||
@ -140,12 +146,7 @@ func NewEtcdSnapshotCommands(delete, list, prune, save func(ctx *cli.Context) er
|
||||
SkipFlagParsing: false,
|
||||
SkipArgReorder: true,
|
||||
Action: prune,
|
||||
Flags: append(EtcdSnapshotFlags, &cli.IntFlag{
|
||||
Name: "snapshot-retention",
|
||||
Usage: "(db) Number of snapshots to retain.",
|
||||
Destination: &ServerConfig.EtcdSnapshotRetention,
|
||||
Value: defaultSnapshotRentention,
|
||||
}),
|
||||
Flags: EtcdSnapshotFlags,
|
||||
},
|
||||
},
|
||||
Flags: EtcdSnapshotFlags,
|
||||
|
Loading…
Reference in New Issue
Block a user