Skip to content

Commit

Permalink
Improving common field inheritance
Browse files Browse the repository at this point in the history
Signed-off-by: Yuri Nikolic <[email protected]>
  • Loading branch information
duricanikolic committed Mar 4, 2025
1 parent 7c46af2 commit ba77419
Show file tree
Hide file tree
Showing 7 changed files with 678 additions and 41 deletions.
273 changes: 273 additions & 0 deletions cmd/mimir/config-descriptor.json
Original file line number Diff line number Diff line change
Expand Up @@ -20392,6 +20392,279 @@
"fieldFlag": "common.cluster-validation-label",
"fieldType": "string",
"fieldCategory": "experimental"
},
{
"kind": "block",
"name": "grpc_client",
"required": false,
"desc": "",
"blockEntries": [
{
"kind": "field",
"name": "max_recv_msg_size",
"required": false,
"desc": "gRPC client max receive message size (bytes).",
"fieldValue": null,
"fieldDefaultValue": 104857600,
"fieldFlag": "common.grpc-client.grpc-max-recv-msg-size",
"fieldType": "int",
"fieldCategory": "advanced"
},
{
"kind": "field",
"name": "max_send_msg_size",
"required": false,
"desc": "gRPC client max send message size (bytes).",
"fieldValue": null,
"fieldDefaultValue": 104857600,
"fieldFlag": "common.grpc-client.grpc-max-send-msg-size",
"fieldType": "int",
"fieldCategory": "advanced"
},
{
"kind": "field",
"name": "grpc_compression",
"required": false,
"desc": "Use compression when sending messages. Supported values are: 'gzip', 'snappy' and '' (disable compression)",
"fieldValue": null,
"fieldDefaultValue": "",
"fieldFlag": "common.grpc-client.grpc-compression",
"fieldType": "string",
"fieldCategory": "advanced"
},
{
"kind": "field",
"name": "rate_limit",
"required": false,
"desc": "Rate limit for gRPC client; 0 means disabled.",
"fieldValue": null,
"fieldDefaultValue": 0,
"fieldFlag": "common.grpc-client.grpc-client-rate-limit",
"fieldType": "float",
"fieldCategory": "advanced"
},
{
"kind": "field",
"name": "rate_limit_burst",
"required": false,
"desc": "Rate limit burst for gRPC client.",
"fieldValue": null,
"fieldDefaultValue": 0,
"fieldFlag": "common.grpc-client.grpc-client-rate-limit-burst",
"fieldType": "int",
"fieldCategory": "advanced"
},
{
"kind": "field",
"name": "backoff_on_ratelimits",
"required": false,
"desc": "Enable backoff and retry when we hit rate limits.",
"fieldValue": null,
"fieldDefaultValue": false,
"fieldFlag": "common.grpc-client.backoff-on-ratelimits",
"fieldType": "boolean",
"fieldCategory": "advanced"
},
{
"kind": "block",
"name": "backoff_config",
"required": false,
"desc": "",
"blockEntries": [
{
"kind": "field",
"name": "min_period",
"required": false,
"desc": "Minimum delay when backing off.",
"fieldValue": null,
"fieldDefaultValue": 100000000,
"fieldFlag": "common.grpc-client.backoff-min-period",
"fieldType": "duration",
"fieldCategory": "advanced"
},
{
"kind": "field",
"name": "max_period",
"required": false,
"desc": "Maximum delay when backing off.",
"fieldValue": null,
"fieldDefaultValue": 10000000000,
"fieldFlag": "common.grpc-client.backoff-max-period",
"fieldType": "duration",
"fieldCategory": "advanced"
},
{
"kind": "field",
"name": "max_retries",
"required": false,
"desc": "Number of times to backoff and retry before failing.",
"fieldValue": null,
"fieldDefaultValue": 10,
"fieldFlag": "common.grpc-client.backoff-retries",
"fieldType": "int",
"fieldCategory": "advanced"
}
],
"fieldValue": null,
"fieldDefaultValue": null
},
{
"kind": "field",
"name": "initial_stream_window_size",
"required": false,
"desc": "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.",
"fieldValue": null,
"fieldDefaultValue": null,
"fieldFlag": "common.grpc-client.initial-stream-window-size",
"fieldType": "int",
"fieldCategory": "experimental"
},
{
"kind": "field",
"name": "initial_connection_window_size",
"required": false,
"desc": "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.",
"fieldValue": null,
"fieldDefaultValue": null,
"fieldFlag": "common.grpc-client.initial-connection-window-size",
"fieldType": "int",
"fieldCategory": "experimental"
},
{
"kind": "field",
"name": "tls_enabled",
"required": false,
"desc": "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.",
"fieldValue": null,
"fieldDefaultValue": false,
"fieldFlag": "common.grpc-client.tls-enabled",
"fieldType": "boolean",
"fieldCategory": "advanced"
},
{
"kind": "field",
"name": "tls_cert_path",
"required": false,
"desc": "Path to the client certificate, which will be used for authenticating with the server. Also requires the key path to be configured.",
"fieldValue": null,
"fieldDefaultValue": "",
"fieldFlag": "common.grpc-client.tls-cert-path",
"fieldType": "string",
"fieldCategory": "advanced"
},
{
"kind": "field",
"name": "tls_key_path",
"required": false,
"desc": "Path to the key for the client certificate. Also requires the client certificate to be configured.",
"fieldValue": null,
"fieldDefaultValue": "",
"fieldFlag": "common.grpc-client.tls-key-path",
"fieldType": "string",
"fieldCategory": "advanced"
},
{
"kind": "field",
"name": "tls_ca_path",
"required": false,
"desc": "Path to the CA certificates to validate server certificate against. If not set, the host's root CA certificates are used.",
"fieldValue": null,
"fieldDefaultValue": "",
"fieldFlag": "common.grpc-client.tls-ca-path",
"fieldType": "string",
"fieldCategory": "advanced"
},
{
"kind": "field",
"name": "tls_server_name",
"required": false,
"desc": "Override the expected name on the server certificate.",
"fieldValue": null,
"fieldDefaultValue": "",
"fieldFlag": "common.grpc-client.tls-server-name",
"fieldType": "string",
"fieldCategory": "advanced"
},
{
"kind": "field",
"name": "tls_insecure_skip_verify",
"required": false,
"desc": "Skip validating server certificate.",
"fieldValue": null,
"fieldDefaultValue": false,
"fieldFlag": "common.grpc-client.tls-insecure-skip-verify",
"fieldType": "boolean",
"fieldCategory": "advanced"
},
{
"kind": "field",
"name": "tls_cipher_suites",
"required": false,
"desc": "Override the default cipher suite list (separated by commas). Allowed values:\n\nSecure Ciphers:\n- TLS_AES_128_GCM_SHA256\n- TLS_AES_256_GCM_SHA384\n- TLS_CHACHA20_POLY1305_SHA256\n- TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA\n- TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA\n- TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA\n- TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA\n- TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256\n- TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384\n- TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256\n- TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384\n- TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256\n- TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256\n\nInsecure Ciphers:\n- TLS_RSA_WITH_RC4_128_SHA\n- TLS_RSA_WITH_3DES_EDE_CBC_SHA\n- TLS_RSA_WITH_AES_128_CBC_SHA\n- TLS_RSA_WITH_AES_256_CBC_SHA\n- TLS_RSA_WITH_AES_128_CBC_SHA256\n- TLS_RSA_WITH_AES_128_GCM_SHA256\n- TLS_RSA_WITH_AES_256_GCM_SHA384\n- TLS_ECDHE_ECDSA_WITH_RC4_128_SHA\n- TLS_ECDHE_RSA_WITH_RC4_128_SHA\n- TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA\n- TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256\n- TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256\n",
"fieldValue": null,
"fieldDefaultValue": "",
"fieldFlag": "common.grpc-client.tls-cipher-suites",
"fieldType": "string",
"fieldCategory": "advanced"
},
{
"kind": "field",
"name": "tls_min_version",
"required": false,
"desc": "Override the default minimum TLS version. Allowed values: VersionTLS10, VersionTLS11, VersionTLS12, VersionTLS13",
"fieldValue": null,
"fieldDefaultValue": "",
"fieldFlag": "common.grpc-client.tls-min-version",
"fieldType": "string",
"fieldCategory": "advanced"
},
{
"kind": "field",
"name": "connect_timeout",
"required": false,
"desc": "The maximum amount of time to establish a connection. A value of 0 means default gRPC client connect timeout and backoff.",
"fieldValue": null,
"fieldDefaultValue": 5000000000,
"fieldFlag": "common.grpc-client.connect-timeout",
"fieldType": "duration",
"fieldCategory": "advanced"
},
{
"kind": "field",
"name": "connect_backoff_base_delay",
"required": false,
"desc": "Initial backoff delay after first connection failure. Only relevant if ConnectTimeout \u003e 0.",
"fieldValue": null,
"fieldDefaultValue": 1000000000,
"fieldFlag": "common.grpc-client.connect-backoff-base-delay",
"fieldType": "duration",
"fieldCategory": "advanced"
},
{
"kind": "field",
"name": "connect_backoff_max_delay",
"required": false,
"desc": "Maximum backoff delay when establishing a connection. Only relevant if ConnectTimeout \u003e 0.",
"fieldValue": null,
"fieldDefaultValue": 5000000000,
"fieldFlag": "common.grpc-client.connect-backoff-max-delay",
"fieldType": "duration",
"fieldCategory": "advanced"
},
{
"kind": "field",
"name": "cluster_validation_label",
"required": false,
"desc": "Optionally define gRPC client's cluster validation label.",
"fieldValue": null,
"fieldDefaultValue": "",
"fieldFlag": "common.grpc-client.cluster-validation-label",
"fieldType": "string",
"fieldCategory": "experimental"
}
],
"fieldValue": null,
"fieldDefaultValue": null
}
],
"fieldValue": null,
Expand Down
46 changes: 46 additions & 0 deletions cmd/mimir/help-all.txt.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -991,6 +991,52 @@ Usage of ./cmd/mimir/mimir:
TSDB WAL segments files max size (bytes). (default 134217728)
-common.cluster-validation-label string
[experimental] Optionally define gRPC client's cluster validation label.
-common.grpc-client.backoff-max-period duration
Maximum delay when backing off. (default 10s)
-common.grpc-client.backoff-min-period duration
Minimum delay when backing off. (default 100ms)
-common.grpc-client.backoff-on-ratelimits
Enable backoff and retry when we hit rate limits.
-common.grpc-client.backoff-retries int
Number of times to backoff and retry before failing. (default 10)
-common.grpc-client.cluster-validation-label string
[experimental] Optionally define gRPC client's cluster validation label.
-common.grpc-client.connect-backoff-base-delay duration
Initial backoff delay after first connection failure. Only relevant if ConnectTimeout > 0. (default 1s)
-common.grpc-client.connect-backoff-max-delay duration
Maximum backoff delay when establishing a connection. Only relevant if ConnectTimeout > 0. (default 5s)
-common.grpc-client.connect-timeout duration
The maximum amount of time to establish a connection. A value of 0 means default gRPC client connect timeout and backoff. (default 5s)
-common.grpc-client.grpc-client-rate-limit float
Rate limit for gRPC client; 0 means disabled.
-common.grpc-client.grpc-client-rate-limit-burst int
Rate limit burst for gRPC client.
-common.grpc-client.grpc-compression string
Use compression when sending messages. Supported values are: 'gzip', 'snappy' and '' (disable compression)
-common.grpc-client.grpc-max-recv-msg-size int
gRPC client max receive message size (bytes). (default 104857600)
-common.grpc-client.grpc-max-send-msg-size int
gRPC client max send message size (bytes). (default 104857600)
-common.grpc-client.initial-connection-window-size value
[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. (default 63KiB1023B)
-common.grpc-client.initial-stream-window-size value
[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. (default 63KiB1023B)
-common.grpc-client.tls-ca-path string
Path to the CA certificates to validate server certificate against. If not set, the host's root CA certificates are used.
-common.grpc-client.tls-cert-path string
Path to the client certificate, which will be used for authenticating with the server. Also requires the key path to be configured.
-common.grpc-client.tls-cipher-suites string
Override the default cipher suite list (separated by commas).
-common.grpc-client.tls-enabled
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.
-common.grpc-client.tls-insecure-skip-verify
Skip validating server certificate.
-common.grpc-client.tls-key-path string
Path to the key for the client certificate. Also requires the client certificate to be configured.
-common.grpc-client.tls-min-version string
Override the default minimum TLS version. Allowed values: VersionTLS10, VersionTLS11, VersionTLS12, VersionTLS13
-common.grpc-client.tls-server-name string
Override the expected name on the server certificate.
-common.storage.azure.account-key string
Azure storage account key. If unset, Azure managed identities will be used for authentication instead.
-common.storage.azure.account-name string
Expand Down
Loading

0 comments on commit ba77419

Please sign in to comment.