mirror of
https://git.vectorsigma.ru/public/k3s.git
synced 2026-08-06 23:39:56 +00:00
Add retention flag specific for s3
* Add retention flag specific for s3 * Add retention for the unit tests: Signed-off-by: Vitor Savian <vitor.savian@suse.com>
This commit is contained in:
@@ -124,6 +124,13 @@ var EtcdSnapshotFlags = []cli.Flag{
|
||||
Destination: &ServerConfig.EtcdS3Region,
|
||||
Value: "us-east-1",
|
||||
},
|
||||
&cli.IntFlag{
|
||||
Name: "s3-retention",
|
||||
Aliases: []string{"etcd-s3-retention"},
|
||||
Usage: "(db) Number of s3 snapshots to retain.",
|
||||
Destination: &ServerConfig.EtcdS3Retention,
|
||||
Value: defaultSnapshotRentention,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "s3-folder",
|
||||
Aliases: []string{"etcd-s3-folder"},
|
||||
|
||||
@@ -105,6 +105,7 @@ type Server struct {
|
||||
EtcdS3SecretKey string
|
||||
EtcdS3SessionToken string
|
||||
EtcdS3BucketName string
|
||||
EtcdS3Retention int
|
||||
EtcdS3BucketLookupType string
|
||||
EtcdS3Region string
|
||||
EtcdS3Folder string
|
||||
@@ -480,6 +481,12 @@ var ServerFlags = []cli.Flag{
|
||||
Usage: "(db) S3 folder",
|
||||
Destination: &ServerConfig.EtcdS3Folder,
|
||||
},
|
||||
&cli.IntFlag{
|
||||
Name: "etcd-s3-retention",
|
||||
Usage: "(db) S3 retention limit",
|
||||
Destination: &ServerConfig.EtcdS3Retention,
|
||||
Value: defaultSnapshotRentention,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "etcd-s3-proxy",
|
||||
Usage: "(db) Proxy server to use when connecting to S3, overriding any proxy-releated environment variables",
|
||||
|
||||
Reference in New Issue
Block a user