The module is enabled by default and does not require any configuration – it works right out-of-the-box.

Parameters

  • auth (object)

    Options related to authentication or authorization in the application.

    Default: {}

    • allowedUserGroups (array of strings)

      An array of user groups that can access Grafana & Prometheus.

      This parameter is used if the user-authn module is enabled or the externalAuthentication parameter is set.

      Caution! Note that you must add those groups to the appropriate field in the DexProvider config if this module is used together with the user-authn one.

    • externalAuthentication (object)

      A set of parameters to enable external authentication (it is based on the Nginx Ingress external-auth mechanism that uses the Nginx auth_request module.

      The externalAuthentication parameters are set automatically if the user-authn module is enabled.

      • authSignInURL (string)

        The URL to redirect the user for authentication (if the authentication service returned a non-200 HTTP response code).

        Example: "https://myhost.ru/dex/sign_in"

      • authURL (string)

        The URL of the authentication service. If the user is authenticated, the service should return an HTTP 200 response code.

        Example: "https://dex.d8.svc.cluster.local/dex/auth", "https://myhost.ru/dex/auth"

    • password (string)

      The password for http authorization of the admin user (it is generated automatically, but you can change it).

      This parameter is used if the externalAuthentication is not enabled.

    • satisfyAny (boolean)

      Enables single authentication.

      If used together with the whitelistSourceRanges parameter, it authorizes all the users from above networks (no need to enter a username and password).

      Default: false

    • whitelistSourceRanges (array of strings)

      An array if CIDRs that are allowed to authenticate in Grafana & Prometheus.

      Example: ["1.1.1.1/32"]

  • grafana (object)

    Grafana installation-related settings.

    Default: {}

    • customPlugins (array of strings)

      A list of custom Grafana plugins. Contains plugin names from the official repository.

      Here is how you can add custom plugins (in this case, clickhouse-datasource and flowcharting-panel plugins are used):

      grafana:
        customPlugins:
        - agenty-flowcharting-panel
        - vertamedia-clickhouse-datasource
      

      Example: ["agenty-flowcharting-panel","vertamedia-clickhouse-datasource"]

    • useDarkTheme (boolean)

      The dark theme is enabled by default.

      Default: false

  • highAvailability (boolean)

    Manually enable the high availability mode.

    By default, Deckhouse automatically decides whether to enable the HA mode. Click here to learn more about the HA mode for modules.

    Example: true, false

  • https (object)

    What certificate type to use with Grafana/Prometheus.

    This parameter completely overrides the global.modules.https settings.

    Example: {"mode":"CustomCertificate","customCertificate":{"secretName":"foobar"}}, {"mode":"CertManager","certManager":{"clusterIssuerName":"letsencrypt"}}

    • certManager (object)
      • clusterIssuerName (string)

        What ClusterIssuer to use for Grafana/Prometheus.

        Currently, letsencrypt, letsencrypt-staging, selfsigned are available. Also, you can define your own.

        Default: "letsencrypt"

    • customCertificate (object)

      Default: {}

      • secretName (string)

        The name of the secret in the d8-system namespace to use with Grafana/Prometheus.

        This secret must have the kubernetes.io/tls format.

        Default: "false"

    • mode (string)

      The HTTPS usage mode:

      • Disabled — in this mode, Grafana/Prometheus work over HTTP only; CertManager — Grafana/Prometheus will use HTTPS and get a certificate from the clusterissuer defined in the certManager.clusterIssuerName parameter.
      • CustomCertificate — Grafana/Prometheus will use HTTPS using the certificate from the d8-system namespace.
      • OnlyInURI — Grafana/Prometheus will work over HTTP (thinking that there is an external HTTPS load balancer in front that terminates HTTPS traffic). All the links in the user-authn will be generated using the HTTPS scheme.

      Default: "Disabled"

      Allowed values: Disabled, CertManager, CustomCertificate, OnlyInURI

  • ingressClass (string)

    The class of the Ingress controller used for Grafana/Prometheus.

    An optional parameter. By default, the modules.ingressClass global value is used.

    Example: "public", "production"

  • longtermMaxDiskSizeGigabytes (integer)

    the maximum size (in GiB) to which the Longterm Prometheus’ disk can be automatically resized.

    Default: 300

  • longtermRetentionDays (integer)

    How long to keep the data in longterm Prometheus.

    Setting this parameter to 0 will result in Longterm Prometheus not running in the cluster.

    Default: 1095

  • longtermScrapeInterval (string)

    Sets the interval for making “data snapshots” of the main Prometheus by the longterm Prometheus.

    Default: "5m"

  • longtermStorageClass (string)

    The name of the storageClass to use for Longterm Prometheus.

    If omitted, the StorageClass of the existing Longterm Prometheus PVC is used. If there is no PVC yet, either global.StorageClass or global.discovery.defaultStorageClass is used, and if those are undefined, the emptyDir volume is used to store the data;

    CAUTION! Setting this value to one that differs from the current one (in the existing PVC) will result in Longterm Prometheus volume reprovisioning and data loss.

    Example: "ceph-ssd", "false"

  • mainMaxDiskSizeGigabytes (integer)

    The maximum size (in GiB) that the main Prometheus’ volume can automatically resize to.

    Default: 300

  • nodeSelector (object)

    The same as in the pods’ spec.nodeSelector parameter in Kubernetes.

    If the parameter is omitted or false, it will be determined automatically.

    Example: {"disktype":"ssd"}

  • retentionDays (integer)

    How long to keep the data.

    Default: 15

  • scrapeInterval (string)

    Sets the interval for scraping metrics from targets.

    Evaluation Interval is always equal to scrapeInterval.

    Default: "30s"

  • storageClass (string)

    The name of the StorageClass to use.

    If omitted, the StorageClass of the existing Prometheus PVC is used. If there is no PVC yet, either global.StorageClass or global.discovery.defaultStorageClass is used, and if those are undefined, the emptyDir volume is used to store the data.

    storageClass: false — forces the emptyDir usage. You will need to delete the old PVC and restart the pod manually.

    CAUTION! Setting this value to one that differs from the current one (in the existing PVC) will result in Prometheus volume reprovisioning and data loss.

    Example: "ceph-ssd", "false"

  • tolerations (array of objects)

    The same as in the pods’ spec.tolerations parameter in Kubernetes;

    If the parameter is omitted or false, it will be determined automatically.

    Example: [{"key":"key1","operator":"Equal","value":"value1","effect":"NoSchedule"},{"key":"key1","operator":"Exists","effect":"NoSchedule"}]

    • effect (string)
    • key (string)
    • operator (string)
    • tolerationSeconds (integer)
    • value (string)
  • vpa (object)

    Default: {"updateMode"=>"Initial"}

    Example: {"updateMode":"Initial"}, {"updateMode":"Off","longtermMaxCPU":"1","longtermMaxMemory":"2Mi","maxCPU":"1000m","maxMemory":"2Mi"}

    • longtermMaxCPU

      The maximum CPU requests set by the VPA controller for the Longterm Prometheus pods.

      The default value is chosen automatically based on the maximum number of pods that can be created in the cluster considering the current number of nodes and their settings. For more information, see the detect_vpa_max hook of the module.

      Example: "1400m", 1, 0.1

    • longtermMaxMemory

      The maximum Memory requests set by the VPA controller for the longterm Prometheus pods.

      The default value is chosen automatically based on the maximum number of pods that can be created in the cluster considering the current number of nodes and their settings. For more information, see the detect_vpa_max hook of the module.

      Example: "4Mi", 4096

    • maxCPU

      The maximum CPU requests set by the VPA controller for the main Prometheus pods.

      The default value is chosen automatically based on the maximum number of pods that can be created in the cluster considering the current number of nodes and their settings. For more information, see the detect_vpa_max hook of the module.

      Example: "3", 3, "0.1", 0.1, "1500m"

    • maxMemory

      The maximum Memory requests set by the VPA controller for the main Prometheus pods.

      The default value is chosen automatically based on the maximum number of pods that can be created in the cluster considering the current number of nodes and their settings. For more information, see the detect_vpa_max hook of the module.

      Example: "3Mi", 4096

    • updateMode (string)

      The pod update mode.

      Default: "Initial"

      Allowed values: Initial, Auto, Off

      Example: "Initial", "Auto", "Off"

Notes

  • retentionSize for the main and longterm Prometheus is calculated automatically; you cannot set this value manually!
    • The following calculation algorithm is used:
      • pvc_size * 0.8 — if the PVC exists;
      • 10 GiB — if there is no PVC and if the StorageClass supports resizing;
      • 25 GiB — if there is no PVC and if the StorageClass does not support resizing;
    • If the local-storage is used, and you have to change the retentionSize, then you need to manually change the size of the PV and PVC. Caution! Note that the value from .status.capacity.storage PVC is used for the calculation since it reflects the actual size of the PV in the case of manual resizing.
  • You can change the size of Prometheus disks in the standard Kubernetes way (if the StorageClass permits this) by editing the .spec.resources.requests.storage field of the PersistentVolumeClaim resource.