From 94b839d5a695a6e740cd22ddea3514351a70604d Mon Sep 17 00:00:00 2001 From: Joel Takvorian Date: Wed, 3 Feb 2021 09:13:05 +0100 Subject: [PATCH] Performance / custom dashboards: new configs - discovery_enabled (true/false/auto) to switch discovery mode - discovery_auto_threshold: pods threshold above which discovery is skipped in auto mode Part of https://github.com/kiali/kiali/issues/3660 --- deploy/kiali/kiali_cr.yaml | 15 +++++++++++++-- roles/default/kiali-deploy/defaults/main.yml | 2 ++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/deploy/kiali/kiali_cr.yaml b/deploy/kiali/kiali_cr.yaml index 5ee13a78e..175c58e5f 100644 --- a/deploy/kiali/kiali_cr.yaml +++ b/deploy/kiali/kiali_cr.yaml @@ -408,15 +408,26 @@ spec: # In this case, you would set "external_services.grafana.auth.password" to "secret:myGrafanaCredentials:myGrafanaPw". # # **Custom-dashboards settings: -# enabled: enable or disable custom dashboards, including the dashboards discovery process. Default: true. +# discovery_enabled: Enable, disable or set 'auto' mode to the dashboards discovery process. If set to true, Kiali +# will always try to discover dashboards based on metrics. Note that it can generate performance penalties while +# discovering dashboards for workloads having many pods (thus many metrics), especially with versions of Prometheus < 2.24. +# When set to 'auto', Kiali will skip dashboards discovery for workloads with more than a configured threshold of pods +# (see 'discovery_auto_threshold'). When discovery is disabled or auto/skipped, it is still possible to tie workloads +# with dashboards through annotations on pods (refer to the doc https://kiali.io/documentation/latest/runtimes-monitoring/#pods-annotations) +# Allowed values: true, false, auto. Default: auto. +# discovery_auto_threshold: Threshold of pods, for a given Application or Workload, above which dashboards discovery will be skipped +# when in 'auto' mode. Default: 10. +# enabled: Enable or disable custom dashboards, including the dashboards discovery process. Default: true. # is_core_component: Used in the Components health feature. When true, the unhealthy scenarios will be raised as errors. Otherwise, they will be raised as a warning. # namespace_label: Prometheus label name used for identifying namespaces in metrics for custom dashboards. # Default is "kubernetes_namespace". It is quite common to use just "namespace" as well, depending on your Prometheus configuration. -# prometheus: please check the section below about Prometheus-specific settings: they are identical. The Prometheus +# prometheus: Please check the section below about Prometheus-specific settings: they are identical. The Prometheus # configuration defined here is dedicated to fetching custom dashboards, hence allowing to use a different instance # of Prometheus. If omitted, the same Prometheus as for Istio metrics will be reused for custom dashboards. # --- # custom_dashboards: +# discovery_enabled: auto +# discovery_auto_threshold: 10 # enabled: true # is_core_component: false # namespace_label: "kubernetes_namespace" diff --git a/roles/default/kiali-deploy/defaults/main.yml b/roles/default/kiali-deploy/defaults/main.yml index 3f4ce76a3..7616dbebb 100644 --- a/roles/default/kiali-deploy/defaults/main.yml +++ b/roles/default/kiali-deploy/defaults/main.yml @@ -90,6 +90,8 @@ kiali_defaults: external_services: custom_dashboards: + discovery_enabled: "auto" + discovery_auto_threshold: 10 enabled: true is_core_component: false namespace_label: ""