Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
0b359320
Commit
0b359320
authored
Feb 15, 2024
by
Brad Davidson
Committed by
Brad Davidson
Mar 04, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move snapshot-retention to EtcdSnapshotFlags in order to support loading from config
Signed-off-by:
Brad Davidson
<
brad.davidson@rancher.com
>
parent
3576ed43
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
etcd_snapshot.go
pkg/cli/cmds/etcd_snapshot.go
+7
-6
No files found.
pkg/cli/cmds/etcd_snapshot.go
View file @
0b359320
...
@@ -37,6 +37,12 @@ var EtcdSnapshotFlags = []cli.Flag{
...
@@ -37,6 +37,12 @@ var EtcdSnapshotFlags = []cli.Flag{
Usage
:
"(db) Compress etcd snapshot"
,
Usage
:
"(db) Compress etcd snapshot"
,
Destination
:
&
ServerConfig
.
EtcdSnapshotCompress
,
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
{
&
cli
.
BoolFlag
{
Name
:
"s3,etcd-s3"
,
Name
:
"s3,etcd-s3"
,
Usage
:
"(db) Enable backup to S3"
,
Usage
:
"(db) Enable backup to S3"
,
...
@@ -140,12 +146,7 @@ func NewEtcdSnapshotCommands(delete, list, prune, save func(ctx *cli.Context) er
...
@@ -140,12 +146,7 @@ func NewEtcdSnapshotCommands(delete, list, prune, save func(ctx *cli.Context) er
SkipFlagParsing
:
false
,
SkipFlagParsing
:
false
,
SkipArgReorder
:
true
,
SkipArgReorder
:
true
,
Action
:
prune
,
Action
:
prune
,
Flags
:
append
(
EtcdSnapshotFlags
,
&
cli
.
IntFlag
{
Flags
:
EtcdSnapshotFlags
,
Name
:
"snapshot-retention"
,
Usage
:
"(db) Number of snapshots to retain."
,
Destination
:
&
ServerConfig
.
EtcdSnapshotRetention
,
Value
:
defaultSnapshotRentention
,
}),
},
},
},
},
Flags
:
EtcdSnapshotFlags
,
Flags
:
EtcdSnapshotFlags
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment