Browse Source

Added configuration input to etcd-snapshot (#4280)

Signed-off-by: dereknola <derek.nola@suse.com>
pull/4290/head
Derek Nola 3 years ago committed by GitHub
parent
commit
918945da45
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      pkg/cli/cmds/etcd_snapshot.go
  2. 2
      pkg/configfilearg/defaultparser.go

3
pkg/cli/cmds/etcd_snapshot.go

@ -11,6 +11,7 @@ const EtcdSnapshotCommand = "etcd-snapshot"
var EtcdSnapshotFlags = []cli.Flag{
DebugFlag,
ConfigFlag,
LogFile,
AlsoLogToStderr,
cli.StringFlag{
@ -25,7 +26,7 @@ var EtcdSnapshotFlags = []cli.Flag{
Destination: &ServerConfig.DataDir,
},
&cli.StringFlag{
Name: "name,etcd-snapshot-name",
Name: "name",
Usage: "(db) Set the base name of the etcd on-demand snapshot (appended with UNIX timestamp).",
Destination: &ServerConfig.EtcdSnapshotName,
Value: "on-demand",

2
pkg/configfilearg/defaultparser.go

@ -7,7 +7,7 @@ import (
func MustParse(args []string) []string {
parser := &Parser{
After: []string{"server", "agent"},
After: []string{"server", "agent", "etcd-snapshot"},
FlagNames: []string{"--config", "-c"},
EnvName: version.ProgramUpper + "_CONFIG_FILE",
DefaultConfig: "/etc/rancher/" + version.Program + "/config.yaml",

Loading…
Cancel
Save