Skip to content

Commit 09ea351

Browse files
authored
Adding the -etcd.ping-without-stream-allowed parameter (#5933)
* Adding the -etcd.ping-without-stream-allowed paremeter to enable/disable this etcd connectivity parameter Signed-off-by: Kris Buytaert <Kris.Buytaert@gmail.com> * Adding docs generated by make doc Signed-off-by: Kris Buytaert <Kris.Buytaert@gmail.com> * Updating CHANGELOG for stream parameter Signed-off-by: Kris Buytaert <Kris.Buytaert@gmail.com> * Reordering CHANGELOG update Signed-off-by: Kris Buytaert <Kris.Buytaert@gmail.com> * Referring the PR, not the Issue Signed-off-by: Kris Buytaert <Kris.Buytaert@gmail.com> * Regenerated docs Signed-off-by: Kris Buytaert <Kris.Buytaert@gmail.com> --------- Signed-off-by: Kris Buytaert <Kris.Buytaert@gmail.com>
1 parent 77c7138 commit 09ea351

File tree

4 files changed

+14
-3
lines changed

4 files changed

+14
-3
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@
77
* [ENHANCEMENT] Distributor: Added `max_inflight_push_requests` config to ingester client to protect distributor from OOMKilled. #5917
88
* [ENHANCEMENT] Distributor/Querier: Clean stale per-ingester metrics after ingester restarts. #5930
99
* [ENHANCEMENT] Distributor/Ring: Allow disabling detailed ring metrics by ring member. #5931
10+
* [ENHANCEMENT] KV: Etcd Added etcd.ping-without-stream-allowed parameter to disable/enable PermitWithoutStream #5933
1011
* [CHANGE] Upgrade Dockerfile Node version from 14x to 18x. #5906
1112
* [BUGFIX] Configsdb: Fix endline issue in db password. #5920
1213

14+
1315
## 1.17.0 2024-04-30
1416

1517
* [CHANGE] Azure Storage: Upgraded objstore dependency and support Azure Workload Identity Authentication. Added `connection_string` to support authenticating via SAS token. Marked `msi_resource` config as deprecating. #5645

docs/configuration/arguments.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,9 @@ prefix these flags with `distributor.ha-tracker.`
160160
The trusted CA file path.
161161
- `etcd.tls-insecure-skip-verify`
162162
Skip validating server certificate.
163+
- `etcd.ping-without-stream-allowd'`
164+
Enable/Disable PermitWithoutStream parameter
165+
163166

164167
#### memberlist
165168

docs/configuration/config-file-reference.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2606,6 +2606,10 @@ The `etcd_config` configures the etcd client. The supported CLI flags `<prefix>`
26062606
# Etcd password.
26072607
# CLI flag: -<prefix>.etcd.password
26082608
[password: <string> | default = ""]
2609+
2610+
# Send Keepalive pings with no streams.
2611+
# CLI flag: -<prefix>.etcd.ping-without-stream-allowed
2612+
[ping-without-stream-allowed: <boolean> | default = true]
26092613
```
26102614

26112615
### `fifo_cache_config`

pkg/ring/kv/etcd/etcd.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,9 @@ type Config struct {
2727
EnableTLS bool `yaml:"tls_enabled"`
2828
TLS cortextls.ClientConfig `yaml:",inline"`
2929

30-
UserName string `yaml:"username"`
31-
Password string `yaml:"password"`
30+
UserName string `yaml:"username"`
31+
Password string `yaml:"password"`
32+
PermitWithoutStream bool `yaml:"ping-without-stream-allowed"`
3233
}
3334

3435
// Clientv3Facade is a subset of all Etcd client operations that are required
@@ -59,6 +60,7 @@ func (cfg *Config) RegisterFlagsWithPrefix(f *flag.FlagSet, prefix string) {
5960
f.BoolVar(&cfg.EnableTLS, prefix+"etcd.tls-enabled", false, "Enable TLS.")
6061
f.StringVar(&cfg.UserName, prefix+"etcd.username", "", "Etcd username.")
6162
f.StringVar(&cfg.Password, prefix+"etcd.password", "", "Etcd password.")
63+
f.BoolVar(&cfg.PermitWithoutStream, prefix+"etcd.ping-without-stream-allowed", true, "Send Keepalive pings with no streams.")
6264
cfg.TLS.RegisterFlagsWithPrefix(prefix+"etcd", f)
6365
}
6466

@@ -102,7 +104,7 @@ func New(cfg Config, codec codec.Codec, logger log.Logger) (*Client, error) {
102104
// to server without any active streams (enabled)
103105
DialKeepAliveTime: 10 * time.Second,
104106
DialKeepAliveTimeout: 2 * cfg.DialTimeout,
105-
PermitWithoutStream: true,
107+
PermitWithoutStream: cfg.PermitWithoutStream,
106108
TLS: tlsConfig,
107109
Username: cfg.UserName,
108110
Password: cfg.Password,

0 commit comments

Comments
 (0)