Skip to content

Adding the -etcd.ping-without-stream-allowed parameter #5933

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@
* [ENHANCEMENT] Distributor: Added `max_inflight_push_requests` config to ingester client to protect distributor from OOMKilled. #5917
* [ENHANCEMENT] Distributor/Querier: Clean stale per-ingester metrics after ingester restarts. #5930
* [ENHANCEMENT] Distributor/Ring: Allow disabling detailed ring metrics by ring member. #5931
* [ENHANCEMENT] KV: Etcd Added etcd.ping-without-stream-allowed parameter to disable/enable PermitWithoutStream #5933
* [CHANGE] Upgrade Dockerfile Node version from 14x to 18x. #5906
* [BUGFIX] Configsdb: Fix endline issue in db password. #5920


## 1.17.0 2024-04-30

* [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
Expand Down
3 changes: 3 additions & 0 deletions docs/configuration/arguments.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,9 @@ prefix these flags with `distributor.ha-tracker.`
The trusted CA file path.
- `etcd.tls-insecure-skip-verify`
Skip validating server certificate.
- `etcd.ping-without-stream-allowd'`
Enable/Disable PermitWithoutStream parameter


#### memberlist

Expand Down
4 changes: 4 additions & 0 deletions docs/configuration/config-file-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -2606,6 +2606,10 @@ The `etcd_config` configures the etcd client. The supported CLI flags `<prefix>`
# Etcd password.
# CLI flag: -<prefix>.etcd.password
[password: <string> | default = ""]

# Send Keepalive pings with no streams.
# CLI flag: -<prefix>.etcd.ping-without-stream-allowed
[ping-without-stream-allowed: <boolean> | default = true]
```

### `fifo_cache_config`
Expand Down
8 changes: 5 additions & 3 deletions pkg/ring/kv/etcd/etcd.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ type Config struct {
EnableTLS bool `yaml:"tls_enabled"`
TLS cortextls.ClientConfig `yaml:",inline"`

UserName string `yaml:"username"`
Password string `yaml:"password"`
UserName string `yaml:"username"`
Password string `yaml:"password"`
PermitWithoutStream bool `yaml:"ping-without-stream-allowed"`
}

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

Expand Down Expand Up @@ -102,7 +104,7 @@ func New(cfg Config, codec codec.Codec, logger log.Logger) (*Client, error) {
// to server without any active streams (enabled)
DialKeepAliveTime: 10 * time.Second,
DialKeepAliveTimeout: 2 * cfg.DialTimeout,
PermitWithoutStream: true,
PermitWithoutStream: cfg.PermitWithoutStream,
TLS: tlsConfig,
Username: cfg.UserName,
Password: cfg.Password,
Expand Down
Loading