Commit Graph

121 Commits (2ff2755528372bae36ede36ddccd1a77bd118887)

Author SHA1 Message Date
rohitsardesai83 42a7ea6d33 etcd: Replace ghodss/yaml with sigs.k8s.io/yaml
To remove the dependency on ghodss/yaml. Replaced this dependency with sigs.k8s.io/yaml.
This wil help to remove the ghodss/yaml dependency from main kubernetes repository.

xref: https://github.com/kubernetes/kubernetes/issues/77024
2019-05-02 12:34:36 +05:30
shivaramr 9150bf52d6 go modules: Fix module path version to include version number 2019-04-26 15:29:50 -07:00
WizardCXY e6c6d8492e *: add flag to let etcd use the new boltdb freelistType feature 2019-02-14 11:07:08 +08:00
Hitoshi Mitake 72dd4a18c5 *: add a new option --enable-grpc-gateway for enabling/disabling grpc gateway 2019-01-23 03:26:34 +09:00
Mark McLoughlin fcc29894c2 config: multiple logging fixes
First, don't panic with invalid --log-outputs. For example:

  $> ./bin/etcd --log-outputs foo
  2018-12-20 15:05:47.988652 C | embed: unknown log-output "foo" (only supports "default", "stderr", "stdout")
  panic: unknown log-output "foo" (only supports "default", "stderr", "stdout")

  goroutine 1 [running]:
  go.etcd.io/etcd/vendor/github.com/coreos/pkg/capnslog.(*PackageLogger).Panicf(0xc000294b00, 0x10fe067, 0x30, 0xc0001fa398, 0x4, 0x4)
        go.etcd.io/etcd/vendor/github.com/coreos/pkg/capnslog/pkg_logger.go:75 +0x161
  go.etcd.io/etcd/embed.(*Config).setupLogging(0xc000291400, 0xc0002a85b0, 0x1)
        go.etcd.io/etcd/embed/config_logging.go:120 +0x1939
  ...

Or:

 $> ./bin/etcd --log-outputs foo,default --logger zap
 panic: multi logoutput for "default" is not supported yet

 goroutine 1 [running]:
 go.etcd.io/etcd/embed.(*Config).setupLogging(0xc000314500, 0xc0001b2f70, 0x1)
        go.etcd.io/etcd/embed/config_logging.go:129 +0x2437
 go.etcd.io/etcd/embed.(*Config).Validate(0xc000314500, 0xc000268a98, 0x127e440)
        go.etcd.io/etcd/embed/config.go:543 +0x43

Second, don't exit in embed.setupLogging(). Before:

  $> ./bin/etcd --log-outputs foo,bar
  --logger=capnslog supports only 1 value in '--log-outputs', got ["bar" "foo"]

and after:

  $> ./bin/etcd --log-outputs foo,bar
  2018-12-20 15:10:24.317982 E | etcdmain: error verifying flags, --logger=capnslog supports only 1 value in '--log-outputs', got ["bar" "foo"]. See 'etcd --help'.

Third, remove duplicated unique strings code. UniqueStringsFromFlag()
is already available to return a sorted slice of values, so just use
that.

Lastly, fix a tiny logging typo in config.
2019-01-17 15:09:26 -05:00
Xiang Li 3faed211e5 *: add flags to setup backend related config 2018-11-26 15:50:26 -08:00
Gyuho Lee d37f1521b7 *: update import paths to "go.etcd.io/etcd"
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2018-08-28 17:47:55 -07:00
Gyuho Lee abffe0d29a etcdmain: add "--cipher-suites" flag
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-06-05 12:54:34 -07:00
Gyuho Lee 892f7e02e0 etcdmain: rename "SnapshotCount"
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-05-18 14:39:31 -07:00
Jiang Xuan bf432648ae *: make bcrypt-cost configurable 2018-05-03 11:43:32 -07:00
Joe LeGasse 7ea9059453 docs: Update documentation around --listen-metrics-urls
The `--listen-metrics-urls` also responds to the `/health` endpoint, but
that was not made clear in the documentation. These updates should help
explain how else that flag can be used.
2018-05-01 11:02:22 -04:00
Gyuho Lee af5bc439b3 embed,etcdmain: rename to "--log-outputs" flag
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-25 13:20:26 -07:00
Gyuho Lee f99cb35d29 embed: rename "LogOutput" to "LogOutputs"
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-25 10:28:13 -07:00
Gyuho Lee 85b7a59c56 etcdmain: add "--initial-election-tick-advance"
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-19 17:45:23 -07:00
Gyuho Lee 1974785511 etcdmain: accept multiple values in "--log-output"
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-17 12:47:06 -07:00
Gyuho Lee 041b9069a2 *: configure server logger
- Add/Document "logger" to support structured logging.
  - This makes functional tests run easier, since zap logger
    provides built-in log redirect to files.
  - "etcd --logger-option=zap" to enable structured logging.
- Current "capnslog" will still be used as "default".
  - We may switch the default or deprecate "capnslog" in v3.5.
  - Either way, will clearly be documented.

Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-16 17:36:00 -07:00
Gyuho Lee 27ed129f44 etcdmain: update "CORS", "HostWhitelist" flag parsing
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-03-27 06:25:44 -07:00
Gyuho Lee 35b01b982c etcdmain: use NewUniqueURLsWithExceptions
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-03-27 06:25:44 -07:00
Gyuho Lee 940200f1ae etcdmain: move "unsafe" flags to bottom
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-03-23 19:44:24 -07:00
Gyuho Lee 82ef3f83f6 etcdmain: deprecate 'ca-file' and 'peer-ca-file' flags
Has been deprecated since 2.1...

Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-03-20 15:31:32 -07:00
Gyuho Lee a66e657cac *: update "pre-vote" flag
Disabled by default, anyway.

Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-03-19 07:18:57 -07:00
Gyuho Lee 1640cdb044 pkg/flags: clean up, add "SelectiveStringsValue"
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-03-19 02:23:06 -07:00
Gyuho Lee bec3d975e0 etcdmain: handle JSON "listen-metrics-urls"
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-03-15 01:24:53 -04:00
Gyuho Lee 4419661fb1 etcdmain: remove "listen-metrics-urls" manual parsing
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-03-15 01:23:33 -04:00
Gyuho Lee 79d3c93568 etcdmain: replace "--host-whitelist" with "flags.StringSlice"
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-03-14 21:38:20 -04:00
Gyuho Lee b48d3eb380 etcdmain: add "--experimental-pre-vote" flag
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-03-06 09:56:32 -08:00
Gyuho Lee 9f0027dfb2 *: do not whitelist empty hosts
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-02-28 19:20:10 -08:00
Gyuho Lee 0179d81f22 etcdmain: add "--host-whitelist" flag
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-02-28 18:23:16 -08:00
Gyuho Lee 0850ccbf45 *: revert "internal/version" change
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-02-26 17:11:40 -08:00
Gyuho Lee 37546f74ab *: move "version" to "internal/version"
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-01-29 10:00:20 -08:00
Tavish Armstrong b664b9176c pkg/srv, embed, etcdmain: Support multiple clusters in the same DNS discovery region. 2018-01-24 20:15:48 +00:00
Sahdev P. Zala 8a8aff198f Log: add information statement
Adding information that when config file is used other command line flags
and env variables will be ignored. This changes are a follow up of a
disucssion under PR,
https://github.com/coreos/etcd/pull/9066
2017-12-27 17:12:28 -05:00
Gyuho Lee 0133d77f0a etcdmain: display default --enable-v2, --strict-reconfig-check value ("true")
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2017-12-14 11:25:20 -08:00
Gyu-Ho Lee 3db5ad8d57 embed,etcdmain: add "--experimental-initial-corrupt-check"
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-11-22 15:27:14 -08:00
dahefanteng a4c407ece4 Documentation: change "key file" to "cert file"
when refered "--trusted-ca-file",what we need provide should be a CA cert file,not the CA private key file.
2017-11-20 00:44:32 -05:00
Gyu-Ho Lee 370ff6b670 etcdmain: do not embed structs (fix go vet warnings)
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-11-08 14:20:52 -08:00
Gyu-Ho Lee adc3cea8cf etcdmain: use embed.DefaultLogOutput for flags
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-11-02 14:43:06 -07:00
Gyu-Ho Lee 1fa295e3ba etcdmain: move SetupLogging to embed
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-11-02 13:19:49 -07:00
Gyu-Ho Lee 863dfd1f0e Merge pull request #8616 from mitake/peer-cn-auth
RFC: etcdmain, pkg: CN based auth for inter peer connection
2017-10-04 10:00:53 -07:00
Hitoshi Mitake 70018e9207 etcdmain, pkg: CN based auth for inter peer connection
This commit adds an authentication mechanism to inter peer connection
(rafthttp). If the cert based peer auth is enabled and a new option
`--peer-cert-allowed-cn` is passed, an etcd process denies a peer
connection whose CN doesn't match.
2017-10-02 15:59:17 +09:00
fanmin shi bcef78c665 Merge pull request #8563 from fanminshi/make_auto_compaction_granular
*: support auto-compaction with finer granularity
2017-09-29 11:18:51 -07:00
fanmin shi 733de98cfb *: modify etcd flags to support finner compaction retention 2017-09-28 17:22:44 -07:00
Gyu-Ho Lee 4b3d4000af etcdmain: add 'grpc-keepalive-*' flags
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-09-28 11:24:02 -07:00
Anthony Romano a0adee5209 etcdmain: add command line flag to etcdmain 2017-08-31 11:47:41 -07:00
blueblue 9b92e1b2d0 flag: improve StringFlags by support set default value when init (#8447)
* flag: improve StringFlags by support set default value when init

when init flagSet, set default value should be moved to StringFlags init
func, which is more friendly

personal proposal

* flag: code improved for StringFlags
2017-08-28 00:02:11 -07:00
Anthony Romano 86aeaad924 etcdmain: support experimental-corrupt-check-time flag 2017-08-22 09:59:59 -07:00
Gyu-Ho Lee 8463b377d9 etcdmain: add 'listen-metrics-urls' option
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-07-14 11:14:09 -07:00
Xiang Li 0fe8fdcb29 Merge pull request #8123 from yudai/revision_compactor
Compactor: Add Revisional compactor
2017-06-22 16:34:28 -07:00
Iwasaki Yudai a3f8f47422 *: add Revision compactor 2017-06-21 15:41:07 -07:00
Anthony Romano 7d7d1ae6a0 etcdmain: configure CRL file through command line 2017-06-19 15:23:41 -07:00