Commit 1e022f59 authored by Brad Davidson's avatar Brad Davidson Committed by Brad Davidson

Move snapshot-retention to EtcdSnapshotFlags in order to support loading from config

Signed-off-by: 's avatarBrad Davidson <brad.davidson@rancher.com> (cherry picked from commit 0b359320) Signed-off-by: 's avatarBrad Davidson <brad.davidson@rancher.com>
parent ea81098e
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment