Skip to content

Commit

Permalink
Allow cluster validation in query-frontend and query-scheduler client…
Browse files Browse the repository at this point in the history
…s of querier worked

Signed-off-by: Yuri Nikolic <[email protected]>
  • Loading branch information
duricanikolic committed Mar 4, 2025
1 parent 75e98b6 commit 0b9248d
Show file tree
Hide file tree
Showing 9 changed files with 350 additions and 51 deletions.
280 changes: 274 additions & 6 deletions docs/sources/mimir/configure/configuration-parameters/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3061,8 +3061,6 @@ grpc_client_config:

The `grpc_client` block configures the gRPC client used to communicate between two Mimir components. The supported CLI flags `<prefix>` used to reference this configuration block are:

- `querier.frontend-client`
- `querier.scheduler-client`
- `query-frontend.grpc-client-config`
- `query-scheduler.grpc-client-config`
- `ruler.client`
Expand Down Expand Up @@ -3240,13 +3238,283 @@ The `frontend_worker` block configures the worker running within the querier, pi
# Configures the gRPC client used to communicate between the querier and the
# query-frontend.
# The CLI flags prefix for this block configuration is: querier.frontend-client
[grpc_client_config: <grpc_client>]
grpc_client_config:
# (advanced) gRPC client max receive message size (bytes).
# CLI flag: -querier.frontend-client.grpc-max-recv-msg-size
[max_recv_msg_size: <int> | default = 104857600]
# (advanced) gRPC client max send message size (bytes).
# CLI flag: -querier.frontend-client.grpc-max-send-msg-size
[max_send_msg_size: <int> | default = 104857600]
# (advanced) Use compression when sending messages. Supported values are:
# 'gzip', 'snappy', 's2' and '' (disable compression)
# CLI flag: -querier.frontend-client.grpc-compression
[grpc_compression: <string> | default = ""]
# (advanced) Rate limit for gRPC client; 0 means disabled.
# CLI flag: -querier.frontend-client.grpc-client-rate-limit
[rate_limit: <float> | default = 0]
# (advanced) Rate limit burst for gRPC client.
# CLI flag: -querier.frontend-client.grpc-client-rate-limit-burst
[rate_limit_burst: <int> | default = 0]
# (advanced) Enable backoff and retry when we hit rate limits.
# CLI flag: -querier.frontend-client.backoff-on-ratelimits
[backoff_on_ratelimits: <boolean> | default = false]
backoff_config:
# (advanced) Minimum delay when backing off.
# CLI flag: -querier.frontend-client.backoff-min-period
[min_period: <duration> | default = 100ms]
# (advanced) Maximum delay when backing off.
# CLI flag: -querier.frontend-client.backoff-max-period
[max_period: <duration> | default = 10s]
# (advanced) Number of times to backoff and retry before failing.
# CLI flag: -querier.frontend-client.backoff-retries
[max_retries: <int> | default = 10]
# (experimental) Initial stream window size. Values less than the default are
# not supported and are ignored. Setting this to a value other than the
# default disables the BDP estimator.
# CLI flag: -querier.frontend-client.initial-stream-window-size
[initial_stream_window_size: <int> | default = 63KiB1023B]
# (experimental) Initial connection window size. Values less than the default
# are not supported and are ignored. Setting this to a value other than the
# default disables the BDP estimator.
# CLI flag: -querier.frontend-client.initial-connection-window-size
[initial_connection_window_size: <int> | default = 63KiB1023B]
# (advanced) Enable TLS in the gRPC client. This flag needs to be enabled when
# any other TLS flag is set. If set to false, insecure connection to gRPC
# server will be used.
# CLI flag: -querier.frontend-client.tls-enabled
[tls_enabled: <boolean> | default = false]
# (advanced) Path to the client certificate, which will be used for
# authenticating with the server. Also requires the key path to be configured.
# CLI flag: -querier.frontend-client.tls-cert-path
[tls_cert_path: <string> | default = ""]
# (advanced) Path to the key for the client certificate. Also requires the
# client certificate to be configured.
# CLI flag: -querier.frontend-client.tls-key-path
[tls_key_path: <string> | default = ""]
# (advanced) Path to the CA certificates to validate server certificate
# against. If not set, the host's root CA certificates are used.
# CLI flag: -querier.frontend-client.tls-ca-path
[tls_ca_path: <string> | default = ""]
# (advanced) Override the expected name on the server certificate.
# CLI flag: -querier.frontend-client.tls-server-name
[tls_server_name: <string> | default = ""]
# (advanced) Skip validating server certificate.
# CLI flag: -querier.frontend-client.tls-insecure-skip-verify
[tls_insecure_skip_verify: <boolean> | default = false]
# (advanced) Override the default cipher suite list (separated by commas).
# Allowed values:
#
# Secure Ciphers:
# - TLS_AES_128_GCM_SHA256
# - TLS_AES_256_GCM_SHA384
# - TLS_CHACHA20_POLY1305_SHA256
# - TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
# - TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
# - TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
# - TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
# - TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
# - TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
# - TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
# - TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
# - TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256
# - TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256
#
# Insecure Ciphers:
# - TLS_RSA_WITH_RC4_128_SHA
# - TLS_RSA_WITH_3DES_EDE_CBC_SHA
# - TLS_RSA_WITH_AES_128_CBC_SHA
# - TLS_RSA_WITH_AES_256_CBC_SHA
# - TLS_RSA_WITH_AES_128_CBC_SHA256
# - TLS_RSA_WITH_AES_128_GCM_SHA256
# - TLS_RSA_WITH_AES_256_GCM_SHA384
# - TLS_ECDHE_ECDSA_WITH_RC4_128_SHA
# - TLS_ECDHE_RSA_WITH_RC4_128_SHA
# - TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
# - TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
# - TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
# CLI flag: -querier.frontend-client.tls-cipher-suites
[tls_cipher_suites: <string> | default = ""]
# (advanced) Override the default minimum TLS version. Allowed values:
# VersionTLS10, VersionTLS11, VersionTLS12, VersionTLS13
# CLI flag: -querier.frontend-client.tls-min-version
[tls_min_version: <string> | default = ""]
# (advanced) The maximum amount of time to establish a connection. A value of
# 0 means default gRPC client connect timeout and backoff.
# CLI flag: -querier.frontend-client.connect-timeout
[connect_timeout: <duration> | default = 5s]
# (advanced) Initial backoff delay after first connection failure. Only
# relevant if ConnectTimeout > 0.
# CLI flag: -querier.frontend-client.connect-backoff-base-delay
[connect_backoff_base_delay: <duration> | default = 1s]
# (advanced) Maximum backoff delay when establishing a connection. Only
# relevant if ConnectTimeout > 0.
# CLI flag: -querier.frontend-client.connect-backoff-max-delay
[connect_backoff_max_delay: <duration> | default = 5s]
# (experimental) Optionally define gRPC client's cluster validation label.
# CLI flag: -querier.frontend-client.cluster-validation-label
[cluster_validation_label: <string> | default = ""]
# Configures the gRPC client used to communicate between the querier and the
# query-scheduler.
# The CLI flags prefix for this block configuration is: querier.scheduler-client
[query_scheduler_grpc_client_config: <grpc_client>]
query_scheduler_grpc_client_config:
# (advanced) gRPC client max receive message size (bytes).
# CLI flag: -querier.scheduler-client.grpc-max-recv-msg-size
[max_recv_msg_size: <int> | default = 104857600]
# (advanced) gRPC client max send message size (bytes).
# CLI flag: -querier.scheduler-client.grpc-max-send-msg-size
[max_send_msg_size: <int> | default = 104857600]
# (advanced) Use compression when sending messages. Supported values are:
# 'gzip', 'snappy', 's2' and '' (disable compression)
# CLI flag: -querier.scheduler-client.grpc-compression
[grpc_compression: <string> | default = ""]
# (advanced) Rate limit for gRPC client; 0 means disabled.
# CLI flag: -querier.scheduler-client.grpc-client-rate-limit
[rate_limit: <float> | default = 0]
# (advanced) Rate limit burst for gRPC client.
# CLI flag: -querier.scheduler-client.grpc-client-rate-limit-burst
[rate_limit_burst: <int> | default = 0]
# (advanced) Enable backoff and retry when we hit rate limits.
# CLI flag: -querier.scheduler-client.backoff-on-ratelimits
[backoff_on_ratelimits: <boolean> | default = false]
backoff_config:
# (advanced) Minimum delay when backing off.
# CLI flag: -querier.scheduler-client.backoff-min-period
[min_period: <duration> | default = 100ms]
# (advanced) Maximum delay when backing off.
# CLI flag: -querier.scheduler-client.backoff-max-period
[max_period: <duration> | default = 10s]
# (advanced) Number of times to backoff and retry before failing.
# CLI flag: -querier.scheduler-client.backoff-retries
[max_retries: <int> | default = 10]
# (experimental) Initial stream window size. Values less than the default are
# not supported and are ignored. Setting this to a value other than the
# default disables the BDP estimator.
# CLI flag: -querier.scheduler-client.initial-stream-window-size
[initial_stream_window_size: <int> | default = 63KiB1023B]
# (experimental) Initial connection window size. Values less than the default
# are not supported and are ignored. Setting this to a value other than the
# default disables the BDP estimator.
# CLI flag: -querier.scheduler-client.initial-connection-window-size
[initial_connection_window_size: <int> | default = 63KiB1023B]
# (advanced) Enable TLS in the gRPC client. This flag needs to be enabled when
# any other TLS flag is set. If set to false, insecure connection to gRPC
# server will be used.
# CLI flag: -querier.scheduler-client.tls-enabled
[tls_enabled: <boolean> | default = false]
# (advanced) Path to the client certificate, which will be used for
# authenticating with the server. Also requires the key path to be configured.
# CLI flag: -querier.scheduler-client.tls-cert-path
[tls_cert_path: <string> | default = ""]
# (advanced) Path to the key for the client certificate. Also requires the
# client certificate to be configured.
# CLI flag: -querier.scheduler-client.tls-key-path
[tls_key_path: <string> | default = ""]
# (advanced) Path to the CA certificates to validate server certificate
# against. If not set, the host's root CA certificates are used.
# CLI flag: -querier.scheduler-client.tls-ca-path
[tls_ca_path: <string> | default = ""]
# (advanced) Override the expected name on the server certificate.
# CLI flag: -querier.scheduler-client.tls-server-name
[tls_server_name: <string> | default = ""]
# (advanced) Skip validating server certificate.
# CLI flag: -querier.scheduler-client.tls-insecure-skip-verify
[tls_insecure_skip_verify: <boolean> | default = false]
# (advanced) Override the default cipher suite list (separated by commas).
# Allowed values:
#
# Secure Ciphers:
# - TLS_AES_128_GCM_SHA256
# - TLS_AES_256_GCM_SHA384
# - TLS_CHACHA20_POLY1305_SHA256
# - TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
# - TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
# - TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
# - TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
# - TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
# - TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
# - TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
# - TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
# - TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256
# - TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256
#
# Insecure Ciphers:
# - TLS_RSA_WITH_RC4_128_SHA
# - TLS_RSA_WITH_3DES_EDE_CBC_SHA
# - TLS_RSA_WITH_AES_128_CBC_SHA
# - TLS_RSA_WITH_AES_256_CBC_SHA
# - TLS_RSA_WITH_AES_128_CBC_SHA256
# - TLS_RSA_WITH_AES_128_GCM_SHA256
# - TLS_RSA_WITH_AES_256_GCM_SHA384
# - TLS_ECDHE_ECDSA_WITH_RC4_128_SHA
# - TLS_ECDHE_RSA_WITH_RC4_128_SHA
# - TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
# - TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
# - TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
# CLI flag: -querier.scheduler-client.tls-cipher-suites
[tls_cipher_suites: <string> | default = ""]
# (advanced) Override the default minimum TLS version. Allowed values:
# VersionTLS10, VersionTLS11, VersionTLS12, VersionTLS13
# CLI flag: -querier.scheduler-client.tls-min-version
[tls_min_version: <string> | default = ""]
# (advanced) The maximum amount of time to establish a connection. A value of
# 0 means default gRPC client connect timeout and backoff.
# CLI flag: -querier.scheduler-client.connect-timeout
[connect_timeout: <duration> | default = 5s]
# (advanced) Initial backoff delay after first connection failure. Only
# relevant if ConnectTimeout > 0.
# CLI flag: -querier.scheduler-client.connect-backoff-base-delay
[connect_backoff_base_delay: <duration> | default = 1s]
# (advanced) Maximum backoff delay when establishing a connection. Only
# relevant if ConnectTimeout > 0.
# CLI flag: -querier.scheduler-client.connect-backoff-max-delay
[connect_backoff_max_delay: <duration> | default = 5s]
# (experimental) Optionally define gRPC client's cluster validation label.
# CLI flag: -querier.scheduler-client.cluster-validation-label
[cluster_validation_label: <string> | default = ""]
# (experimental) Enables streaming of responses from querier to query-frontend
# for response types that support it (currently only `active_series` responses
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1272,8 +1272,8 @@ github.com/grafana-tools/sdk v0.0.0-20220919052116-6562121319fc h1:PXZQA2WCxe85T
github.com/grafana-tools/sdk v0.0.0-20220919052116-6562121319fc/go.mod h1:AHHlOEv1+GGQ3ktHMlhuTUwo3zljV3QJbC0+8o2kn+4=
github.com/grafana/alerting v0.0.0-20250303095629-6fd0c494dfa3 h1:otX6Lww40e6jEsc4AQBdYmgDsaryAZkBTdBvWUsnDxk=
github.com/grafana/alerting v0.0.0-20250303095629-6fd0c494dfa3/go.mod h1:p5P86ajOwL2XPJN6+xu6QJUtO4DptdFiqJ35r3Ac4HY=
github.com/grafana/dskit v0.0.0-20250303172748-fd4441b85237 h1:VZagYtPcmjgazfPAuWN7lER6mprG20r51+1eYPpATkw=
github.com/grafana/dskit v0.0.0-20250303172748-fd4441b85237/go.mod h1:cu2zIOHhAgRaIDuECsERftSp1l7KHq1aX1jgihQCu0c=
github.com/grafana/dskit v0.0.0-20250303214858-d23654211757 h1:nAd6h3RfteaAMeTO4cJLcPQGm1X7uYxv5oAhZICkBNw=
github.com/grafana/dskit v0.0.0-20250303214858-d23654211757/go.mod h1:cu2zIOHhAgRaIDuECsERftSp1l7KHq1aX1jgihQCu0c=
github.com/grafana/e2e v0.1.2-0.20240118170847-db90b84177fc h1:BW+LjKJDz0So5LI8UZfW5neWeKpSkWqhmGjQFzcFfLM=
github.com/grafana/e2e v0.1.2-0.20240118170847-db90b84177fc/go.mod h1:JVmqPBe8A/pZWwRoJW5ZjyALeY5OXMzPl7LrVXOdZAI=
github.com/grafana/franz-go v0.0.0-20241009100846-782ba1442937 h1:fwwnG/NcygoS6XbAaEyK2QzMXI/BZIEJvQ3CD+7XZm8=
Expand Down
4 changes: 3 additions & 1 deletion pkg/mimir/mimir.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,9 @@ func (c *Config) CommonConfigInheritance() CommonConfigInheritance {
"alertmanager_storage": &c.AlertmanagerStorage.StorageBackendConfig,
},
GRPCClient: map[string]*util.GRPCClientConfig{
"ingester_client": &c.IngesterClient.GRPCClientConfig,
"ingester_client": &c.IngesterClient.GRPCClientConfig,
"frontend_worker_frontend_client": &c.Worker.QueryFrontendGRPCClientConfig,
"frontend_worker_scheduler_client": &c.Worker.QuerySchedulerGRPCClientConfig,
},
}
}
Expand Down
Loading

0 comments on commit 0b9248d

Please sign in to comment.