Merge pull request #56017 from elohmeier/prom-tls
prometheus: add tls_config
This commit is contained in:
commit
08b277e0da
|
@ -237,6 +237,14 @@ let
|
||||||
Optional http login credentials for metrics scraping.
|
Optional http login credentials for metrics scraping.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
tls_config = mkOption {
|
||||||
|
type = types.nullOr promTypes.tls_config;
|
||||||
|
default = null;
|
||||||
|
apply = x: mapNullable _filter x;
|
||||||
|
description = ''
|
||||||
|
Configures the scrape request's TLS settings.
|
||||||
|
'';
|
||||||
|
};
|
||||||
dns_sd_configs = mkOption {
|
dns_sd_configs = mkOption {
|
||||||
type = types.listOf promTypes.dns_sd_config;
|
type = types.listOf promTypes.dns_sd_config;
|
||||||
default = [];
|
default = [];
|
||||||
|
@ -431,6 +439,48 @@ let
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
promTypes.tls_config = types.submodule {
|
||||||
|
options = {
|
||||||
|
ca_file = mkOption {
|
||||||
|
type = types.nullOr types.str;
|
||||||
|
default = null;
|
||||||
|
description = ''
|
||||||
|
CA certificate to validate API server certificate with.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
cert_file = mkOption {
|
||||||
|
type = types.nullOr types.str;
|
||||||
|
default = null;
|
||||||
|
description = ''
|
||||||
|
Certificate file for client cert authentication to the server.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
key_file = mkOption {
|
||||||
|
type = types.nullOr types.str;
|
||||||
|
default = null;
|
||||||
|
description = ''
|
||||||
|
Key file for client cert authentication to the server.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
server_name = mkOption {
|
||||||
|
type = types.nullOr types.str;
|
||||||
|
default = null;
|
||||||
|
description = ''
|
||||||
|
ServerName extension to indicate the name of the server.
|
||||||
|
http://tools.ietf.org/html/rfc4366#section-3.1
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
insecure_skip_verify = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description = ''
|
||||||
|
Disable validation of the server certificate.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
in {
|
in {
|
||||||
options = {
|
options = {
|
||||||
services.prometheus = {
|
services.prometheus = {
|
||||||
|
|
Loading…
Reference in a new issue