Merge pull request #10764 from jingyih/clarify_config_file_setting

*: more clarification on when server config file is provided
This commit is contained in:
Gyuho Lee 2019-05-28 16:23:19 -07:00 committed by GitHub
commit bdcecd1fc4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

@ -4,7 +4,7 @@ title: Configuration flags
etcd is configurable through a configuration file, various command-line flags, and environment variables. etcd is configurable through a configuration file, various command-line flags, and environment variables.
A reusable configuration file is a YAML file made with name and value of one or more command-line flags described below. In order to use this file, specify the file path as a value to the `--config-file` flag. The [sample configuration file][sample-config-file] can be used as a starting point to create a new configuration file as needed. A reusable configuration file is a YAML file made with name and value of one or more command-line flags described below. In order to use this file, specify the file path as a value to the `--config-file` flag or `ETCD_CONFIG_FILE` environment variable. The [sample configuration file][sample-config-file] can be used as a starting point to create a new configuration file as needed.
Options set on the command line take precedence over those from the environment. If a configuration file is provided, other command line flags and environment variables will be ignored. Options set on the command line take precedence over those from the environment. If a configuration file is provided, other command line flags and environment variables will be ignored.
For example, `etcd --config-file etcd.conf.yml.sample --data-dir /tmp` will ignore the `--data-dir` flag. For example, `etcd --config-file etcd.conf.yml.sample --data-dir /tmp` will ignore the `--data-dir` flag.
@ -372,7 +372,7 @@ Follow the instructions when using these flags.
+ default: false + default: false
### --config-file ### --config-file
+ Load server configuration from a file. + Load server configuration from a file. Note that if a configuration file is provided, other command line flags and environment variables will be ignored.
+ default: "" + default: ""
+ example: [sample configuration file][sample-config-file] + example: [sample configuration file][sample-config-file]
+ env variable: ETCD_CONFIG_FILE + env variable: ETCD_CONFIG_FILE

View File

@ -127,7 +127,7 @@ func newConfig() *config {
fmt.Fprintln(os.Stderr, usageline) fmt.Fprintln(os.Stderr, usageline)
} }
fs.StringVar(&cfg.configFile, "config-file", "", "Path to the server configuration file") fs.StringVar(&cfg.configFile, "config-file", "", "Path to the server configuration file. Note that if a configuration file is provided, other command line flags and environment variables will be ignored.")
// member // member
fs.StringVar(&cfg.ec.Dir, "data-dir", cfg.ec.Dir, "Path to the data directory.") fs.StringVar(&cfg.ec.Dir, "data-dir", cfg.ec.Dir, "Path to the data directory.")

View File

@ -35,7 +35,7 @@ var (
Show the help information about etcd. Show the help information about etcd.
etcd --config-file etcd --config-file
Path to the server configuration file. Path to the server configuration file. Note that if a configuration file is provided, other command line flags and environment variables will be ignored.
etcd gateway etcd gateway
Run the stateless pass-through etcd TCP connection forwarding proxy. Run the stateless pass-through etcd TCP connection forwarding proxy.