diff --git a/deploy/services/helm-charts/dss/values.yaml b/deploy/services/helm-charts/dss/values.yaml index 6b3eaf9a7..7b4938c6d 100644 --- a/deploy/services/helm-charts/dss/values.yaml +++ b/deploy/services/helm-charts/dss/values.yaml @@ -85,7 +85,7 @@ prometheus: evaluation_interval: 5s podAnnotations: - serverFilesVersion: "2" # Since the prometheus helm chart does not detect changes in server files, this value is used to force the redeployment following the update of the serverFiles defined below. + serverFilesVersion: "3" # Since the prometheus helm chart does not detect changes in server files, this value is used to force the redeployment following the update of the serverFiles defined below. extraFlags: - "web.config.file=/etc/config/web-config.yml" @@ -119,6 +119,16 @@ prometheus: prometheus.yml: scrape_configs: + - job_name: 'prometheus' + scheme: 'https' + tls_config: + ca_file: '/certs/ca.crt' + cert_file: '/certs/node.crt' + key_file: '/certs/node.key' + insecure_skip_verify: true # Don't verify as it's localhost (so it's safe) and hostname doesn't match + static_configs: + - targets: + - '127.0.0.1:9090' - job_name: K8s-Endpoints tls_config: insecure_skip_verify: true diff --git a/deploy/services/tanka/prometheus.libsonnet b/deploy/services/tanka/prometheus.libsonnet index 5e1dd79d4..1190c9581 100644 --- a/deploy/services/tanka/prometheus.libsonnet +++ b/deploy/services/tanka/prometheus.libsonnet @@ -1,5 +1,5 @@ local base = import 'base.libsonnet'; -local k8sEndpoints = import 'prometheus_configs/k8s-endpoints.libsonnet'; +local scrapeConfigs = import 'prometheus_configs/scrape-configs.libsonnet'; local crdbAggregation = import 'prometheus_configs/crdb-aggregation.libsonnet'; @@ -17,7 +17,7 @@ local PrometheusConfig(metadata) = { 'aggregation.rules.yml', 'custom.rules.yml', ], - scrape_configs: k8sEndpoints.scrape_configs, + scrape_configs: scrapeConfigs.scrape_configs, }; local PrometheusWebConfig(metadata) = { @@ -137,7 +137,7 @@ local externalLB(metadata, name, ip) = annotations+: { "checksum/config": std.native('sha256')(std.manifestJson(PrometheusConfig(metadata))), "checksum/webconfig": std.native('sha256')(std.manifestJson(PrometheusWebConfig(metadata))), - "checksum/k8sEndpoints": std.native('sha256')(std.manifestJson(k8sEndpoints)), + "checksum/scrapeConfigs": std.native('sha256')(std.manifestJson(scrapeConfigs)), "checksum/crdbAggregation": std.native('sha256')(std.manifestJson(crdbAggregation)), }, }, diff --git a/deploy/services/tanka/prometheus_configs/k8s-endpoints.libsonnet b/deploy/services/tanka/prometheus_configs/scrape-configs.libsonnet similarity index 91% rename from deploy/services/tanka/prometheus_configs/k8s-endpoints.libsonnet rename to deploy/services/tanka/prometheus_configs/scrape-configs.libsonnet index fd7fb0d4e..7fa50060e 100644 --- a/deploy/services/tanka/prometheus_configs/k8s-endpoints.libsonnet +++ b/deploy/services/tanka/prometheus_configs/scrape-configs.libsonnet @@ -1,5 +1,22 @@ { scrape_configs: [ + { + job_name: 'prometheus', + scheme: 'https', + tls_config: { + ca_file: '/certs/ca.crt', + cert_file: '/certs/node.crt', + key_file: '/certs/node.key', + insecure_skip_verify: true, # Don't verify as it's localhost (so it's safe) and hostname doesn't match + }, + static_configs: [ + { + targets: [ + '127.0.0.1:9090', + ] + }, + ], + }, { job_name: 'K8s-Endpoints', kubernetes_sd_configs: [