diff --git a/packs/loki-3.7.4/README.md b/packs/loki-3.7.4/README.md new file mode 100644 index 00000000..1caab96c --- /dev/null +++ b/packs/loki-3.7.4/README.md @@ -0,0 +1,201 @@ +## Loki + +Grafana Loki is a horizontally scalable log aggregation system designed for efficient storage and querying of logs. This package deploys Loki using the Grafana Community Helm Chart and supports Monolithic, Simple Scalable, and Microservices deployment modes. + +### Package Information + +| Property | Value | +|-----------|---------| +| Application | Grafana Loki | +| Chart | loki | +| Chart Version | 18.5.2 | +| Application Version | 3.7.4 | +| Namespace | loki | + +--- + +## Prerequisites + +Before deploying this package, ensure the following requirements are met: + +### Kubernetes Requirements + +- Kubernetes 1.25 or later +- Helm 3.x + +### Dependencies + +The following components are included as subcharts: + +| Repository | Dependency | Version | +|------------|------------|---------| +| https://charts.min.io | MinIO | 5.4.0 | +| https://grafana.github.io/helm-charts | Rollout Operator | 0.50.1 | + +> Note: The embedded MinIO deployment is deprecated for production environments. Use external object storage whenever possible. + +### Storage Requirements + +For production deployments, configure one of the following object storage backends: + +- Amazon S3 +- Azure Blob Storage +- Google Cloud Storage +- S3-compatible storage + +--- + +## Parameters + +### Common Configuration + +```yaml +deploymentMode: Monolithic + +gateway: + enabled: true + +lokiCanary: + enabled: true +``` + +### Loki Image Configuration + +```yaml +loki: + image: + repository: grafana/loki + tag: 3.7.4 +``` + +### Package Images + +```yaml +pack: + content: + images: + - image: docker.io/grafana/loki:3.7.4 + - image: docker.io/grafana/loki-canary:3.7.4 + - image: docker.io/grafana/loki-helm-test:3.7.4 + - image: docker.io/nginxinc/nginx-unprivileged:1.31-alpine + - image: ghcr.io/jkroepke/access-log-exporter:0.4.6 + - image: docker.io/memcached:1.6.45-alpine + - image: quay.io/prometheus/memcached-exporter:v0.16.0 + - image: docker.io/kiwigrid/k8s-sidecar:2.8.1 + - image: registry.k8s.io/kubectl:v1.36.0 +``` + +### Storage Example + +```yaml +loki: + storage: + bucketNames: + chunks: loki-chunks + ruler: loki-ruler +``` + +--- + +## Upgrade + +### Upgrade Package + +```bash +helm upgrade loki grafana-community/loki \ + --namespace loki \ + -f values.yaml +``` + +### Important Upgrade Considerations + +#### From 17.x to 18.x + +- Monitoring settings moved under `.Values.monitoring` +- Dashboard generation now uses upstream `loki-mixin` +- `cluster` label replaced by `app_instance` +- Alert configuration moved to `monitoring.alerts` + +#### From 16.x to 17.x + +- Embedded MinIO deployment is deprecated +- External object storage is recommended + +#### From 11.x to 12.x + +- Default deployment mode changed to `Monolithic` +- `SingleBinary` renamed to `Monolithic` + +#### Kubernetes Compatibility + +- Kubernetes 1.25+ required +- Deprecated API versions removed + +--- + +## Usage + +### Install from OCI Registry + +```bash +helm install loki \ + oci://ghcr.io/grafana-community/helm-charts/loki \ + --namespace loki \ + --create-namespace +``` + +### Install from Helm Repository + +```bash +helm repo add grafana-community https://grafana-community.github.io/helm-charts + +helm repo update + +helm install loki \ + grafana-community/loki \ + --namespace loki \ + --create-namespace +``` + +### Verify Installation + +```bash +kubectl get pods -n loki +``` + +```bash +kubectl get svc -n loki +``` + +### Uninstall + +```bash +helm uninstall loki -n loki +``` + +--- + +## References + +### Documentation + +- https://grafana.com/docs/loki/latest/ +- https://grafana.com/docs/loki/latest/setup/install/helm/ +- https://grafana.com/oss/loki/ + +### Source Code + +- https://github.com/grafana/loki + +### Helm Repository + +- https://grafana-community.github.io/helm-charts + +### Storage Documentation + +- https://grafana.com/docs/loki/latest/configure/storage/ +- https://grafana.com/docs/loki/latest/operations/storage/schema/ + +### Changelog + +- https://grafana-community.github.io/helm-charts/changelog/?chart=loki diff --git a/packs/loki-3.7.4/charts/loki-18.5.2.tgz b/packs/loki-3.7.4/charts/loki-18.5.2.tgz new file mode 100644 index 00000000..88b18079 Binary files /dev/null and b/packs/loki-3.7.4/charts/loki-18.5.2.tgz differ diff --git a/packs/loki-3.7.4/charts/loki/.helmignore b/packs/loki-3.7.4/charts/loki/.helmignore new file mode 100644 index 00000000..eca5f0df --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/.helmignore @@ -0,0 +1,33 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ +# Helm plugin tooling +ci/ +tests/ +*.gotmpl +# pre-fork content - to be removed +test/ +scenarios/ +docs/ +*-values.yaml +hack/ diff --git a/packs/loki-3.7.4/charts/loki/Chart.lock b/packs/loki-3.7.4/charts/loki/Chart.lock new file mode 100644 index 00000000..36f27ddb --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/Chart.lock @@ -0,0 +1,9 @@ +dependencies: +- name: minio + repository: https://charts.min.io/ + version: 5.4.0 +- name: rollout-operator + repository: https://grafana.github.io/helm-charts + version: 0.50.1 +digest: sha256:43cb7005a687a7eb7d7876f38a9ae771d6da29dcdb1c573986e71135dfdcdcfd +generated: "2026-07-17T18:13:45.639631483Z" diff --git a/packs/loki-3.7.4/charts/loki/Chart.yaml b/packs/loki-3.7.4/charts/loki/Chart.yaml new file mode 100644 index 00000000..811d64a6 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/Chart.yaml @@ -0,0 +1,35 @@ +apiVersion: v2 +appVersion: 3.7.4 +dependencies: +- alias: minio + condition: minio.enabled + name: minio + repository: https://charts.min.io/ + version: 5.4.0 +- alias: rollout_operator + condition: rollout_operator.enabled + name: rollout-operator + repository: https://grafana.github.io/helm-charts + version: 0.50.1 +description: Helm chart for Grafana Loki supporting monolithic, simple scalable, and + microservices modes. +home: https://grafana-community.github.io/helm-charts +icon: https://grafana.com/docs/loki/latest/logo_and_name.png +kubeVersion: '>=1.25.0-0' +maintainers: +- email: mike1118@live.com + name: Michael Timmerman + url: https://github.com/TheRealNoob +- email: github@jkroepke.de + name: Jan-Otto Kröpke + url: https://github.com/jkroepke +- email: quentin.bisson@gmail.com + name: Quentin Bisson + url: https://github.com/QuentinBisson +name: loki +sources: +- https://github.com/grafana/loki +- https://grafana.com/oss/loki/ +- https://grafana.com/docs/loki/latest/ +type: application +version: 18.5.4 diff --git a/packs/loki-3.7.4/charts/loki/README.md b/packs/loki-3.7.4/charts/loki/README.md new file mode 100644 index 00000000..7c130098 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/README.md @@ -0,0 +1,437 @@ +# loki + +Helm chart for Grafana Loki supporting monolithic, simple scalable, and microservices modes. + +## Source Code + +* +* +* + +## Requirements + +The Following are installed via subchart + +| Repository | Name | +|------------|------| +| https://charts.min.io/ | minio(minio) | +| https://grafana.github.io/helm-charts | rollout_operator(rollout-operator) | + +Find more information in the Loki Helm Chart [documentation](https://grafana.com/docs/loki/latest/setup/install/helm/). + +## Installing the Chart + +### OCI Registry + +OCI registries are preferred in Helm as they implement unified storage, distribution, and improved security. + +```console +helm install RELEASE-NAME oci://ghcr.io/grafana-community/helm-charts/loki +``` + +### HTTP Registry + +```console +helm repo add grafana-community https://grafana-community.github.io/helm-charts +helm repo update +helm install RELEASE-NAME grafana-community/loki +``` + +## Uninstalling the Chart + +To remove all of the Kubernetes objects associated with the Helm chart release: + +```console +helm delete RELEASE-NAME +``` + +## Changelog + +See the [changelog](https://grafana-community.github.io/helm-charts/changelog/?chart=loki). + +--- + +## Upgrading + +### From 17.x to 18.0.0 ([#193](https://github.com/grafana-community/helm-charts/pull/193)) + +The `.Values.monitoring` block has been refactored and the root `.Values.clusterLabelOverride` field removed and merged into `.Values.monitoring`. Users should not assume backwards compatibility with any prior monitoring configuration — review this section in full before upgrading. + +All dashboards, recording rules, and alert rules are now generated from the upstream [loki-mixin](https://github.com/grafana/loki/tree/main/production/loki-mixin) rather than maintained as static files. This ensures dashboard queries work correctly across all deployment modes (Monolithic, SimpleScalable, Distributed) and keeps the chart aligned with the upstream Loki observability stack. + +#### `cluster` label repurposed; new `app_instance` label + +The metric label that identifies the Loki Helm release has changed from `cluster` to `app_instance`. The `cluster` label is no longer added by default — it is now an optional label for multi-cluster environments, controlled by `monitoring.multiCluster.enabled`. When enabled, its value comes from `monitoring.multiCluster.clusterName` and represents the Kubernetes cluster, not the Helm release. + +Actions required: +- Update any alerting rules, dashboards, or downstream recording rules that filter on `cluster=~""` to use `app_instance=~""` instead. +- Existing Grafana dashboard URLs that encode the `cluster` variable in the URL will need to be updated. +- If you run Loki across multiple Kubernetes clusters, enable `monitoring.multiCluster.enabled` and set `monitoring.multiCluster.clusterName` to restore the `cluster` label with a per-cluster value. + +#### Alerts separated from rules + +Alert rules have been split into a new `monitoring.alerts` section, separate from `monitoring.rules` (which now only controls recording rules). Users who had `monitoring.rules.alerting: true` must switch to `monitoring.alerts.enabled: true`. + +The old `monitoring.rules.configs` block (with per-alert `enabled`, `for`, `lookbackPeriod`, `threshold`, `severity`) has been removed. Alerts are now generated from the loki-mixin and can be individually disabled or customised: + +```yaml +monitoring: + alerts: + enabled: true + disabled: {} # disable specific alerts: { LokiRequestErrors: true } + overrides: {} # override per-alert for/severity: { LokiRequestErrors: { for: 5m, severity: warning } } + keepFiringFor: "" +``` + +Note: `lookbackPeriod` and `threshold` are not carried forward as they did not generalize to all PromQL alert expressions. + +#### Removed and renamed values + +| Old value | Replacement | +|---|---| +| `clusterLabelOverride` | `monitoring.appInstanceLabelName` and `monitoring.appInstanceLabelValue` | +| `monitoring.serviceMonitor.clusterLabel` | `monitoring.appInstanceLabelName` and `monitoring.appInstanceLabelValue` | +| `monitoring.dashboards.namespace` | `monitoring.namespace` (applies to all monitoring resources) | +| `monitoring.rules.namespace` | `monitoring.namespace` | +| `monitoring.rules.additionalGroups` | `monitoring.additionalPrometheusRules` (dict structure, supports both recording rules and alerts — see `values.yaml` for examples) | +| `monitoring.dashboards.multiCluster` | `monitoring.multiCluster` (hoisted to monitoring level) | + +#### Recording rule names + +Recording rule `record:` names now use the `cluster_job:`, `cluster_job_route:`, and `cluster_namespace_job_route:` conventions from the upstream loki-mixin. If you reference recording rule metrics directly in custom alerts or dashboards, update your queries. + +#### Multi-cluster configuration + +`monitoring.multiCluster` supports two modes: + +| Setting | Behavior | +|---|---| +| `enabled: true` + `clusterName: "my-cluster"` | **Basic mode.** The chart adds `cluster` labels to ServiceMonitor relabeling, recording rules, and alerts. Recording rule aggregations include `cluster` in `by()` clauses. Dashboards show the `cluster` variable. | +| `enabled: true` + `clusterName: ""` | **Externally managed mode.** Only dashboards are modified — the `cluster` variable is shown. Recording rules, alerts, and ServiceMonitor are not modified. Use this when an external tool (e.g. Grafana Alloy) handles cluster label injection and PromQL rewriting. | + +To restore the old `cluster` label behavior (not recommended), set `monitoring.appInstanceLabelName` to `cluster`. This may cause confusion in multi-cluster environments and does not align with community conventions. + +#### Dashboard architecture changed + +Dashboards are now generated from loki-mixin into individual ConfigMap resources (one per dashboard) instead of a single ConfigMap containing all dashboards. The static JSON source files under `src/dashboards/` have been removed. + +New dashboard configuration options: +- `monitoring.dashboards.defaultDashboardsTimezone` (default: `utc`) +- `monitoring.dashboards.defaultDashboardsEditable` (default: `true`) +- `monitoring.dashboards.defaultDashboardsInterval` (default: `1m`) +- `monitoring.dashboards.grafanaOperator` — optional deployment via Grafana Operator CRD instead of ConfigMaps +- `monitoring.dashboards.grafanaOperator.instanceSelector` — label selector matching your Grafana instance's labels (default: `{}`) + +### From 16.x to 17.0.0 ([#366](https://github.com/grafana-community/helm-charts/pull/366)) + +The built-in MinIO subchart is now **officially deprecated**. Enabling `minio.enabled=true` now fails chart rendering by default. + +Actions required: +1. Configure a dedicated external object storage backend instead of the built-in MinIO dependency + (for example: AWS S3, GCS, or Azure Blob). Potential self-hosted S3-compatible options include + RustFS and Garage; validate production suitability for your environment before adoption. +2. Deploy a transition release that keeps old MinIO data readable but writes new data to the external store. +3. Keep both stores configured until old data in MinIO has aged out according to retention. +4. Remove the MinIO-related config only after retention has fully elapsed. + +Recommended migration values flow: + +Before (legacy state using built-in MinIO): + +```yaml +minio: + enabled: true + +loki: + schemaConfig: + configs: + - from: "2024-01-01" + store: tsdb + object_store: s3 + schema: v13 + index: + prefix: index_ + period: 24h +``` + +Transition release (temporary dual-store period): + +```yaml +# Temporary escape hatch while migrating +ignoreMinioDeprecation: true +minio: + enabled: true + +loki: + # Use structuredConfig so you can configure named stores explicitly + structuredConfig: + storage_config: + named_stores: + aws: + minio: + endpoint: '{{ include "loki.minio" $ }}' + bucketnames: chunks + secret_access_key: '{{ $.Values.minio.rootPassword }}' + access_key_id: '{{ $.Values.minio.rootUser }}' + s3forcepathstyle: true + insecure: true + s3-loki-chunks: + endpoint: 's3.example.com' + bucketnames: chunks + access_key_id: '' + secret_access_key: '' + s3forcepathstyle: true + insecure: true + schema_config: + configs: + # Keep old data in MinIO readable + - from: "2024-01-01" + store: tsdb + object_store: minio + schema: v13 + index: + prefix: index_ + period: 24h + # Write new data to external S3 + - from: "2026-05-01" # Adjust this date as needed based on your retention period. Should be in the near future + store: tsdb + object_store: s3-loki-chunks + schema: v13 + index: + prefix: index_ + period: 24h +``` + +Final release (after retention has elapsed): + +The chart still requires `loki.storage.bucketNames` for helper-generated storage sections such as `common.storage` and ruler storage. + +```yaml +loki: + storage: + bucketNames: + chunks: chunks + ruler: ruler + structuredConfig: + storage_config: + named_stores: + aws: + s3-loki-chunks: + endpoint: 's3.example.com' + bucketnames: chunks + access_key_id: '' + secret_access_key: '' + s3forcepathstyle: true + insecure: true + schema_config: + configs: + - from: "2026-05-01" + store: tsdb + object_store: s3-loki-chunks + schema: v13 + index: + prefix: index_ + period: 24h +``` + +Reference docs: +- +- +- Potential self-hosted S3-compatible options: + - RustFS: + - Garage: + +### From 15.x to 16.0.0 ([#499](https://github.com/grafana-community/helm-charts/pull/499)) + +The `loki-canary` workload no longer uses the shared Loki pod template. This change isolates canary rendering from Loki component configuration after users reported that shared settings were unintentionally inherited by canary and could break canary startup. + +What changed: +- `loki-canary` no longer inherits metadata from `loki.*` values such as `loki.annotations`, `loki.serviceAnnotations`, and `loki.serviceLabels`. +- Canary pod annotations are now sourced only from `lokiCanary.podAnnotations`. +- Canary pod API token mount behavior is now controlled explicitly by `lokiCanary.automountServiceAccountToken`. + +Actions required: +- Move canary-specific metadata from `loki.*` keys to `lokiCanary.*` keys. +- If you previously relied on inherited settings, set the canary values explicitly. + +Before: + +```yaml +loki: + annotations: + team: observability + serviceAnnotations: + prometheus.io/scrape: "true" + serviceLabels: + app: loki +``` + +After: + +```yaml +lokiCanary: + annotations: + team: observability + podAnnotations: + team: observability + service: + annotations: + prometheus.io/scrape: "true" + labels: + app: loki-canary + automountServiceAccountToken: false +``` + +### From 14.x to 15.0.0 ([#413](https://github.com/grafana-community/helm-charts/pull/413)) + +Support for Cilium-specific network policies has been removed from this chart. + +Actions required: +- Remove `networkPolicy.flavor` from your values file. The chart now renders Kubernetes `NetworkPolicy` resources only. +- Remove `networkPolicy.egressWorld.enabled` and `networkPolicy.egressKubeApiserver.enabled` from your values file. +- If you relied on Cilium-only behavior, manage those `CiliumNetworkPolicy` rules outside this chart (for example with separate manifests managed by your GitOps workflow). + +Before: + +```yaml +networkPolicy: + enabled: true + flavor: cilium + egressWorld: + enabled: true + egressKubeApiserver: + enabled: true +``` + +After: + +```yaml +networkPolicy: + enabled: true +``` + +### From 13.x to 14.0.0 ([#479](https://github.com/grafana-community/helm-charts/pull/479)) + +The dot-based registry heuristic has been removed. Previously, if the `repository` value contained a dot (`.`) in its first path segment, the chart assumed it already included a registry and silently skipped prepending `global.imageRegistry` or the service-level `registry`. This caused configured registries to be ignored for image references like `mirror.gcr.io/grafana/loki` or `foo.com/loki-fips`. + +**This is now the expected behavior**: when a registry is configured (via `global.imageRegistry` or a component's `image.registry`), it is always prepended unconditionally. +`global.imageRegistry` is intentionally the highest-precedence registry setting and overrides all component-level `image.registry` values. + +Actions required: +- If you stored a fully-qualified image reference in `repository` (e.g. `repository: private.registry.com/grafana/loki`) and relied on the dot-heuristic to prevent double-prefixing, split the value into separate `registry` and `repository` fields: + +Before: + +```yaml +loki: + image: + repository: private.registry.com/grafana/loki +``` + +After: + +```yaml +loki: + image: + registry: private.registry.com + repository: grafana/loki +``` + +Users who only set `repository` to a plain path (e.g. `grafana/loki`) or who use `global.imageRegistry` / `image.registry` correctly are unaffected. + +### From 12.x to 13.0.0 ([#258](https://github.com/grafana-community/helm-charts/pull/258)) + +The persistence configuration for ephemeral volumes has been flattened. + +Actions required: +- Replace `persistence.ephemeralDataVolume.enabled: true` with `persistence.enabled: true` and `persistence.type: ephemeral`. +- Move any fields under `persistence.ephemeralDataVolume` (`accessModes`, `size`, `storageClass`, `volumeAttributesClassName`, `selector`, `annotations`, `labels`) directly under `persistence`. + +Before: + +```yaml +: + persistence: + ephemeralDataVolume: + enabled: true + accessModes: + - ReadWriteOnce + size: 10Gi + storageClass: null +``` + +After: + +```yaml +: + persistence: + enabled: true + type: ephemeral + accessModes: + - ReadWriteOnce + size: 10Gi + storageClass: null +``` + + +### From 11.x to 12.0.0 ([#258](https://github.com/grafana-community/helm-charts/pull/258)) + +The `deploymentMode` default value has been changed to `Monolithic`. `SingleBinary` has been renamed to `Monolithic`. +The old naming `SingleBinary` is still supported. `SimpleScalable` is still supported but will be removed in Loki 4.0.0. + +Actions required: +- If you are using `SimpleScalable` deployment mode, you have to explicitly set `deploymentMode: SimpleScalable` in your values file to avoid breaking changes. Consider migrating to `Monolithic` deployment mode as `SimpleScalable` will be removed in Loki 4.0.0. +- If you are using `SingleBinary` deployment mode, you have to explicitly set `deploymentMode: Monolithic` in your values file to avoid breaking changes. + +### From 10.x to 11.0.0 ([#273](https://github.com/grafana-community/helm-charts/pull/273)) + +The `read.legacyReadTarget` option has been removed. Simple scalable deployments always requires a dedicated backend target. + +### From 9.x to 10.0.0 ([#270](https://github.com/grafana-community/helm-charts/pull/270)) + +The `indexGateway.persistence.inMemory` has been replaced with `indexGateway.persistence.dataVolumeParameters` to establish a more consistent configuration for persistence across all components. + +Before: + +```yaml +indexGateway: + persistence: + inMemory: true + size: 10Gi +``` + +After: + +```yaml +indexGateway: + persistence: + dataVolumeParameters: + emptyDir: + medium: Memory + sizeLimit: 10Gi +``` + +### From 8.x to 9.0.0 ([#187](https://github.com/grafana-community/helm-charts/pull/187)) + +The `monitoring.selfMonitoring` component has been removed along with `grafana-agent-operator` subchart dependency. Additionally, loki-canary tenant authentication has been moved as it was located under selfMonitoring. + +Actions required: +- `monitoring.selfMonitoring` has been removed because [Grafana Agent is EOL](https://grafana.com/docs/agent/latest/). Native support for collection and shipment of logs to Loki is no longer supported in the chart. [Grafana Alloy](https://grafana.com/docs/alloy/latest/) is the successor to Grafana Agent if you're to re-implement the same functionality. +- `monitoring.serviceMonitor.metricsInstance` has been removed as it implemented a (Grafana Agent) CRD object no longer supported. +- loki-canary authentication is now configured via `lokiCanary.tenant.name` and `lokiCanary.tenant.password`. + +### From 7.x to 8.0.0 ([#184](https://github.com/grafana-community/helm-charts/pull/184)) + +Grafana Enterprise Logs (GEL) / Loki Enterprise support has been removed from this chart. This chart is intended for open-source Loki users only. + +If you are a GEL user, do not migrate to this chart. The upstream `grafana/loki` chart remains available for GEL users. Consult your Grafana Labs account team about your migration options. See the [migration announcement](https://github.com/grafana/loki/issues/20705) for details. + +### From 6.x to 7.0.0 ([#183](https://github.com/grafana-community/helm-charts/pull/183)) + +Support for deprecated Kubernetes APIs has been dropped. **Kubernetes 1.25 or later is now required.** + +Actions required: + +- Remove `rbac.pspEnabled` and `rbac.pspAnnotations` from your values file — PodSecurityPolicy support has been removed (PSP was removed in Kubernetes 1.25). +- Ingress resources now use `networking.k8s.io/v1` only; `v1beta1` is no longer supported. +- PodDisruptionBudget resources now use `policy/v1` only. diff --git a/packs/loki-3.7.4/charts/loki/charts/minio/.helmignore b/packs/loki-3.7.4/charts/loki/charts/minio/.helmignore new file mode 100644 index 00000000..a9fe7278 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/charts/minio/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj +# OWNERS file for Kubernetes +OWNERS \ No newline at end of file diff --git a/packs/loki-3.7.4/charts/loki/charts/minio/Chart.yaml b/packs/loki-3.7.4/charts/loki/charts/minio/Chart.yaml new file mode 100644 index 00000000..827787ea --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/charts/minio/Chart.yaml @@ -0,0 +1,18 @@ +apiVersion: v1 +appVersion: RELEASE.2024-12-18T13-15-44Z +description: High Performance Object Storage +home: https://min.io +icon: https://min.io/resources/img/logo/MINIO_wordmark.png +keywords: +- minio +- storage +- object-storage +- s3 +- cluster +maintainers: +- email: dev@minio.io + name: MinIO, Inc +name: minio +sources: +- https://github.com/minio/minio +version: 5.4.0 diff --git a/packs/loki-3.7.4/charts/loki/charts/minio/README.md b/packs/loki-3.7.4/charts/loki/charts/minio/README.md new file mode 100644 index 00000000..a1d5c99f --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/charts/minio/README.md @@ -0,0 +1,264 @@ +# MinIO Community Helm Chart + +[![Slack](https://slack.min.io/slack?type=svg)](https://slack.min.io) [![license](https://img.shields.io/badge/license-AGPL%20V3-blue)](https://github.com/minio/minio/blob/master/LICENSE) + +MinIO is a High Performance Object Storage released under GNU Affero General Public License v3.0. It is API compatible with Amazon S3 cloud storage service. Use MinIO to build high performance infrastructure for machine learning, analytics and application data workloads. + +| IMPORTANT | +| -------------------------- | +| This Helm chart is community built, maintained, and supported. MinIO does not guarantee support for any given bug, feature request, or update referencing this chart.

MinIO publishes a separate [MinIO Kubernetes Operator and Tenant Helm Chart](https://github.com/minio/operator/tree/master/helm) that is officially maintained and supported. MinIO strongly recommends using the MinIO Kubernetes Operator for production deployments. See [Deploy Operator With Helm](https://min.io/docs/minio/kubernetes/upstream/operations/install-deploy-manage/deploy-operator-helm.html?ref=github) for additional documentation. | + +## Introduction + +This chart bootstraps MinIO Cluster on [Kubernetes](http://kubernetes.io) using the [Helm](https://helm.sh) package manager. + +## Prerequisites + +- Helm cli with Kubernetes cluster configured. +- PV provisioner support in the underlying infrastructure. (We recommend using ) +- Use Kubernetes version v1.19 and later for best experience. + +## Configure MinIO Helm repo + +```bash +helm repo add minio https://charts.min.io/ +``` + +### Installing the Chart + +Install this chart using: + +```bash +helm install --namespace minio --set rootUser=rootuser,rootPassword=rootpass123 --generate-name minio/minio +``` + +The command deploys MinIO on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation. + +### Installing the Chart (toy-setup) + +Minimal toy setup for testing purposes can be deployed using: + +```bash +helm install --set resources.requests.memory=512Mi --set replicas=1 --set persistence.enabled=false --set mode=standalone --set rootUser=rootuser,rootPassword=rootpass123 --generate-name minio/minio +``` + +### Upgrading the Chart + +You can use Helm to update MinIO version in a live release. Assuming your release is named as `my-release`, get the values using the command: + +```bash +helm get values my-release > old_values.yaml +``` + +Then change the field `image.tag` in `old_values.yaml` file with MinIO image tag you want to use. Now update the chart using + +```bash +helm upgrade -f old_values.yaml my-release minio/minio +``` + +Default upgrade strategies are specified in the `values.yaml` file. Update these fields if you'd like to use a different strategy. + +### Configuration + +Refer the [Values file](./values.yaml) for all the possible config fields. + +You can specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, + +```bash +helm install --name my-release --set persistence.size=1Ti minio/minio +``` + +The above command deploys MinIO server with a 1Ti backing persistent volume. + +Alternately, you can provide a YAML file that specifies parameter values while installing the chart. For example, + +```bash +helm install --name my-release -f values.yaml minio/minio +``` + +### Persistence + +This chart provisions a PersistentVolumeClaim and mounts corresponding persistent volume to default location `/export`. You'll need physical storage available in the Kubernetes cluster for this to work. If you'd rather use `emptyDir`, disable PersistentVolumeClaim by: + +```bash +helm install --set persistence.enabled=false minio/minio +``` + +> *"An emptyDir volume is first created when a Pod is assigned to a Node, and exists as long as that Pod is running on that node. When a Pod is removed from a node for any reason, the data in the emptyDir is deleted forever."* + +### Existing PersistentVolumeClaim + +If a Persistent Volume Claim already exists, specify it during installation. + +1. Create the PersistentVolume +2. Create the PersistentVolumeClaim +3. Install the chart + +```bash +helm install --set persistence.existingClaim=PVC_NAME minio/minio +``` + +### NetworkPolicy + +To enable network policy for MinIO, +install [a networking plugin that implements the Kubernetes +NetworkPolicy spec](https://kubernetes.io/docs/tasks/administer-cluster/declare-network-policy#before-you-begin), +and set `networkPolicy.enabled` to `true`. + +For Kubernetes v1.5 & v1.6, you must also turn on NetworkPolicy by setting +the DefaultDeny namespace annotation. Note: this will enforce policy for *all* pods in the namespace: + +``` +kubectl annotate namespace default "net.beta.kubernetes.io/network-policy={\"ingress\":{\"isolation\":\"DefaultDeny\"}}" +``` + +When using `Cilium` as a CNI in your cluster, please edit the `flavor` field to `cilium`. + +With NetworkPolicy enabled, traffic will be limited to just port 9000. + +For more precise policy, set `networkPolicy.allowExternal=true`. This will +only allow pods with the generated client label to connect to MinIO. +This label will be displayed in the output of a successful install. + +### Existing secret + +Instead of having this chart create the secret for you, you can supply a preexisting secret, much +like an existing PersistentVolumeClaim. + +First, create the secret: + +```bash +kubectl create secret generic my-minio-secret --from-literal=rootUser=foobarbaz --from-literal=rootPassword=foobarbazqux +``` + +Then install the chart, specifying that you want to use an existing secret: + +```bash +helm install --set existingSecret=my-minio-secret minio/minio +``` + +The following fields are expected in the secret: + +| .data.\ in Secret | Corresponding variable | Description | Required | +|:------------------------|:-----------------------|:---------------|:---------| +| `rootUser` | `rootUser` | Root user. | yes | +| `rootPassword` | `rootPassword` | Root password. | yes | + +All corresponding variables will be ignored in values file. + +### Configure TLS + +To enable TLS for MinIO containers, acquire TLS certificates from a CA or create self-signed certificates. While creating / acquiring certificates ensure the corresponding domain names are set as per the standard [DNS naming conventions](https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#pod-identity) in a Kubernetes StatefulSet (for a distributed MinIO setup). Then create a secret using + +```bash +kubectl create secret generic tls-ssl-minio --from-file=path/to/private.key --from-file=path/to/public.crt +``` + +Then install the chart, specifying that you want to use the TLS secret: + +```bash +helm install --set tls.enabled=true,tls.certSecret=tls-ssl-minio minio/minio +``` + +### Installing certificates from third party CAs + +MinIO can connect to other servers, including MinIO nodes or other server types such as NATs and Redis. If these servers use certificates that were not registered with a known CA, add trust for these certificates to MinIO Server by bundling these certificates into a Kubernetes secret and providing it to Helm via the `trustedCertsSecret` value. If `.Values.tls.enabled` is `true` and you're installing certificates for third party CAs, remember to include MinIO's own certificate with key `public.crt`, if it also needs to be trusted. + +For instance, given that TLS is enabled and you need to add trust for MinIO's own CA and for the CA of a Keycloak server, a Kubernetes secret can be created from the certificate files using `kubectl`: + +``` +kubectl -n minio create secret generic minio-trusted-certs --from-file=public.crt --from-file=keycloak.crt +``` + +If TLS is not enabled, you would need only the third party CA: + +``` +kubectl -n minio create secret generic minio-trusted-certs --from-file=keycloak.crt +``` + +The name of the generated secret can then be passed to Helm using a values file or the `--set` parameter: + +``` +trustedCertsSecret: "minio-trusted-certs" + +or + +--set trustedCertsSecret=minio-trusted-certs +``` + +### Create buckets after install + +Install the chart, specifying the buckets you want to create after install: + +```bash +helm install --set buckets[0].name=bucket1,buckets[0].policy=none,buckets[0].purge=false minio/minio +``` + +Description of the configuration parameters used above - + +- `buckets[].name` - name of the bucket to create, must be a string with length > 0 +- `buckets[].policy` - can be one of none|download|upload|public +- `buckets[].purge` - purge if bucket exists already + +### Create policies after install + +Install the chart, specifying the policies you want to create after install: + +```bash +helm install --set policies[0].name=mypolicy,policies[0].statements[0].resources[0]='arn:aws:s3:::bucket1',policies[0].statements[0].actions[0]='s3:ListBucket',policies[0].statements[0].actions[1]='s3:GetObject' minio/minio +``` + +Description of the configuration parameters used above - + +- `policies[].name` - name of the policy to create, must be a string with length > 0 +- `policies[].statements[]` - list of statements, includes actions and resources +- `policies[].statements[].resources[]` - list of resources that applies the statement +- `policies[].statements[].actions[]` - list of actions granted + +### Create user after install + +Install the chart, specifying the users you want to create after install: + +```bash +helm install --set users[0].accessKey=accessKey,users[0].secretKey=secretKey,users[0].policy=none,users[1].accessKey=accessKey2,users[1].secretRef=existingSecret,users[1].secretKey=password,users[1].policy=none minio/minio +``` + +Description of the configuration parameters used above - + +- `users[].accessKey` - accessKey of user +- `users[].secretKey` - secretKey of usersecretRef +- `users[].existingSecret` - secret name that contains the secretKey of user +- `users[].existingSecretKey` - data key in existingSecret secret containing the secretKey +- `users[].policy` - name of the policy to assign to user + +### Create service account after install + +Install the chart, specifying the service accounts you want to create after install: + +```bash +helm install --set svcaccts[0].accessKey=accessKey,svcaccts[0].secretKey=secretKey,svcaccts[0].user=parentUser,svcaccts[1].accessKey=accessKey2,svcaccts[1].secretRef=existingSecret,svcaccts[1].secretKey=password,svcaccts[1].user=parentUser2 minio/minio +``` + +Description of the configuration parameters used above - + +- `svcaccts[].accessKey` - accessKey of service account +- `svcaccts[].secretKey` - secretKey of svcacctsecretRef +- `svcaccts[].existingSecret` - secret name that contains the secretKey of service account +- `svcaccts[].existingSecretKey` - data key in existingSecret secret containing the secretKey +- `svcaccts[].user` - name of the parent user to assign to service account + +## Uninstalling the Chart + +Assuming your release is named as `my-release`, delete it using the command: + +```bash +helm delete my-release +``` + +or + +```bash +helm uninstall my-release +``` + +The command removes all the Kubernetes components associated with the chart and deletes the release. diff --git a/packs/loki-3.7.4/charts/loki/charts/minio/templates/NOTES.txt b/packs/loki-3.7.4/charts/loki/charts/minio/templates/NOTES.txt new file mode 100644 index 00000000..ba51b4c6 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/charts/minio/templates/NOTES.txt @@ -0,0 +1,43 @@ +{{- if eq .Values.service.type "ClusterIP" "NodePort" }} +MinIO can be accessed via port {{ .Values.service.port }} on the following DNS name from within your cluster: +{{ template "minio.fullname" . }}.{{ .Release.Namespace }}.{{ .Values.clusterDomain }} + +To access MinIO from localhost, run the below commands: + + 1. export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") + + 2. kubectl port-forward $POD_NAME 9000 --namespace {{ .Release.Namespace }} + +Read more about port forwarding here: http://kubernetes.io/docs/user-guide/kubectl/kubectl_port-forward/ + +You can now access MinIO server on http://localhost:9000. Follow the below steps to connect to MinIO server with mc client: + + 1. Download the MinIO mc client - https://min.io/docs/minio/linux/reference/minio-mc.html#quickstart + + 2. export MC_HOST_{{ template "minio.fullname" . }}-local=http://$(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "minio.secretName" . }} -o jsonpath="{.data.rootUser}" | base64 --decode):$(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "minio.secretName" . }} -o jsonpath="{.data.rootPassword}" | base64 --decode)@localhost:{{ .Values.service.port }} + + 3. mc ls {{ template "minio.fullname" . }}-local + +{{- end }} +{{- if eq .Values.service.type "LoadBalancer" }} +MinIO can be accessed via port {{ .Values.service.port }} on an external IP address. Get the service external IP address by: +kubectl get svc --namespace {{ .Release.Namespace }} -l app={{ template "minio.fullname" . }} + +Note that the public IP may take a couple of minutes to be available. + +You can now access MinIO server on http://:9000. Follow the below steps to connect to MinIO server with mc client: + + 1. Download the MinIO mc client - https://min.io/docs/minio/linux/reference/minio-mc.html#quickstart + + 2. export MC_HOST_{{ template "minio.fullname" . }}-local=http://$(kubectl get secret {{ template "minio.secretName" . }} --namespace {{ .Release.Namespace }} -o jsonpath="{.data.rootUser}" | base64 --decode):$(kubectl get secret {{ template "minio.secretName" . }} -o jsonpath="{.data.rootPassword}" | base64 --decode)@:{{ .Values.service.port }} + + 3. mc ls {{ template "minio.fullname" . }} + +Alternately, you can use your browser or the MinIO SDK to access the server - https://min.io/docs/minio/linux/reference/minio-server/minio-server.html +{{- end }} + +{{ if and (.Values.networkPolicy.enabled) (not .Values.networkPolicy.allowExternal) }} +Note: Since NetworkPolicy is enabled, only pods with label +{{ template "minio.fullname" . }}-client=true" +will be able to connect to this minio cluster. +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/charts/minio/templates/_helper_create_bucket.txt b/packs/loki-3.7.4/charts/loki/charts/minio/templates/_helper_create_bucket.txt new file mode 100644 index 00000000..83b8dcb2 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/charts/minio/templates/_helper_create_bucket.txt @@ -0,0 +1,122 @@ +#!/bin/sh +set -e # Have script exit in the event of a failed command. + +{{- if .Values.configPathmc }} +MC_CONFIG_DIR="{{ .Values.configPathmc }}" +MC="/usr/bin/mc --insecure --config-dir ${MC_CONFIG_DIR}" +{{- else }} +MC="/usr/bin/mc --insecure" +{{- end }} + +# connectToMinio +# Use a check-sleep-check loop to wait for MinIO service to be available +connectToMinio() { + SCHEME=$1 + ATTEMPTS=0 + LIMIT=29 # Allow 30 attempts + set -e # fail if we can't read the keys. + ACCESS=$(cat /config/rootUser) + SECRET=$(cat /config/rootPassword) + set +e # The connections to minio are allowed to fail. + echo "Connecting to MinIO server: $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT" + MC_COMMAND="${MC} alias set myminio $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT $ACCESS $SECRET" + $MC_COMMAND + STATUS=$? + until [ $STATUS = 0 ]; do + ATTEMPTS=$(expr $ATTEMPTS + 1) + echo \"Failed attempts: $ATTEMPTS\" + if [ $ATTEMPTS -gt $LIMIT ]; then + exit 1 + fi + sleep 2 # 1 second intervals between attempts + $MC_COMMAND + STATUS=$? + done + set -e # reset `e` as active + return 0 +} + +# checkBucketExists ($bucket) +# Check if the bucket exists, by using the exit code of `mc ls` +checkBucketExists() { + BUCKET=$1 + CMD=$(${MC} stat myminio/$BUCKET >/dev/null 2>&1) + return $? +} + +# createBucket ($bucket, $policy, $purge) +# Ensure bucket exists, purging if asked to +createBucket() { + BUCKET=$1 + POLICY=$2 + PURGE=$3 + VERSIONING=$4 + OBJECTLOCKING=$5 + + # Purge the bucket, if set & exists + # Since PURGE is user input, check explicitly for `true` + if [ $PURGE = true ]; then + if checkBucketExists $BUCKET; then + echo "Purging bucket '$BUCKET'." + set +e # don't exit if this fails + ${MC} rm -r --force myminio/$BUCKET + set -e # reset `e` as active + else + echo "Bucket '$BUCKET' does not exist, skipping purge." + fi + fi + + # Create the bucket if it does not exist and set objectlocking if enabled (NOTE: versioning will be not changed if OBJECTLOCKING is set because it enables versioning to the Buckets created) + if ! checkBucketExists $BUCKET; then + if [ ! -z $OBJECTLOCKING ]; then + if [ $OBJECTLOCKING = true ]; then + echo "Creating bucket with OBJECTLOCKING '$BUCKET'" + ${MC} mb --with-lock myminio/$BUCKET + elif [ $OBJECTLOCKING = false ]; then + echo "Creating bucket '$BUCKET'" + ${MC} mb myminio/$BUCKET + fi + elif [ -z $OBJECTLOCKING ]; then + echo "Creating bucket '$BUCKET'" + ${MC} mb myminio/$BUCKET + else + echo "Bucket '$BUCKET' already exists." + fi + fi + + # set versioning for bucket if objectlocking is disabled or not set + if [ $OBJECTLOCKING = false ]; then + if [ ! -z $VERSIONING ]; then + if [ $VERSIONING = true ]; then + echo "Enabling versioning for '$BUCKET'" + ${MC} version enable myminio/$BUCKET + elif [ $VERSIONING = false ]; then + echo "Suspending versioning for '$BUCKET'" + ${MC} version suspend myminio/$BUCKET + fi + fi + else + echo "Bucket '$BUCKET' versioning unchanged." + fi + + # At this point, the bucket should exist, skip checking for existence + # Set policy on the bucket + echo "Setting policy of bucket '$BUCKET' to '$POLICY'." + ${MC} anonymous set $POLICY myminio/$BUCKET +} + +# Try connecting to MinIO instance +{{- if .Values.tls.enabled }} +scheme=https +{{- else }} +scheme=http +{{- end }} +connectToMinio $scheme + +{{ if .Values.buckets }} +{{ $global := . }} +# Create the buckets +{{- range .Values.buckets }} +createBucket {{ tpl .name $global }} {{ .policy | default "none" | quote }} {{ .purge | default false }} {{ .versioning | default false }} {{ .objectlocking | default false }} +{{- end }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/charts/minio/templates/_helper_create_policy.txt b/packs/loki-3.7.4/charts/loki/charts/minio/templates/_helper_create_policy.txt new file mode 100644 index 00000000..aa584952 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/charts/minio/templates/_helper_create_policy.txt @@ -0,0 +1,75 @@ +#!/bin/sh +set -e ; # Have script exit in the event of a failed command. + +{{- if .Values.configPathmc }} +MC_CONFIG_DIR="{{ .Values.configPathmc }}" +MC="/usr/bin/mc --insecure --config-dir ${MC_CONFIG_DIR}" +{{- else }} +MC="/usr/bin/mc --insecure" +{{- end }} + +# connectToMinio +# Use a check-sleep-check loop to wait for MinIO service to be available +connectToMinio() { + SCHEME=$1 + ATTEMPTS=0 ; LIMIT=29 ; # Allow 30 attempts + set -e ; # fail if we can't read the keys. + ACCESS=$(cat /config/rootUser) ; SECRET=$(cat /config/rootPassword) ; + set +e ; # The connections to minio are allowed to fail. + echo "Connecting to MinIO server: $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT" ; + MC_COMMAND="${MC} alias set myminio $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT $ACCESS $SECRET" ; + $MC_COMMAND ; + STATUS=$? ; + until [ $STATUS = 0 ] + do + ATTEMPTS=`expr $ATTEMPTS + 1` ; + echo \"Failed attempts: $ATTEMPTS\" ; + if [ $ATTEMPTS -gt $LIMIT ]; then + exit 1 ; + fi ; + sleep 2 ; # 1 second intervals between attempts + $MC_COMMAND ; + STATUS=$? ; + done ; + set -e ; # reset `e` as active + return 0 +} + +# checkPolicyExists ($policy) +# Check if the policy exists, by using the exit code of `mc admin policy info` +checkPolicyExists() { + POLICY=$1 + CMD=$(${MC} admin policy info myminio $POLICY > /dev/null 2>&1) + return $? +} + +# createPolicy($name, $filename) +createPolicy () { + NAME=$1 + FILENAME=$2 + + # Create the name if it does not exist + echo "Checking policy: $NAME (in /config/$FILENAME.json)" + if ! checkPolicyExists $NAME ; then + echo "Creating policy '$NAME'" + else + echo "Policy '$NAME' already exists." + fi + ${MC} admin policy create myminio $NAME /config/$FILENAME.json + +} + +# Try connecting to MinIO instance +{{- if .Values.tls.enabled }} +scheme=https +{{- else }} +scheme=http +{{- end }} +connectToMinio $scheme + +{{ if .Values.policies }} +# Create the policies +{{- range $idx, $policy := .Values.policies }} +createPolicy {{ $policy.name }} policy_{{ $idx }} +{{- end }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/charts/minio/templates/_helper_create_svcacct.txt b/packs/loki-3.7.4/charts/loki/charts/minio/templates/_helper_create_svcacct.txt new file mode 100644 index 00000000..5c8aec4f --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/charts/minio/templates/_helper_create_svcacct.txt @@ -0,0 +1,106 @@ +#!/bin/sh +set -e ; # Have script exit in the event of a failed command. + +{{- if .Values.configPathmc }} +MC_CONFIG_DIR="{{ .Values.configPathmc }}" +MC="/usr/bin/mc --insecure --config-dir ${MC_CONFIG_DIR}" +{{- else }} +MC="/usr/bin/mc --insecure" +{{- end }} + +# AccessKey and secretkey credentials file are added to prevent shell execution errors caused by special characters. +# Special characters for example : ',",<,>,{,} +MINIO_ACCESSKEY_SECRETKEY_TMP="/tmp/accessKey_and_secretKey_svcacct_tmp" + +# connectToMinio +# Use a check-sleep-check loop to wait for MinIO service to be available +connectToMinio() { + SCHEME=$1 + ATTEMPTS=0 ; LIMIT=29 ; # Allow 30 attempts + set -e ; # fail if we can't read the keys. + ACCESS=$(cat /config/rootUser) ; SECRET=$(cat /config/rootPassword) ; + set +e ; # The connections to minio are allowed to fail. + echo "Connecting to MinIO server: $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT" ; + MC_COMMAND="${MC} alias set myminio $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT $ACCESS $SECRET" ; + $MC_COMMAND ; + STATUS=$? ; + until [ $STATUS = 0 ] + do + ATTEMPTS=`expr $ATTEMPTS + 1` ; + echo \"Failed attempts: $ATTEMPTS\" ; + if [ $ATTEMPTS -gt $LIMIT ]; then + exit 1 ; + fi ; + sleep 2 ; # 2 second intervals between attempts + $MC_COMMAND ; + STATUS=$? ; + done ; + set -e ; # reset `e` as active + return 0 +} + +# checkSvcacctExists () +# Check if the svcacct exists, by using the exit code of `mc admin user svcacct info` +checkSvcacctExists() { + CMD=$(${MC} admin user svcacct info myminio $(head -1 $MINIO_ACCESSKEY_SECRETKEY_TMP) > /dev/null 2>&1) + return $? +} + +# createSvcacct ($user) +createSvcacct () { + USER=$1 + FILENAME=$2 + #check accessKey_and_secretKey_tmp file + if [[ ! -f $MINIO_ACCESSKEY_SECRETKEY_TMP ]];then + echo "credentials file does not exist" + return 1 + fi + if [[ $(cat $MINIO_ACCESSKEY_SECRETKEY_TMP|wc -l) -ne 2 ]];then + echo "credentials file is invalid" + rm -f $MINIO_ACCESSKEY_SECRETKEY_TMP + return 1 + fi + SVCACCT=$(head -1 $MINIO_ACCESSKEY_SECRETKEY_TMP) + # Create the svcacct if it does not exist + if ! checkSvcacctExists ; then + echo "Creating svcacct '$SVCACCT'" + # Check if policy file is define + if [ -z $FILENAME ]; then + ${MC} admin user svcacct add --access-key $(head -1 $MINIO_ACCESSKEY_SECRETKEY_TMP) --secret-key $(tail -n1 $MINIO_ACCESSKEY_SECRETKEY_TMP) myminio $USER + else + ${MC} admin user svcacct add --access-key $(head -1 $MINIO_ACCESSKEY_SECRETKEY_TMP) --secret-key $(tail -n1 $MINIO_ACCESSKEY_SECRETKEY_TMP) --policy /config/$FILENAME.json myminio $USER + fi + else + echo "Svcacct '$SVCACCT' already exists." + fi + #clean up credentials files. + rm -f $MINIO_ACCESSKEY_SECRETKEY_TMP +} + +# Try connecting to MinIO instance +{{- if .Values.tls.enabled }} +scheme=https +{{- else }} +scheme=http +{{- end }} +connectToMinio $scheme + +{{ if .Values.svcaccts }} +{{ $global := . }} +# Create the svcaccts +{{- range $idx, $svc := .Values.svcaccts }} +echo {{ tpl .accessKey $global }} > $MINIO_ACCESSKEY_SECRETKEY_TMP +{{- if .existingSecret }} +cat /config/secrets-svc/{{ tpl .existingSecret $global }}/{{ tpl .existingSecretKey $global }} >> $MINIO_ACCESSKEY_SECRETKEY_TMP +# Add a new line if it doesn't exist +echo >> $MINIO_ACCESSKEY_SECRETKEY_TMP +{{ else }} +echo {{ .secretKey }} >> $MINIO_ACCESSKEY_SECRETKEY_TMP +{{- end }} +{{- if $svc.policy}} +createSvcacct {{ .user }} svc_policy_{{ $idx }} +{{ else }} +createSvcacct {{ .user }} +{{- end }} +{{- end }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/charts/minio/templates/_helper_create_user.txt b/packs/loki-3.7.4/charts/loki/charts/minio/templates/_helper_create_user.txt new file mode 100644 index 00000000..bfb79bee --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/charts/minio/templates/_helper_create_user.txt @@ -0,0 +1,107 @@ +#!/bin/sh +set -e ; # Have script exit in the event of a failed command. + +{{- if .Values.configPathmc }} +MC_CONFIG_DIR="{{ .Values.configPathmc }}" +MC="/usr/bin/mc --insecure --config-dir ${MC_CONFIG_DIR}" +{{- else }} +MC="/usr/bin/mc --insecure" +{{- end }} + +# AccessKey and secretkey credentials file are added to prevent shell execution errors caused by special characters. +# Special characters for example : ',",<,>,{,} +MINIO_ACCESSKEY_SECRETKEY_TMP="/tmp/accessKey_and_secretKey_tmp" + +# connectToMinio +# Use a check-sleep-check loop to wait for MinIO service to be available +connectToMinio() { + SCHEME=$1 + ATTEMPTS=0 ; LIMIT=29 ; # Allow 30 attempts + set -e ; # fail if we can't read the keys. + ACCESS=$(cat /config/rootUser) ; SECRET=$(cat /config/rootPassword) ; + set +e ; # The connections to minio are allowed to fail. + echo "Connecting to MinIO server: $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT" ; + MC_COMMAND="${MC} alias set myminio $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT $ACCESS $SECRET" ; + $MC_COMMAND ; + STATUS=$? ; + until [ $STATUS = 0 ] + do + ATTEMPTS=`expr $ATTEMPTS + 1` ; + echo \"Failed attempts: $ATTEMPTS\" ; + if [ $ATTEMPTS -gt $LIMIT ]; then + exit 1 ; + fi ; + sleep 2 ; # 1 second intervals between attempts + $MC_COMMAND ; + STATUS=$? ; + done ; + set -e ; # reset `e` as active + return 0 +} + +# checkUserExists () +# Check if the user exists, by using the exit code of `mc admin user info` +checkUserExists() { + CMD=$(${MC} admin user info myminio $(head -1 $MINIO_ACCESSKEY_SECRETKEY_TMP) > /dev/null 2>&1) + return $? +} + +# createUser ($policy) +createUser() { + POLICY=$1 + #check accessKey_and_secretKey_tmp file + if [[ ! -f $MINIO_ACCESSKEY_SECRETKEY_TMP ]];then + echo "credentials file does not exist" + return 1 + fi + if [[ $(cat $MINIO_ACCESSKEY_SECRETKEY_TMP|wc -l) -ne 2 ]];then + echo "credentials file is invalid" + rm -f $MINIO_ACCESSKEY_SECRETKEY_TMP + return 1 + fi + USER=$(head -1 $MINIO_ACCESSKEY_SECRETKEY_TMP) + # Create the user if it does not exist + if ! checkUserExists ; then + echo "Creating user '$USER'" + cat $MINIO_ACCESSKEY_SECRETKEY_TMP | ${MC} admin user add myminio + else + echo "User '$USER' already exists." + fi + #clean up credentials files. + rm -f $MINIO_ACCESSKEY_SECRETKEY_TMP + + # set policy for user + if [ ! -z $POLICY -a $POLICY != " " ] ; then + echo "Adding policy '$POLICY' for '$USER'" + set +e ; # policy already attach errors out, allow it. + ${MC} admin policy attach myminio $POLICY --user=$USER + set -e + else + echo "User '$USER' has no policy attached." + fi +} + +# Try connecting to MinIO instance +{{- if .Values.tls.enabled }} +scheme=https +{{- else }} +scheme=http +{{- end }} +connectToMinio $scheme + +{{ if .Values.users }} +{{ $global := . }} +# Create the users +{{- range .Values.users }} +echo {{ tpl .accessKey $global }} > $MINIO_ACCESSKEY_SECRETKEY_TMP +{{- if .existingSecret }} +cat /config/secrets/{{ tpl .existingSecret $global }}/{{ tpl .existingSecretKey $global }} >> $MINIO_ACCESSKEY_SECRETKEY_TMP +# Add a new line if it doesn't exist +echo >> $MINIO_ACCESSKEY_SECRETKEY_TMP +createUser {{ .policy }} +{{ else }} +echo {{ .secretKey }} >> $MINIO_ACCESSKEY_SECRETKEY_TMP +createUser {{ .policy }} +{{- end }} +{{- end }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/charts/minio/templates/_helper_custom_command.txt b/packs/loki-3.7.4/charts/loki/charts/minio/templates/_helper_custom_command.txt new file mode 100644 index 00000000..b583a778 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/charts/minio/templates/_helper_custom_command.txt @@ -0,0 +1,58 @@ +#!/bin/sh +set -e ; # Have script exit in the event of a failed command. + +{{- if .Values.configPathmc }} +MC_CONFIG_DIR="{{ .Values.configPathmc }}" +MC="/usr/bin/mc --insecure --config-dir ${MC_CONFIG_DIR}" +{{- else }} +MC="/usr/bin/mc --insecure" +{{- end }} + +# connectToMinio +# Use a check-sleep-check loop to wait for MinIO service to be available +connectToMinio() { + SCHEME=$1 + ATTEMPTS=0 ; LIMIT=29 ; # Allow 30 attempts + set -e ; # fail if we can't read the keys. + ACCESS=$(cat /config/rootUser) ; SECRET=$(cat /config/rootPassword) ; + set +e ; # The connections to minio are allowed to fail. + echo "Connecting to MinIO server: $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT" ; + MC_COMMAND="${MC} alias set myminio $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT $ACCESS $SECRET" ; + $MC_COMMAND ; + STATUS=$? ; + until [ $STATUS = 0 ] + do + ATTEMPTS=`expr $ATTEMPTS + 1` ; + echo \"Failed attempts: $ATTEMPTS\" ; + if [ $ATTEMPTS -gt $LIMIT ]; then + exit 1 ; + fi ; + sleep 2 ; # 1 second intervals between attempts + $MC_COMMAND ; + STATUS=$? ; + done ; + set -e ; # reset `e` as active + return 0 +} + +# runCommand ($@) +# Run custom mc command +runCommand() { + ${MC} "$@" + return $? +} + +# Try connecting to MinIO instance +{{- if .Values.tls.enabled }} +scheme=https +{{- else }} +scheme=http +{{- end }} +connectToMinio $scheme + +{{ if .Values.customCommands }} +# Run custom commands +{{- range .Values.customCommands }} +runCommand {{ .command }} +{{- end }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/charts/minio/templates/_helper_policy.tpl b/packs/loki-3.7.4/charts/loki/charts/minio/templates/_helper_policy.tpl new file mode 100644 index 00000000..8be998e5 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/charts/minio/templates/_helper_policy.tpl @@ -0,0 +1,28 @@ +{{- $statements_length := len .statements -}} +{{- $statements_length := sub $statements_length 1 -}} +{ + "Version": "2012-10-17", + "Statement": [ +{{- range $i, $statement := .statements }} + { + "Effect": "{{ $statement.effect | default "Allow" }}", + "Action": [ +"{{ $statement.actions | join "\",\n\"" }}" + ]{{ if $statement.resources }}, + "Resource": [ +"{{ $statement.resources | join "\",\n\"" }}" + ]{{ end }} +{{- if $statement.conditions }} +{{- $condition_len := len $statement.conditions }} +{{- $condition_len := sub $condition_len 1 }} + , + "Condition": { + {{- range $k,$v := $statement.conditions }} + {{- range $operator,$object := $v }} + "{{ $operator }}": { {{ $object }} }{{- if lt $k $condition_len }},{{- end }} + {{- end }}{{- end }} + }{{- end }} + }{{ if lt $i $statements_length }},{{end }} +{{- end }} + ] +} diff --git a/packs/loki-3.7.4/charts/loki/charts/minio/templates/_helpers.tpl b/packs/loki-3.7.4/charts/loki/charts/minio/templates/_helpers.tpl new file mode 100644 index 00000000..1cb209e5 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/charts/minio/templates/_helpers.tpl @@ -0,0 +1,218 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "minio.name" -}} + {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "minio.fullname" -}} + {{- if .Values.fullnameOverride -}} + {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} + {{- else -}} + {{- $name := default .Chart.Name .Values.nameOverride -}} + {{- if contains $name .Release.Name -}} + {{- .Release.Name | trunc 63 | trimSuffix "-" -}} + {{- else -}} + {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} + {{- end -}} + {{- end -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "minio.chart" -}} + {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Return the appropriate apiVersion for networkpolicy. +*/}} +{{- define "minio.networkPolicy.apiVersion" -}} + {{- if semverCompare ">=1.4-0, <1.7-0" .Capabilities.KubeVersion.Version -}} + {{- print "extensions/v1beta1" -}} + {{- else if semverCompare ">=1.7-0, <1.16-0" .Capabilities.KubeVersion.Version -}} + {{- print "networking.k8s.io/v1beta1" -}} + {{- else if semverCompare "^1.16-0" .Capabilities.KubeVersion.Version -}} + {{- print "networking.k8s.io/v1" -}} + {{- end -}} +{{- end -}} + +{{/* +Return the appropriate apiVersion for deployment. +*/}} +{{- define "minio.deployment.apiVersion" -}} + {{- if semverCompare "<1.9-0" .Capabilities.KubeVersion.Version -}} + {{- print "apps/v1beta2" -}} + {{- else -}} + {{- print "apps/v1" -}} + {{- end -}} +{{- end -}} + +{{/* +Return the appropriate apiVersion for statefulset. +*/}} +{{- define "minio.statefulset.apiVersion" -}} + {{- if semverCompare "<1.16-0" .Capabilities.KubeVersion.Version -}} + {{- print "apps/v1beta2" -}} + {{- else -}} + {{- print "apps/v1" -}} + {{- end -}} +{{- end -}} + +{{/* +Return the appropriate apiVersion for ingress. +*/}} +{{- define "minio.ingress.apiVersion" -}} + {{- if semverCompare "<1.14-0" .Capabilities.KubeVersion.GitVersion -}} + {{- print "extensions/v1beta1" -}} + {{- else if semverCompare "<1.19-0" .Capabilities.KubeVersion.GitVersion -}} + {{- print "networking.k8s.io/v1beta1" -}} + {{- else -}} + {{- print "networking.k8s.io/v1" -}} + {{- end -}} +{{- end -}} + +{{/* +Return the appropriate apiVersion for console ingress. +*/}} +{{- define "minio.consoleIngress.apiVersion" -}} + {{- if semverCompare "<1.14-0" .Capabilities.KubeVersion.GitVersion -}} + {{- print "extensions/v1beta1" -}} + {{- else if semverCompare "<1.19-0" .Capabilities.KubeVersion.GitVersion -}} + {{- print "networking.k8s.io/v1beta1" -}} + {{- else -}} + {{- print "networking.k8s.io/v1" -}} + {{- end -}} +{{- end -}} + +{{/* +Determine secret name. +*/}} +{{- define "minio.secretName" -}} + {{- if .Values.existingSecret -}} + {{- .Values.existingSecret }} + {{- else -}} + {{- include "minio.fullname" . -}} + {{- end -}} +{{- end -}} + +{{/* +Determine name for scc role and rolebinding +*/}} +{{- define "minio.sccRoleName" -}} + {{- printf "%s-%s" "scc" (include "minio.fullname" .) | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Properly format optional additional arguments to MinIO binary +*/}} +{{- define "minio.extraArgs" -}} +{{- range .Values.extraArgs -}} +{{ " " }}{{ . }} +{{- end -}} +{{- end -}} + +{{/* +Return the proper Docker Image Registry Secret Names +*/}} +{{- define "minio.imagePullSecrets" -}} +{{/* +Helm 2.11 supports the assignment of a value to a variable defined in a different scope, +but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic. +Also, we can not use a single if because lazy evaluation is not an option +*/}} +{{- if .Values.global }} +{{- if .Values.global.imagePullSecrets }} +imagePullSecrets: +{{- range .Values.global.imagePullSecrets }} + - name: {{ . }} +{{- end }} +{{- else if .Values.imagePullSecrets }} +imagePullSecrets: + {{ toYaml .Values.imagePullSecrets }} +{{- end -}} +{{- else if .Values.imagePullSecrets }} +imagePullSecrets: + {{ toYaml .Values.imagePullSecrets }} +{{- end -}} +{{- end -}} + +{{/* +Formats volumeMount for MinIO TLS keys and trusted certs +*/}} +{{- define "minio.tlsKeysVolumeMount" -}} +{{- if .Values.tls.enabled }} +- name: cert-secret-volume + mountPath: {{ .Values.certsPath }} +{{- end }} +{{- if or .Values.tls.enabled (ne .Values.trustedCertsSecret "") }} +{{- $casPath := printf "%s/CAs" .Values.certsPath | clean }} +- name: trusted-cert-secret-volume + mountPath: {{ $casPath }} +{{- end }} +{{- end -}} + +{{/* +Formats volume for MinIO TLS keys and trusted certs +*/}} +{{- define "minio.tlsKeysVolume" -}} +{{- if .Values.tls.enabled }} +- name: cert-secret-volume + secret: + secretName: {{ tpl .Values.tls.certSecret $ }} + items: + - key: {{ .Values.tls.publicCrt }} + path: public.crt + - key: {{ .Values.tls.privateKey }} + path: private.key +{{- end }} +{{- if or .Values.tls.enabled (ne .Values.trustedCertsSecret "") }} +{{- $certSecret := eq .Values.trustedCertsSecret "" | ternary .Values.tls.certSecret .Values.trustedCertsSecret }} +{{- $publicCrt := eq .Values.trustedCertsSecret "" | ternary .Values.tls.publicCrt "" }} +- name: trusted-cert-secret-volume + secret: + secretName: {{ $certSecret }} + {{- if ne $publicCrt "" }} + items: + - key: {{ $publicCrt }} + path: public.crt + {{- end }} +{{- end }} +{{- end -}} + +{{/* +Returns the available value for certain key in an existing secret (if it exists), +otherwise it generates a random value. +*/}} +{{- define "minio.getValueFromSecret" }} + {{- $len := (default 16 .Length) | int -}} + {{- $obj := (lookup "v1" "Secret" .Namespace .Name).data -}} + {{- if $obj }} + {{- index $obj .Key | b64dec -}} + {{- else -}} + {{- randAlphaNum $len -}} + {{- end -}} +{{- end }} + +{{- define "minio.root.username" -}} + {{- if .Values.rootUser }} + {{- .Values.rootUser | toString }} + {{- else }} + {{- include "minio.getValueFromSecret" (dict "Namespace" .Release.Namespace "Name" (include "minio.fullname" .) "Length" 20 "Key" "rootUser") }} + {{- end }} +{{- end -}} + +{{- define "minio.root.password" -}} + {{- if .Values.rootPassword }} + {{- .Values.rootPassword | toString }} + {{- else }} + {{- include "minio.getValueFromSecret" (dict "Namespace" .Release.Namespace "Name" (include "minio.fullname" .) "Length" 40 "Key" "rootPassword") }} + {{- end }} +{{- end -}} diff --git a/packs/loki-3.7.4/charts/loki/charts/minio/templates/ciliumnetworkpolicy.yaml b/packs/loki-3.7.4/charts/loki/charts/minio/templates/ciliumnetworkpolicy.yaml new file mode 100644 index 00000000..1dc91bcf --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/charts/minio/templates/ciliumnetworkpolicy.yaml @@ -0,0 +1,33 @@ +{{- if and (.Values.networkPolicy.enabled) (eq .Values.networkPolicy.flavor "cilium") }} +kind: CiliumNetworkPolicy +apiVersion: cilium.io/v2 +metadata: + name: {{ template "minio.fullname" . }} + labels: + app: {{ template "minio.name" . }} + chart: {{ template "minio.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + endpointSelector: + matchLabels: + app: {{ template "minio.name" . }} + release: {{ .Release.Name }} + ingress: + - toPorts: + - ports: + - port: "{{ .Values.minioAPIPort }}" + protocol: TCP + - port: "{{ .Values.minioConsolePort }}" + protocol: TCP + {{- if not .Values.networkPolicy.allowExternal }} + fromEndpoints: + - matchLabels: + {{ template "minio.name" . }}-client: "true" + {{- end }} + egress: + {{- range $entity := .Values.networkPolicy.egressEntities }} + - toEntities: + - {{ $entity }} + {{- end }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/charts/minio/templates/configmap.yaml b/packs/loki-3.7.4/charts/loki/charts/minio/templates/configmap.yaml new file mode 100644 index 00000000..47f64cc2 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/charts/minio/templates/configmap.yaml @@ -0,0 +1,32 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "minio.fullname" . }} + labels: + app: {{ template "minio.name" . }} + chart: {{ template "minio.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +data: + initialize: |- + {{- include (print $.Template.BasePath "/_helper_create_bucket.txt") . | nindent 4 }} + add-user: |- + {{- include (print $.Template.BasePath "/_helper_create_user.txt") . | nindent 4 }} + add-policy: |- + {{- include (print $.Template.BasePath "/_helper_create_policy.txt") . | nindent 4 }} + {{- range $idx, $policy := .Values.policies }} + # Policy: {{ $policy.name }} + policy_{{ $idx }}.json: |- + {{- include (print $.Template.BasePath "/_helper_policy.tpl") . | nindent 4 }} + {{ end }} + {{- range $idx, $svc := .Values.svcaccts }} + {{- if $svc.policy }} + # SVC: {{ $svc.accessKey }} + svc_policy_{{ $idx }}.json: |- + {{- include (print $.Template.BasePath "/_helper_policy.tpl") .policy | nindent 4 }} + {{- end }} + {{- end }} + add-svcacct: |- + {{- include (print $.Template.BasePath "/_helper_create_svcacct.txt") . | nindent 4 }} + custom-command: |- + {{- include (print $.Template.BasePath "/_helper_custom_command.txt") . | nindent 4 }} diff --git a/packs/loki-3.7.4/charts/loki/charts/minio/templates/console-ingress.yaml b/packs/loki-3.7.4/charts/loki/charts/minio/templates/console-ingress.yaml new file mode 100644 index 00000000..79a2b1b5 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/charts/minio/templates/console-ingress.yaml @@ -0,0 +1,55 @@ +{{- if .Values.consoleIngress.enabled -}} +{{- $fullName := printf "%s-console" (include "minio.fullname" .) -}} +{{- $servicePort := .Values.consoleService.port -}} +{{- $ingressPath := .Values.consoleIngress.path -}} +apiVersion: {{ template "minio.consoleIngress.apiVersion" . }} +kind: Ingress +metadata: + name: {{ $fullName }} + labels: + app: {{ template "minio.name" . }} + chart: {{ template "minio.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + {{- with .Values.consoleIngress.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.consoleIngress.annotations }} + annotations: {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- if .Values.consoleIngress.ingressClassName }} + ingressClassName: {{ .Values.consoleIngress.ingressClassName }} + {{- end }} + {{- if .Values.consoleIngress.tls }} + tls: + {{- range .Values.consoleIngress.tls }} + - hosts: + {{- range .hosts }} + - {{ . | quote }} + {{- end }} + secretName: {{ .secretName }} + {{- end }} + {{- end }} + rules: + {{- range .Values.consoleIngress.hosts }} + - http: + paths: + - path: {{ $ingressPath }} + {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} + pathType: Prefix + backend: + service: + name: {{ $fullName }} + port: + number: {{ $servicePort }} + {{- else }} + backend: + serviceName: {{ $fullName }} + servicePort: {{ $servicePort }} + {{- end }} + {{- if . }} + host: {{ tpl . $ | quote }} + {{- end }} + {{- end }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/charts/minio/templates/console-service.yaml b/packs/loki-3.7.4/charts/loki/charts/minio/templates/console-service.yaml new file mode 100644 index 00000000..f09e3f3c --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/charts/minio/templates/console-service.yaml @@ -0,0 +1,45 @@ +{{ $scheme := .Values.tls.enabled | ternary "https" "http" }} +apiVersion: v1 +kind: Service +metadata: + name: {{ template "minio.fullname" . }}-console + labels: + app: {{ template "minio.name" . }} + chart: {{ template "minio.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + {{- if .Values.consoleService.annotations }} + annotations: {{- toYaml .Values.consoleService.annotations | nindent 4 }} + {{- end }} +spec: + type: {{ .Values.consoleService.type }} + {{- if and (eq .Values.consoleService.type "ClusterIP") .Values.consoleService.clusterIP }} + clusterIP: {{ .Values.consoleService.clusterIP }} + {{- end }} + {{- if or (eq .Values.consoleService.type "LoadBalancer") (eq .Values.consoleService.type "NodePort") }} + externalTrafficPolicy: {{ .Values.consoleService.externalTrafficPolicy | quote }} + {{- end }} + {{- if and (eq .Values.consoleService.type "LoadBalancer") .Values.consoleService.loadBalancerSourceRanges }} + loadBalancerSourceRanges: {{ .Values.consoleService.loadBalancerSourceRanges }} + {{ end }} + {{- if and (eq .Values.consoleService.type "LoadBalancer") (not (empty .Values.consoleService.loadBalancerIP)) }} + loadBalancerIP: {{ .Values.consoleService.loadBalancerIP }} + {{- end }} + ports: + - name: {{ $scheme }} + port: {{ .Values.consoleService.port }} + protocol: TCP + {{- if (and (eq .Values.consoleService.type "NodePort") ( .Values.consoleService.nodePort)) }} + nodePort: {{ .Values.consoleService.nodePort }} + {{- else }} + targetPort: {{ .Values.minioConsolePort }} + {{- end }} + {{- if .Values.consoleService.externalIPs }} + externalIPs: + {{- range $i , $ip := .Values.consoleService.externalIPs }} + - {{ $ip }} + {{- end }} + {{- end }} + selector: + app: {{ template "minio.name" . }} + release: {{ .Release.Name }} diff --git a/packs/loki-3.7.4/charts/loki/charts/minio/templates/deployment.yaml b/packs/loki-3.7.4/charts/loki/charts/minio/templates/deployment.yaml new file mode 100644 index 00000000..4c57010f --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/charts/minio/templates/deployment.yaml @@ -0,0 +1,213 @@ +{{- if eq .Values.mode "standalone" }} +{{ $scheme := .Values.tls.enabled | ternary "https" "http" }} +{{ $bucketRoot := or ($.Values.bucketRoot) ($.Values.mountPath) }} +apiVersion: {{ template "minio.deployment.apiVersion" . }} +kind: Deployment +metadata: + name: {{ template "minio.fullname" . }} + labels: + app: {{ template "minio.name" . }} + chart: {{ template "minio.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + {{- if .Values.additionalLabels }} + {{- toYaml .Values.additionalLabels | nindent 4 }} + {{- end }} + {{- if .Values.additionalAnnotations }} + annotations: {{- toYaml .Values.additionalAnnotations | nindent 4 }} + {{- end }} +spec: + strategy: + type: {{ .Values.deploymentUpdate.type }} + {{- if eq .Values.deploymentUpdate.type "RollingUpdate" }} + rollingUpdate: + maxSurge: {{ .Values.deploymentUpdate.maxSurge }} + maxUnavailable: {{ .Values.deploymentUpdate.maxUnavailable }} + {{- end }} + replicas: 1 + selector: + matchLabels: + app: {{ template "minio.name" . }} + release: {{ .Release.Name }} + template: + metadata: + name: {{ template "minio.fullname" . }} + labels: + app: {{ template "minio.name" . }} + release: {{ .Release.Name }} + {{- if .Values.podLabels }} + {{- toYaml .Values.podLabels | nindent 8 }} + {{- end }} + annotations: + {{- if not .Values.ignoreChartChecksums }} + checksum/secrets: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }} + checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} + {{- end }} + {{- if .Values.podAnnotations }} + {{- toYaml .Values.podAnnotations | trimSuffix "\n" | nindent 8 }} + {{- end }} + spec: + {{- if .Values.priorityClassName }} + priorityClassName: "{{ .Values.priorityClassName }}" + {{- end }} + {{- if .Values.runtimeClassName }} + runtimeClassName: "{{ .Values.runtimeClassName }}" + {{- end }} + {{- if and .Values.securityContext.enabled .Values.persistence.enabled }} + securityContext: + {{ omit .Values.securityContext "enabled" | toYaml | nindent 8 }} + {{- end }} + {{ if .Values.serviceAccount.create }} + serviceAccountName: {{ .Values.serviceAccount.name }} + {{- end }} + containers: + - name: {{ .Chart.Name }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + command: + - "/bin/sh" + - "-ce" + - "/usr/bin/docker-entrypoint.sh minio server {{ $bucketRoot }} -S {{ .Values.certsPath }} --address :{{ .Values.minioAPIPort }} --console-address :{{ .Values.minioConsolePort }} {{- template "minio.extraArgs" . }}" + volumeMounts: + - name: minio-user + mountPath: "/tmp/credentials" + readOnly: true + - name: export + mountPath: {{ .Values.mountPath }} + {{- if and .Values.persistence.enabled .Values.persistence.subPath }} + subPath: "{{ .Values.persistence.subPath }}" + {{- end }} + {{- if .Values.extraSecret }} + - name: extra-secret + mountPath: "/tmp/minio-config-env" + {{- end }} + {{- include "minio.tlsKeysVolumeMount" . | indent 12 }} + {{- if .Values.extraVolumeMounts }} + {{- toYaml .Values.extraVolumeMounts | nindent 12 }} + {{- end }} + ports: + - name: {{ $scheme }} + containerPort: {{ .Values.minioAPIPort }} + - name: {{ $scheme }}-console + containerPort: {{ .Values.minioConsolePort }} + env: + - name: MINIO_ROOT_USER + valueFrom: + secretKeyRef: + name: {{ template "minio.secretName" . }} + key: rootUser + - name: MINIO_ROOT_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "minio.secretName" . }} + key: rootPassword + {{- if .Values.extraSecret }} + - name: MINIO_CONFIG_ENV_FILE + value: "/tmp/minio-config-env/config.env" + {{- end }} + {{- if .Values.metrics.serviceMonitor.public }} + - name: MINIO_PROMETHEUS_AUTH_TYPE + value: "public" + {{- end }} + {{- if .Values.oidc.enabled }} + - name: MINIO_IDENTITY_OPENID_CONFIG_URL + value: {{ .Values.oidc.configUrl }} + - name: MINIO_IDENTITY_OPENID_CLIENT_ID + {{- if and .Values.oidc.existingClientSecretName .Values.oidc.existingClientIdKey }} + valueFrom: + secretKeyRef: + name: {{ .Values.oidc.existingClientSecretName }} + key: {{ .Values.oidc.existingClientIdKey }} + {{- else }} + value: {{ .Values.oidc.clientId }} + {{- end }} + - name: MINIO_IDENTITY_OPENID_CLIENT_SECRET + {{- if and .Values.oidc.existingClientSecretName .Values.oidc.existingClientSecretKey }} + valueFrom: + secretKeyRef: + name: {{ .Values.oidc.existingClientSecretName }} + key: {{ .Values.oidc.existingClientSecretKey }} + {{- else }} + value: {{ .Values.oidc.clientSecret }} + {{- end }} + - name: MINIO_IDENTITY_OPENID_CLAIM_NAME + value: {{ .Values.oidc.claimName }} + - name: MINIO_IDENTITY_OPENID_CLAIM_PREFIX + value: {{ .Values.oidc.claimPrefix }} + - name: MINIO_IDENTITY_OPENID_SCOPES + value: {{ .Values.oidc.scopes }} + - name: MINIO_IDENTITY_OPENID_COMMENT + value: {{ .Values.oidc.comment }} + - name: MINIO_IDENTITY_OPENID_REDIRECT_URI + value: {{ .Values.oidc.redirectUri }} + - name: MINIO_IDENTITY_OPENID_DISPLAY_NAME + value: {{ .Values.oidc.displayName }} + {{- end }} + {{- if .Values.etcd.endpoints }} + - name: MINIO_ETCD_ENDPOINTS + value: {{ join "," .Values.etcd.endpoints | quote }} + {{- if .Values.etcd.clientCert }} + - name: MINIO_ETCD_CLIENT_CERT + value: "/tmp/credentials/etcd_client_cert.pem" + {{- end }} + {{- if .Values.etcd.clientCertKey }} + - name: MINIO_ETCD_CLIENT_CERT_KEY + value: "/tmp/credentials/etcd_client_cert_key.pem" + {{- end }} + {{- if .Values.etcd.pathPrefix }} + - name: MINIO_ETCD_PATH_PREFIX + value: {{ .Values.etcd.pathPrefix }} + {{- end }} + {{- if .Values.etcd.corednsPathPrefix }} + - name: MINIO_ETCD_COREDNS_PATH + value: {{ .Values.etcd.corednsPathPrefix }} + {{- end }} + {{- end }} + {{- range $key, $val := .Values.environment }} + - name: {{ $key }} + value: {{ tpl $val $ | quote }} + {{- end }} + resources: {{- toYaml .Values.resources | nindent 12 }} + {{- if and .Values.securityContext.enabled .Values.persistence.enabled }} + {{- with .Values.containerSecurityContext }} + securityContext: {{ toYaml . | nindent 12}} + {{- end }} + {{- end }} + {{- with .Values.extraContainers }} + {{- if eq (typeOf .) "string" }} + {{- tpl . $ | nindent 8 }} + {{- else }} + {{- toYaml . | nindent 8 }} + {{- end }} + {{- end }} + {{- with .Values.nodeSelector }} + nodeSelector: {{- toYaml . | nindent 8 }} + {{- end }} + {{- include "minio.imagePullSecrets" . | indent 6 }} + {{- with .Values.affinity }} + affinity: {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: {{- toYaml . | nindent 8 }} + {{- end }} + volumes: + - name: export + {{- if .Values.persistence.enabled }} + persistentVolumeClaim: + claimName: {{ .Values.persistence.existingClaim | default (include "minio.fullname" .) }} + {{- else }} + emptyDir: {} + {{- end }} + {{- if .Values.extraSecret }} + - name: extra-secret + secret: + secretName: {{ .Values.extraSecret }} + {{- end }} + - name: minio-user + secret: + secretName: {{ template "minio.secretName" . }} + {{- include "minio.tlsKeysVolume" . | indent 8 }} + {{- if .Values.extraVolumes }} + {{ toYaml .Values.extraVolumes | nindent 8 }} + {{- end }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/charts/minio/templates/ingress.yaml b/packs/loki-3.7.4/charts/loki/charts/minio/templates/ingress.yaml new file mode 100644 index 00000000..1a564c6b --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/charts/minio/templates/ingress.yaml @@ -0,0 +1,55 @@ +{{- if .Values.ingress.enabled -}} +{{- $fullName := include "minio.fullname" . -}} +{{- $servicePort := .Values.service.port -}} +{{- $ingressPath := .Values.ingress.path -}} +apiVersion: {{ template "minio.ingress.apiVersion" . }} +kind: Ingress +metadata: + name: {{ $fullName }} + labels: + app: {{ template "minio.name" . }} + chart: {{ template "minio.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + {{- with .Values.ingress.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.ingress.annotations }} + annotations: {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- if .Values.ingress.ingressClassName }} + ingressClassName: {{ .Values.ingress.ingressClassName }} + {{- end }} + {{- if .Values.ingress.tls }} + tls: + {{- range .Values.ingress.tls }} + - hosts: + {{- range .hosts }} + - {{ . | quote }} + {{- end }} + secretName: {{ .secretName }} + {{- end }} + {{- end }} + rules: + {{- range .Values.ingress.hosts }} + - http: + paths: + - path: {{ $ingressPath }} + {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} + pathType: Prefix + backend: + service: + name: {{ $fullName }} + port: + number: {{ $servicePort }} + {{- else }} + backend: + serviceName: {{ $fullName }} + servicePort: {{ $servicePort }} + {{- end }} + {{- if . }} + host: {{ tpl . $ | quote }} + {{- end }} + {{- end }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/charts/minio/templates/networkpolicy.yaml b/packs/loki-3.7.4/charts/loki/charts/minio/templates/networkpolicy.yaml new file mode 100644 index 00000000..b9c07717 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/charts/minio/templates/networkpolicy.yaml @@ -0,0 +1,26 @@ +{{- if and (.Values.networkPolicy.enabled) (eq .Values.networkPolicy.flavor "kubernetes") }} +kind: NetworkPolicy +apiVersion: {{ template "minio.networkPolicy.apiVersion" . }} +metadata: + name: {{ template "minio.fullname" . }} + labels: + app: {{ template "minio.name" . }} + chart: {{ template "minio.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + podSelector: + matchLabels: + app: {{ template "minio.name" . }} + release: {{ .Release.Name }} + ingress: + - ports: + - port: {{ .Values.minioAPIPort }} + - port: {{ .Values.minioConsolePort }} + {{- if not .Values.networkPolicy.allowExternal }} + from: + - podSelector: + matchLabels: + {{ template "minio.name" . }}-client: "true" + {{- end }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/charts/minio/templates/poddisruptionbudget.yaml b/packs/loki-3.7.4/charts/loki/charts/minio/templates/poddisruptionbudget.yaml new file mode 100644 index 00000000..a5f90a08 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/charts/minio/templates/poddisruptionbudget.yaml @@ -0,0 +1,17 @@ +{{- if .Values.podDisruptionBudget.enabled }} +{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodDisruptionBudget" }} +apiVersion: policy/v1beta1 +{{- else }} +apiVersion: policy/v1 +{{- end }} +kind: PodDisruptionBudget +metadata: + name: minio + labels: + app: {{ template "minio.name" . }} +spec: + maxUnavailable: {{ .Values.podDisruptionBudget.maxUnavailable }} + selector: + matchLabels: + app: {{ template "minio.name" . }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/charts/minio/templates/post-job.yaml b/packs/loki-3.7.4/charts/loki/charts/minio/templates/post-job.yaml new file mode 100644 index 00000000..955d6558 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/charts/minio/templates/post-job.yaml @@ -0,0 +1,258 @@ +{{- if or .Values.buckets .Values.users .Values.policies .Values.customCommands .Values.svcaccts }} +apiVersion: batch/v1 +kind: Job +metadata: + name: {{ template "minio.fullname" . }}-post-job + labels: + app: {{ template "minio.name" . }}-post-job + chart: {{ template "minio.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + annotations: + "helm.sh/hook": post-install,post-upgrade + "helm.sh/hook-delete-policy": hook-succeeded,before-hook-creation + {{- with .Values.postJob.annotations }} + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + template: + metadata: + labels: + app: {{ template "minio.name" . }}-job + release: {{ .Release.Name }} + {{- if .Values.podLabels }} + {{- toYaml .Values.podLabels | nindent 8 }} + {{- end }} + {{- if .Values.postJob.podAnnotations }} + annotations: {{- toYaml .Values.postJob.podAnnotations | nindent 8 }} + {{- end }} + spec: + restartPolicy: OnFailure + {{- include "minio.imagePullSecrets" . | indent 6 }} + {{- if .Values.nodeSelector }} + nodeSelector: {{- toYaml .Values.postJob.nodeSelector | nindent 8 }} + {{- end }} + {{- with .Values.postJob.affinity }} + affinity: {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.postJob.tolerations }} + tolerations: {{- toYaml . | nindent 8 }} + {{- end }} + {{- if .Values.postJob.securityContext.enabled }} + securityContext: {{ omit .Values.postJob.securityContext "enabled" | toYaml | nindent 12 }} + {{- end }} + volumes: + - name: etc-path + emptyDir: {} + - name: tmp + emptyDir: {} + - name: minio-configuration + projected: + sources: + - configMap: + name: {{ template "minio.fullname" . }} + - secret: + name: {{ template "minio.secretName" . }} + {{- range (concat .Values.users (default (list) .Values.svcaccts)) }} + {{- if .existingSecret }} + - secret: + name: {{ tpl .existingSecret $ }} + items: + - key: {{ .existingSecretKey }} + path: secrets/{{ tpl .existingSecret $ }}/{{ tpl .existingSecretKey $ }} + {{- end }} + {{- end }} + {{- range ( default list .Values.svcaccts ) }} + {{- if .existingSecret }} + - secret: + name: {{ tpl .existingSecret $ }} + items: + - key: {{ .existingSecretKey }} + path: secrets-svc/{{ tpl .existingSecret $ }}/{{ tpl .existingSecretKey $ }} + {{- end }} + {{- end }} + {{- if .Values.tls.enabled }} + - name: cert-secret-volume-mc + secret: + secretName: {{ .Values.tls.certSecret }} + items: + - key: {{ .Values.tls.publicCrt }} + path: CAs/public.crt + {{- end }} + {{- if .Values.customCommandJob.extraVolumes }} + {{- toYaml .Values.customCommandJob.extraVolumes | nindent 8 }} + {{- end }} + {{- if .Values.serviceAccount.create }} + serviceAccountName: {{ .Values.serviceAccount.name }} + {{- end }} + {{- if .Values.policies }} + initContainers: + - name: minio-make-policy + image: "{{ .Values.mcImage.repository }}:{{ .Values.mcImage.tag }}" + {{- if .Values.makePolicyJob.securityContext.enabled }} + {{- with .Values.makePolicyJob.containerSecurityContext }} + securityContext: {{ toYaml . | nindent 12 }} + {{- end }} + {{- end }} + imagePullPolicy: {{ .Values.mcImage.pullPolicy }} + {{- if .Values.makePolicyJob.exitCommand }} + command: [ "/bin/sh", "-c" ] + args: [ "/bin/sh /config/add-policy; EV=$?; {{ .Values.makePolicyJob.exitCommand }} && exit $EV" ] + {{- else }} + command: [ "/bin/sh", "/config/add-policy" ] + {{- end }} + env: + - name: MINIO_ENDPOINT + value: {{ template "minio.fullname" . }} + - name: MINIO_PORT + value: {{ .Values.service.port | quote }} + volumeMounts: + - name: etc-path + mountPath: /etc/minio/mc + - name: tmp + mountPath: /tmp + - name: minio-configuration + mountPath: /config + {{- if .Values.tls.enabled }} + - name: cert-secret-volume-mc + mountPath: {{ .Values.configPathmc }}certs + {{- end }} + resources: {{- toYaml .Values.makePolicyJob.resources | nindent 12 }} + {{- end }} + containers: + {{- if .Values.buckets }} + - name: minio-make-bucket + image: "{{ .Values.mcImage.repository }}:{{ .Values.mcImage.tag }}" + {{- if .Values.makeBucketJob.securityContext.enabled }} + {{- with .Values.makeBucketJob.containerSecurityContext }} + securityContext: {{ toYaml . | nindent 12 }} + {{- end }} + {{- end }} + imagePullPolicy: {{ .Values.mcImage.pullPolicy }} + {{- if .Values.makeBucketJob.exitCommand }} + command: [ "/bin/sh", "-c" ] + args: [ "/bin/sh /config/initialize; EV=$?; {{ .Values.makeBucketJob.exitCommand }} && exit $EV" ] + {{- else }} + command: [ "/bin/sh", "/config/initialize" ] + {{- end }} + env: + - name: MINIO_ENDPOINT + value: {{ template "minio.fullname" . }} + - name: MINIO_PORT + value: {{ .Values.service.port | quote }} + volumeMounts: + - name: etc-path + mountPath: /etc/minio/mc + - name: tmp + mountPath: /tmp + - name: minio-configuration + mountPath: /config + {{- if .Values.tls.enabled }} + - name: cert-secret-volume-mc + mountPath: {{ .Values.configPathmc }}certs + {{- end }} + resources: {{- toYaml .Values.makeBucketJob.resources | nindent 12 }} + {{- end }} + {{- if .Values.users }} + - name: minio-make-user + image: "{{ .Values.mcImage.repository }}:{{ .Values.mcImage.tag }}" + {{- if .Values.makeUserJob.securityContext.enabled }} + {{- with .Values.makeUserJob.containerSecurityContext }} + securityContext: {{ toYaml . | nindent 12 }} + {{- end }} + {{- end }} + imagePullPolicy: {{ .Values.mcImage.pullPolicy }} + {{- if .Values.makeUserJob.exitCommand }} + command: [ "/bin/sh", "-c" ] + args: [ "/bin/sh /config/add-user; EV=$?; {{ .Values.makeUserJob.exitCommand }} && exit $EV" ] + {{- else }} + command: [ "/bin/sh", "/config/add-user" ] + {{- end }} + env: + - name: MINIO_ENDPOINT + value: {{ template "minio.fullname" . }} + - name: MINIO_PORT + value: {{ .Values.service.port | quote }} + volumeMounts: + - name: etc-path + mountPath: /etc/minio/mc + - name: tmp + mountPath: /tmp + - name: minio-configuration + mountPath: /config + {{- if .Values.tls.enabled }} + - name: cert-secret-volume-mc + mountPath: {{ .Values.configPathmc }}certs + {{- end }} + resources: {{- toYaml .Values.makeUserJob.resources | nindent 12 }} + {{- end }} + {{- if .Values.customCommands }} + - name: minio-custom-command + image: "{{ .Values.mcImage.repository }}:{{ .Values.mcImage.tag }}" + {{- if .Values.customCommandJob.securityContext.enabled }} + {{- with .Values.customCommandJob.containerSecurityContext }} + securityContext: {{ toYaml . | nindent 12 }} + {{- end }} + {{- end }} + imagePullPolicy: {{ .Values.mcImage.pullPolicy }} + {{- if .Values.customCommandJob.exitCommand }} + command: [ "/bin/sh", "-c" ] + args: [ "/bin/sh /config/custom-command; EV=$?; {{ .Values.customCommandJob.exitCommand }} && exit $EV" ] + {{- else }} + command: [ "/bin/sh", "/config/custom-command" ] + {{- end }} + env: + - name: MINIO_ENDPOINT + value: {{ template "minio.fullname" . }} + - name: MINIO_PORT + value: {{ .Values.service.port | quote }} + volumeMounts: + - name: etc-path + mountPath: /etc/minio/mc + - name: tmp + mountPath: /tmp + - name: minio-configuration + mountPath: /config + {{- if .Values.tls.enabled }} + - name: cert-secret-volume-mc + mountPath: {{ .Values.configPathmc }}certs + {{- end }} + {{- if .Values.customCommandJob.extraVolumeMounts }} + {{- toYaml .Values.customCommandJob.extraVolumeMounts | nindent 12 }} + {{- end }} + resources: {{- toYaml .Values.customCommandJob.resources | nindent 12 }} + {{- end }} + {{- if .Values.svcaccts }} + - name: minio-make-svcacct + image: "{{ .Values.mcImage.repository }}:{{ .Values.mcImage.tag }}" + {{- if .Values.makeServiceAccountJob.securityContext.enabled }} + {{- with .Values.makeServiceAccountJob.containerSecurityContext }} + securityContext: {{ toYaml . | nindent 12 }} + {{- end }} + {{- end }} + imagePullPolicy: {{ .Values.mcImage.pullPolicy }} + {{- if .Values.makeServiceAccountJob.exitCommand }} + command: [ "/bin/sh", "-c" ] + args: ["/bin/sh /config/add-svcacct; EV=$?; {{ .Values.makeServiceAccountJob.exitCommand }} && exit $EV" ] + {{- else }} + command: ["/bin/sh", "/config/add-svcacct"] + {{- end }} + env: + - name: MINIO_ENDPOINT + value: {{ template "minio.fullname" . }} + - name: MINIO_PORT + value: {{ .Values.service.port | quote }} + volumeMounts: + - name: etc-path + mountPath: /etc/minio/mc + - name: tmp + mountPath: /tmp + - name: minio-configuration + mountPath: /config + {{- if .Values.tls.enabled }} + - name: cert-secret-volume-mc + mountPath: {{ .Values.configPathmc }}certs + {{- end }} + resources: {{- toYaml .Values.makeServiceAccountJob.resources | nindent 12 }} + {{- end }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/charts/minio/templates/pvc.yaml b/packs/loki-3.7.4/charts/loki/charts/minio/templates/pvc.yaml new file mode 100644 index 00000000..60f5267b --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/charts/minio/templates/pvc.yaml @@ -0,0 +1,32 @@ +{{- if eq .Values.mode "standalone" }} +{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) }} +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: {{ template "minio.fullname" . }} + labels: + app: {{ template "minio.name" . }} + chart: {{ template "minio.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + {{- if .Values.persistence.annotations }} + annotations: {{- toYaml .Values.persistence.annotations | nindent 4 }} + {{- end }} +spec: + accessModes: + - {{ .Values.persistence.accessMode | quote }} + resources: + requests: + storage: {{ .Values.persistence.size | quote }} + {{- if .Values.persistence.storageClass }} + {{- if (eq "-" .Values.persistence.storageClass) }} + storageClassName: "" + {{- else }} + storageClassName: "{{ .Values.persistence.storageClass }}" + {{- end }} + {{- end }} + {{- if .Values.persistence.volumeName }} + volumeName: "{{ .Values.persistence.volumeName }}" + {{- end }} +{{- end }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/charts/minio/templates/secrets.yaml b/packs/loki-3.7.4/charts/loki/charts/minio/templates/secrets.yaml new file mode 100644 index 00000000..476c3da5 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/charts/minio/templates/secrets.yaml @@ -0,0 +1,21 @@ +{{- if not .Values.existingSecret }} +apiVersion: v1 +kind: Secret +metadata: + name: {{ template "minio.secretName" . }} + labels: + app: {{ template "minio.name" . }} + chart: {{ template "minio.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +type: Opaque +data: + rootUser: {{ include "minio.root.username" . | b64enc | quote }} + rootPassword: {{ include "minio.root.password" . | b64enc | quote }} + {{- if .Values.etcd.clientCert }} + etcd_client.crt: {{ .Values.etcd.clientCert | toString | b64enc | quote }} + {{- end }} + {{- if .Values.etcd.clientCertKey }} + etcd_client.key: {{ .Values.etcd.clientCertKey | toString | b64enc | quote }} + {{- end }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/charts/minio/templates/securitycontextconstraints.yaml b/packs/loki-3.7.4/charts/loki/charts/minio/templates/securitycontextconstraints.yaml new file mode 100644 index 00000000..4bac7e37 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/charts/minio/templates/securitycontextconstraints.yaml @@ -0,0 +1,45 @@ +{{- if and .Values.securityContext.enabled .Values.persistence.enabled (.Capabilities.APIVersions.Has "security.openshift.io/v1") }} +apiVersion: security.openshift.io/v1 +kind: SecurityContextConstraints +metadata: + name: {{ template "minio.fullname" . }} + labels: + app: {{ template "minio.name" . }} + chart: {{ template "minio.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +allowHostDirVolumePlugin: false +allowHostIPC: false +allowHostNetwork: false +allowHostPID: false +allowHostPorts: false +allowPrivilegeEscalation: true +allowPrivilegedContainer: false +allowedCapabilities: [] +readOnlyRootFilesystem: false +defaultAddCapabilities: [] +requiredDropCapabilities: +- KILL +- MKNOD +- SETUID +- SETGID +fsGroup: + type: MustRunAs + ranges: + - max: {{ .Values.securityContext.fsGroup }} + min: {{ .Values.securityContext.fsGroup }} +runAsUser: + type: MustRunAs + uid: {{ .Values.securityContext.runAsUser }} +seLinuxContext: + type: MustRunAs +supplementalGroups: + type: RunAsAny +volumes: +- configMap +- downwardAPI +- emptyDir +- persistentVolumeClaim +- projected +- secret +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/charts/minio/templates/service.yaml b/packs/loki-3.7.4/charts/loki/charts/minio/templates/service.yaml new file mode 100644 index 00000000..d872cd07 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/charts/minio/templates/service.yaml @@ -0,0 +1,46 @@ +{{ $scheme := .Values.tls.enabled | ternary "https" "http" }} +apiVersion: v1 +kind: Service +metadata: + name: {{ template "minio.fullname" . }} + labels: + app: {{ template "minio.name" . }} + chart: {{ template "minio.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + monitoring: "true" + {{- if .Values.service.annotations }} + annotations: {{- toYaml .Values.service.annotations | nindent 4 }} + {{- end }} +spec: + type: {{ .Values.service.type }} + {{- if and (eq .Values.service.type "ClusterIP") .Values.service.clusterIP }} + clusterIP: {{ .Values.service.clusterIP }} + {{- end }} + {{- if or (eq .Values.service.type "LoadBalancer") (eq .Values.service.type "NodePort") }} + externalTrafficPolicy: {{ .Values.service.externalTrafficPolicy | quote }} + {{- end }} + {{- if and (eq .Values.service.type "LoadBalancer") .Values.service.loadBalancerSourceRanges }} + loadBalancerSourceRanges: {{ .Values.service.loadBalancerSourceRanges }} + {{ end }} + {{- if and (eq .Values.service.type "LoadBalancer") (not (empty .Values.service.loadBalancerIP)) }} + loadBalancerIP: {{ default "" .Values.service.loadBalancerIP | quote }} + {{- end }} + ports: + - name: {{ $scheme }} + port: {{ .Values.service.port }} + protocol: TCP + {{- if (and (eq .Values.service.type "NodePort") ( .Values.service.nodePort)) }} + nodePort: {{ .Values.service.nodePort }} + {{- else }} + targetPort: {{ .Values.minioAPIPort }} + {{- end }} + {{- if .Values.service.externalIPs }} + externalIPs: + {{- range $i , $ip := .Values.service.externalIPs }} + - {{ $ip }} + {{- end }} + {{- end }} + selector: + app: {{ template "minio.name" . }} + release: {{ .Release.Name }} diff --git a/packs/loki-3.7.4/charts/loki/charts/minio/templates/serviceaccount.yaml b/packs/loki-3.7.4/charts/loki/charts/minio/templates/serviceaccount.yaml new file mode 100644 index 00000000..07840153 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/charts/minio/templates/serviceaccount.yaml @@ -0,0 +1,6 @@ +{{- if .Values.serviceAccount.create }} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ .Values.serviceAccount.name | quote }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/charts/minio/templates/servicemonitor.yaml b/packs/loki-3.7.4/charts/loki/charts/minio/templates/servicemonitor.yaml new file mode 100644 index 00000000..f875a850 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/charts/minio/templates/servicemonitor.yaml @@ -0,0 +1,112 @@ +{{- if and .Values.metrics.serviceMonitor.enabled .Values.metrics.serviceMonitor.includeNode }} +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: {{ template "minio.fullname" . }} + {{- if .Values.metrics.serviceMonitor.namespace }} + namespace: {{ .Values.metrics.serviceMonitor.namespace }} + {{- end }} + labels: + app: {{ template "minio.name" . }} + chart: {{ template "minio.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + {{- if .Values.metrics.serviceMonitor.additionalLabels }} + {{- toYaml .Values.metrics.serviceMonitor.additionalLabels | nindent 4 }} + {{- end }} + {{- if .Values.metrics.serviceMonitor.annotations }} + annotations: {{- toYaml .Values.metrics.serviceMonitor.annotations | nindent 4 }} + {{- end }} +spec: + endpoints: + {{- if .Values.tls.enabled }} + - port: https + scheme: https + tlsConfig: + ca: + secret: + name: {{ .Values.tls.certSecret }} + key: {{ .Values.tls.publicCrt }} + serverName: {{ template "minio.fullname" . }} + {{- else }} + - port: http + scheme: http + {{- end }} + path: /minio/v2/metrics/node + {{- if .Values.metrics.serviceMonitor.interval }} + interval: {{ .Values.metrics.serviceMonitor.interval }} + {{- end }} + {{- if .Values.metrics.serviceMonitor.scrapeTimeout }} + scrapeTimeout: {{ .Values.metrics.serviceMonitor.scrapeTimeout }} + {{- end }} + {{- if .Values.metrics.serviceMonitor.relabelConfigs }} + {{- toYaml .Values.metrics.serviceMonitor.relabelConfigs | nindent 6 }} + {{- end }} + {{- if not .Values.metrics.serviceMonitor.public }} + bearerTokenSecret: + name: {{ template "minio.fullname" . }}-prometheus + key: token + {{- end }} + namespaceSelector: + matchNames: + - {{ .Release.Namespace | quote }} + selector: + matchLabels: + app: {{ include "minio.name" . }} + release: {{ .Release.Name }} + monitoring: "true" +{{- end }} +{{- if .Values.metrics.serviceMonitor.enabled }} +--- +apiVersion: monitoring.coreos.com/v1 +kind: Probe +metadata: + name: {{ template "minio.fullname" . }}-cluster + {{- if .Values.metrics.serviceMonitor.namespace }} + namespace: {{ .Values.metrics.serviceMonitor.namespace }} + {{- end }} + labels: + app: {{ template "minio.name" . }} + chart: {{ template "minio.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + {{- if .Values.metrics.serviceMonitor.additionalLabels }} + {{- toYaml .Values.metrics.serviceMonitor.additionalLabels | nindent 4 }} + {{- end }} +spec: + jobName: {{ template "minio.fullname" . }} + {{- if .Values.tls.enabled }} + tlsConfig: + ca: + secret: + name: {{ .Values.tls.certSecret }} + key: {{ .Values.tls.publicCrt }} + serverName: {{ template "minio.fullname" . }} + {{- end }} + prober: + url: {{ template "minio.fullname" . }}.{{ .Release.Namespace }}:{{ .Values.service.port }} + path: /minio/v2/metrics/cluster + {{- if .Values.tls.enabled }} + scheme: https + {{- else }} + scheme: http + {{- end }} + {{- if .Values.metrics.serviceMonitor.relabelConfigsCluster }} + {{- toYaml .Values.metrics.serviceMonitor.relabelConfigsCluster | nindent 2 }} + {{- end }} + targets: + staticConfig: + static: + - {{ template "minio.fullname" . }}.{{ .Release.Namespace }} + {{- if not .Values.metrics.serviceMonitor.public }} + {{- if .Values.metrics.serviceMonitor.interval }} + interval: {{ .Values.metrics.serviceMonitor.interval }} + {{- end }} + {{- if .Values.metrics.serviceMonitor.scrapeTimeout }} + scrapeTimeout: {{ .Values.metrics.serviceMonitor.scrapeTimeout }} + {{- end }} + bearerTokenSecret: + name: {{ template "minio.fullname" . }}-prometheus + key: token + {{- end }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/charts/minio/templates/statefulset.yaml b/packs/loki-3.7.4/charts/loki/charts/minio/templates/statefulset.yaml new file mode 100644 index 00000000..d671eaaf --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/charts/minio/templates/statefulset.yaml @@ -0,0 +1,267 @@ +{{- if eq .Values.mode "distributed" }} +{{ $poolCount := .Values.pools | int }} +{{ $nodeCount := .Values.replicas | int }} +{{ $replicas := mul $poolCount $nodeCount }} +{{ $drivesPerNode := .Values.drivesPerNode | int }} +{{ $scheme := .Values.tls.enabled | ternary "https" "http" }} +{{ $mountPath := .Values.mountPath }} +{{ $bucketRoot := or ($.Values.bucketRoot) ($.Values.mountPath) }} +{{ $subPath := .Values.persistence.subPath }} +{{ $penabled := .Values.persistence.enabled }} +{{ $accessMode := .Values.persistence.accessMode }} +{{ $storageClass := .Values.persistence.storageClass }} +{{ $psize := .Values.persistence.size }} +apiVersion: v1 +kind: Service +metadata: + name: {{ template "minio.fullname" . }}-svc + labels: + app: {{ template "minio.name" . }} + chart: {{ template "minio.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + publishNotReadyAddresses: true + clusterIP: None + ports: + - name: {{ $scheme }} + port: {{ .Values.service.port }} + protocol: TCP + targetPort: {{ .Values.minioAPIPort }} + selector: + app: {{ template "minio.name" . }} + release: {{ .Release.Name }} +--- +apiVersion: {{ template "minio.statefulset.apiVersion" . }} +kind: StatefulSet +metadata: + name: {{ template "minio.fullname" . }} + labels: + app: {{ template "minio.name" . }} + chart: {{ template "minio.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + {{- if .Values.additionalLabels }} + {{- toYaml .Values.additionalLabels | nindent 4 }} + {{- end }} + {{- if .Values.additionalAnnotations }} + annotations: {{- toYaml .Values.additionalAnnotations | nindent 4 }} + {{- end }} +spec: + updateStrategy: + type: {{ .Values.statefulSetUpdate.updateStrategy }} + podManagementPolicy: "Parallel" + serviceName: {{ template "minio.fullname" . }}-svc + replicas: {{ $replicas }} + selector: + matchLabels: + app: {{ template "minio.name" . }} + release: {{ .Release.Name }} + template: + metadata: + name: {{ template "minio.fullname" . }} + labels: + app: {{ template "minio.name" . }} + release: {{ .Release.Name }} + {{- if .Values.podLabels }} + {{- toYaml .Values.podLabels | nindent 8 }} + {{- end }} + annotations: + {{- if not .Values.ignoreChartChecksums }} + checksum/secrets: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }} + checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} + {{- end }} + {{- if .Values.podAnnotations }} + {{- toYaml .Values.podAnnotations | nindent 8 }} + {{- end }} + spec: + {{- if .Values.priorityClassName }} + priorityClassName: "{{ .Values.priorityClassName }}" + {{- end }} + {{- if .Values.runtimeClassName }} + runtimeClassName: "{{ .Values.runtimeClassName }}" + {{- end }} + {{- if and .Values.securityContext.enabled .Values.persistence.enabled }} + securityContext: + {{- omit .Values.securityContext "enabled" | toYaml | nindent 8 }} + {{- end }} + {{- if .Values.serviceAccount.create }} + serviceAccountName: {{ .Values.serviceAccount.name }} + {{- end }} + containers: + - name: {{ .Chart.Name }} + image: {{ .Values.image.repository }}:{{ .Values.image.tag }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + command: [ + "/bin/sh", + "-ce", + "/usr/bin/docker-entrypoint.sh minio server {{- range $i := until $poolCount }}{{ $factor := mul $i $nodeCount }}{{ $endIndex := add $factor $nodeCount }}{{ $beginIndex := mul $i $nodeCount }} {{ $scheme }}://{{ template `minio.fullname` $ }}-{{ `{` }}{{ $beginIndex }}...{{ sub $endIndex 1 }}{{ `}`}}.{{ template `minio.fullname` $ }}-svc.{{ $.Release.Namespace }}.svc{{if (gt $drivesPerNode 1)}}{{ $bucketRoot }}-{{ `{` }}0...{{ sub $drivesPerNode 1 }}{{ `}` }}{{ else }}{{ $bucketRoot }}{{end }}{{- end }} -S {{ .Values.certsPath }} --address :{{ .Values.minioAPIPort }} --console-address :{{ .Values.minioConsolePort }} {{- template `minio.extraArgs` . }}" + ] + volumeMounts: + {{- if $penabled }} + {{- if (gt $drivesPerNode 1) }} + {{- range $i := until $drivesPerNode }} + - name: export-{{ $i }} + mountPath: {{ $mountPath }}-{{ $i }} + {{- if and $penabled $subPath }} + subPath: {{ $subPath }} + {{- end }} + {{- end }} + {{- else }} + - name: export + mountPath: {{ $mountPath }} + {{- if and $penabled $subPath }} + subPath: {{ $subPath }} + {{- end }} + {{- end }} + {{- end }} + {{- if .Values.extraSecret }} + - name: extra-secret + mountPath: "/tmp/minio-config-env" + {{- end }} + {{- include "minio.tlsKeysVolumeMount" . | indent 12 }} + {{- if .Values.extraVolumeMounts }} + {{- toYaml .Values.extraVolumeMounts | nindent 12 }} + {{- end }} + ports: + - name: {{ $scheme }} + containerPort: {{ .Values.minioAPIPort }} + - name: {{ $scheme }}-console + containerPort: {{ .Values.minioConsolePort }} + env: + - name: MINIO_ROOT_USER + valueFrom: + secretKeyRef: + name: {{ template "minio.secretName" . }} + key: rootUser + - name: MINIO_ROOT_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "minio.secretName" . }} + key: rootPassword + {{- if .Values.extraSecret }} + - name: MINIO_CONFIG_ENV_FILE + value: "/tmp/minio-config-env/config.env" + {{- end }} + {{- if .Values.metrics.serviceMonitor.public }} + - name: MINIO_PROMETHEUS_AUTH_TYPE + value: "public" + {{- end }} + {{- if .Values.oidc.enabled }} + - name: MINIO_IDENTITY_OPENID_CONFIG_URL + value: {{ .Values.oidc.configUrl }} + - name: MINIO_IDENTITY_OPENID_CLIENT_ID + {{- if and .Values.oidc.existingClientSecretName .Values.oidc.existingClientIdKey }} + valueFrom: + secretKeyRef: + name: {{ .Values.oidc.existingClientSecretName }} + key: {{ .Values.oidc.existingClientIdKey }} + {{- else }} + value: {{ .Values.oidc.clientId }} + {{- end }} + - name: MINIO_IDENTITY_OPENID_CLIENT_SECRET + {{- if and .Values.oidc.existingClientSecretName .Values.oidc.existingClientSecretKey }} + valueFrom: + secretKeyRef: + name: {{ .Values.oidc.existingClientSecretName }} + key: {{ .Values.oidc.existingClientSecretKey }} + {{- else }} + value: {{ .Values.oidc.clientSecret }} + {{- end }} + - name: MINIO_IDENTITY_OPENID_CLAIM_NAME + value: {{ .Values.oidc.claimName }} + - name: MINIO_IDENTITY_OPENID_CLAIM_PREFIX + value: {{ .Values.oidc.claimPrefix }} + - name: MINIO_IDENTITY_OPENID_SCOPES + value: {{ .Values.oidc.scopes }} + - name: MINIO_IDENTITY_OPENID_COMMENT + value: {{ .Values.oidc.comment }} + - name: MINIO_IDENTITY_OPENID_REDIRECT_URI + value: {{ .Values.oidc.redirectUri }} + - name: MINIO_IDENTITY_OPENID_DISPLAY_NAME + value: {{ .Values.oidc.displayName }} + {{- end }} + {{- range $key, $val := .Values.environment }} + - name: {{ $key }} + value: {{ tpl $val $ | quote }} + {{- end }} + resources: {{- toYaml .Values.resources | nindent 12 }} + {{- if and .Values.securityContext.enabled .Values.persistence.enabled }} + {{- with .Values.containerSecurityContext }} + securityContext: {{ toYaml . | nindent 12}} + {{- end }} + {{- end }} + {{- with .Values.extraContainers }} + {{- if eq (typeOf .) "string" }} + {{- tpl . $ | nindent 8 }} + {{- else }} + {{- toYaml . | nindent 8 }} + {{- end }} + {{- end }} + {{- with .Values.nodeSelector }} + nodeSelector: {{- toYaml . | nindent 8 }} + {{- end }} + {{- include "minio.imagePullSecrets" . | indent 6 }} + {{- with .Values.affinity }} + affinity: {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: {{- toYaml . | nindent 8 }} + {{- end }} + {{- if and (gt $replicas 1) (ge .Capabilities.KubeVersion.Major "1") (ge .Capabilities.KubeVersion.Minor "19") }} + {{- with .Values.topologySpreadConstraints }} + topologySpreadConstraints: {{- toYaml . | nindent 8 }} + {{- end }} + {{- end }} + volumes: + - name: minio-user + secret: + secretName: {{ template "minio.secretName" . }} + {{- if .Values.extraSecret }} + - name: extra-secret + secret: + secretName: {{ .Values.extraSecret }} + {{- end }} + {{- include "minio.tlsKeysVolume" . | indent 8 }} + {{- if .Values.extraVolumes }} + {{- toYaml .Values.extraVolumes | nindent 8 }} + {{- end }} + {{- if .Values.persistence.enabled }} + volumeClaimTemplates: + {{- if gt $drivesPerNode 1 }} + {{- range $diskId := until $drivesPerNode}} + - apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: export-{{ $diskId }} + {{- if $.Values.persistence.annotations }} + annotations: {{- toYaml $.Values.persistence.annotations | nindent 10 }} + {{- end }} + spec: + accessModes: [ {{ $accessMode | quote }} ] + {{- if $storageClass }} + storageClassName: {{ $storageClass }} + {{- end }} + resources: + requests: + storage: {{ $psize }} + {{- end }} + {{- else }} + - apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: export + {{- if $.Values.persistence.annotations }} + annotations: {{- toYaml $.Values.persistence.annotations | nindent 10 }} + {{- end }} + spec: + accessModes: [ {{ $accessMode | quote }} ] + {{- if $storageClass }} + storageClassName: {{ $storageClass }} + {{- end }} + resources: + requests: + storage: {{ $psize }} + {{- end }} + {{- end }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/charts/minio/values.yaml b/packs/loki-3.7.4/charts/loki/charts/minio/values.yaml new file mode 100644 index 00000000..4c9714ea --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/charts/minio/values.yaml @@ -0,0 +1,593 @@ +## Provide a name in place of minio for `app:` labels +## +nameOverride: "" + +## Provide a name to substitute for the full names of resources +## +fullnameOverride: "" + +## set kubernetes cluster domain where minio is running +## +clusterDomain: cluster.local + +## Set default image, imageTag, and imagePullPolicy. mode is used to indicate the +## +image: + repository: quay.io/minio/minio + tag: RELEASE.2024-12-18T13-15-44Z + pullPolicy: IfNotPresent + +imagePullSecrets: [] +# - name: "image-pull-secret" + +## Set default image, imageTag, and imagePullPolicy for the `mc` (the minio +## client used to create a default bucket). +## +mcImage: + repository: quay.io/minio/mc + tag: RELEASE.2024-11-21T17-21-54Z + pullPolicy: IfNotPresent + +## minio mode, i.e. standalone or distributed +mode: distributed ## other supported values are "standalone" + +## Additional labels to include with deployment or statefulset +additionalLabels: {} + +## Additional annotations to include with deployment or statefulset +additionalAnnotations: {} + +## Typically the deployment/statefulset includes checksums of secrets/config, +## So that when these change on a subsequent helm install, the deployment/statefulset +## is restarted. This can result in unnecessary restarts under GitOps tooling such as +## flux, so set to "true" to disable this behaviour. +ignoreChartChecksums: false + +## Additional arguments to pass to minio binary +extraArgs: [] +# example for enabling FTP: +# - --ftp=\"address=:8021\" +# - --ftp=\"passive-port-range=10000-10010\" + +## Additional volumes to minio container +extraVolumes: [] + +## Additional volumeMounts to minio container +extraVolumeMounts: [] + +## Additional sidecar containers +extraContainers: [] + +## Internal port number for MinIO S3 API container +## Change service.port to change external port number +minioAPIPort: "9000" + +## Internal port number for MinIO Browser Console container +## Change consoleService.port to change external port number +minioConsolePort: "9001" + +## Update strategy for Deployments +deploymentUpdate: + type: RollingUpdate + maxUnavailable: 0 + maxSurge: 100% + +## Update strategy for StatefulSets +statefulSetUpdate: + updateStrategy: RollingUpdate + +## Pod priority settings +## ref: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/ +## +priorityClassName: "" + +## Pod runtime class name +## ref https://kubernetes.io/docs/concepts/containers/runtime-class/ +## +runtimeClassName: "" + +## Set default rootUser, rootPassword +## rootUser and rootPassword is generated when not set +## Distributed MinIO ref: https://min.io/docs/minio/linux/operations/install-deploy-manage/deploy-minio-multi-node-multi-drive.html +## +rootUser: "" +rootPassword: "" + +## Use existing Secret that store following variables: +## +## | Chart var | .data. in Secret | +## |:----------------------|:-------------------------| +## | rootUser | rootUser | +## | rootPassword | rootPassword | +## +## All mentioned variables will be ignored in values file. +## .data.rootUser and .data.rootPassword are mandatory, +## others depend on enabled status of corresponding sections. +existingSecret: "" + +## Directory on the MinIO pof +certsPath: "/etc/minio/certs/" +configPathmc: "/etc/minio/mc/" + +## Path where PV would be mounted on the MinIO Pod +mountPath: "/export" +## Override the root directory which the minio server should serve from. +## If left empty, it defaults to the value of {{ .Values.mountPath }} +## If defined, it must be a sub-directory of the path specified in {{ .Values.mountPath }} +## +bucketRoot: "" + +# Number of drives attached to a node +drivesPerNode: 1 +# Number of MinIO containers running +replicas: 16 +# Number of expanded MinIO clusters +pools: 1 + +## TLS Settings for MinIO +tls: + enabled: false + ## Create a secret with private.key and public.crt files and pass that here. Ref: https://github.com/minio/minio/tree/master/docs/tls/kubernetes#2-create-kubernetes-secret + certSecret: "" + publicCrt: public.crt + privateKey: private.key + +## Trusted Certificates Settings for MinIO. Ref: https://min.io/docs/minio/linux/operations/network-encryption.html#third-party-certificate-authorities +## Bundle multiple trusted certificates into one secret and pass that here. Ref: https://github.com/minio/minio/tree/master/docs/tls/kubernetes#2-create-kubernetes-secret +## When using self-signed certificates, remember to include MinIO's own certificate in the bundle with key public.crt. +## If certSecret is left empty and tls is enabled, this chart installs the public certificate from .Values.tls.certSecret. +trustedCertsSecret: "" + +## Enable persistence using Persistent Volume Claims +## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ +## +persistence: + enabled: true + annotations: {} + + ## A manually managed Persistent Volume and Claim + ## Requires persistence.enabled: true + ## If defined, PVC must be created manually before volume will be bound + existingClaim: "" + + ## minio data Persistent Volume Storage Class + ## If defined, storageClassName: + ## If set to "-", storageClassName: "", which disables dynamic provisioning + ## If undefined (the default) or set to null, no storageClassName spec is + ## set, choosing the default provisioner. (gp2 on AWS, standard on + ## GKE, AWS & OpenStack) + ## + ## Storage class of PV to bind. By default it looks for standard storage class. + ## If the PV uses a different storage class, specify that here. + storageClass: "" + volumeName: "" + accessMode: ReadWriteOnce + size: 500Gi + + ## If subPath is set mount a sub folder of a volume instead of the root of the volume. + ## This is especially handy for volume plugins that don't natively support sub mounting (like glusterfs). + ## + subPath: "" + +## Expose the MinIO service to be accessed from outside the cluster (LoadBalancer service). +## or access it from within the cluster (ClusterIP service). Set the service type and the port to serve it. +## ref: http://kubernetes.io/docs/user-guide/services/ +## +service: + type: ClusterIP + clusterIP: ~ + port: "9000" + nodePort: 32000 + loadBalancerIP: ~ + externalIPs: [] + annotations: {} + + ## service.loadBalancerSourceRanges Addresses that are allowed when service is LoadBalancer + ## https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/#restrict-access-for-loadbalancer-service + ## + #loadBalancerSourceRanges: + # - 10.10.10.0/24 + loadBalancerSourceRanges: [] + + ## service.externalTrafficPolicy minio service external traffic policy + ## ref http://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip + ## + externalTrafficPolicy: Cluster + +## Configure Ingress based on the documentation here: https://kubernetes.io/docs/concepts/services-networking/ingress/ +## + +ingress: + enabled: false + ingressClassName: ~ + labels: {} + # node-role.kubernetes.io/ingress: platform + annotations: {} + # kubernetes.io/ingress.class: nginx + # kubernetes.io/tls-acme: "true" + # kubernetes.io/ingress.allow-http: "false" + # kubernetes.io/ingress.global-static-ip-name: "" + # nginx.ingress.kubernetes.io/secure-backends: "true" + # nginx.ingress.kubernetes.io/backend-protocol: "HTTPS" + # nginx.ingress.kubernetes.io/whitelist-source-range: 0.0.0.0/0 + path: / + hosts: + - minio-example.local + tls: [] + # - secretName: chart-example-tls + # hosts: + # - chart-example.local + +consoleService: + type: ClusterIP + clusterIP: ~ + port: "9001" + nodePort: 32001 + loadBalancerIP: ~ + externalIPs: [] + annotations: {} + ## consoleService.loadBalancerSourceRanges Addresses that are allowed when service is LoadBalancer + ## https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/#restrict-access-for-loadbalancer-service + ## + #loadBalancerSourceRanges: + # - 10.10.10.0/24 + loadBalancerSourceRanges: [] + + ## servconsoleServiceice.externalTrafficPolicy minio service external traffic policy + ## ref http://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip + ## + externalTrafficPolicy: Cluster + +consoleIngress: + enabled: false + ingressClassName: ~ + labels: {} + # node-role.kubernetes.io/ingress: platform + annotations: {} + # kubernetes.io/ingress.class: nginx + # kubernetes.io/tls-acme: "true" + # kubernetes.io/ingress.allow-http: "false" + # kubernetes.io/ingress.global-static-ip-name: "" + # nginx.ingress.kubernetes.io/secure-backends: "true" + # nginx.ingress.kubernetes.io/backend-protocol: "HTTPS" + # nginx.ingress.kubernetes.io/whitelist-source-range: 0.0.0.0/0 + path: / + hosts: + - console.minio-example.local + tls: [] + # - secretName: chart-example-tls + # hosts: + # - chart-example.local + +## Node labels for pod assignment +## Ref: https://kubernetes.io/docs/user-guide/node-selection/ +## +nodeSelector: {} +tolerations: [] +affinity: {} +topologySpreadConstraints: [] + +## Add stateful containers to have security context, if enabled MinIO will run as this +## user and group NOTE: securityContext is only enabled if persistence.enabled=true +securityContext: + enabled: true + runAsUser: 1000 + runAsGroup: 1000 + fsGroup: 1000 + fsGroupChangePolicy: "OnRootMismatch" + +containerSecurityContext: + readOnlyRootFilesystem: false + +# Additational pod annotations +podAnnotations: {} + +# Additional pod labels +podLabels: {} + +## Configure resource requests and limits +## ref: http://kubernetes.io/docs/user-guide/compute-resources/ +## +resources: + requests: + memory: 16Gi + +## List of policies to be created after minio install +## +## In addition to default policies [readonly|readwrite|writeonly|consoleAdmin|diagnostics] +## you can define additional policies with custom supported actions and resources +policies: [] +## writeexamplepolicy policy grants creation or deletion of buckets with name +## starting with example. In addition, grants objects write permissions on buckets starting with +## example. +# - name: writeexamplepolicy +# statements: +# - effect: Allow # this is the default +# resources: +# - 'arn:aws:s3:::example*/*' +# actions: +# - "s3:AbortMultipartUpload" +# - "s3:GetObject" +# - "s3:DeleteObject" +# - "s3:PutObject" +# - "s3:ListMultipartUploadParts" +# - resources: +# - 'arn:aws:s3:::example*' +# actions: +# - "s3:CreateBucket" +# - "s3:DeleteBucket" +# - "s3:GetBucketLocation" +# - "s3:ListBucket" +# - "s3:ListBucketMultipartUploads" +## readonlyexamplepolicy policy grants access to buckets with name starting with example. +## In addition, grants objects read permissions on buckets starting with example. +# - name: readonlyexamplepolicy +# statements: +# - resources: +# - 'arn:aws:s3:::example*/*' +# actions: +# - "s3:GetObject" +# - resources: +# - 'arn:aws:s3:::example*' +# actions: +# - "s3:GetBucketLocation" +# - "s3:ListBucket" +# - "s3:ListBucketMultipartUploads" +## conditionsexample policy creates all access to example bucket with aws:username="johndoe" and source ip range 10.0.0.0/8 and 192.168.0.0/24 only +# - name: conditionsexample +# statements: +# - resources: +# - 'arn:aws:s3:::example/*' +# actions: +# - 's3:*' +# conditions: +# - StringEquals: '"aws:username": "johndoe"' +# - IpAddress: | +# "aws:SourceIp": [ +# "10.0.0.0/8", +# "192.168.0.0/24" +# ] +# +## Additional Annotations for the Kubernetes Job makePolicyJob +makePolicyJob: + securityContext: + enabled: false + runAsUser: 1000 + runAsGroup: 1000 + resources: + requests: + memory: 128Mi + # Command to run after the main command on exit + exitCommand: "" + +## List of users to be created after minio install +## +users: + ## Username, password and policy to be assigned to the user + ## Default policies are [readonly|readwrite|writeonly|consoleAdmin|diagnostics] + ## Add new policies as explained here https://min.io/docs/minio/kubernetes/upstream/administration/identity-access-management.html#access-management + ## NOTE: this will fail if LDAP is enabled in your MinIO deployment + ## make sure to disable this if you are using LDAP. + - accessKey: console + secretKey: console123 + policy: consoleAdmin + # Or you can refer to specific secret + #- accessKey: externalSecret + # existingSecret: my-secret + # existingSecretKey: password + # policy: readonly + +## Additional Annotations for the Kubernetes Job makeUserJob +makeUserJob: + securityContext: + enabled: false + runAsUser: 1000 + runAsGroup: 1000 + resources: + requests: + memory: 128Mi + # Command to run after the main command on exit + exitCommand: "" + +## List of service accounts to be created after minio install +## +svcaccts: [] + ## accessKey, secretKey and parent user to be assigned to the service accounts + ## Add new service accounts as explained here https://min.io/docs/minio/kubernetes/upstream/administration/identity-access-management/minio-user-management.html#service-accounts + # - accessKey: console-svcacct + # secretKey: console123 + # user: console + ## Or you can refer to specific secret + # - accessKey: externalSecret + # existingSecret: my-secret + # existingSecretKey: password + # user: console + ## You also can pass custom policy + # - accessKey: console-svcacct + # secretKey: console123 + # user: console + # policy: + # statements: + # - resources: + # - 'arn:aws:s3:::example*/*' + # actions: + # - "s3:AbortMultipartUpload" + # - "s3:GetObject" + # - "s3:DeleteObject" + # - "s3:PutObject" + # - "s3:ListMultipartUploadParts" + +makeServiceAccountJob: + securityContext: + enabled: false + runAsUser: 1000 + runAsGroup: 1000 + resources: + requests: + memory: 128Mi + # Command to run after the main command on exit + exitCommand: "" + +## List of buckets to be created after minio install +## +buckets: [] + # # Name of the bucket + # - name: bucket1 + # # Policy to be set on the + # # bucket [none|download|upload|public] + # policy: none + # # Purge if bucket exists already + # purge: false + # # set versioning for + # # bucket [true|false] + # versioning: false # remove this key if you do not want versioning feature + # # set objectlocking for + # # bucket [true|false] NOTE: versioning is enabled by default if you use locking + # objectlocking: false + # - name: bucket2 + # policy: none + # purge: false + # versioning: true + # # set objectlocking for + # # bucket [true|false] NOTE: versioning is enabled by default if you use locking + # objectlocking: false + +## Additional Annotations for the Kubernetes Job makeBucketJob +makeBucketJob: + securityContext: + enabled: false + runAsUser: 1000 + runAsGroup: 1000 + resources: + requests: + memory: 128Mi + # Command to run after the main command on exit + exitCommand: "" + +## List of command to run after minio install +## NOTE: the mc command TARGET is always "myminio" +customCommands: + # - command: "admin policy attach myminio consoleAdmin --group='cn=ops,cn=groups,dc=example,dc=com'" + +## Additional Annotations for the Kubernetes Job customCommandJob +customCommandJob: + securityContext: + enabled: false + runAsUser: 1000 + runAsGroup: 1000 + resources: + requests: + memory: 128Mi + ## Additional volumes to add to the post-job. + extraVolumes: [] + # - name: extra-policies + # configMap: + # name: my-extra-policies-cm + ## Additional volumeMounts to add to the custom commands container when + ## running the post-job. + extraVolumeMounts: [] + # - name: extra-policies + # mountPath: /mnt/extras/ + # Command to run after the main command on exit + exitCommand: "" + +## Merge jobs +postJob: + podAnnotations: {} + annotations: {} + securityContext: + enabled: false + runAsUser: 1000 + runAsGroup: 1000 + fsGroup: 1000 + nodeSelector: {} + tolerations: [] + affinity: {} + +## Use this field to add environment variables relevant to MinIO server. These fields will be passed on to MinIO container(s) +## when Chart is deployed +environment: + ## Please refer for comprehensive list https://min.io/docs/minio/linux/reference/minio-server/minio-server.html + ## MINIO_SUBNET_LICENSE: "License key obtained from https://subnet.min.io" + ## MINIO_BROWSER: "off" + +## The name of a secret in the same kubernetes namespace which contain secret values +## This can be useful for LDAP password, etc +## The key in the secret must be 'config.env' +## +extraSecret: ~ + +## OpenID Identity Management +## The following section documents environment variables for enabling external identity management using an OpenID Connect (OIDC)-compatible provider. +## See https://min.io/docs/minio/linux/operations/external-iam/configure-openid-external-identity-management.html for a tutorial on using these variables. +oidc: + enabled: false + configUrl: "https://identity-provider-url/.well-known/openid-configuration" + clientId: "minio" + clientSecret: "" + # Provide existing client secret from the Kubernetes Secret resource, existing secret will have priority over `clientId` and/or `clientSecret`` + existingClientSecretName: "" + existingClientIdKey: "" + existingClientSecretKey: "" + claimName: "policy" + scopes: "openid,profile,email" + redirectUri: "https://console-endpoint-url/oauth_callback" + # Can leave empty + claimPrefix: "" + comment: "" + displayName: "" + +networkPolicy: + enabled: false + # Specifies whether the policies created will be standard Network Policies (flavor: kubernetes) + # or Cilium Network Policies (flavor: cilium) + flavor: kubernetes + allowExternal: true + # only when using flavor: cilium + egressEntities: + - kube-apiserver + +## PodDisruptionBudget settings +## ref: https://kubernetes.io/docs/concepts/workloads/pods/disruptions/ +## +podDisruptionBudget: + enabled: false + maxUnavailable: 1 + +## Specify the service account to use for the MinIO pods. If 'create' is set to 'false' +## and 'name' is left unspecified, the account 'default' will be used. +serviceAccount: + create: true + ## The name of the service account to use. If 'create' is 'true', a service account with that name + ## will be created. + name: "minio-sa" + +metrics: + serviceMonitor: + enabled: false + # scrape each node/pod individually for additional metrics + includeNode: false + public: true + additionalLabels: {} + annotations: {} + # for node metrics + relabelConfigs: {} + # for cluster metrics + relabelConfigsCluster: {} + # metricRelabelings: + # - regex: (server|pod) + # action: labeldrop + namespace: ~ + # Scrape interval, for example `interval: 30s` + interval: ~ + # Scrape timeout, for example `scrapeTimeout: 10s` + scrapeTimeout: ~ + +## ETCD settings: https://github.com/minio/minio/blob/master/docs/sts/etcd.md +## Define endpoints to enable this section. +etcd: + endpoints: [] + pathPrefix: "" + corednsPathPrefix: "" + clientCert: "" + clientCertKey: "" diff --git a/packs/loki-3.7.4/charts/loki/charts/rollout-operator/.helmignore b/packs/loki-3.7.4/charts/loki/charts/rollout-operator/.helmignore new file mode 100644 index 00000000..0e8a0eb3 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/charts/rollout-operator/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/packs/loki-3.7.4/charts/loki/charts/rollout-operator/Chart.lock b/packs/loki-3.7.4/charts/loki/charts/rollout-operator/Chart.lock new file mode 100644 index 00000000..66496275 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/charts/rollout-operator/Chart.lock @@ -0,0 +1,6 @@ +dependencies: +- name: crds + repository: "" + version: 0.1.0 +digest: sha256:f9d3034df90169322e24e32ab5ea8f1947dc2aca3ab79960d6687b79a512efeb +generated: "2026-07-15T20:53:18.362916985Z" diff --git a/packs/loki-3.7.4/charts/loki/charts/rollout-operator/Chart.yaml b/packs/loki-3.7.4/charts/loki/charts/rollout-operator/Chart.yaml new file mode 100644 index 00000000..4d4bca01 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/charts/rollout-operator/Chart.yaml @@ -0,0 +1,13 @@ +apiVersion: v2 +appVersion: v0.38.1 +dependencies: +- condition: crds.enabled + name: crds + repository: "" + version: 0.1.0 +description: Grafana rollout-operator +home: https://github.com/grafana/rollout-operator +kubeVersion: ^1.10.0-0 +name: rollout-operator +type: application +version: 0.50.1 diff --git a/packs/loki-3.7.4/charts/loki/charts/rollout-operator/README.md b/packs/loki-3.7.4/charts/loki/charts/rollout-operator/README.md new file mode 100644 index 00000000..b1743cf1 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/charts/rollout-operator/README.md @@ -0,0 +1,114 @@ +# Grafana rollout-operator Helm Chart + +Helm chart for deploying [Grafana rollout-operator](https://github.com/grafana/rollout-operator) to Kubernetes. + +# rollout-operator + +![Version: 0.50.1](https://img.shields.io/badge/Version-0.50.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.38.1](https://img.shields.io/badge/AppVersion-v0.38.1-informational?style=flat-square) + +Grafana rollout-operator + +## Requirements + +Kubernetes: `^1.10.0-0` + +| Repository | Name | Version | +|------------|------|---------| +| | crds | 0.1.0 | + +## Installation + +This section describes various use cases for installation, upgrade and migration from different systems and versions. + +### Preparation + +These are the common tasks to perform before any of the use cases. + +```bash +# Add the repository +helm repo add grafana https://grafana.github.io/helm-charts +helm repo update +``` + +### Installation of Grafana Rollout Operator + +```bash +helm install -n grafana/rollout-operator +``` + +The Grafana rollout-operator should be installed in the same namespace as the statefulsets it is operating upon. +It is not a highly available application and runs as a single pod. + +### Upgrade of Grafana Rollout Operator <= v0.38.0 + +v0.38.0 of the rollout-operator introduced a new option for enforcing a "fixed delay" in partition aware PDB evictions. + +This requires an updated CRD and an additional role for the rollout-operator to patch pods. + +***Before upgrading to this version, make sure that the CustomResourceDefinitions (CRDs) shipped with the chart are applied to your cluster.*** + +Additionally, make sure that the updated roles have been assigned. + +### Upgrade of Grafana Rollout Operator <= v0.32.0 + +Starting with v0.33.0 of the rollout-operator chart, the rollout-operator webhooks are enabled. See https://github.com/grafana/rollout-operator/#webhooks. + +Before upgrading to this version, make sure that the CustomResourceDefinitions (CRDs) shipped with the chart are applied to your cluster. + +Manually applying these CRDs is only required if upgrading from a chart <= v0.32.0. + +### Custom Resource Definitions (CRDs) + +Starting with v0.48.0 the rollout-operator CRDs (`ReplicaTemplate` and `NoDownscale`) are shipped via a bundled `crds` subchart at `charts/rollout-operator/charts/crds/`. They are installed by default on `helm install` and follow Helm's standard CRD handling (the files in the subchart's `crds/` directory are not templated and are skipped on upgrade — see https://helm.sh/docs/chart_best_practices/custom_resource_definitions/). + +The operator always requires its CRDs to be present in the cluster, so the chart installs them by default. Set `crds.enabled=false` only when CRDs are managed out of band — for example a single shared rollout-operator instance owns the CRDs cluster-wide, a GitOps controller / umbrella chart reconciles them, or cluster RBAC prevents the release from creating CRDs. In those cases you are responsible for ensuring the CRDs exist before installing or upgrading this chart; the YAMLs are available under `charts/rollout-operator/charts/crds/crds/` for manual application. + +## Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| affinity | object | `{}` | | +| annotations | object | `{}` | Additional annotations to add to the deployment | +| crds.enabled | bool | `true` | Install CRDs as part of the chart (via the bundled `crds` subchart). Set to `false` only when CRDs are managed out of band — see the comment above for guidance. | +| extraArgs | list | `[]` | List of additional CLI arguments to configure rollout-operator (example: `--log.level=info`) | +| extraEnv | list | `[]` | Environment variables to add to rollout-operator container | +| extraEnvFrom | list | `[]` | Environment variables from secrets or configmaps to add to rollout-operator container | +| fullnameOverride | string | `""` | | +| global.commonLabels | object | `{}` | Common labels for all object directly managed by this chart. | +| hostAliases | list | `[]` | hostAliases to add | +| hostNetwork | bool | `false` | Enable or disable the use of host networking for the pod. When true, the pod will use the node's network namespace | +| image.pullPolicy | string | `"IfNotPresent"` | | +| image.registry | string | `"docker.io"` | | +| image.repository | string | `"grafana/rollout-operator"` | | +| image.tag | string | `""` | Overrides the image tag whose default is the chart appVersion. | +| imagePullSecrets | list | `[]` | | +| minReadySeconds | int | `10` | | +| nameOverride | string | `""` | | +| namespaceSelector | object | `{"matchExpressions":[]}` | Namespace selector applied to all webhooks. Defaults to restricting to the release namespace. See https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/#matching-requests-namespaceselector | +| nodeSelector | object | `{}` | | +| podAnnotations | object | `{}` | Pod Annotations | +| podLabels | object | `{}` | Pod (extra) Labels | +| podSecurityContext | object | `{}` | | +| priorityClassName | string | `""` | | +| resources.limits.memory | string | `"200Mi"` | | +| resources.requests.cpu | string | `"100m"` | | +| resources.requests.memory | string | `"100Mi"` | | +| revisionHistoryLimit | int | `10` | Number of old ReplicaSets to retain | +| securityContext | object | `{}` | | +| serviceAccount.annotations | object | `{}` | Annotations to add to the service account | +| serviceAccount.create | bool | `true` | Specifies whether a service account should be created | +| serviceAccount.name | string | `""` | The name of the service account to use. If not set and create is true, a name is generated using the fullname template | +| serviceMonitor.annotations | object | `{}` | ServiceMonitor annotations | +| serviceMonitor.enabled | bool | `false` | Create ServiceMonitor to scrape metrics for Prometheus | +| serviceMonitor.interval | string | `nil` | ServiceMonitor scrape interval | +| serviceMonitor.labels | object | `{}` | Additional ServiceMonitor labels | +| serviceMonitor.namespace | string | `nil` | Alternative namespace for ServiceMonitor resources | +| serviceMonitor.namespaceSelector | object | `{}` | Namespace selector for ServiceMonitor resources | +| serviceMonitor.relabelings | list | `[]` | ServiceMonitor relabel configs to apply to samples before scraping https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#relabelconfig | +| serviceMonitor.scrapeTimeout | string | `nil` | ServiceMonitor scrape timeout in Go duration format (e.g. 15s) | +| tolerations | list | `[]` | | +| webhooks.enabled | bool | `true` | Enable the rollout-operator webhooks. See https://github.com/grafana/rollout-operator/#webhooks. Note that the webhooks require custom resource definitions. If upgrading, manually apply the files in the `crds` directory. | +| webhooks.failurePolicy | string | `"Fail"` | Validating and mutating webhook failure policy. `Ignore` or `Fail`. | +| webhooks.objectSelector | object | `{}` | objectSelector to filter which objects the webhooks apply to. | +| webhooks.selfSignedCertSecretName | string | `"certificate"` | Secret resource name for the TLS certificate to be used with the webhooks | +| webhooks.timeoutSeconds | int | `10` | Timeout in seconds for the prepare-downscale mutating webhook. Must be between 1 and 30. | diff --git a/packs/loki-3.7.4/charts/loki/charts/rollout-operator/README.md.gotmpl b/packs/loki-3.7.4/charts/loki/charts/rollout-operator/README.md.gotmpl new file mode 100644 index 00000000..ddd1824a --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/charts/rollout-operator/README.md.gotmpl @@ -0,0 +1,62 @@ +# Grafana rollout-operator Helm Chart + +Helm chart for deploying [Grafana rollout-operator]({{ template "chart.homepage" . }}) to Kubernetes. + +{{ template "chart.header" . }} + +{{ template "chart.versionBadge" . }}{{ template "chart.typeBadge" . }}{{ template "chart.appVersionBadge" . }} + +{{ template "chart.description" . }} + +{{ template "chart.sourcesSection" . }} + +{{ template "chart.requirementsSection" . }} + +## Installation + +This section describes various use cases for installation, upgrade and migration from different systems and versions. + +### Preparation + +These are the common tasks to perform before any of the use cases. + +```bash +# Add the repository +helm repo add grafana https://grafana.github.io/helm-charts +helm repo update +``` + +### Installation of Grafana Rollout Operator + +```bash +helm install -n grafana/rollout-operator +``` + +The Grafana rollout-operator should be installed in the same namespace as the statefulsets it is operating upon. +It is not a highly available application and runs as a single pod. + +### Upgrade of Grafana Rollout Operator <= v0.38.0 + +v0.38.0 of the rollout-operator introduced a new option for enforcing a "fixed delay" in partition aware PDB evictions. + +This requires an updated CRD and an additional role for the rollout-operator to patch pods. + +***Before upgrading to this version, make sure that the CustomResourceDefinitions (CRDs) shipped with the chart are applied to your cluster.*** + +Additionally, make sure that the updated roles have been assigned. + +### Upgrade of Grafana Rollout Operator <= v0.32.0 + +Starting with v0.33.0 of the rollout-operator chart, the rollout-operator webhooks are enabled. See https://github.com/grafana/rollout-operator/#webhooks. + +Before upgrading to this version, make sure that the CustomResourceDefinitions (CRDs) shipped with the chart are applied to your cluster. + +Manually applying these CRDs is only required if upgrading from a chart <= v0.32.0. + +### Custom Resource Definitions (CRDs) + +Starting with v0.48.0 the rollout-operator CRDs (`ReplicaTemplate` and `NoDownscale`) are shipped via a bundled `crds` subchart at `charts/rollout-operator/charts/crds/`. They are installed by default on `helm install` and follow Helm's standard CRD handling (the files in the subchart's `crds/` directory are not templated and are skipped on upgrade — see https://helm.sh/docs/chart_best_practices/custom_resource_definitions/). + +The operator always requires its CRDs to be present in the cluster, so the chart installs them by default. Set `crds.enabled=false` only when CRDs are managed out of band — for example a single shared rollout-operator instance owns the CRDs cluster-wide, a GitOps controller / umbrella chart reconciles them, or cluster RBAC prevents the release from creating CRDs. In those cases you are responsible for ensuring the CRDs exist before installing or upgrading this chart; the YAMLs are available under `charts/rollout-operator/charts/crds/crds/` for manual application. + +{{ template "chart.valuesSection" . }} diff --git a/packs/loki-3.7.4/charts/loki/charts/rollout-operator/charts/crds/Chart.yaml b/packs/loki-3.7.4/charts/loki/charts/rollout-operator/charts/crds/Chart.yaml new file mode 100644 index 00000000..169b646a --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/charts/rollout-operator/charts/crds/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v2 +description: Grafana rollout-operator CRDs +name: crds +type: application +version: 0.1.0 diff --git a/packs/loki-3.7.4/charts/loki/charts/rollout-operator/charts/crds/README.md b/packs/loki-3.7.4/charts/loki/charts/rollout-operator/charts/crds/README.md new file mode 100644 index 00000000..7a413934 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/charts/rollout-operator/charts/crds/README.md @@ -0,0 +1,8 @@ +# crds + +![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) + +Grafana rollout-operator CRDs + +---------------------------------------------- +Autogenerated from chart metadata using [helm-docs v1.8.1](https://github.com/norwoodj/helm-docs/releases/v1.8.1) diff --git a/packs/loki-3.7.4/charts/loki/charts/rollout-operator/charts/crds/crds/replica-templates-custom-resource-definition.yaml b/packs/loki-3.7.4/charts/loki/charts/rollout-operator/charts/crds/crds/replica-templates-custom-resource-definition.yaml new file mode 100644 index 00000000..fc88f66e --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/charts/rollout-operator/charts/crds/crds/replica-templates-custom-resource-definition.yaml @@ -0,0 +1,51 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: replicatemplates.rollout-operator.grafana.com +spec: + group: rollout-operator.grafana.com + versions: + - name: v1 + served: true + storage: true + additionalPrinterColumns: + - description: Status replicas + jsonPath: .status.replicas + name: StatusReplicas + type: string + - description: Spec replicas + jsonPath: .spec.replicas + name: SpecReplicas + type: string + schema: + openAPIV3Schema: + type: object + properties: + spec: + type: object + properties: + replicas: + type: integer + default: 1 + minimum: 0 + labelSelector: + type: string + status: + type: object + properties: + replicas: + type: integer + subresources: + status: { } + scale: + specReplicasPath: .spec.replicas + statusReplicasPath: .status.replicas + labelSelectorPath: .spec.labelSelector + scope: Namespaced + names: + plural: replicatemplates + singular: replicatemplate + kind: ReplicaTemplate + categories: + # Include in "kubectl get all" output + - all diff --git a/packs/loki-3.7.4/charts/loki/charts/rollout-operator/charts/crds/crds/zone-aware-pod-disruption-budget-custom-resource-definition.yaml b/packs/loki-3.7.4/charts/loki/charts/rollout-operator/charts/crds/crds/zone-aware-pod-disruption-budget-custom-resource-definition.yaml new file mode 100644 index 00000000..7ef88a54 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/charts/rollout-operator/charts/crds/crds/zone-aware-pod-disruption-budget-custom-resource-definition.yaml @@ -0,0 +1,57 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: zoneawarepoddisruptionbudgets.rollout-operator.grafana.com +spec: + group: rollout-operator.grafana.com + versions: + - name: v1 + served: true + storage: true + schema: + openAPIV3Schema: + type: object + properties: + spec: + type: object + required: + - selector + properties: + maxUnavailable: + type: integer + description: The number of pods that can be unavailable within a zone or partition. + minimum: 0 + maxUnavailablePercentage: + type: integer + description: Calculate the maxUnavailable value as a percentage of the StatefulSet's spec.Replica count. This option is not supported when using podNamePartitionRegex. + minimum: 0 + maximum: 100 + selector: + type: object + description: A selector for finding pods and statefulsets that this ZoneAwarePodDisruptionBudget applies to. + required: + - matchLabels + properties: + matchLabels: + type: object + additionalProperties: + type: string + podNamePartitionRegex: + type: string + description: A regular expression for returning a partition name given a pod name. This field is optional and should only be used when the ZoneAwarePodDisruptionBudget is to be scoped to a partition, such as a multi-zone ingester deployment with ingest_storage_enabled. Enabling this changes the ZPDB functionality such that minAvailability is applied across ALL zones for a given partition. When not enabled, the minAvailability is applied to pods within the eviction zone assuming there are no disruptions in the other zones. + podNameRegexGroup: + type: integer + minimum: 1 + description: The regular expression capture group number that contains the partition name. This field is only required when the podNamePartitionRegex field is set and has more then one grouping. The default value is 1 and 1-based indexing is used. + crossZoneEvictionDelay: + type: string + description: An optional duration that defines the minimum time that must elapse after a pod returns to a ready state before another pod for the same partition can be evicted. The value must be a valid Go duration string (e.g. "20m", "1h"). This field is only applicable when podNamePartitionRegex is set. + subresources: + status: {} + scope: Namespaced + names: + kind: ZoneAwarePodDisruptionBudget + plural: zoneawarepoddisruptionbudgets + singular: zoneawarepoddisruptionbudget + shortNames: + - zpdb \ No newline at end of file diff --git a/packs/loki-3.7.4/charts/loki/charts/rollout-operator/charts/crds/values.yaml b/packs/loki-3.7.4/charts/loki/charts/rollout-operator/charts/crds/values.yaml new file mode 100644 index 00000000..7e6c85ab --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/charts/rollout-operator/charts/crds/values.yaml @@ -0,0 +1,8 @@ +# This subchart ships the CustomResourceDefinitions that rollout-operator +# requires to function. The CRDs live under crds/ and are installed by Helm +# without templating, per Helm's CRD best practice +# (https://helm.sh/docs/chart_best_practices/custom_resource_definitions/). +# +# The subchart has no values of its own; toggling whether it is installed is +# done from the parent chart via `crds.enabled`. See the parent chart's +# values.yaml for guidance on when to disable it. diff --git a/packs/loki-3.7.4/charts/loki/charts/rollout-operator/templates/NOTES.txt b/packs/loki-3.7.4/charts/loki/charts/rollout-operator/templates/NOTES.txt new file mode 100644 index 00000000..a76e5ba0 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/charts/rollout-operator/templates/NOTES.txt @@ -0,0 +1,10 @@ +Repo : {{ .Chart.Home }} + +Validation: + +Check the logs of the pod and ensure messages for reconcilliation of the statefulsets are present. +``` +kubectl logs -n {{ .Release.Namespace }} -l {{ include "cli.labels" . }} +``` +Example log line: +level=debug ts=2022-04-20T13:59:52.783051541Z msg="reconciling StatefulSet" statefulset=mimir-store-gateway-zone-a diff --git a/packs/loki-3.7.4/charts/loki/charts/rollout-operator/templates/_helpers.tpl b/packs/loki-3.7.4/charts/loki/charts/rollout-operator/templates/_helpers.tpl new file mode 100644 index 00000000..44496d70 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/charts/rollout-operator/templates/_helpers.tpl @@ -0,0 +1,94 @@ +{{/* +Expand the name of the chart. +*/}} +{{- define "rollout-operator.name" -}} +{{- default (include "rollout-operator.chartName" .) .Values.nameOverride | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "rollout-operator.fullname" -}} +{{- if .Values.fullnameOverride }} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- $name := default (include "rollout-operator.chartName" .) .Values.nameOverride }} +{{- if contains $name .Release.Name }} +{{- .Release.Name | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} +{{- end }} +{{- end }} +{{- end }} + +{{/* +Recalculate the chart name, because it may be sub-chart included as rollout_operator, +and _ is not valid in resource names. +*/}} +{{- define "rollout-operator.chartName" -}} +{{- print .Chart.Name | replace "_" "-" -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "rollout-operator.chart" -}} +{{- printf "%s-%s" (include "rollout-operator.chartName" .) .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "rollout-operator.labels" -}} +helm.sh/chart: {{ include "rollout-operator.chart" . }} +{{ include "rollout-operator.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- with .Values.global.commonLabels }} +{{ toYaml . }} +{{- end }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "rollout-operator.selectorLabels" -}} +app.kubernetes.io/name: {{ include "rollout-operator.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "rollout-operator.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "rollout-operator.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} + + +{{- define "cli.labels" -}} +{{- $list := list -}} +{{- range $k, $v := ( include "rollout-operator.selectorLabels" . | fromYaml ) -}} +{{- $list = append $list (printf "%s=%s" $k $v) -}} +{{- end -}} +{{ join "," $list }} +{{- end -}} + +{{/* +Create the image name +*/}} +{{- define "rollout-operator.imageName" -}} +{{- $imageTag := (.Values.image.tag | default .Chart.AppVersion) }} +{{- if .Values.image.registry }} +{{- (printf "%s/%s:%s" .Values.image.registry .Values.image.repository $imageTag) }} +{{- else }} +{{- (printf "%s:%s" .Values.image.repository $imageTag) }} +{{- end -}} +{{- end -}} diff --git a/packs/loki-3.7.4/charts/loki/charts/rollout-operator/templates/deployment.yaml b/packs/loki-3.7.4/charts/loki/charts/rollout-operator/templates/deployment.yaml new file mode 100644 index 00000000..b784403c --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/charts/rollout-operator/templates/deployment.yaml @@ -0,0 +1,110 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "rollout-operator.fullname" . }} + namespace: {{ .Release.Namespace | quote }} + {{- with .Values.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} + labels: + {{- include "rollout-operator.labels" . | nindent 4 }} +spec: + replicas: 1 + revisionHistoryLimit: {{ .Values.revisionHistoryLimit }} + minReadySeconds: {{ .Values.minReadySeconds }} + selector: + matchLabels: + {{- include "rollout-operator.selectorLabels" . | nindent 6 }} + strategy: + rollingUpdate: + maxSurge: 0 + maxUnavailable: 1 + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + namespace: {{ .Release.Namespace | quote }} + labels: + {{- include "rollout-operator.selectorLabels" . | nindent 8 }} + {{- with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + spec: + {{- with .Values.priorityClassName }} + priorityClassName: {{ . }} + {{- end }} + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.hostNetwork }} + hostNetwork: {{ . }} + {{- end }} + {{- with .Values.hostAliases }} + hostAliases: + {{- toYaml . | nindent 8 }} + {{- end }} + serviceAccountName: {{ include "rollout-operator.serviceAccountName" . }} + securityContext: + {{- toYaml .Values.podSecurityContext | nindent 8 }} + containers: + - name: rollout-operator + securityContext: + {{- toYaml .Values.securityContext | nindent 12 }} + image: {{ include "rollout-operator.imageName" . }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + args: + - -kubernetes.namespace={{ .Release.Namespace }} + - -zpdb.pod-ready-annotation-patch-timeout=5s + {{- if .Values.webhooks.enabled }} + - -server-tls.enabled=true + - -server-tls.self-signed-cert.secret-name={{ .Values.webhooks.selfSignedCertSecretName }} + - -server-tls.self-signed-cert.dns-name={{ include "rollout-operator.fullname" . }}.{{ .Release.Namespace }}.svc + {{- end }} + {{- range .Values.extraArgs }} + - {{ . }} + {{- end }} + {{- if .Values.extraEnv }} + env: + {{- with .Values.extraEnv }} + {{- toYaml . | nindent 12 }} + {{- end }} + {{- end }} + {{- if .Values.extraEnvFrom }} + envFrom: + {{- with .Values.extraEnvFrom }} + {{- toYaml . | nindent 12 }} + {{- end }} + {{- end }} + ports: + - name: http-metrics + containerPort: 8001 + protocol: TCP + {{- if .Values.webhooks.enabled }} + - name: https + containerPort: 8443 + protocol: TCP + {{- end }} + readinessProbe: + httpGet: + path: /ready + port: http-metrics + initialDelaySeconds: 5 + timeoutSeconds: 1 + resources: + {{- toYaml .Values.resources | nindent 12 }} + {{- with .Values.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/packs/loki-3.7.4/charts/loki/charts/rollout-operator/templates/no-downscale-webhook.yaml b/packs/loki-3.7.4/charts/loki/charts/rollout-operator/templates/no-downscale-webhook.yaml new file mode 100644 index 00000000..dabf7c37 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/charts/rollout-operator/templates/no-downscale-webhook.yaml @@ -0,0 +1,55 @@ +{{- if .Values.webhooks.enabled -}} +apiVersion: admissionregistration.k8s.io/v1 +kind: ValidatingWebhookConfiguration +metadata: + name: no-downscale-{{ .Release.Namespace }} + labels: + grafana.com/inject-rollout-operator-ca: "true" + grafana.com/namespace: {{ .Release.Namespace | quote }} + {{- include "rollout-operator.labels" . | nindent 4 }} +webhooks: + - name: no-downscale-{{ .Release.Namespace }}.grafana.com + clientConfig: + service: + namespace: {{ .Release.Namespace | quote }} + name: {{ include "rollout-operator.fullname" . }} + path: /admission/no-downscale + port: 443 + rules: + - operations: + - UPDATE + apiGroups: + - apps + apiVersions: + - v1 + resources: + - statefulsets + - statefulsets/scale + scope: Namespaced + admissionReviewVersions: + - v1 + {{- if not (kindIs "invalid" .Values.namespaceSelector) }} + namespaceSelector: + {{- if .Values.namespaceSelector.matchLabels }} + matchLabels: + {{- toYaml .Values.namespaceSelector.matchLabels | nindent 8 }} + {{- with .Values.namespaceSelector.matchExpressions }} + matchExpressions: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- else }} + matchLabels: + kubernetes.io/metadata.name: {{ .Release.Namespace | quote }} + {{- with .Values.namespaceSelector.matchExpressions }} + matchExpressions: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- end }} + {{- end }} + {{- with .Values.webhooks.objectSelector }} + objectSelector: + {{- toYaml . | nindent 6 }} + {{- end }} + sideEffects: None + failurePolicy: {{.Values.webhooks.failurePolicy}} +{{- end -}} \ No newline at end of file diff --git a/packs/loki-3.7.4/charts/loki/charts/rollout-operator/templates/pod-eviction-webhook.yaml b/packs/loki-3.7.4/charts/loki/charts/rollout-operator/templates/pod-eviction-webhook.yaml new file mode 100644 index 00000000..ccf6ce8a --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/charts/rollout-operator/templates/pod-eviction-webhook.yaml @@ -0,0 +1,51 @@ +{{- if .Values.webhooks.enabled -}} +apiVersion: admissionregistration.k8s.io/v1 +kind: ValidatingWebhookConfiguration +metadata: + name: pod-eviction-{{ .Release.Namespace }} + labels: + grafana.com/inject-rollout-operator-ca: "true" + grafana.com/namespace: {{ .Release.Namespace | quote }} + {{- include "rollout-operator.labels" . | nindent 4 }} +webhooks: + - name: pod-eviction-{{ .Release.Namespace }}.grafana.com + clientConfig: + service: + namespace: {{ .Release.Namespace | quote }} + name: {{ include "rollout-operator.fullname" . }} + path: /admission/pod-eviction + port: 443 + rules: + - operations: + - CREATE + apiGroups: + - "" + apiVersions: + - v1 + resources: + - pods/eviction + scope: Namespaced + admissionReviewVersions: + - v1 + {{- if not (kindIs "invalid" .Values.namespaceSelector) }} + namespaceSelector: + {{- if .Values.namespaceSelector.matchLabels }} + matchLabels: + {{- toYaml .Values.namespaceSelector.matchLabels | nindent 8 }} + {{- else }} + matchLabels: + kubernetes.io/metadata.name: {{ .Release.Namespace | quote }} + {{- end }} + {{- with .Values.namespaceSelector.matchExpressions }} + matchExpressions: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- end }} + {{- with .Values.webhooks.objectSelector }} + objectSelector: + {{- toYaml . | nindent 6 }} + {{- end }} + sideEffects: None + timeoutSeconds: {{.Values.webhooks.timeoutSeconds}} + failurePolicy: {{.Values.webhooks.failurePolicy}} +{{- end -}} \ No newline at end of file diff --git a/packs/loki-3.7.4/charts/loki/charts/rollout-operator/templates/prepare-downscale-webhook.yaml b/packs/loki-3.7.4/charts/loki/charts/rollout-operator/templates/prepare-downscale-webhook.yaml new file mode 100644 index 00000000..aaf6c5b5 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/charts/rollout-operator/templates/prepare-downscale-webhook.yaml @@ -0,0 +1,53 @@ +{{- if .Values.webhooks.enabled -}} +apiVersion: admissionregistration.k8s.io/v1 +kind: MutatingWebhookConfiguration +metadata: + name: prepare-downscale-{{ .Release.Namespace }} + labels: + grafana.com/inject-rollout-operator-ca: "true" + grafana.com/namespace: {{ .Release.Namespace | quote }} + {{- include "rollout-operator.labels" . | nindent 4 }} +webhooks: + - name: prepare-downscale-{{ .Release.Namespace }}.grafana.com + clientConfig: + service: + namespace: {{ .Release.Namespace | quote }} + name: {{ include "rollout-operator.fullname" . }} + path: /admission/prepare-downscale + port: 443 + rules: + - operations: + - UPDATE + apiGroups: + - apps + apiVersions: + - v1 + resources: + - statefulsets + - statefulsets/scale + scope: Namespaced + admissionReviewVersions: + - v1 + {{- if not (kindIs "invalid" .Values.namespaceSelector) }} + namespaceSelector: + {{- if .Values.namespaceSelector.matchLabels }} + matchLabels: + {{- toYaml .Values.namespaceSelector.matchLabels | nindent 8 }} + {{- else }} + matchLabels: + kubernetes.io/metadata.name: {{ .Release.Namespace | quote }} + {{- end }} + {{- with .Values.namespaceSelector.matchExpressions }} + matchExpressions: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- end }} + {{- with .Values.webhooks.objectSelector }} + objectSelector: + {{- toYaml . | nindent 6 }} + {{- end }} + sideEffects: NoneOnDryRun + matchPolicy: Equivalent + timeoutSeconds: {{.Values.webhooks.timeoutSeconds}} + failurePolicy: {{.Values.webhooks.failurePolicy}} +{{- end -}} \ No newline at end of file diff --git a/packs/loki-3.7.4/charts/loki/charts/rollout-operator/templates/role.yaml b/packs/loki-3.7.4/charts/loki/charts/rollout-operator/templates/role.yaml new file mode 100644 index 00000000..a949c3de --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/charts/rollout-operator/templates/role.yaml @@ -0,0 +1,51 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: {{ include "rollout-operator.fullname" . }} + namespace: {{ .Release.Namespace | quote }} + labels: + {{- include "rollout-operator.labels" . | nindent 4 }} +rules: +- apiGroups: + - "" + resources: + - pods + verbs: + - list + - get + - watch + - delete + - patch +- apiGroups: + - apps + resources: + - statefulsets + verbs: + - list + - get + - watch + - patch +- apiGroups: + - apps + resources: + - statefulsets/status + verbs: + - update +- apiGroups: + - rollout-operator.grafana.com + resources: + - zoneawarepoddisruptionbudgets + verbs: + - get + - list + - watch +{{- if .Values.webhooks.enabled }} +- apiGroups: + - rollout-operator.grafana.com + resources: + - replicatemplates/scale + - replicatemplates/status + verbs: + - get + - patch + {{- end }} \ No newline at end of file diff --git a/packs/loki-3.7.4/charts/loki/charts/rollout-operator/templates/rolebinding.yaml b/packs/loki-3.7.4/charts/loki/charts/rollout-operator/templates/rolebinding.yaml new file mode 100644 index 00000000..cd86bd12 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/charts/rollout-operator/templates/rolebinding.yaml @@ -0,0 +1,14 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: {{ include "rollout-operator.fullname" . }} + namespace: {{ .Release.Namespace | quote }} + labels: + {{- include "rollout-operator.labels" . | nindent 4 }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: {{ include "rollout-operator.fullname" . }} +subjects: +- kind: ServiceAccount + name: {{ include "rollout-operator.serviceAccountName" . }} diff --git a/packs/loki-3.7.4/charts/loki/charts/rollout-operator/templates/service.yaml b/packs/loki-3.7.4/charts/loki/charts/rollout-operator/templates/service.yaml new file mode 100644 index 00000000..776337f2 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/charts/rollout-operator/templates/service.yaml @@ -0,0 +1,29 @@ +{{- if or (eq .Values.serviceMonitor.enabled true) (eq .Values.webhooks.enabled true) }} +apiVersion: v1 +kind: Service +metadata: + name: {{ include "rollout-operator.fullname" . }} + namespace: {{ .Release.Namespace | quote }} + labels: + {{- include "rollout-operator.labels" . | nindent 4 }} +spec: + type: ClusterIP + {{- if eq .Values.webhooks.enabled false }} + clusterIP: None + {{- end }} + ports: + {{- if .Values.serviceMonitor.enabled }} + - port: 8001 + targetPort: http-metrics + protocol: TCP + name: http-metrics + {{- end }} + {{- if .Values.webhooks.enabled }} + - port: 443 + protocol: TCP + targetPort: 8443 + name: https + {{- end }} + selector: + {{- include "rollout-operator.selectorLabels" . | nindent 4 }} +{{- end -}} diff --git a/packs/loki-3.7.4/charts/loki/charts/rollout-operator/templates/serviceaccount.yaml b/packs/loki-3.7.4/charts/loki/charts/rollout-operator/templates/serviceaccount.yaml new file mode 100644 index 00000000..90a06cbb --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/charts/rollout-operator/templates/serviceaccount.yaml @@ -0,0 +1,13 @@ +{{- if .Values.serviceAccount.create -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "rollout-operator.serviceAccountName" . }} + namespace: {{ .Release.Namespace | quote }} + labels: + {{- include "rollout-operator.labels" . | nindent 4 }} + {{- with .Values.serviceAccount.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/charts/rollout-operator/templates/servicemonitor.yaml b/packs/loki-3.7.4/charts/loki/charts/rollout-operator/templates/servicemonitor.yaml new file mode 100644 index 00000000..5bb1d2af --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/charts/rollout-operator/templates/servicemonitor.yaml @@ -0,0 +1,36 @@ +{{- if .Values.serviceMonitor.enabled }} +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: {{ include "rollout-operator.fullname" . }} + {{- with .Values.serviceMonitor.namespace }} + namespace: {{ . | default $.Release.Namespace | quote }} + {{- end }} + labels: + {{- include "rollout-operator.labels" . | nindent 4 }} + {{- with .Values.serviceMonitor.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- with .Values.serviceMonitor.namespaceSelector }} + namespaceSelector: + {{- toYaml . | nindent 4 }} + {{- end }} + selector: + matchLabels: + {{- include "rollout-operator.selectorLabels" . | nindent 6 }} + endpoints: + - port: http-metrics + {{- with .Values.serviceMonitor.interval }} + interval: {{ . }} + {{- end }} + {{- with .Values.serviceMonitor.scrapeTimeout }} + scrapeTimeout: {{ . }} + {{- end }} + {{- with .Values.serviceMonitor.relabelings }} + relabelings: + {{- toYaml . | nindent 8 }} + {{- end }} + scheme: http +{{- end -}} diff --git a/packs/loki-3.7.4/charts/loki/charts/rollout-operator/templates/webhook-clusterrole-binding.yaml b/packs/loki-3.7.4/charts/loki/charts/rollout-operator/templates/webhook-clusterrole-binding.yaml new file mode 100644 index 00000000..c305928c --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/charts/rollout-operator/templates/webhook-clusterrole-binding.yaml @@ -0,0 +1,14 @@ +{{- if .Values.webhooks.enabled -}} +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: {{ include "rollout-operator.fullname" . }}-webhook-clusterrolebinding +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: {{ include "rollout-operator.fullname" . }}-webhook-clusterrole +subjects: + - kind: ServiceAccount + name: {{ include "rollout-operator.serviceAccountName" . }} + namespace: {{ .Release.Namespace | quote }} +{{- end -}} \ No newline at end of file diff --git a/packs/loki-3.7.4/charts/loki/charts/rollout-operator/templates/webhook-clusterrole.yaml b/packs/loki-3.7.4/charts/loki/charts/rollout-operator/templates/webhook-clusterrole.yaml new file mode 100644 index 00000000..7e597c1b --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/charts/rollout-operator/templates/webhook-clusterrole.yaml @@ -0,0 +1,16 @@ +{{- if .Values.webhooks.enabled -}} +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: {{ include "rollout-operator.fullname" . }}-webhook-clusterrole +rules: + - apiGroups: + - admissionregistration.k8s.io + resources: + - validatingwebhookconfigurations + - mutatingwebhookconfigurations + verbs: + - list + - patch + - watch +{{- end -}} \ No newline at end of file diff --git a/packs/loki-3.7.4/charts/loki/charts/rollout-operator/templates/webhook-role-binding.yaml b/packs/loki-3.7.4/charts/loki/charts/rollout-operator/templates/webhook-role-binding.yaml new file mode 100644 index 00000000..7da0b53e --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/charts/rollout-operator/templates/webhook-role-binding.yaml @@ -0,0 +1,15 @@ +{{- if .Values.webhooks.enabled -}} +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: {{ include "rollout-operator.fullname" . }}-webhook-rolebinding + namespace: {{ .Release.Namespace | quote }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: {{ include "rollout-operator.fullname" . }}-webhook-role +subjects: + - kind: ServiceAccount + name: {{ include "rollout-operator.serviceAccountName" . }} + namespace: {{ .Release.Namespace | quote }} +{{- end -}} \ No newline at end of file diff --git a/packs/loki-3.7.4/charts/loki/charts/rollout-operator/templates/webhook-role.yaml b/packs/loki-3.7.4/charts/loki/charts/rollout-operator/templates/webhook-role.yaml new file mode 100644 index 00000000..8d548632 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/charts/rollout-operator/templates/webhook-role.yaml @@ -0,0 +1,23 @@ +{{- if .Values.webhooks.enabled -}} +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: {{ include "rollout-operator.fullname" . }}-webhook-role + namespace: {{ .Release.Namespace | quote }} +rules: + - apiGroups: + - "" + resources: + - secrets + verbs: + - update + - get + resourceNames: + - {{ .Values.webhooks.selfSignedCertSecretName }} + - apiGroups: + - "" + resources: + - secrets + verbs: + - create +{{- end -}} \ No newline at end of file diff --git a/packs/loki-3.7.4/charts/loki/charts/rollout-operator/templates/zone-aware-pod-disruption-budget-validating-webhook.yaml b/packs/loki-3.7.4/charts/loki/charts/rollout-operator/templates/zone-aware-pod-disruption-budget-validating-webhook.yaml new file mode 100644 index 00000000..33072a6d --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/charts/rollout-operator/templates/zone-aware-pod-disruption-budget-validating-webhook.yaml @@ -0,0 +1,51 @@ +{{- if .Values.webhooks.enabled -}} +apiVersion: admissionregistration.k8s.io/v1 +kind: ValidatingWebhookConfiguration +metadata: + name: zpdb-validation-{{ .Release.Namespace }} + labels: + grafana.com/inject-rollout-operator-ca: "true" + grafana.com/namespace: {{ .Release.Namespace | quote }} + {{- include "rollout-operator.labels" . | nindent 4 }} +webhooks: + - name: zpdb-validation-{{ .Release.Namespace }}.grafana.com + clientConfig: + service: + namespace: {{ .Release.Namespace | quote }} + name: {{ include "rollout-operator.fullname" . }} + path: /admission/zpdb-validation + port: 443 + rules: + - operations: + - CREATE + - UPDATE + apiGroups: + - rollout-operator.grafana.com + apiVersions: + - v1 + resources: + - zoneawarepoddisruptionbudgets + scope: Namespaced + admissionReviewVersions: ["v1"] + {{- if not (kindIs "invalid" .Values.namespaceSelector) }} + namespaceSelector: + {{- if .Values.namespaceSelector.matchLabels }} + matchLabels: + {{- toYaml .Values.namespaceSelector.matchLabels | nindent 8 }} + {{- else }} + matchLabels: + kubernetes.io/metadata.name: {{ .Release.Namespace | quote }} + {{- end }} + {{- with .Values.namespaceSelector.matchExpressions }} + matchExpressions: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- end }} + {{- with .Values.webhooks.objectSelector }} + objectSelector: + {{- toYaml . | nindent 6 }} + {{- end }} + sideEffects: None + timeoutSeconds: {{.Values.webhooks.timeoutSeconds}} + failurePolicy: {{.Values.webhooks.failurePolicy}} +{{- end -}} \ No newline at end of file diff --git a/packs/loki-3.7.4/charts/loki/charts/rollout-operator/values.yaml b/packs/loki-3.7.4/charts/loki/charts/rollout-operator/values.yaml new file mode 100644 index 00000000..ad64b806 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/charts/rollout-operator/values.yaml @@ -0,0 +1,187 @@ +# Default values for rollout-operator. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + + +global: + # -- Common labels for all object directly managed by this chart. + commonLabels: {} + +# -- Number of old ReplicaSets to retain +revisionHistoryLimit: 10 + +image: + repository: grafana/rollout-operator + registry: docker.io + pullPolicy: IfNotPresent + # -- Overrides the image tag whose default is the chart appVersion. + tag: "" + +imagePullSecrets: [] + +# -- hostAliases to add +hostAliases: [] +# - ip: 1.2.3.4 +# hostnames: +# - domain.tld + +# -- Enable or disable the use of host networking for the pod. +# When true, the pod will use the node's network namespace +hostNetwork: false + +nameOverride: "" +fullnameOverride: "" + +serviceAccount: + # -- Specifies whether a service account should be created + create: true + # -- Annotations to add to the service account + annotations: {} + # -- The name of the service account to use. + # If not set and create is true, a name is generated using the fullname template + name: "" + +## CRD management. +## rollout-operator always requires its CRDs (ReplicaTemplate, NoDownscale) to +## be present in the cluster — the operator will not start without them. This +## flag controls only whether *this chart* installs them via the bundled +## `crds` subchart. +## +## Leave `enabled: true` (default) for standalone installs. +## +## Set `enabled: false` only when CRDs are managed out of band, for example: +## * a single shared rollout-operator instance owns the CRDs cluster-wide +## and other releases should not contend with them; +## * CRDs are reconciled by a GitOps controller, an umbrella chart, or a +## separate Helm release dedicated to CRDs; +## * cluster RBAC forbids the release's service account from creating CRDs. +## In all of these cases you are responsible for ensuring the CRDs exist +## before installing/upgrading this chart. +crds: + # -- Install CRDs as part of the chart (via the bundled `crds` subchart). + # Set to `false` only when CRDs are managed out of band — see the comment + # above for guidance. + enabled: true + +# -- Additional annotations to add to the deployment +annotations: {} + +# -- Pod Annotations +podAnnotations: {} + +# -- Pod (extra) Labels +podLabels: {} + +podSecurityContext: {} + # fsGroup: 2000 + +securityContext: {} + # capabilities: + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + +# -- List of additional CLI arguments to configure rollout-operator (example: `--log.level=info`) +extraArgs: [] + +# -- Environment variables to add to rollout-operator container +extraEnv: [] + +# -- Environment variables from secrets or configmaps to add to rollout-operator container +extraEnvFrom: [] + +resources: + limits: + # cpu: "1" + memory: 200Mi + requests: + cpu: 100m + memory: 100Mi + +minReadySeconds: 10 + +nodeSelector: {} + +tolerations: [] + +affinity: {} + +priorityClassName: "" + +serviceMonitor: + # -- Create ServiceMonitor to scrape metrics for Prometheus + enabled: false + # -- Alternative namespace for ServiceMonitor resources + namespace: null + # -- Namespace selector for ServiceMonitor resources + namespaceSelector: {} + # -- ServiceMonitor annotations + annotations: {} + # -- Additional ServiceMonitor labels + labels: {} + # -- ServiceMonitor scrape interval + interval: null + # -- ServiceMonitor scrape timeout in Go duration format (e.g. 15s) + scrapeTimeout: null + # -- ServiceMonitor relabel configs to apply to samples before scraping + # https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#relabelconfig + relabelings: [] + +webhooks: + # -- Enable the rollout-operator webhooks. See https://github.com/grafana/rollout-operator/#webhooks. + # Note that the webhooks require custom resource definitions. If upgrading, manually apply the files in the `crds` directory. + enabled: true + # -- Timeout in seconds for the prepare-downscale mutating webhook. Must be between 1 and 30. + timeoutSeconds: 10 + # -- Validating and mutating webhook failure policy. `Ignore` or `Fail`. + failurePolicy: "Fail" + # -- Secret resource name for the TLS certificate to be used with the webhooks + selfSignedCertSecretName: "certificate" + # -- objectSelector to filter which objects the webhooks apply to. + objectSelector: {} + # See https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/#matching-requests-objectselector + # Example: + # objectSelector: + # matchLabels: + # app: loki + # matchExpressions: + # - key: environment + # operator: In + # values: + # - production + +# -- Namespace selector applied to all webhooks. Defaults to restricting to the release namespace. +# See https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/#matching-requests-namespaceselector +namespaceSelector: + # Example 1 - matchExpressions only: merged with the default release namespace matchLabels. + # values.yaml: + # matchExpressions: + # - key: team + # operator: NotIn + # values: [team-a] + # renders: + # namespaceSelector: + # matchLabels: + # kubernetes.io/metadata.name: + # matchExpressions: + # - key: team + # operator: NotIn + # values: [team-a] + # + # Example 2 - matchLabels set: full selector is user-controlled (matchExpressions also supported). + # values.yaml: + # matchLabels: + # kubernetes.io/metadata.name: logging + # renders: + # namespaceSelector: + # matchLabels: + # kubernetes.io/metadata.name: logging + # + # Example 3 - set to null: omits namespaceSelector entirely (e.g. when objectSelector alone is sufficient). + # values.yaml: + # namespaceSelector: null + # renders: + # (nothing) + matchExpressions: [] diff --git a/packs/loki-3.7.4/charts/loki/templates/NOTES.txt b/packs/loki-3.7.4/charts/loki/templates/NOTES.txt new file mode 100644 index 00000000..e5b67e9b --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/NOTES.txt @@ -0,0 +1,177 @@ +*********************************************************************** + Welcome to Grafana Loki + Chart version: {{ .Chart.Version }} + Chart Name: {{ .Chart.Name }} + Loki version: {{ .Chart.AppVersion }} +*********************************************************************** + +** Please be patient while the chart is being deployed ** + +Tip: + + Watch the deployment status using the command: kubectl get pods -w --namespace {{ include "loki.namespace" $ }} + +If pods are taking too long to schedule make sure pod affinity can be fulfilled in the current cluster. + +*********************************************************************** +Installed components: +*********************************************************************** + +{{- if eq (include "loki.deployment.isMonolithic" .) "true" }} +* loki +{{- else -}} +{{- if .Values.gateway.enabled }} +* gateway +{{- end }} +{{- if .Values.minio.enabled }} +* minio +{{- end }} +{{- if eq (include "loki.deployment.isScalable" .) "true" }} +* read +* write +* backend +{{- else }} +* compactor +* index gateway +* query scheduler +* ruler +* distributor +* ingester +* querier +* query frontend +{{- end }} +{{- end }} + + +{{- if eq (include "loki.deployment.isMonolithic" .) "true" }} + +Loki has been deployed as a single binary. +This means a single pod is handling reads and writes. You can scale that pod vertically by adding more CPU and memory resources. + +{{- end }} + + +*********************************************************************** +Sending logs to Loki +*********************************************************************** + +{{- if .Values.gateway.enabled }} + +Loki has been configured with a gateway (nginx) to support reads and writes from a single component. + +{{- end }} + +You can send logs from inside the cluster using the cluster DNS: + +{{- if .Values.gateway.enabled }} + +http://{{ include "loki.resourceName" (dict "ctx" . "component" "gateway") }}.{{ include "loki.namespace" . }}.svc.{{ .Values.global.clusterDomain }}/loki/api/v1/push + +{{- else }} +{{- if eq (include "loki.deployment.isMonolithic" .) "true" }} + +http://{{ include "loki.fullname" . }}.{{ include "loki.namespace" . }}.svc.{{ .Values.global.clusterDomain }}:{{ .Values.loki.server.http_listen_port }}/loki/api/v1/push + +{{- end}} +{{- if eq (include "loki.deployment.isScalable" .) "true" }} + +http://{{ include "loki.resourceName" (dict "ctx" . "component" "write") }}.{{ include "loki.namespace" . }}.svc.{{ .Values.global.clusterDomain }}:{{ .Values.loki.server.http_listen_port }}/loki/api/v1/push + +{{- end }} +{{- if eq (include "loki.deployment.isDistributed" .) "true" }} + +http://{{ include "loki.resourceName" (dict "ctx" . "component" "distributor") }}.{{ include "loki.namespace" . }}.svc.{{ .Values.global.clusterDomain }}:3100/loki/api/v1/push + +{{- end }} +{{- end }} + +You can test to send data from outside the cluster by port-forwarding the gateway to your local machine: +{{- if .Values.gateway.enabled }} + + kubectl port-forward --namespace {{ include "loki.namespace" $ }} svc/{{ include "loki.resourceName" (dict "ctx" . "component" "gateway") }} 3100:{{ .Values.gateway.service.port }} & + +{{- else }} +{{- if eq (include "loki.deployment.isMonolithic" .) "true" }} + + kubectl port-forward --namespace {{ include "loki.namespace" $ }} svc/{{ include "loki.fullname" . }} 3100:{{ .Values.loki.server.http_listen_port }} & + +{{- end }} +{{- if eq (include "loki.deployment.isScalable" .) "true" }} + + kubectl port-forward --namespace {{ include "loki.namespace" $ }} svc/{{ include "loki.resourceName" (dict "ctx" . "component" "write") }} 3100:{{ .Values.loki.server.http_listen_port }} & + +{{- end }} +{{- if eq (include "loki.deployment.isDistributed" .) "true" }} + + kubectl port-forward --namespace {{ include "loki.namespace" $ }} svc/{{ include "loki.resourceName" (dict "ctx" . "component" "distributor") }} 3100:3100 & + +{{- end }} +{{- end }} + +And then using http://127.0.0.1:3100/loki/api/v1/push URL as shown below: + +``` +curl -H "Content-Type: application/json" -XPOST -s "http://127.0.0.1:3100/loki/api/v1/push" \ +--data-raw "{\"streams\": [{\"stream\": {\"job\": \"test\"}, \"values\": [[\"$(date +%s)000000000\", \"fizzbuzz\"]]}]}" +{{- if .Values.loki.auth_enabled }} \ +-H X-Scope-OrgId:foo +{{- end}} +``` + +Then verify that Loki did receive the data using the following command: + +``` +curl "http://127.0.0.1:3100/loki/api/v1/query_range" --data-urlencode 'query={job="test"}' {{- if .Values.loki.auth_enabled }} -H X-Scope-OrgId:foo {{- end}} | jq .data.result +``` + +*********************************************************************** +Connecting Grafana to Loki +*********************************************************************** + +If Grafana operates within the cluster, you'll set up a new Loki datasource by utilizing the following URL: + +{{- if .Values.gateway.enabled }} + +http://{{ include "loki.resourceName" (dict "ctx" . "component" "gateway") }}.{{ include "loki.namespace" . }}.svc.{{ .Values.global.clusterDomain }}/ + +{{- else }} +{{- if eq (include "loki.deployment.isMonolithic" .) "true" }} + +http://{{ include "loki.fullname" . }}.{{ include "loki.namespace" . }}.svc.{{ .Values.global.clusterDomain }}:{{ .Values.loki.server.http_listen_port }}/ + +{{- end}} +{{- if eq (include "loki.deployment.isScalable" .) "true" }} + +http://{{ include "loki.resourceName" (dict "ctx" . "component" "read") }}.{{ include "loki.namespace" . }}.svc.{{ .Values.global.clusterDomain }}:{{ .Values.loki.server.http_listen_port }}/ + +{{- end }} +{{- if eq (include "loki.deployment.isDistributed" .) "true" }} + +http://{{ include "loki.resourceName" (dict "ctx" . "component" "query-frontend") }}.{{ include "loki.namespace" . }}.svc.{{ .Values.global.clusterDomain }}:3100/ + +{{- end }} +{{- end }} + +{{- if .Values.loki.auth_enabled }} + +*********************************************************************** +Multi-tenancy +*********************************************************************** + +Loki is configured with auth enabled (multi-tenancy) and expects tenant headers (`X-Scope-OrgID`) to be set for all API calls. + +You must configure Grafana's Loki datasource using the `HTTP Headers` section with the `X-Scope-OrgID` to target a specific tenant. +For each tenant, you can create a different datasource. + +The agent of your choice must also be configured to propagate this header. +For example, when using Promtail you can use the `tenant` stage. https://grafana.com/docs/loki/latest/send-data/promtail/stages/tenant/ + +When not provided with the `X-Scope-OrgID` while auth is enabled, Loki will reject reads and writes with a 404 status code `no org id`. + +You can also use a reverse proxy, to automatically add the `X-Scope-OrgID` header as suggested by https://grafana.com/docs/loki/latest/operations/authentication/ + +For more information, read our documentation about multi-tenancy: https://grafana.com/docs/loki/latest/operations/multi-tenancy/ + +> When using curl you can pass `X-Scope-OrgId` header using `-H X-Scope-OrgId:foo` option, where foo can be replaced with the tenant of your choice. + +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/_helpers.tpl b/packs/loki-3.7.4/charts/loki/templates/_helpers.tpl new file mode 100644 index 00000000..832ab73f --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/_helpers.tpl @@ -0,0 +1,1214 @@ +{{/* +Enforce valid label value. +See https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#syntax-and-character-set +*/}} +{{- define "loki.validLabelValue" -}} +{{- (regexReplaceAllLiteral "[^a-zA-Z0-9._-]" . "-") | trunc 63 | trimSuffix "-" | trimSuffix "_" | trimSuffix "." }} +{{- end }} + +{{/* +Safely convert a value to int with fallback. + +Accepts int, float64 (e.g. 15.0), or numeric strings (e.g. "15"). +Falls back to default for invalid values (e.g. "abc", nil). + +Usage: + {{ include "loki.safeInt" (dict "value" $v "default" 30) }} + +Args: + value: input value to convert + default: fallback integer if value is invalid +*/}} +{{- define "loki.safeInt" -}} +{{- $v := index . "value" -}} +{{- $default := index . "default" -}} + +{{- if or + (kindIs "int" $v) + (kindIs "float64" $v) + (and (kindIs "string" $v) (eq (toString (toString $v | int)) $v)) +}} + {{- toString $v | int -}} +{{- else -}} + {{- $default -}} +{{- end -}} +{{- end -}} + +{{/* +Expand the name of the chart. +*/}} +{{- define "loki.name" -}} +{{- $name := .Chart.Name }} +{{- if .Values.nameOverride }} +{{- $name = (tpl .Values.nameOverride $) }} +{{- end }} +{{- $name | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Allow the release namespace to be overridden for multi-namespace deployments in combined charts +*/}} +{{- define "loki.namespace" -}} + {{- if .Values.namespaceOverride -}} + {{- .Values.namespaceOverride -}} + {{- else -}} + {{- .Release.Namespace -}} + {{- end -}} +{{- end -}} + +{{/* +Resource workload name template +Params: + ctx = . context + componentValues = component values + component = component name (optional) + rolloutZoneName = rollout zone name (optional) + suffix = component suffix (optional) +*/}} +{{- define "loki.workloadResourceName" -}} +{{- (tpl (.componentValues.fullnameOverride | default "") .ctx) | default (include "loki.resourceName" .) }} +{{- end -}} + +{{/* +Resource name template +Params: + ctx = . context + component = component name (optional) + rolloutZoneName = rollout zone name (optional) + suffix = component suffix (optional) +*/}} +{{- define "loki.resourceName" -}} +{{- $resourceName := include "loki.fullname" .ctx -}} +{{- if .component -}}{{- $resourceName = printf "%s-%s" $resourceName .component -}}{{- end -}} +{{- if and (not .component) .rolloutZoneName -}}{{- printf "Component name cannot be empty if rolloutZoneName (%s) is set" .rolloutZoneName | fail -}}{{- end -}} +{{- if .rolloutZoneName -}}{{- $resourceName = printf "%s-%s" $resourceName .rolloutZoneName -}}{{- end -}} +{{- if .suffix -}}{{- $resourceName = printf "%s-%s" $resourceName .suffix -}}{{- end -}} +{{- $resourceName | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Return if deployment mode is simple scalable +*/}} +{{- define "loki.deployment.isScalable" -}} + {{- and (eq (include "loki.isUsingObjectStorage" . ) "true") (or (eq .Values.deploymentMode "SingleBinary<->SimpleScalable") (eq .Values.deploymentMode "Monolithic<->SimpleScalable") (eq .Values.deploymentMode "SimpleScalable") (eq .Values.deploymentMode "SimpleScalable<->Distributed")) }} +{{- end -}} + +{{/* +Return if deployment mode is single binary +*/}} +{{- define "loki.deployment.isMonolithic" -}} + {{- or (eq .Values.deploymentMode "SingleBinary") (eq .Values.deploymentMode "Monolithic") (eq .Values.deploymentMode "SingleBinary<->SimpleScalable") (eq .Values.deploymentMode "Monolithic<->SimpleScalable") }} +{{- end -}} + +{{/* +Return if deployment mode is distributed +*/}} +{{- define "loki.deployment.isDistributed" -}} + {{- and (eq (include "loki.isUsingObjectStorage" . ) "true") (or (eq .Values.deploymentMode "Distributed") (eq .Values.deploymentMode "SimpleScalable<->Distributed")) }} +{{- end -}} + + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "loki.fullname" -}} +{{- if .Values.fullnameOverride }} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- $name := include "loki.name" . }} +{{- if contains $name .Release.Name }} +{{- .Release.Name | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} +{{- end }} +{{- end }} +{{- end }} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "loki.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "loki.labels" -}} +helm.sh/chart: {{ include "loki.chart" . }} +{{ include "loki.selectorLabels" . }} +{{- if or (.Chart.AppVersion) (.Values.loki.image.tag) }} +app.kubernetes.io/version: {{ include "loki.validLabelValue" (.Values.loki.image.tag | default .Chart.AppVersion) | quote }} +{{- end }} +{{- if .Values.commonLabels }} +{{ .Values.commonLabels | toYaml }} +{{- end }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "loki.selectorLabels" -}} +app.kubernetes.io/name: {{ include "loki.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use. + +Input parameters: + ctx = root context for looking up values + component = component name + target = target context +*/}} +{{- define "loki.serviceAccountName" -}} +{{- if .component.serviceAccount.name }} + {{- tpl .component.serviceAccount.name .ctx }} +{{- else if .component.serviceAccount.create -}} + {{- include "loki.resourceName" (dict "ctx" .ctx "component" .target) }} +{{- else if .ctx.Values.serviceAccount.name }} + {{- tpl .ctx.Values.serviceAccount.name .ctx }} +{{- else if .ctx.Values.serviceAccount.create -}} + {{- include "loki.fullname" .ctx }} +{{- else -}} + {{- "default" }} +{{- end -}} +{{- end -}} + +{{/* +Base template for building docker image reference +Always prepends the registry when one is configured (global or service-level). +It also respects `.digest` as well as `.sha` (deprecated). + +Parameters: + ctx = . root context + component = component name (optional) + defaultVersion = default version to use if tag is not defined (optional) + default = default image config to use if component config is not defined (optional) +*/}} +{{- define "loki.image" -}} +{{- $ctx := .ctx -}} +{{- $component := .component | default .service | default dict -}} +{{- $defaultVersion := .defaultVersion -}} +{{- $default := .default | default dict -}} +{{- $global := dict -}} +{{- if $ctx -}} +{{- $global = $ctx.Values.global | default dict -}} +{{- else -}} +{{- $global = .global | default dict -}} +{{- end -}} + +{{- /* Resolve image source values with clear precedence. */ -}} +{{- $registry := coalesce $global.imageRegistry $global.image.registry $global.registry $component.registry $default.registry "" -}} +{{- $repository := coalesce $component.repository $default.repository "" -}} + +{{- /* Prefer digest over tag, and support deprecated sha fallback. */ -}} +{{- $sha := coalesce $component.sha $default.sha "" -}} +{{- $shaRef := ternary (printf "@sha256:%s" $sha) "" (not (empty $sha)) -}} +{{- $digest := coalesce $component.digest $default.digest "" -}} +{{- $digestRef := ternary (printf "@%s" $digest) $shaRef (not (empty $digest)) -}} +{{- $tagRef := printf ":%s" (coalesce $component.tag $default.tag $defaultVersion | toString) -}} +{{- $ref := ternary $tagRef $digestRef (empty $digestRef) -}} + +{{- $prefix := "" -}} +{{- if $registry -}} +{{- $prefix = printf "%s/" $registry -}} +{{- end -}} + +{{- printf "%s%s%s" $prefix $repository $ref -}} +{{- end -}} + +{{/* +Generated storage config for loki common config +*/}} +{{- define "loki.commonStorageConfig" -}} +{{- if .Values.loki.storage.use_thanos_objstore -}} +{{- $bucketName := required "Please define loki.storage.bucketNames.chunks" (dig "storage" "bucketNames" "chunks" "" .Values.loki) }} +object_store: + {{- include "loki.thanosStorageConfig" (dict "ctx" . "bucketName" $bucketName) | nindent 2 }} +{{- else if .Values.minio.enabled -}} +s3: + endpoint: {{ include "loki.minio" $ }} + bucketnames: chunks + secret_access_key: {{ $.Values.minio.rootPassword }} + access_key_id: {{ $.Values.minio.rootUser }} + s3forcepathstyle: true + insecure: true +{{- else if (eq (include "loki.isUsingObjectStorage" . ) "true") -}} +{{- $bucketName := "" }} +{{- if not (or (dig "aws" "s3" "" .Values.loki.storage_config) (dig "aws" "bucketnames" "" .Values.loki.storage_config)) -}} +{{- $bucketName = required "Please define loki.storage.bucketNames.chunks" (dig "storage" "bucketNames" "chunks" "" .Values.loki) }} +{{- end -}} +{{- include "loki.lokiStorageConfig" (dict "ctx" . "bucketName" $bucketName) | nindent 0 }} +{{- else if .Values.loki.storage.filesystem }} +filesystem: + {{- toYaml .Values.loki.storage.filesystem | nindent 2 }} +{{- end -}} +{{- end -}} + +{{/* +Storage config for ruler +*/}} +{{- define "loki.rulerStorageConfig" -}} +{{- if eq (dig "storage" "type" "" .Values.loki.rulerConfig) "local" -}} +type: "local" +{{- else if .Values.minio.enabled -}} +type: "s3" +s3: + bucketnames: ruler +{{- else if (eq (include "loki.isUsingObjectStorage" . ) "true") }} +type: {{ .Values.loki.storage.type | quote }} +{{- $bucketName := required "Please define loki.storage.bucketNames.ruler" (dig "storage" "bucketNames" "ruler" "" .Values.loki) }} +{{- include "loki.lokiStorageConfig" (dict "ctx" . "bucketName" $bucketName) | nindent 0 }} +{{- else }} +type: "local" +{{- end }} +{{- end -}} + + +{{/* +Storage config +*/}} +{{- define "loki.lokiStorageConfig" -}} +{{- $bucketName := .bucketName }} +{{- if eq .ctx.Values.loki.storage.type "s3" -}} +s3: +{{- include "loki.lokiStorageConfig.s3" (dict "ctx" .ctx.Values.loki.storage.s3 "bucketName" $bucketName) | nindent 2 }} +{{- else if eq .ctx.Values.loki.storage.type "gcs" -}} +gcs: +{{- include "loki.lokiStorageConfig.gcs" (dict "ctx" .ctx.Values.loki.storage.gcs "bucketName" $bucketName) | nindent 2 }} +{{- else if eq .ctx.Values.loki.storage.type "azure" -}} +azure: +{{- include "loki.lokiStorageConfig.azure" (dict "ctx" .ctx.Values.loki.storage.azure "bucketName" $bucketName) | nindent 2 }} +{{- else if eq .ctx.Values.loki.storage.type "alibabacloud" -}} +{{- with .ctx.Values.loki.storage.alibabacloud }} +alibabacloud: + {{- toYaml (mergeOverwrite dict + (dict + "bucket" $bucketName + "access_key_id" .accessKeyId + "secret_access_key" .secretAccessKey + ) + (omit . "bucket" "accessKeyId" "secretAccessKey") + ) | nindent 2 }} +{{- end -}} +{{- else if eq .ctx.Values.loki.storage.type "swift" -}} +{{- with .ctx.Values.loki.storage.swift }} +swift: + container_name: {{ $bucketName }} +{{- toYaml (omit . "container_name") | nindent 2 }} +{{- end -}} +{{- else if eq .ctx.Values.loki.storage.type "bos" -}} +{{- with .ctx.Values.loki.storage.bos }} +bos: + bucket_name: {{ $bucketName }} +{{- toYaml (omit . "bucketName") | nindent 2 }} +{{- end -}} +{{- else if eq .ctx.Values.loki.storage.type "cos" -}} +{{- with .ctx.Values.loki.storage.cos }} +cos: + bucketnames: {{ $bucketName }} +{{- toYaml (omit . "bucketnames") | nindent 2 }} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Storage config S3 +*/}} +{{- define "loki.lokiStorageConfig.s3" -}} +{{- $bucketName := .bucketName }} +{{- with .ctx }} +{{- mergeOverwrite +(dict + "bucketnames" $bucketName + "s3forcepathstyle" .s3ForcePathStyle +) +(omit . "bucketnames" "s3ForcePathStyle" "s3" "endpoint" "region" "secretAccessKey" "accessKeyId" "signatureVersion" "disable_dualstack" "http_config" "backoff_config" "sse") +| toYaml | nindent 0 }} +{{- with .s3 }} +s3: {{ . }} +{{- end }} +{{- with .endpoint }} +endpoint: {{ . }} +{{- end }} +{{- with .region }} +region: {{ . }} +{{- end}} +{{- with .secretAccessKey }} +secret_access_key: {{ . }} +{{- end }} +{{- with .accessKeyId }} +access_key_id: {{ . }} +{{- end }} +{{- with .signatureVersion }} +signature_version: {{ . }} +{{- end }} +{{- with .disable_dualstack }} +disable_dualstack: {{ . }} +{{- end }} +{{- with .http_config }} +http_config: +{{- toYaml . | nindent 4 }} +{{- end }} +{{- with .backoff_config }} +backoff_config: +{{- toYaml . | nindent 4 }} +{{- end }} +{{- with .sse }} +sse: +{{- toYaml . | nindent 4 }} +{{- end }} +{{- end }} +{{- end -}} + +{{/* +Storage config GCS +*/}} +{{- define "loki.lokiStorageConfig.gcs" -}} +{{- $bucketName := .bucketName }} +{{- with .ctx }} +{{- mergeOverwrite (dict + "bucket_name" $bucketName + "chunk_buffer_size" .chunkBufferSize + "request_timeout" .requestTimeout + "enable_http2" .enableHttp2 +) (omit . "bucket_name" "chunkBufferSize" "requestTimeout" "enableHttp2") | toYaml | nindent 0 }} +{{- end -}} +{{- end -}} + +{{/* +Storage config Azure +*/}} +{{- define "loki.lokiStorageConfig.azure" -}} +{{- $bucketName := .bucketName }} +{{- with .ctx }} +{{- mergeOverwrite +(dict + "container_name" $bucketName + "account_name" .accountName + "use_managed_identity" .useManagedIdentity + "use_federated_token" .useFederatedToken +) +(omit . "accountName" "useManagedIdentity" "useFederatedToken" "accountKey" "connectionString" "userAssignedId" "requestTimeout" "endpointSuffix" "chunkDelimiter") | toYaml | nindent 0 }} +{{- with .accountKey }} +account_key: {{ . }} +{{- end }} +{{- with .connectionString }} +connection_string: {{ . }} +{{- end }} +{{- with .userAssignedId }} +user_assigned_id: {{ . }} +{{- end }} +{{- with .requestTimeout }} +request_timeout: {{ . }} +{{- end }} +{{- with .endpointSuffix }} +endpoint_suffix: {{ . }} +{{- end }} +{{- with .chunkDelimiter }} +chunk_delimiter: {{ . }} +{{- end }} +{{- end -}} +{{- end -}} + +{{/* Loki ruler config */}} +{{- define "loki.rulerConfig" }} +ruler: +{{- mergeOverwrite (dict "storage" (include "loki.rulerStorageConfig" . | fromYaml)) (.Values.loki.rulerConfig | default dict) | toYaml | nindent 2 }} +{{- end }} + +{{/* Ruler Thanos Storage Config */}} +{{- define "loki.rulerThanosStorageConfig" -}} +{{- if and .Values.loki.storage.use_thanos_objstore .Values.ruler.enabled}} + backend: {{ .Values.loki.storage.object_store.type }} + {{- $bucketName := required "Please define loki.storage.bucketNames.ruler" (dig "storage" "bucketNames" "ruler" "" .Values.loki) }} + {{- include "loki.thanosStorageConfig" (dict "ctx" . "bucketName" $bucketName) | nindent 2 }} +{{- end }} +{{- end }} + +{{/* +Calculate the config from structured and unstructured text input +*/}} +{{- define "loki.calculatedConfig" -}} +{{ tpl (mergeOverwrite (tpl .Values.loki.config . | fromYaml) .Values.loki.structuredConfig | toYaml) . }} +{{- end }} + +{{/* +The volume to mount for loki configuration +*/}} +{{- define "loki.configVolume" -}} +{{- if eq .Values.loki.configStorageType "Secret" -}} +secret: + secretName: {{ tpl .Values.loki.configObjectName . }} +{{- else -}} +configMap: + name: {{ tpl .Values.loki.configObjectName . }} + items: + - key: "config.yaml" + path: "config.yaml" +{{- end -}} +{{- end -}} + +{{- define "loki.memcached.suffix" -}} +{{- $suffix := default "" . -}} +{{ if ne $suffix "" }}-{{ $suffix }}{{ end }} +{{- end }} + +{{/* Allow KubeVersion to be overridden. */}} +{{- define "loki.kubeVersion" -}} + {{- default .Capabilities.KubeVersion.Version .Values.kubeVersionOverride -}} +{{- end -}} + +{{/* +Generate list of ingress service paths based on deployment type +*/}} +{{- define "loki.ingress.servicePaths" -}} +{{- if (eq (include "loki.deployment.isMonolithic" .) "true") -}} +{{- include "loki.ingress.monolithicServicePaths" . }} +{{- else if (eq (include "loki.deployment.isDistributed" .) "true") -}} +{{- include "loki.ingress.distributedServicePaths" . }} +{{- else if (eq (include "loki.deployment.isScalable" .) "true") -}} +{{- include "loki.ingress.scalableServicePaths" . }} +{{- end -}} +{{- end -}} + +{{/* +Ingress service paths for distributed deployment +*/}} +{{- define "loki.ingress.distributedServicePaths" -}} +{{- $distributorServiceName := include "loki.resourceName" (dict "ctx" . "component" "distributor") }} +{{- include "loki.ingress.servicePath" (dict "ctx" . "serviceName" $distributorServiceName "paths" .Values.ingress.paths.distributor )}} +{{- $queryFrontendServiceName := include "loki.resourceName" (dict "ctx" . "component" "query-frontend") }} +{{- include "loki.ingress.servicePath" (dict "ctx" . "serviceName" $queryFrontendServiceName "paths" .Values.ingress.paths.queryFrontend )}} +{{- $rulerServiceName := include "loki.resourceName" (dict "ctx" . "component" "ruler") }} +{{- include "loki.ingress.servicePath" (dict "ctx" . "serviceName" $rulerServiceName "paths" .Values.ingress.paths.ruler)}} +{{- $compactorServiceName := include "loki.resourceName" (dict "ctx" . "component" "compactor") }} +{{- include "loki.ingress.servicePath" (dict "ctx" . "serviceName" $compactorServiceName "paths" .Values.ingress.paths.compactor)}} +{{- end -}} + +{{/* +Ingress service paths for simple scalable deployment when backend components were part of read component. +*/}} +{{- define "loki.ingress.scalableServicePaths" -}} +{{- $readServiceName := include "loki.resourceName" (dict "ctx" . "component" "read") }} +{{- include "loki.ingress.servicePath" (dict "ctx" . "serviceName" $readServiceName "paths" .Values.ingress.paths.queryFrontend )}} +{{- $writeServiceName := include "loki.resourceName" (dict "ctx" . "component" "write") }} +{{- include "loki.ingress.servicePath" (dict "ctx" . "serviceName" $writeServiceName "paths" .Values.ingress.paths.distributor )}} +{{- $backendServiceName := include "loki.resourceName" (dict "ctx" . "component" "backend") }} +{{- include "loki.ingress.servicePath" (dict "ctx" . "serviceName" $backendServiceName "paths" .Values.ingress.paths.ruler )}} +{{- include "loki.ingress.servicePath" (dict "ctx" . "serviceName" $backendServiceName "paths" .Values.ingress.paths.compactor )}} +{{- end -}} + +{{/* +Ingress service paths for single binary deployment +*/}} +{{- define "loki.ingress.monolithicServicePaths" -}} +{{- $serviceName := include "loki.fullname" . }} +{{- include "loki.ingress.servicePath" (dict "ctx" . "serviceName" $serviceName "paths" .Values.ingress.paths.distributor )}} +{{- include "loki.ingress.servicePath" (dict "ctx" . "serviceName" $serviceName "paths" .Values.ingress.paths.queryFrontend )}} +{{- include "loki.ingress.servicePath" (dict "ctx" . "serviceName" $serviceName "paths" .Values.ingress.paths.ruler )}} +{{- include "loki.ingress.servicePath" (dict "ctx" . "serviceName" $serviceName "paths" .Values.ingress.paths.compactor )}} +{{- end -}} + +{{/* +Ingress service path helper function +Params: + ctx = . context + serviceName = fully qualified k8s service name + paths = list of url paths to allow ingress for +*/}} +{{- define "loki.ingress.servicePath" -}} +{{- range .paths }} +- path: {{ . }} + pathType: Prefix + backend: + service: + name: {{ $.serviceName }} + port: + number: {{ $.ctx.Values.loki.server.http_listen_port }} +{{- end -}} +{{- end -}} + +{{/* +Create the service endpoint including port for MinIO. +*/}} +{{- define "loki.minio" -}} +{{- if .Values.minio.enabled -}} +{{- .Values.minio.address | default (printf "%s-%s.%s.svc:%s" .Release.Name "minio" (include "loki.namespace" .) (.Values.minio.service.port | toString)) -}} +{{- end -}} +{{- end -}} + +{{/* Determine if deployment is using object storage */}} +{{- define "loki.isUsingObjectStorage" -}} +{{- has .Values.loki.storage.type (list "s3" "gcs" "azure" "swift" "alibabacloud" "cos" "bos") }} +{{- end -}} + +{{/* Configure the correct name for the memberlist service */}} +{{- define "loki.memberlist" -}} +{{- if .Values.memberlist.service.name }} +{{- tpl .Values.memberlist.service.name . }} +{{- else }} +{{- include "loki.fullname" . }}-memberlist +{{- end -}} +{{- end -}} + +{{/* Configure the correct name for the runtime config */}} +{{- define "loki.runtime.name" -}} +{{- include "loki.fullname" . }}-runtime +{{- end -}} + +{{/* Determine the public host for the Loki cluster */}} +{{- define "loki.host" -}} +{{- $isMonolithic := eq (include "loki.deployment.isMonolithic" .) "true" -}} +{{- $url := printf "%s.%s.svc.%s.:%s" (include "loki.resourceName" (dict "ctx" . "component" "gateway")) (include "loki.namespace" .) .Values.global.clusterDomain (.Values.gateway.service.port | toString) }} +{{- if and $isMonolithic (not .Values.gateway.enabled) }} + {{- $url = printf "%s.%s.svc.%s.:%s" (include "loki.fullname" .) (include "loki.namespace" .) .Values.global.clusterDomain (.Values.loki.server.http_listen_port | toString) }} +{{- end }} +{{- printf "%s" $url -}} +{{- end -}} + +{{/* Determine the public endpoint for the Loki cluster */}} +{{- define "loki.address" -}} +{{- printf "http://%s" (include "loki.host" . ) -}} +{{- end -}} + +{{/* Snippet for the nginx file used by gateway */}} +{{- define "loki.nginxFile" -}} +worker_processes 5; ## Default: 1 +error_log /dev/stderr; +pid /tmp/nginx.pid; +worker_rlimit_nofile 8192; + +events { + worker_connections 4096; ## Default: 1024 +} + +http { + client_body_temp_path /tmp/client_temp; + proxy_temp_path /tmp/proxy_temp_path; + fastcgi_temp_path /tmp/fastcgi_temp; + uwsgi_temp_path /tmp/uwsgi_temp; + scgi_temp_path /tmp/scgi_temp; + + client_max_body_size {{ .Values.gateway.nginxConfig.clientMaxBodySize }}; + + proxy_read_timeout 600; ## 10 minutes + proxy_send_timeout 600; + proxy_connect_timeout 600; + + proxy_http_version 1.1; + + default_type application/octet-stream; + log_format {{ .Values.gateway.nginxConfig.logFormat }} + + {{- if .Values.gateway.metrics.enabled }} + # Exclude specific requests from logging + map $request_uri $track { + default 1; + ~^/$ 0; + ~^/health 0; + ~^/metrics 0; + } + + # simple_upstream preset + log_format access_log_exporter '$http_host\t$request_method\t$status\t$request_completion\t$request_time\t$request_length\t$bytes_sent\t$upstream_addr\t$upstream_connect_time\t$upstream_header_time\t$upstream_response_time\t$request_uri'; + access_log syslog:server=127.0.0.1:8514,nohostname access_log_exporter if=$track; + {{- end }} + {{- if .Values.gateway.verboseLogging }} + access_log /dev/stderr main; + {{- else }} + + map $status $loggable { + ~^[23] 0; + default 1; + } + access_log /dev/stderr main if=$loggable; + {{- end }} + + sendfile on; + tcp_nopush on; + {{- if .Values.gateway.nginxConfig.resolver }} + resolver {{ .Values.gateway.nginxConfig.resolver }}; + {{- else }} + resolver {{ .Values.global.dnsService }}.{{ .Values.global.dnsNamespace }}.svc.{{ .Values.global.clusterDomain }}.; + {{- end }} + + {{- with .Values.gateway.nginxConfig.httpSnippet }} + {{- tpl . $ | nindent 2 }} + {{- end }} + + # if the X-Query-Tags header is empty, set a noop= without a value as empty values are not logged + map $http_x_query_tags $query_tags { + "" "noop="; # When header is empty, set noop= + default $http_x_query_tags; # Otherwise, preserve the original value + } + + server { + {{- if .Values.gateway.nginxConfig.ssl }} + listen {{ .Values.gateway.containerPort }} ssl; + {{- if .Values.gateway.nginxConfig.enableIPv6 }} + listen [::]:{{ .Values.gateway.containerPort }} ssl; + {{- end }} + {{- else }} + listen {{ .Values.gateway.containerPort }}; + {{- if .Values.gateway.nginxConfig.enableIPv6 }} + listen [::]:{{ .Values.gateway.containerPort }}; + {{- end }} + {{- end }} + + {{- if .Values.gateway.basicAuth.enabled }} + auth_basic "Loki"; + auth_basic_user_file /etc/nginx/secrets/.htpasswd; + {{- end }} + + location = / { + {{- with .Values.gateway.nginxConfig.locationSnippet }} + {{- tpl . $ | nindent 6 }} + {{- end }} + return 200 'OK'; + auth_basic off; + } + + location = /stub_status { + stub_status on; + satisfy any; + access_log off; + allow 127.0.0.1; + deny all; + server_tokens on; # expose nginx version + } + + ######################################################## + # Configure backend targets + + {{- $namespace := include "loki.namespace" . }} + {{- $backendHost := include "loki.resourceName" (dict "ctx" . "component" "backend") }} + {{- $readHost := include "loki.resourceName" (dict "ctx" . "component" "read") }} + {{- $writeHost := include "loki.resourceName" (dict "ctx" . "component" "write") }} + + {{- $httpSchema := .Values.gateway.nginxConfig.schema }} + + {{- $writeUrl := printf "%s://%s.%s.svc.%s:%s" $httpSchema $writeHost $namespace .Values.global.clusterDomain (.Values.loki.server.http_listen_port | toString) }} + {{- $readUrl := printf "%s://%s.%s.svc.%s:%s" $httpSchema $readHost $namespace .Values.global.clusterDomain (.Values.loki.server.http_listen_port | toString) }} + {{- $backendUrl := printf "%s://%s.%s.svc.%s:%s" $httpSchema $backendHost $namespace .Values.global.clusterDomain (.Values.loki.server.http_listen_port | toString) }} + + {{- if .Values.gateway.nginxConfig.customWriteUrl }} + {{- $writeUrl = .Values.gateway.nginxConfig.customWriteUrl }} + {{- end }} + {{- if .Values.gateway.nginxConfig.customReadUrl }} + {{- $readUrl = .Values.gateway.nginxConfig.customReadUrl }} + {{- end }} + {{- if .Values.gateway.nginxConfig.customBackendUrl }} + {{- $backendUrl = .Values.gateway.nginxConfig.customBackendUrl }} + {{- end }} + + {{- $monolithicHost := include "loki.fullname" . }} + {{- $monolithicUrl := printf "%s://%s.%s.svc.%s:%s" $httpSchema $monolithicHost $namespace .Values.global.clusterDomain (.Values.loki.server.http_listen_port | toString) }} + + {{- $distributorHost := include "loki.resourceName" (dict "ctx" . "component" "distributor") }} + {{- $ingesterHost := include "loki.resourceName" (dict "ctx" . "component" "ingester") }} + {{- $queryFrontendHost := include "loki.resourceName" (dict "ctx" . "component" "query-frontend") }} + {{- $indexGatewayHost := include "loki.resourceName" (dict "ctx" . "component" "index-gateway") }} + {{- $rulerHost := include "loki.resourceName" (dict "ctx" . "component" "ruler") }} + {{- $compactorHost := include "loki.resourceName" (dict "ctx" . "component" "compactor") }} + {{- $querySchedulerHost := include "loki.resourceName" (dict "ctx" . "component" "query-scheduler") }} + {{- $querierHost := include "loki.resourceName" (dict "ctx" . "component" "querier") }} + + {{- $distributorUrl := printf "%s://%s.%s.svc.%s:%s" $httpSchema $distributorHost $namespace .Values.global.clusterDomain (.Values.loki.server.http_listen_port | toString) -}} + {{- $ingesterUrl := printf "%s://%s.%s.svc.%s:%s" $httpSchema $ingesterHost $namespace .Values.global.clusterDomain (.Values.loki.server.http_listen_port | toString) }} + {{- $queryFrontendUrl := printf "%s://%s.%s.svc.%s:%s" $httpSchema $queryFrontendHost $namespace .Values.global.clusterDomain (.Values.loki.server.http_listen_port | toString) }} + {{- $indexGatewayUrl := printf "%s://%s.%s.svc.%s:%s" $httpSchema $indexGatewayHost $namespace .Values.global.clusterDomain (.Values.loki.server.http_listen_port | toString) }} + {{- $rulerUrl := printf "%s://%s.%s.svc.%s:%s" $httpSchema $rulerHost $namespace .Values.global.clusterDomain (.Values.loki.server.http_listen_port | toString) }} + {{- $compactorUrl := printf "%s://%s.%s.svc.%s:%s" $httpSchema $compactorHost $namespace .Values.global.clusterDomain (.Values.loki.server.http_listen_port | toString) }} + {{- $querySchedulerUrl := printf "%s://%s.%s.svc.%s:%s" $httpSchema $querySchedulerHost $namespace .Values.global.clusterDomain (.Values.loki.server.http_listen_port | toString) }} + {{- $querierUrl := printf "%s://%s.%s.svc.%s:%s" $httpSchema $querierHost $namespace .Values.global.clusterDomain (.Values.loki.server.http_listen_port | toString) }} + + {{- if eq (include "loki.deployment.isMonolithic" .) "true"}} + {{- $distributorUrl = $monolithicUrl }} + {{- $ingesterUrl = $monolithicUrl }} + {{- $queryFrontendUrl = $monolithicUrl }} + {{- $indexGatewayUrl = $monolithicUrl }} + {{- $rulerUrl = $monolithicUrl }} + {{- $compactorUrl = $monolithicUrl }} + {{- $querySchedulerUrl = $monolithicUrl }} + {{- $querierUrl = $monolithicUrl }} + {{- else if eq (include "loki.deployment.isScalable" .) "true"}} + {{- $distributorUrl = $writeUrl }} + {{- $ingesterUrl = $writeUrl }} + {{- $queryFrontendUrl = $readUrl }} + {{- $querierUrl = $readUrl }} + {{- $indexGatewayUrl = $backendUrl }} + {{- $rulerUrl = $backendUrl }} + {{- $compactorUrl = $backendUrl }} + {{- $querySchedulerUrl = $backendUrl }} + {{- end -}} + + {{- if .Values.loki.ui.gateway.enabled }} + location ^~ /ui { + {{- with .Values.gateway.nginxConfig.locationSnippet }} + {{- tpl . $ | nindent 6 }} + {{- end }} + set $backend "{{ $querierUrl }}"; + proxy_pass $backend$request_uri; + } + {{- end }} + + # Distributor + location = /api/prom/push { + {{- with .Values.gateway.nginxConfig.locationSnippet }} + {{- tpl . $ | nindent 6 }} + {{- end }} + set $backend "{{ $distributorUrl }}"; + proxy_pass $backend$request_uri; + } + location = /loki/api/v1/push { + {{- with .Values.gateway.nginxConfig.locationSnippet }} + {{- tpl . $ | nindent 6 }} + {{- end }} + set $backend "{{ $distributorUrl }}"; + proxy_pass $backend$request_uri; + } + location = /distributor/ring { + {{- with .Values.gateway.nginxConfig.locationSnippet }} + {{- tpl . $ | nindent 6 }} + {{- end }} + set $backend "{{ $distributorUrl }}"; + proxy_pass $backend$request_uri; + } + location = /otlp/v1/logs { + {{- with .Values.gateway.nginxConfig.locationSnippet }} + {{- tpl . $ | nindent 6 }} + {{- end }} + set $backend "{{ $distributorUrl }}"; + proxy_pass $backend$request_uri; + } + + # Ingester + location = /flush { + {{- with .Values.gateway.nginxConfig.locationSnippet }} + {{- tpl . $ | nindent 6 }} + {{- end }} + set $backend "{{ $ingesterUrl }}"; + proxy_pass $backend$request_uri; + } + location ^~ /ingester/ { + {{- with .Values.gateway.nginxConfig.locationSnippet }} + {{- tpl . $ | nindent 6 }} + {{- end }} + set $backend "{{ $ingesterUrl }}"; + proxy_pass $backend$request_uri; + } + location = /ingester { + {{- with .Values.gateway.nginxConfig.locationSnippet }} + {{- tpl . $ | nindent 6 }} + {{- end }} + internal; # to suppress 301 + } + + # Ring + location = /ring { + {{- with .Values.gateway.nginxConfig.locationSnippet }} + {{- tpl . $ | nindent 6 }} + {{- end }} + set $backend "{{ $ingesterUrl }}"; + proxy_pass $backend$request_uri; + } + + # MemberListKV + location = /memberlist { + {{- with .Values.gateway.nginxConfig.locationSnippet }} + {{- tpl . $ | nindent 6 }} + {{- end }} + set $backend "{{ $ingesterUrl }}"; + proxy_pass $backend$request_uri; + } + + # Ruler + location = /ruler/ring { + {{- with .Values.gateway.nginxConfig.locationSnippet }} + {{- tpl . $ | nindent 6 }} + {{- end }} + set $backend "{{ $rulerUrl }}"; + proxy_pass $backend$request_uri; + } + location = /api/prom/rules { + {{- with .Values.gateway.nginxConfig.locationSnippet }} + {{- tpl . $ | nindent 6 }} + {{- end }} + set $backend "{{ $rulerUrl }}"; + proxy_pass $backend$request_uri; + } + location ^~ /api/prom/rules/ { + {{- with .Values.gateway.nginxConfig.locationSnippet }} + {{- tpl . $ | nindent 6 }} + {{- end }} + set $backend "{{ $rulerUrl }}"; + proxy_pass $backend$request_uri; + } + location = /loki/api/v1/rules { + {{- with .Values.gateway.nginxConfig.locationSnippet }} + {{- tpl . $ | nindent 6 }} + {{- end }} + set $backend "{{ $rulerUrl }}"; + proxy_pass $backend$request_uri; + } + location ^~ /loki/api/v1/rules/ { + {{- with .Values.gateway.nginxConfig.locationSnippet }} + {{- tpl . $ | nindent 6 }} + {{- end }} + set $backend "{{ $rulerUrl }}"; + proxy_pass $backend$request_uri; + } + location = /prometheus/api/v1/alerts { + {{- with .Values.gateway.nginxConfig.locationSnippet }} + {{- tpl . $ | nindent 6 }} + {{- end }} + set $backend "{{ $rulerUrl }}"; + proxy_pass $backend$request_uri; + } + location = /prometheus/api/v1/rules { + {{- with .Values.gateway.nginxConfig.locationSnippet }} + {{- tpl . $ | nindent 6 }} + {{- end }} + set $backend "{{ $rulerUrl }}"; + proxy_pass $backend$request_uri; + } + + # Compactor + location = /compactor/ring { + {{- with .Values.gateway.nginxConfig.locationSnippet }} + {{- tpl . $ | nindent 6 }} + {{- end }} + set $backend "{{ $compactorUrl }}"; + proxy_pass $backend$request_uri; + } + location = /loki/api/v1/delete { + {{- with .Values.gateway.nginxConfig.locationSnippet }} + {{- tpl . $ | nindent 6 }} + {{- end }} + set $backend "{{ $compactorUrl }}"; + proxy_pass $backend$request_uri; + } + location = /loki/api/v1/cache/generation_numbers { + {{- with .Values.gateway.nginxConfig.locationSnippet }} + {{- tpl . $ | nindent 6 }} + {{- end }} + set $backend "{{ $compactorUrl }}"; + proxy_pass $backend$request_uri; + } + + # IndexGateway + location = /indexgateway/ring { + {{- with .Values.gateway.nginxConfig.locationSnippet }} + {{- tpl . $ | nindent 6 }} + {{- end }} + set $backend "{{ $indexGatewayUrl }}"; + proxy_pass $backend$request_uri; + } + + # QueryScheduler + location = /scheduler/ring { + {{- with .Values.gateway.nginxConfig.locationSnippet }} + {{- tpl . $ | nindent 6 }} + {{- end }} + set $backend "{{ $querySchedulerUrl }}"; + proxy_pass $backend$request_uri; + } + + # Config + location = /config { + {{- with .Values.gateway.nginxConfig.locationSnippet }} + {{- tpl . $ | nindent 6 }} + {{- end }} + set $backend "{{ $ingesterUrl }}"; + proxy_pass $backend$request_uri; + } + + # QueryFrontend, Querier + location = /api/prom/tail { + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + {{- with .Values.gateway.nginxConfig.locationSnippet }} + {{- tpl . $ | nindent 6 }} + {{- end }} + set $backend "{{ $queryFrontendUrl }}"; + proxy_pass $backend$request_uri; + } + location = /loki/api/v1/tail { + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + {{- with .Values.gateway.nginxConfig.locationSnippet }} + {{- tpl . $ | nindent 6 }} + {{- end }} + set $backend "{{ $queryFrontendUrl }}"; + proxy_pass $backend$request_uri; + } + location ^~ /api/prom/ { + {{- with .Values.gateway.nginxConfig.locationSnippet }} + {{- tpl . $ | nindent 6 }} + {{- end }} + set $backend "{{ $queryFrontendUrl }}"; + proxy_pass $backend$request_uri; + } + location = /api/prom { + {{- with .Values.gateway.nginxConfig.locationSnippet }} + {{- tpl . $ | nindent 6 }} + {{- end }} + internal; # to suppress 301 + } + location ^~ /loki/api/v1/ { + # pass custom headers set by Grafana as X-Query-Tags which are logged as key/value pairs in metrics.go log messages + proxy_set_header X-Query-Tags "${query_tags},user=${http_x_grafana_user},dashboard_id=${http_x_dashboard_uid},dashboard_title=${http_x_dashboard_title},panel_id=${http_x_panel_id},panel_title=${http_x_panel_title},source_rule_uid=${http_x_rule_uid},rule_name=${http_x_rule_name},rule_folder=${http_x_rule_folder},rule_version=${http_x_rule_version},rule_source=${http_x_rule_source},rule_type=${http_x_rule_type}"; + {{- with .Values.gateway.nginxConfig.locationSnippet }} + {{- tpl . $ | nindent 6 }} + {{- end }} + set $backend "{{ $queryFrontendUrl }}"; + proxy_pass $backend$request_uri; + } + location = /loki/api/v1 { + {{- with .Values.gateway.nginxConfig.locationSnippet }} + {{- tpl . $ | nindent 6 }} + {{- end }} + internal; # to suppress 301 + } + + {{- with .Values.gateway.nginxConfig.serverSnippet }} + {{ . | nindent 4 }} + {{- end }} + } +} +{{- end }} + +{{/* +Resolve enableServiceLinks for a component using three-level cascade. +Accepts (dict "component" ... "ctx" .). +Returns "enableServiceLinks: " or empty string when unset at all levels. +*/}} +{{- define "loki.enableServiceLinks" -}} +{{- $component := .component -}} +{{- $ctx := .ctx -}} +{{- if (kindIs "bool" $component.enableServiceLinks) -}} +enableServiceLinks: {{ $component.enableServiceLinks }} +{{- else if (kindIs "bool" $ctx.Values.defaults.enableServiceLinks) -}} +enableServiceLinks: {{ $ctx.Values.defaults.enableServiceLinks }} +{{- else if (kindIs "bool" $ctx.Values.loki.enableServiceLinks) -}} +enableServiceLinks: {{ $ctx.Values.loki.enableServiceLinks }} +{{- end -}} +{{- end -}} + +{{/* Determine compactor address based on target configuration */}} +{{- define "loki.compactorAddress" -}} +{{- $isSimpleScalable := eq (include "loki.deployment.isScalable" .) "true" -}} +{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} +{{- $isMonolithic := eq (include "loki.deployment.isMonolithic" .) "true" -}} +{{- $compactorAddress := include "loki.resourceName" (dict "ctx" . "component" "backend") -}} +{{- if $isMonolithic -}} +{{/* single binary */}} +{{- $compactorAddress = include "loki.fullname" . -}} +{{/* distributed */}} +{{- else if $isDistributed -}} +{{- $compactorAddress = include "loki.resourceName" (dict "ctx" . "component" "compactor") -}} +{{- end -}} +{{- printf "%s.%s.svc.%s:%s" $compactorAddress (include "loki.namespace" .) .Values.global.clusterDomain (.Values.loki.server.grpc_listen_port | toString) }} +{{- end }} + +{{/* Determine query-scheduler address */}} +{{- define "loki.querySchedulerAddress" -}} +{{- $querySchedulerAddress := ""}} +{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} +{{- if $isDistributed -}} +{{- $querySchedulerAddress = printf "%s-headless.%s.svc.%s:%s" (include "loki.resourceName" (dict "ctx" . "component" "query-scheduler")) (include "loki.namespace" .) .Values.global.clusterDomain (.Values.loki.server.grpc_listen_port | toString) -}} +{{- end -}} +{{- printf "%s" $querySchedulerAddress }} +{{- end }} + +{{/* Determine querier address */}} +{{- define "loki.querierAddress" -}} +{{- $querierAddress := "" }} +{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} +{{- if $isDistributed -}} +{{- $querierHost := include "loki.resourceName" (dict "ctx" . "component" "querier")}} +{{- $querierUrl := printf "http://%s.%s.svc.%s:%s" $querierHost (include "loki.namespace" .) .Values.global.clusterDomain (.Values.loki.server.http_listen_port | toString) }} +{{- $querierAddress = $querierUrl }} +{{- end -}} +{{- printf "%s" $querierAddress }} +{{- end }} + +{{/* Determine index-gateway address */}} +{{- define "loki.indexGatewayAddress" -}} +{{- $idxGatewayAddress := ""}} +{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} +{{- $isScalable := eq (include "loki.deployment.isScalable" .) "true" -}} +{{- if $isDistributed -}} +{{- $idxGatewayAddress = printf "dns+%s-headless.%s.svc.%s:%s" (include "loki.resourceName" (dict "ctx" . "component" "index-gateway")) (include "loki.namespace" .) .Values.global.clusterDomain (.Values.loki.server.grpc_listen_port | toString) -}} +{{- end -}} +{{- if $isScalable -}} +{{- $idxGatewayAddress = printf "dns+%s-headless.%s.svc.%s:%s" (include "loki.resourceName" (dict "ctx" . "component" "backend")) (include "loki.namespace" .) .Values.global.clusterDomain (.Values.loki.server.grpc_listen_port | toString) -}} +{{- end -}} +{{- printf "%s" $idxGatewayAddress }} +{{- end }} + +{{/* Determine bloom-planner address */}} +{{- define "loki.bloomPlannerAddress" -}} +{{- $bloomPlannerAddress := ""}} +{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} +{{- $isScalable := eq (include "loki.deployment.isScalable" .) "true" -}} +{{- if $isDistributed -}} +{{- $bloomPlannerAddress = printf "%s-headless.%s.svc.%s:%s" (include "loki.resourceName" (dict "ctx" . "component" "bloom-planner")) (include "loki.namespace" .) .Values.global.clusterDomain (.Values.loki.server.grpc_listen_port | toString) -}} +{{- end -}} +{{- if $isScalable -}} +{{- $bloomPlannerAddress = printf "%s-headless.%s.svc.%s:%s" (include "loki.resourceName" (dict "ctx" . "component" "backend")) (include "loki.namespace" .) .Values.global.clusterDomain (.Values.loki.server.grpc_listen_port | toString) -}} +{{- end -}} +{{- printf "%s" $bloomPlannerAddress}} +{{- end }} + +{{/* Determine bloom-gateway address */}} +{{- define "loki.bloomGatewayAddresses" -}} +{{- $bloomGatewayAddresses := ""}} +{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} +{{- $isScalable := eq (include "loki.deployment.isScalable" .) "true" -}} +{{- if $isDistributed -}} +{{- $bloomGatewayAddresses = printf "dnssrvnoa+_grpc._tcp.%s-headless.%s.svc.%s" (include "loki.resourceName" (dict "ctx" . "component" "bloom-gateway")) (include "loki.namespace" .) .Values.global.clusterDomain -}} +{{- end -}} +{{- if $isScalable -}} +{{- $bloomGatewayAddresses = printf "dnssrvnoa+_grpc._tcp.%s-headless.%s.svc.%s" (include "loki.resourceName" (dict "ctx" . "component" "backend")) (include "loki.namespace" .) .Values.global.clusterDomain -}} +{{- end -}} +{{- printf "%s" $bloomGatewayAddresses}} +{{- end }} + +{{- define "loki.config.checksum" -}} +checksum/config: {{ include "loki.configMapOrSecretContentHash" (dict "ctx" . "name" "/config.yaml") }} +{{- end -}} + + +{{/* +Return the object store type for use with the test schema. +*/}} +{{- define "loki.testSchemaObjectStore" -}} + {{- if .Values.minio.enabled -}} + s3 + {{- else -}} + filesystem + {{- end -}} +{{- end -}} + +{{/* +compute a ConfigMap or Secret checksum only based on its .data content. +This function needs to be called with a context object containing the following keys: +- ctx: the current Helm context (what '.' is at the call site) +- name: the file name of the ConfigMap or Secret +*/}} +{{- define "loki.configMapOrSecretContentHash" -}} +{{ get (include (print .ctx.Template.BasePath .name) .ctx | fromYaml) "data" | toYaml | sha256sum }} +{{- end }} + +{{/* Thanos object storage configuration helper to build +the thanos_storage_config model*/}} +{{- define "loki.thanosStorageConfig" -}} +{{- $bucketName := .bucketName }} +{{- with .ctx.Values.loki.storage.object_store }} +{{- if eq .type "s3" }} +s3: +{{- toYaml ( mergeOverwrite .s3 (dict "bucket_name" $bucketName) ) | nindent 2 }} +{{- else if eq .type "gcs" }} +gcs: +{{- toYaml ( mergeOverwrite .gcs (dict "bucket_name" $bucketName ) ) | nindent 2 }} +{{- else if eq .type "azure" }} +azure: +{{- toYaml ( mergeOverwrite .azure (dict "container_name" $bucketName ) ) | nindent 2 }} +{{- end }} +storage_prefix: {{ .storage_prefix }} +{{- end }} +{{- end }} + +{{/* +Pod security context +*/}} +{{- define "loki.podSecurityContext" -}} +{{- toYaml .Values.loki.podSecurityContext }} +{{- end -}} + +{{- define "loki.memoryToMiB" -}} +{{- $mem := . | toString -}} +{{- if hasSuffix "Ti" $mem -}} + {{- mulf ((trimSuffix "Ti" $mem) | float64) 1048576 | int -}} +{{- else if hasSuffix "Gi" $mem -}} + {{- mulf ((trimSuffix "Gi" $mem) | float64) 1024 | int -}} +{{- else if hasSuffix "Mi" $mem -}} + {{- (trimSuffix "Mi" $mem) | int -}} +{{- else if hasSuffix "Ki" $mem -}} + {{- divf ((trimSuffix "Ki" $mem) | float64) 1024 | int -}} +{{- else if hasSuffix "T" $mem -}} + {{- mulf ((trimSuffix "T" $mem) | float64) 953674.3164 | int -}} +{{- else if hasSuffix "G" $mem -}} + {{- mulf ((trimSuffix "G" $mem) | float64) 953.6743164 | int -}} +{{- else if hasSuffix "M" $mem -}} + {{- mulf ((trimSuffix "M" $mem) | float64) 0.9536743164 | int -}} +{{- else -}} + {{- divf ($mem | float64) 1048576 | int -}} +{{- end -}} +{{- end -}} + +{{/* +Build the env block for a Loki component, auto-injecting GOMEMLIMIT and GOGC. + +Arguments (passed as a dict): + extraEnv - already-concatenated extraEnv list for this component + resources - the component's resources block (.Values..resources) + factor - fraction of memory limit for GOMEMLIMIT (default 0.85) + gogc - value for GOGC env var (default 80) + +When the memory limit is not set, or GOMEMLIMIT is already defined in extraEnv, +the list is returned unchanged so users retain full control. +*/}} +{{- define "loki.componentEnv" -}} +{{- $envList := .extraEnv | default list -}} +{{- $resources := .resources | default dict -}} +{{- $factor := .factor | default 0.85 | float64 -}} +{{- $gogc := .gogc | default 80 | int -}} +{{- $hasGomemlimit := false -}} +{{- $hasGogc := false -}} +{{- range $envList -}} + {{- if eq .name "GOMEMLIMIT" -}}{{- $hasGomemlimit = true -}}{{- end -}} + {{- if eq .name "GOGC" -}}{{- $hasGogc = true -}}{{- end -}} +{{- end -}} +{{- $memLimit := dig "limits" "memory" "" $resources -}} +{{- if and (not $hasGomemlimit) $memLimit -}} + {{- $mib := include "loki.memoryToMiB" $memLimit | int -}} + {{- $goMemMib := mulf ($mib | float64) $factor | int -}} + {{- $envList = append $envList (dict "name" "GOMEMLIMIT" "value" (printf "%dMiB" $goMemMib)) -}} +{{- end -}} +{{- if not $hasGogc -}} + {{- $envList = append $envList (dict "name" "GOGC" "value" ($gogc | toString)) -}} +{{- end -}} +env: + {{- with $envList | uniq }} + {{- toYaml . | nindent 2 }} + {{- end }} + - name: POD_IP + valueFrom: + fieldRef: + fieldPath: status.podIP +{{- end -}} + +{{/* +format rules dir +*/}} +{{- define "loki.rulerRulesDirName" -}} +rules-{{ . | replace "_" "-" | trimSuffix "-" | lower }} +{{- end }} + +{{/* +monolithic replicas calculation +*/}} +{{- define "loki.monolithicReplicas" -}} +{{- $replicas := 1 }} +{{- $usingObjectStorage := eq (include "loki.isUsingObjectStorage" .) "true" }} +{{- if and $usingObjectStorage (gt (int .Values.singleBinary.replicas) 1)}} +{{- $replicas = int .Values.singleBinary.replicas -}} +{{- end }} +{{- printf "%d" $replicas }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/_hpa.tpl b/packs/loki-3.7.4/charts/loki/templates/_hpa.tpl new file mode 100644 index 00000000..22e2ccbc --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/_hpa.tpl @@ -0,0 +1,68 @@ +{{/* +HPA helper +*/}} + +{{- define "loki.hpa" }} +{{- if .component.autoscaling.enabled }} + {{- $target := .target }} + {{- $kind := .component.kind | default .kind | default "StatefulSet" }} + {{- $ctx := .ctx }} + {{- $component := .component }} + {{- $targetName := .targetName }} + {{- $suffix := .suffix | default "" }} + {{- with $ctx }} +--- +apiVersion: autoscaling/v2 +kind: HorizontalPodAutoscaler +metadata: + name: {{ include "loki.resourceName" (dict "ctx" . "component" $target "suffix" $suffix) }} + namespace: {{ include "loki.namespace" . }} + labels: + {{- include "loki.labels" . | nindent 4 }} + app.kubernetes.io/component: {{ $target }} +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: {{ $kind }} + name: "{{ $targetName | default (include "loki.workloadResourceName" (dict "ctx" $ctx "component" $target "componentValues" $component "suffix" $suffix)) }}" + minReplicas: {{ $component.autoscaling.minReplicas }} + maxReplicas: {{ $component.autoscaling.maxReplicas }} + {{- $behavior := $component.autoscaling.behavior | default dict }} + {{- $enabled := get $behavior "enabled" | default false }} + {{- if $enabled }} + behavior: + {{- toYaml (omit $behavior "enabled") | nindent 4 }} + {{- end }} + {{- if or $component.autoscaling.targetMemoryUtilizationPercentage $component.autoscaling.targetCPUUtilizationPercentage $component.autoscaling.customMetrics }} + metrics: + {{- with $component.autoscaling.targetMemoryUtilizationPercentage }} + - type: Resource + resource: + name: memory + target: + type: Utilization + averageUtilization: {{ . }} + {{- end }} + {{- with $component.autoscaling.targetCPUUtilizationPercentage }} + - type: Resource + resource: + name: cpu + target: + type: Utilization + averageUtilization: {{ . }} + {{- end }} + {{- with $component.autoscaling.customMetrics }} + {{- toYaml . | nindent 4 }} + {{- end }} + {{- else }} + metrics: + - type: Resource + resource: + name: cpu + target: + type: Utilization + averageUtilization: 80 + {{- end }} + {{- end }} +{{- end }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/_keda.tpl b/packs/loki-3.7.4/charts/loki/templates/_keda.tpl new file mode 100644 index 00000000..9054e8a4 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/_keda.tpl @@ -0,0 +1,66 @@ +{{/* +KEDA ScaledObject helper +*/}} + +{{/* +Validate that HPA and KEDA autoscaling are not both enabled for a component. +Params: .component (values object), .name (string for error message) +*/}} +{{- define "loki.validateAutoscaling" -}} +{{- if and (dig "kedaAutoscaling" "enabled" false .component) (dig "autoscaling" "enabled" false .component) }} +{{- fail (printf "Cannot enable both HPA and Keda based autoscaling for %s at the same time." .name) }} +{{- end }} +{{- end -}} + +{{- define "loki.keda" }} +{{- if .component.kedaAutoscaling.enabled }} + {{- $target := .target }} + {{- $kind := .component.kind | default .kind | default "StatefulSet" }} + {{- $ctx := .ctx }} + {{- $component := .component }} + {{- $targetName := .targetName }} + {{- $suffix := .suffix | default "" }} + {{- with $ctx }} +--- +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: {{ include "loki.resourceName" (dict "ctx" . "component" $target "suffix" $suffix) }} + namespace: {{ include "loki.namespace" . }} + labels: + {{- include "loki.labels" . | nindent 4 }} + app.kubernetes.io/component: {{ $target }} +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: {{ $kind }} + name: "{{ $targetName | default (include "loki.workloadResourceName" (dict "ctx" $ctx "component" $target "componentValues" $component "suffix" $suffix)) }}" + minReplicaCount: {{ $component.kedaAutoscaling.minReplicas }} + maxReplicaCount: {{ $component.kedaAutoscaling.maxReplicas }} + pollingInterval: {{ + include "loki.safeInt" (dict + "value" $component.kedaAutoscaling.pollingInterval + "default" .Values.defaults.kedaAutoscaling.pollingInterval + ) + }} + cooldownPeriod: {{ + include "loki.safeInt" (dict + "value" $component.kedaAutoscaling.cooldownPeriod + "default" .Values.defaults.kedaAutoscaling.cooldownPeriod + ) + }} + {{- with $component.kedaAutoscaling.fallback }} + fallback: + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with $component.kedaAutoscaling.behavior }} + advanced: + horizontalPodAutoscalerConfig: + behavior: + {{- toYaml . | nindent 8 }} + {{- end }} + triggers: + {{- tpl ($component.kedaAutoscaling.triggers | toYaml) . | nindent 4 }} + {{- end }} +{{- end }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/_pdb.tpl b/packs/loki-3.7.4/charts/loki/templates/_pdb.tpl new file mode 100644 index 00000000..1e2e7f25 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/_pdb.tpl @@ -0,0 +1,65 @@ +{{/* +PDB helper +*/}} + +{{- define "loki.pdb" }} +{{- if and (.component.podDisruptionBudget.enabled) (or + (and (not (dig "autoscaling" "enabled" false .component)) (not (dig "kedaAutoscaling" "enabled" false .component)) (gt (int .component.replicas | default 1) 1)) + (and (dig "autoscaling" "enabled" false .component) (gt (int ((dig "autoscaling" "minReplicas" 1 .component))) 1)) + (and (dig "kedaAutoscaling" "enabled" false .component) (gt (int ((dig "kedaAutoscaling" "minReplicas" 1 .component))) 1))) +-}} + {{- $target := .target }} + {{- $ctx := .ctx }} + {{- $component := .component }} + {{- $suffix := .suffix }} + {{- $extraMatchLabels := .extraMatchLabels }} + {{- $extraMatchExpressions := .extraMatchExpressions }} + {{- with $ctx }} + {{- $podDisruptionBudget := dict }} + {{- if hasKey $component "maxUnavailable"}} + {{- if not (kindIs "invalid" $component.maxUnavailable) }} + {{- $_ := set $podDisruptionBudget "maxUnavailable" $component.maxUnavailable }} + {{- end }} + {{- end }} + {{- range $key, $value := omit ($component.podDisruptionBudget | default dict) "enabled" "labels" "annotations" }} + {{- if not (kindIs "invalid" $value) }} + {{- $_ := set $podDisruptionBudget $key $value }} + {{- end }} + {{- end }} + {{- if (omit $podDisruptionBudget "selector") }} +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: {{ include "loki.resourceName" (dict "ctx" $ctx "component" $target "suffix" $suffix) }} + namespace: {{ include "loki.namespace" $ctx }} + {{- with $component.podDisruptionBudget.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} + labels: + {{- include "loki.labels" $ctx | nindent 4 }} + app.kubernetes.io/component: {{ $target }} + {{- with $component.podDisruptionBudget.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- range $key, $value := omit $podDisruptionBudget "selector" }} + {{- if not (kindIs "invalid" $value) }} + {{ $key }}: {{ $value | toYaml | trim }} + {{- end }} + {{- end }} + selector: + matchLabels: + {{- include "loki.selectorLabels" $ctx | nindent 6 }} + app.kubernetes.io/component: {{ $target }} + {{- with $extraMatchLabels }} + {{- toYaml . | nindent 6 }} + {{- end }} + {{- with $extraMatchExpressions }} + matchExpressions: + {{- toYaml . | nindent 6 }} + {{- end }} + {{- end }} + {{- end }} +{{- end }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/_pod.tpl b/packs/loki-3.7.4/charts/loki/templates/_pod.tpl new file mode 100644 index 00000000..44029e94 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/_pod.tpl @@ -0,0 +1,419 @@ +{{/* +Pod helper +*/}} + +{{- define "loki.podTemplate" -}} +{{- $target := .target -}} +{{- $ctx := .ctx -}} +{{- $component := .component -}} +{{- $args := .args -}} +{{- $rolloutZoneName := .rolloutZoneName | default "" -}} +{{- $memberlist := hasKey . "memberlist" | ternary .memberlist true -}} +{{- with $ctx -}} +metadata: + annotations: + {{- if ne $target "canary" }} + {{- include "loki.config.checksum" . | nindent 4 }} + {{- end }} + {{- with (mergeOverwrite (dict) .Values.loki.podAnnotations .Values.defaults.podAnnotations ($component.podAnnotations | default (dict))) }} + {{- toYaml . | nindent 4 }} + {{- end }} + kubectl.kubernetes.io/default-container: "{{ replace "single-binary" "loki" $target }}" + labels: + {{- include "loki.labels" . | nindent 4 }} + app.kubernetes.io/component: {{ $target }} + {{- if $memberlist }} + app.kubernetes.io/part-of: memberlist + {{- end }} + {{- if $rolloutZoneName }} + name: {{ if $component.addIngesterNamePrefix }}loki-{{ end }}{{ $target }}-{{ $rolloutZoneName }} + rollout-group: {{ with $component.rolloutGroupPrefix }}{{ . }}-{{ end }}{{ $target }} + {{- end }} + {{- with (mergeOverwrite (dict) .Values.loki.podLabels .Values.defaults.podLabels $component.podLabels) }} + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- with $component.topologySpreadConstraints }} + topologySpreadConstraints: + {{- tpl ( . | toYaml) $ctx | nindent 4 }} + {{- end }} + serviceAccountName: {{ include "loki.serviceAccountName" (dict "ctx" . "component" (eq $target "single-binary" | ternary .Values $component) "target" (replace "single-binary" "" $target) ) }} + {{- $esl := include "loki.enableServiceLinks" (dict "component" $component "ctx" .) }} + {{- if $esl }} + {{ $esl }} + {{- end }} + {{- if (kindIs "bool" $component.automountServiceAccountToken) }} + automountServiceAccountToken: {{ $component.automountServiceAccountToken }} + {{- else if (kindIs "bool" .Values.defaults.automountServiceAccountToken) }} + automountServiceAccountToken: {{ .Values.defaults.automountServiceAccountToken }} + {{- end }} + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with (coalesce $component.dnsConfig .Values.defaults.dnsConfig .Values.loki.dnsConfig) }} + dnsConfig: + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with (coalesce $component.hostAliases .Values.defaults.hostAliases .Values.loki.hostAliases) }} + hostAliases: + {{- toYaml . | nindent 4 }} + {{- end }} + {{- if (kindIs "bool" $component.hostUsers) }} + hostUsers: {{ $component.hostUsers }} + {{- else if (kindIs "bool" .Values.defaults.hostUsers) }} + hostUsers: {{ .Values.defaults.hostUsers }} + {{- else if (kindIs "bool" .Values.loki.hostUsers) }} + hostUsers: {{ .Values.loki.hostUsers }} + {{- end }} + {{- with (coalesce $component.priorityClassName .Values.defaults.priorityClassName .Values.loki.priorityClassName .Values.global.priorityClassName) }} + priorityClassName: {{ . }} + {{- end }} + {{- with (coalesce $component.podSecurityContext .Values.defaults.podSecurityContext .Values.loki.podSecurityContext) }} + securityContext: + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with (coalesce $component.terminationGracePeriodSeconds .Values.defaults.terminationGracePeriodSeconds .Values.loki.terminationGracePeriodSeconds) }} + terminationGracePeriodSeconds: {{ . }} + {{- end }} + {{- with $component.initContainers }} + initContainers: + {{- if kindIs "slice" . }} + {{- tpl (toYaml .) $ctx | nindent 4 }} + {{- else if kindIs "string" . }} + {{- tpl . $ctx | nindent 4 }} + {{- end }} + {{- end }} + {{- if $rolloutZoneName }} + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: rollout-group + operator: In + values: + - {{ with $component.rolloutGroupPrefix }}{{ . }}-{{ end }}{{ $target }} + - key: name + operator: NotIn + values: + - {{ if $component.addIngesterNamePrefix -}}loki-{{ end }}{{ $target }}-{{ $rolloutZoneName }} + topologyKey: kubernetes.io/hostname + {{- with (dig "zoneAwareReplication" (printf "zone%s" (upper (splitList "-" $rolloutZoneName | last))) "extraAffinity" nil $component) }} + {{- tpl ( . | toYaml) $ctx | nindent 4 }} + {{- end }} + {{- else }} + {{- with $component.affinity }} + affinity: + {{- tpl ( . | toYaml) $ctx | nindent 4 }} + {{- end }} + {{- end }} + {{- if $rolloutZoneName }} + {{- with (dig "zoneAwareReplication" (printf "zone%s" (upper (splitList "-" $rolloutZoneName | last))) "nodeSelector" nil $component) }} + nodeSelector: + {{- tpl ( . | toYaml) $ctx | nindent 4 }} + {{- end }} + {{- else }} + {{- with (coalesce $component.nodeSelector .Values.defaults.nodeSelector .Values.loki.nodeSelector) }} + nodeSelector: + {{- tpl ( . | toYaml) $ctx | nindent 4 }} + {{- end }} + {{- end }} + {{- with (coalesce $component.tolerations .Values.defaults.tolerations .Values.loki.tolerations) }} + tolerations: + {{- tpl ( . | toYaml) $ctx | nindent 4 }} + {{- end }} + volumes: + - name: temp + emptyDir: {} + {{- if ne $target "canary" }} + - name: config + {{- include "loki.configVolume" . | nindent 6 }} + - name: runtime-config + configMap: + name: {{ template "loki.name" . }}-runtime + {{- if not (or (dig "persistence" "volumeClaimsEnabled" false $component) (dig "persistence" "enabled" false $component)) }} + - name: {{ eq $target "single-binary" | ternary "storage" "data" }} + {{- if dig "persistence" "inMemory" false $component }} + emptyDir: + medium: Memory + {{- with $component.persistence.size }} + sizeLimit: {{ . }} + {{- end }} + {{- else }} + {{- tpl (toYaml (dig "persistence" "dataVolumeParameters" (dict) $component | default (dict "emptyDir" (dict)))) $ctx | nindent 6 }} + {{- end }} + {{- else if and (or (dig "persistence" "volumeClaimsEnabled" false $component) (dig "persistence" "enabled" false $component)) (eq (dig "persistence" "type" "" $component) "pvc") (eq $component.kind "Deployment") }} + - name: {{ eq $target "single-binary" | ternary "storage" "data" }} + persistentVolumeClaim: + claimName: {{ template "loki.fullname" . }}-data + {{- else if and (or (dig "persistence" "volumeClaimsEnabled" false $component) (dig "persistence" "enabled" false $component)) (eq (dig "persistence" "type" "" $component) "ephemeral") }} + - name: {{ eq $target "single-binary" | ternary "storage" "data" }} + ephemeral: + volumeClaimTemplate: + metadata: + {{- with $component.persistence.annotations }} + annotations: + {{- toYaml . | nindent 14 }} + {{- end }} + {{- with $component.persistence.labels }} + labels: + {{- toYaml . | nindent 14 }} + {{- end }} + spec: + accessModes: + {{- toYaml $component.persistence.accessModes | nindent 12 }} + {{- if not (kindIs "invalid" $component.persistence.storageClass) }} + storageClassName: {{ if (eq "-" $component.persistence.storageClass) }}""{{ else }}{{ $component.persistence.storageClass }}{{ end }} + {{- end }} + {{- with $component.persistence.volumeAttributesClassName }} + volumeAttributesClassName: {{ . }} + {{- end }} + resources: + requests: + storage: {{ $component.persistence.size | quote }} + {{- with $component.persistence.selector }} + selector: + {{- toYaml . | nindent 14 }} + {{- end }} + {{- end }} + {{- end }} + {{- if and $component.sidecar .Values.sidecar.rules.enabled }} + - name: sc-rules-volume + {{- if .Values.sidecar.rules.sizeLimit }} + emptyDir: + sizeLimit: {{ .Values.sidecar.rules.sizeLimit }} + {{- else }} + emptyDir: {} + {{- end }} + - name: sc-rules-temp + emptyDir: {} + {{- end }} + {{- if has $target (list "ruler" "backend" "single-binary") }} + {{- range $dir, $_ := .Values.ruler.directories }} + - name: {{ include "loki.rulerRulesDirName" $dir }} + configMap: + name: {{ include "loki.resourceName" (dict "ctx" $ctx "component" $target "suffix" (include "loki.rulerRulesDirName" $dir)) }} + {{- end }} + {{- end }} + {{- with (concat .Values.global.extraVolumes .Values.defaults.extraVolumes $component.extraVolumes) | uniq }} + {{- toYaml . | nindent 4 }} + {{- end }} + containers: + - name: {{ replace "single-binary" "loki" $target }} + image: {{ include "loki.image" (dict "ctx" . "component" $component.image "default" .Values.loki.image "defaultVersion" .Chart.AppVersion) }} + imagePullPolicy: {{ coalesce $component.image.pullPolicy .Values.loki.image.pullPolicy }} + {{- with coalesce $component.command .Values.defaults.command .Values.loki.command }} + command: + - {{ . | quote }} + {{- end }} + args: + {{- if ne $target "canary" }} + - -config.file=/etc/loki/config/config.yaml + - -config.expand-env=true + - -memberlist.advertise-addr=$(POD_IP) + - -target={{ replace "single-binary" "all" $target }}{{- if and .Values.loki.ui.enabled (has $target (list "single-binary" "read" "query-frontend" "querier")) }},ui{{- end }} + {{- end }} + {{- with $args }} + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with (concat .Values.global.extraArgs .Values.defaults.extraArgs $component.extraArgs) | uniq }} + {{- toYaml . | nindent 8 }} + {{- end }} + ports: + {{- if eq $target "canary" }} + - name: http-metrics + containerPort: 3500 + protocol: TCP + {{- else }} + - name: http-metrics + containerPort: {{ .Values.loki.server.http_listen_port }} + protocol: TCP + - name: grpc + containerPort: {{ .Values.loki.server.grpc_listen_port }} + protocol: TCP + - name: http-memberlist + containerPort: 7946 + protocol: TCP + {{- end }} + {{- include "loki.componentEnv" (dict "extraEnv" (concat .Values.global.extraEnv .Values.defaults.extraEnv $component.extraEnv) "resources" $component.resources "factor" .Values.defaults.goSettings.goMemLimitFactor "gogc" .Values.defaults.goSettings.gogc) | nindent 6 }} + {{- with (concat .Values.global.extraEnvFrom .Values.defaults.extraEnvFrom $component.extraEnvFrom) | uniq }} + envFrom: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with (coalesce $component.containerSecurityContext .Values.defaults.containerSecurityContext .Values.loki.containerSecurityContext) }} + securityContext: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with (coalesce $component.livenessProbe .Values.defaults.livenessProbe .Values.loki.livenessProbe) }} + {{- if .enabled | default true }} + livenessProbe: + {{- toYaml (omit . "enabled") | nindent 8 }} + {{- end }} + {{- end }} + {{- with (coalesce $component.readinessProbe .Values.defaults.readinessProbe .Values.loki.readinessProbe) }} + {{- if .enabled | default true }} + readinessProbe: + {{- toYaml (omit . "enabled") | nindent 8 }} + {{- end }} + {{- end }} + {{- with (coalesce $component.startupProbe .Values.defaults.startupProbe .Values.loki.startupProbe) }} + {{- if .enabled | default true }} + startupProbe: + {{- toYaml (omit . "enabled") | nindent 8 }} + {{- end }} + {{- end }} + {{- with $component.lifecycle }} + lifecycle: + {{- toYaml . | nindent 8 }} + {{- end }} + volumeMounts: + {{- if ne $target "canary" }} + - name: config + mountPath: /etc/loki/config + - name: runtime-config + mountPath: /etc/loki/runtime-config + - name: {{ eq $target "single-binary" | ternary "storage" "data" }} + mountPath: /var/loki + {{- end }} + - name: temp + mountPath: /tmp + {{- if and $component.sidecar .Values.sidecar.rules.enabled }} + - name: sc-rules-volume + mountPath: {{ .Values.sidecar.rules.folder | quote }} + {{- end }} + {{- if has $target (list "ruler" "backend" "single-binary") }} + {{- range $dir, $_ := .Values.ruler.directories }} + - name: {{ include "loki.rulerRulesDirName" $dir }} + mountPath: /etc/loki/rules/{{ $dir }} + {{- end }} + {{- end }} + {{- with (concat .Values.global.extraVolumeMounts .Values.defaults.extraVolumeMounts $component.extraVolumeMounts) | uniq }} + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with (coalesce $component.resources .Values.defaults.resources .Values.loki.resources) }} + resources: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with $component.resizePolicy }} + resizePolicy: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- if and $component.sidecar .Values.sidecar.rules.enabled }} + {{- include "loki.rulesSidecar" . | nindent 4 }} + {{- end }} + {{- with $component.extraContainers }} + {{- if kindIs "slice" . }} + {{- tpl (toYaml .) $ctx | nindent 4 }} + {{- else if kindIs "string" . }} + {{- tpl . $ctx | nindent 4 }} + {{- end }} + {{- end }} + {{- end }} +{{- end }} + + +{{/* +rules sidecar +*/}} +{{- define "loki.rulesSidecar" -}} +{{- if .Values.sidecar.rules.enabled -}} +- name: loki-sc-rules + image: {{ include "loki.image" (dict "ctx" . "component" .Values.sidecar.image) }} + imagePullPolicy: {{ .Values.sidecar.image.pullPolicy }} + {{- if .Values.sidecar.rules.healthPort }} + ports: + - name: http-sidecar + containerPort: {{ .Values.sidecar.rules.healthPort }} + protocol: TCP + {{- end }} + {{- with .Values.sidecar.resources }} + resources: + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.sidecar.resizePolicy }} + resizePolicy: + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.sidecar.securityContext }} + securityContext: + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.sidecar.livenessProbe }} + {{- if .enabled }} + livenessProbe: + {{- toYaml (omit . "enabled") | nindent 8 }} + {{- end }} + {{- end }} + {{- with .Values.sidecar.readinessProbe }} + {{- if .enabled }} + readinessProbe: + {{- toYaml (omit . "enabled") | nindent 8 }} + {{- end }} + {{- end }} + {{- with .Values.sidecar.startupProbe }} + {{- if .enabled }} + startupProbe: + {{- toYaml (omit . "enabled") | nindent 8 }} + {{- end }} + {{- end }} + env: + - name: METHOD + value: {{ .Values.sidecar.rules.watchMethod }} + - name: LABEL + value: "{{ .Values.sidecar.rules.label }}" + {{- if .Values.sidecar.rules.labelValue }} + - name: LABEL_VALUE + value: {{ quote .Values.sidecar.rules.labelValue }} + {{- end }} + - name: FOLDER + value: "{{ .Values.sidecar.rules.folder }}" + {{- if .Values.sidecar.rules.folderAnnotation }} + - name: FOLDER_ANNOTATION + value: "{{ .Values.sidecar.rules.folderAnnotation }}" + {{- end }} + - name: RESOURCE + value: {{ quote .Values.sidecar.rules.resource }} + {{- if .Values.sidecar.enableUniqueFilenames }} + - name: UNIQUE_FILENAMES + value: "{{ .Values.sidecar.enableUniqueFilenames }}" + {{- end }} + {{- if .Values.sidecar.rules.searchNamespace }} + - name: NAMESPACE + value: "{{ .Values.sidecar.rules.searchNamespace | join "," }}" + {{- end }} + {{- if .Values.sidecar.skipTlsVerify }} + - name: SKIP_TLS_VERIFY + value: "{{ .Values.sidecar.skipTlsVerify }}" + {{- end }} + {{- if .Values.sidecar.disableX509StrictVerification }} + - name: DISABLE_X509_STRICT_VERIFICATION + value: "{{ .Values.sidecar.disableX509StrictVerification }}" + {{- end }} + {{- if .Values.sidecar.rules.script }} + - name: SCRIPT + value: "{{ .Values.sidecar.rules.script }}" + {{- end }} + {{- if .Values.sidecar.rules.watchServerTimeout }} + - name: WATCH_SERVER_TIMEOUT + value: "{{ .Values.sidecar.rules.watchServerTimeout }}" + {{- end }} + {{- if .Values.sidecar.rules.watchClientTimeout }} + - name: WATCH_CLIENT_TIMEOUT + value: "{{ .Values.sidecar.rules.watchClientTimeout }}" + {{- end }} + {{- if .Values.sidecar.rules.logLevel }} + - name: LOG_LEVEL + value: "{{ .Values.sidecar.rules.logLevel }}" + {{- end }} + {{- if .Values.sidecar.rules.healthPort }} + - name: HEALTH_PORT + value: "{{ .Values.sidecar.rules.healthPort }}" + {{- end }} + volumeMounts: + - name: sc-rules-temp + mountPath: /tmp + - name: sc-rules-volume + mountPath: {{ .Values.sidecar.rules.folder | quote }} +{{- end }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/_route.tpl b/packs/loki-3.7.4/charts/loki/templates/_route.tpl new file mode 100644 index 00000000..616f3ecf --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/_route.tpl @@ -0,0 +1,149 @@ +{{/* +Detect the highest available Gateway API version from cluster capabilities. +*/}} +{{- define "loki.gatewayApi.apiVersion" -}} +{{- if .Capabilities.APIVersions.Has "gateway.networking.k8s.io/v1" -}} +{{- print "gateway.networking.k8s.io/v1" -}} +{{- else if .Capabilities.APIVersions.Has "gateway.networking.k8s.io/v1beta1" -}} +{{- print "gateway.networking.k8s.io/v1beta1" -}} +{{- else -}} +{{- print "gateway.networking.k8s.io/v1" -}} +{{- end -}} +{{- end -}} + +{{/* +Gateway API route manifest. Shared by the nginx gateway route and direct Loki service routes. +Params: + ctx - chart root context ($) + route - route values object + name - resource name for the route object + rules - pre-rendered rules string to embed under spec.rules + labelsTemplate - optional: name of the labels helper to use (default "loki.labels") +*/}} +{{- define "loki.route" -}} +{{- $route := .route -}} +{{- $ctx := .ctx }} +--- +apiVersion: {{ $route.apiVersion | default (include "loki.gatewayApi.apiVersion" $ctx) }} +kind: {{ $route.kind | default "HTTPRoute" }} +metadata: + name: {{ .name }} + namespace: {{ include "loki.namespace" $ctx }} + labels: + {{- include (.labelsTemplate | default "loki.labels") $ctx | nindent 4 }} + {{- with $route.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with $route.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- with $route.parentRefs }} + parentRefs: + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with $route.hostnames }} + hostnames: + {{- tpl (toYaml .) $ctx | nindent 4 }} + {{- end }} + {{- if or $route.additionalRules (ne (trim .rules) "") }} + rules: + {{- with $route.additionalRules }} + {{- tpl (toYaml .) $ctx | nindent 4 }} + {{- end }} + {{- if ne (trim .rules) "" }} + {{- .rules | nindent 4 }} + {{- end }} + {{- end }} +{{- end -}} + +{{/* +HTTPRoute rule pointing to the nginx gateway backend. +Params: + ctx - chart root context ($) + route - route values object + serviceName - backend Service name (always the gateway service, regardless of route key) + port - backend service port +*/}} +{{- define "loki.route.gatewayRule" -}} +- backendRefs: + - group: "" + kind: Service + name: {{ .serviceName }} + port: {{ .port }} + weight: 1 + {{- with .route.filters }} + filters: + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .route.matches }} + matches: + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .route.timeouts }} + timeouts: + {{- toYaml . | nindent 4 }} + {{- end }} +{{- end -}} + +{{/* +Generate HTTPRoute rules based on deployment mode. +Params: + ctx - chart root context ($) + paths - paths map from the route entry (route.main.paths) + port - optional backend port override; falls back to loki.server.http_listen_port +*/}} +{{- define "loki.route.rules" -}} +{{- $ctx := .ctx -}} +{{- $paths := .paths -}} +{{- $port := .port -}} +{{- if eq (include "loki.deployment.isMonolithic" $ctx) "true" -}} +{{- $svc := include "loki.fullname" $ctx -}} +{{- include "loki.route.serviceRule" (dict "ctx" $ctx "serviceName" $svc "paths" $paths.distributor "port" $port) }} +{{- include "loki.route.serviceRule" (dict "ctx" $ctx "serviceName" $svc "paths" $paths.queryFrontend "port" $port) }} +{{- include "loki.route.serviceRule" (dict "ctx" $ctx "serviceName" $svc "paths" $paths.ruler "port" $port) }} +{{- include "loki.route.serviceRule" (dict "ctx" $ctx "serviceName" $svc "paths" $paths.compactor "port" $port) }} +{{- else if eq (include "loki.deployment.isDistributed" $ctx) "true" -}} +{{- include "loki.route.serviceRule" (dict "ctx" $ctx "serviceName" (include "loki.resourceName" (dict "ctx" $ctx "component" "distributor")) "paths" $paths.distributor "port" $port) }} +{{- /* query-frontend is optional; fall back to querier when it has no replicas and no autoscaler */ -}} +{{- if or (gt (int $ctx.Values.queryFrontend.replicas) 0) $ctx.Values.queryFrontend.autoscaling.enabled $ctx.Values.queryFrontend.kedaAutoscaling.enabled -}} +{{- include "loki.route.serviceRule" (dict "ctx" $ctx "serviceName" (include "loki.resourceName" (dict "ctx" $ctx "component" "query-frontend")) "paths" $paths.queryFrontend "port" $port) }} +{{- else -}} +{{- include "loki.route.serviceRule" (dict "ctx" $ctx "serviceName" (include "loki.resourceName" (dict "ctx" $ctx "component" "querier")) "paths" $paths.queryFrontend "port" $port) }} +{{- end -}} +{{- include "loki.route.serviceRule" (dict "ctx" $ctx "serviceName" (include "loki.resourceName" (dict "ctx" $ctx "component" "ruler")) "paths" $paths.ruler "port" $port) }} +{{- include "loki.route.serviceRule" (dict "ctx" $ctx "serviceName" (include "loki.resourceName" (dict "ctx" $ctx "component" "compactor")) "paths" $paths.compactor "port" $port) }} +{{- else if eq (include "loki.deployment.isScalable" $ctx) "true" -}} +{{- $backend := include "loki.resourceName" (dict "ctx" $ctx "component" "backend") -}} +{{- include "loki.route.serviceRule" (dict "ctx" $ctx "serviceName" (include "loki.resourceName" (dict "ctx" $ctx "component" "read")) "paths" $paths.queryFrontend "port" $port) }} +{{- include "loki.route.serviceRule" (dict "ctx" $ctx "serviceName" (include "loki.resourceName" (dict "ctx" $ctx "component" "write")) "paths" $paths.distributor "port" $port) }} +{{- include "loki.route.serviceRule" (dict "ctx" $ctx "serviceName" $backend "paths" $paths.ruler "port" $port) }} +{{- include "loki.route.serviceRule" (dict "ctx" $ctx "serviceName" $backend "paths" $paths.compactor "port" $port) }} +{{- end -}} +{{- end -}} + +{{/* +HTTPRoute rule for a single Loki service with path-prefix matches. +Params: + ctx - chart root context ($) + serviceName - fully qualified k8s service name + paths - list of URL path prefixes to match; rule is skipped when empty + port - optional backend port; falls back to loki.server.http_listen_port +*/}} +{{- define "loki.route.serviceRule" -}} +{{- if .paths }} +- backendRefs: + - group: "" + kind: Service + name: {{ .serviceName }} + port: {{ .port | default .ctx.Values.loki.server.http_listen_port }} + weight: 1 + matches: + {{- range .paths }} + - path: + type: PathPrefix + value: {{ . }} + {{- end }} +{{- end -}} +{{- end -}} diff --git a/packs/loki-3.7.4/charts/loki/templates/_service.tpl b/packs/loki-3.7.4/charts/loki/templates/_service.tpl new file mode 100644 index 00000000..afa44773 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/_service.tpl @@ -0,0 +1,138 @@ +{{/* +Service helper +*/}} + +{{- define "loki.service" }} +{{- $target := .target }} +{{- $ctx := .ctx }} +{{- $component := .component }} +{{- $rolloutZoneName := .rolloutZoneName }} +{{- $headlessName := .headlessName }} +{{- $name := .name }} +{{- $serviceEnabled := kindIs "bool" .serviceEnabled | ternary .serviceEnabled true }} +{{- $headlessServiceEnabled := kindIs "bool" .headlessServiceEnabled | ternary .headlessServiceEnabled true }} +{{- $publishNotReadyAddresses := kindIs "bool" .publishNotReadyAddresses | ternary .publishNotReadyAddresses true }} +{{- with $ctx }} +{{- if $serviceEnabled }} +apiVersion: v1 +kind: Service +metadata: + {{- if $name }} + name: "{{ $name }}" + {{- else }} + name: "{{ include "loki.resourceName" (dict "ctx" . "component" $target "rolloutZoneName" $rolloutZoneName) }}" + {{- end }} + namespace: "{{ include "loki.namespace" . }}" + labels: + {{- include "loki.labels" . | nindent 4 }} + app.kubernetes.io/component: {{ $target | quote }} + {{- with (mergeOverwrite (dict) .Values.defaults.service.labels ($component.serviceLabels | default dict) $component.service.labels) }} + {{- toYaml . | nindent 4 }} + {{- end }} + annotations: + {{- with (mergeOverwrite (dict) .Values.loki.serviceAnnotations .Values.defaults.service.annotations ($component.serviceAnnotations | default dict) $component.service.annotations) }} + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + type: {{ $component.serviceType | default $component.service.type | default "ClusterIP" }} + {{- with $publishNotReadyAddresses }} + publishNotReadyAddresses: {{ . }} + {{- end }} + ports: + - name: http-metrics + port: {{ .Values.loki.server.http_listen_port }} + targetPort: http-metrics + protocol: TCP + - name: grpc + port: {{ .Values.loki.server.grpc_listen_port }} + targetPort: grpc + protocol: TCP + {{- with (dig "appProtocol" "grpc" $component.service.appProtocol.grpc $component) }} + appProtocol: {{ . }} + {{- end }} + - name: grpclb + port: 9096 + targetPort: grpc + protocol: TCP + {{- with (dig "appProtocol" "grpc" $component.service.appProtocol.grpc $component) }} + appProtocol: {{ . }} + {{- end }} + selector: + {{ include "loki.selectorLabels" . | nindent 4 }} + app.kubernetes.io/component: {{ $target | quote }} +{{- with (coalesce $component.trafficDistribution $component.service.trafficDistribution .Values.defaults.service.trafficDistribution .Values.loki.service.trafficDistribution) }} + trafficDistribution: {{ . }} +{{- end }} +{{- with $component.service.sessionAffinity }} + sessionAffinity: {{ . }} +{{- end }} +{{- with $component.service.sessionAffinityConfig }} + sessionAffinityConfig: + {{- toYaml . | nindent 4 }} +{{- end }} +{{- with (coalesce $component.service.ipFamilyPolicy .Values.defaults.service.ipFamilyPolicy) }} + ipFamilyPolicy: {{ . }} +{{- end }} +{{- with (coalesce $component.service.ipFamilies .Values.defaults.service.ipFamilies) }} + ipFamilies: + {{- toYaml . | nindent 4 }} +{{- end }} +{{- end }} +{{- if $headlessServiceEnabled }} +--- +apiVersion: v1 +kind: Service +metadata: + {{- if $headlessName }} + name: "{{ $headlessName }}" + {{- else }} + name: "{{ include "loki.resourceName" (dict "ctx" . "component" $target "suffix" "headless" "rolloutZoneName" $rolloutZoneName) }}" + {{- end }} + namespace: {{ include "loki.namespace" . }} + labels: + {{- include "loki.labels" . | nindent 4 }} + app.kubernetes.io/component: {{ $target | quote }} + prometheus.io/service-monitor: "false" + variant: headless + {{- with (mergeOverwrite (dict) .Values.defaults.service.labels ($component.serviceLabels | default dict) $component.service.labels) }} + {{- toYaml . | nindent 4 }} + {{- end }} + annotations: + {{- with (mergeOverwrite (dict) .Values.loki.serviceAnnotations .Values.defaults.service.annotations ($component.serviceAnnotations | default dict) $component.service.annotations) }} + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + clusterIP: None + type: ClusterIP + {{- with $publishNotReadyAddresses }} + publishNotReadyAddresses: {{ . }} + {{- end }} + ports: + - name: http-metrics + port: {{ .Values.loki.server.http_listen_port }} + targetPort: http-metrics + protocol: TCP + - name: grpc + port: {{ .Values.loki.server.grpc_listen_port }} + targetPort: grpc + protocol: TCP + {{- with (dig "appProtocol" "grpc" $component.service.appProtocol.grpc $component) }} + appProtocol: {{ . }} + {{- end }} + - name: grpclb + port: 9096 + targetPort: grpc + protocol: TCP + {{- with (dig "appProtocol" "grpc" $component.service.appProtocol.grpc $component) }} + appProtocol: {{ . }} + {{- end }} + selector: + {{ include "loki.selectorLabels" . | nindent 4 }} + app.kubernetes.io/component: {{ $target | quote }} + {{- if $rolloutZoneName }} + name: {{ if $component.addIngesterNamePrefix }}loki-{{ end }}{{ $target }}-{{ $rolloutZoneName }} + rollout-group: {{ with $component.rolloutGroupPrefix }}{{ . }}-{{ end }}{{ $target }} + {{- end }} +{{- end }} +{{- end }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/_serviceaccount.tpl b/packs/loki-3.7.4/charts/loki/templates/_serviceaccount.tpl new file mode 100644 index 00000000..fc2dbaff --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/_serviceaccount.tpl @@ -0,0 +1,33 @@ +{{- define "loki.serviceAccount" }} +{{- $target := .target }} +{{- $ctx := .ctx }} +{{- $component := .component }} +{{- $name := .name }} +{{- with $ctx }} +{{- if $component.serviceAccount.create -}} +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ $name | default (include "loki.serviceAccountName" (dict "ctx" $ctx "component" $component "target" $target)) }} + namespace: {{ include "loki.namespace" $ctx }} + labels: + {{- include "loki.labels" . | nindent 4 }} + {{- with $target }} + app.kubernetes.io/component: {{ . }} + {{- end }} + {{- with $component.serviceAccount.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with $component.serviceAccount.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +automountServiceAccountToken: {{ $component.serviceAccount.automountServiceAccountToken }} +{{- with $component.serviceAccount.imagePullSecrets }} +imagePullSecrets: + {{- toYaml . | nindent 2 }} +{{- end }} +{{- end }} +{{- end }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/_workload.tpl b/packs/loki-3.7.4/charts/loki/templates/_workload.tpl new file mode 100644 index 00000000..3a03cf8a --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/_workload.tpl @@ -0,0 +1,340 @@ +{{/* +Workload helper +*/}} + +{{- define "loki.component" -}} +{{- include "loki.component.workload" . }} +{{- if and .ctx.Release.IsUpgrade (eq .component.kind "StatefulSet") }} +--- +{{- include "loki.component.workload.recreate" . }} +{{- end }} +{{- end }} + +{{- define "loki.component.workload" }} +{{- $target := .target }} +{{- $ctx := .ctx }} +{{- $component := .component }} +{{- $name := .name }} +{{- $headlessName := .headlessName }} +{{- $args := .args }} +{{- $rolloutZoneName := .rolloutZoneName | default "" -}} +{{- $replicas := .replicas | default $component.replicas -}} +{{- $memberlist := hasKey . "memberlist" | ternary .memberlist true -}} +{{- with $ctx }} +{{- if $component.enabled }} +apiVersion: apps/v1 +kind: {{ $component.kind }} +metadata: + name: "{{ $name | default (include "loki.workloadResourceName" (dict "ctx" $ctx "component" $target "componentValues" $component "rolloutZoneName" $rolloutZoneName)) }}" + namespace: "{{ include "loki.namespace" . }}" + labels: + {{- include "loki.labels" . | nindent 4 }} + app.kubernetes.io/component: {{ $target }} + {{- if $rolloutZoneName }} + name: {{ include "loki.prefixIngesterName" . }}ingester-{{ $rolloutZoneName }} + rollout-group: {{ include "loki.prefixRolloutGroup" . }}ingester + {{- end }} + {{- with (mergeOverwrite (dict) .Values.defaults.labels $component.labels) }} + {{- toYaml . | nindent 4 }} + {{- end }} + {{- $annotations := (mergeOverwrite (dict) .Values.defaults.annotations .Values.loki.annotations $component.annotations) }} + {{- if $rolloutZoneName }} + {{- $annotations = mergeOverwrite (dict) ($annotations) (dig "zoneAwareReplication" (printf "zone%s" (upper (splitList "-" $rolloutZoneName | last))) "annotations" (dict) $component)}} + {{- if (not (hasKey $annotations "rollout-max-unavailable")) }} + {{- $_ := set $annotations "rollout-max-unavailable" (include "loki.ingester.maxUnavailable" (dict "ctx" . "replicas" $replicas)) }} + {{- end }} + {{- end }} + {{- with $annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: +{{- if and (not (dig "autoscaling" "enabled" false $component)) (not (dig "kedaAutoscaling" "enabled" false $component)) (not (kindIs "invalid" $component.replicas)) }} + replicas: {{ if eq $target "single-binary" }}{{ include "loki.monolithicReplicas" $ctx }}{{ else }}{{ $replicas }}{{ end }} +{{- end }} + {{- if eq $component.kind "StatefulSet" }} + {{- with $component.podManagementPolicy }} + podManagementPolicy: {{ . }} + {{- end }} + {{- with $component.strategy }} + updateStrategy: + {{- toYaml . | nindent 4 }} + {{- end }} + serviceName: {{ $headlessName | default (include "loki.resourceName" (dict "ctx" $ctx "component" $target "rolloutZoneName" $rolloutZoneName "suffix" "headless")) }} + {{- if and (or (dig "persistence" "volumeClaimsEnabled" false $component) (dig "persistence" "enabled" false $component)) $component.persistence.enableStatefulSetAutoDeletePVC }} + persistentVolumeClaimRetentionPolicy: + whenDeleted: {{ $component.persistence.whenDeleted }} + whenScaled: {{ $component.persistence.whenScaled }} + {{- end }} + {{- else }} + {{- with $component.strategy }} + strategy: + {{- toYaml . | nindent 4 }} + {{- end }} + {{- end }} + revisionHistoryLimit: {{ .Values.loki.revisionHistoryLimit }} + selector: + matchLabels: + {{- include "loki.selectorLabels" . | nindent 6 }} + app.kubernetes.io/component: {{ $target }} + {{- if $rolloutZoneName }} + name: {{ include "loki.prefixIngesterName" . }}ingester-{{ $rolloutZoneName }} + rollout-group: {{ include "loki.prefixRolloutGroup" . }}ingester + {{- end }} + template: + {{- include "loki.podTemplate" (dict "target" $target "component" $component "ctx" $ctx "memberlist" $memberlist "args" $args "rolloutZoneName" $rolloutZoneName) | nindent 4 }} + {{- if and (or (dig "persistence" "volumeClaimsEnabled" false $component) (dig "persistence" "enabled" false $component)) (eq (dig "persistence" "type" "pvc" $component) "pvc") }} + {{- if and (eq $component.kind "Deployment") (gt (int $component.replicas) 1) }} + {{- fail "Persistence with PVC is not supported for Deployment with more than 1 replica. Please use StatefulSet or set replicas to 1." }} + {{- end }} + {{- if eq $component.kind "StatefulSet" }} + {{- $zoneStorageClass := dig "zoneAwareReplication" (printf "zone%s" (upper (splitList "-" $rolloutZoneName | last))) "persistence" "storageClass" nil $component }} + volumeClaimTemplates: + {{- $dataClaimExists := false }} + {{- range $component.persistence.claims }} + {{- if eq .name "data" }} + {{- $dataClaimExists = true }} + {{- end }} + - apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: {{ .name }} + {{- with .annotations }} + annotations: + {{- . | toYaml | nindent 10 }} + {{- end }} + {{- with .labels }} + labels: + {{- . | toYaml | nindent 10 }} + {{- end }} + spec: + accessModes: + {{- toYaml .accessModes | nindent 10 }} + {{- $storageClass := default .storageClass $zoneStorageClass }} + {{- with $storageClass }} + storageClassName: {{ if (eq "-" .) }}""{{ else }}{{ . }}{{ end }} + {{- end }} + {{- with .volumeAttributesClassName }} + volumeAttributesClassName: {{ . }} + {{- end }} + resources: + requests: + storage: {{ .size | quote }} + {{- end }} + {{- if (not $dataClaimExists) }} + - apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: {{ eq $target "single-binary" | ternary "storage" "data" }} + {{- with $component.persistence.annotations }} + annotations: + {{- toYaml . | nindent 10 }} + {{- end }} + {{- with $component.persistence.labels }} + labels: + {{- toYaml . | nindent 10 }} + {{- end }} + spec: + {{- $storageClass := default $component.persistence.storageClass $zoneStorageClass }} + {{- with $storageClass }} + storageClassName: {{ if (eq "-" .) }}""{{ else }}{{ . }}{{ end }} + {{- end }} + {{- with $component.persistence.accessModes }} + accessModes: + {{- toYaml . | nindent 10 }} + {{- end }} + {{- with $component.persistence.volumeAttributesClassName }} + volumeAttributesClassName: {{ . }} + {{- end }} + resources: + requests: + storage: {{ $component.persistence.size | quote }} + {{- with $component.persistence.selector }} + selector: + {{- toYaml . | nindent 14 }} + {{- end }} + {{- end }} + {{- end }} + {{- end }} +{{- end }} +{{- end }} +{{- end }} + + +{{- define "loki.component.workload.recreate" }} +{{- $target := .target }} +{{- $ctx := .ctx }} +{{- $component := .component }} +{{- $name := .name }} +{{- $headlessName := .headlessName }} +{{- $memberlist := hasKey . "memberlist" | ternary .memberlist true -}} +{{- if and $component.enabled $component.statefulSetRecreateJob.enabled -}} +{{- $newStatefulSet := include "loki.component.workload" . | fromYaml -}} +{{- with $ctx }} + {{- $currentStatefulset := dict -}} + {{- if $newStatefulSet -}} + {{- $currentStatefulset = lookup $newStatefulSet.apiVersion $newStatefulSet.kind $newStatefulSet.metadata.namespace $newStatefulSet.metadata.name -}} + {{- $needsRecreation := false -}} + {{- $templates := dict -}} + {{- if and $currentStatefulset (eq $currentStatefulset.metadata.name $newStatefulSet.metadata.name) -}} + {{- $newPodManagementPolicy := dig "spec" "podManagementPolicy" "OrderedReady" $newStatefulSet -}} + {{- $currentPodManagementPolicy := dig "spec" "podManagementPolicy" "OrderedReady" $currentStatefulset -}} + {{- if ne $newPodManagementPolicy $currentPodManagementPolicy -}} + {{- $needsRecreation = true -}} + {{- end -}} + {{- $newServiceName := dig "spec" "serviceName" "" $newStatefulSet -}} + {{- $currentServiceName := dig "spec" "serviceName" "" $currentStatefulset -}} + {{- if ne $newServiceName $currentServiceName -}} + {{- $needsRecreation = true -}} + {{- end -}} + {{- $newVolumeClaimTemplates := dig "spec" "volumeClaimTemplates" (list) $newStatefulSet -}} + {{- $currentVolumeClaimTemplates := dig "spec" "volumeClaimTemplates" (list) $currentStatefulset -}} + {{- if ne (len $newVolumeClaimTemplates) (len $currentVolumeClaimTemplates) -}} + {{- $needsRecreation = true -}} + {{- else -}} + {{- range $index, $newVolumeClaimTemplate := $newVolumeClaimTemplates -}} + {{- $currentVolumeClaimTemplateSpec := dict -}} + {{- range $oldVolumeClaimTemplate := $currentVolumeClaimTemplates -}} + {{- if eq $oldVolumeClaimTemplate.metadata.name $newVolumeClaimTemplate.metadata.name -}} + {{- $currentVolumeClaimTemplateSpec = $oldVolumeClaimTemplate.spec -}} + {{- end -}} + {{- end -}} + {{- $newVolumeClaimTemplateStorageSize := $newVolumeClaimTemplate.spec.resources.requests.storage -}} + {{- if not $currentVolumeClaimTemplateSpec -}} + {{- $needsRecreation = true -}} + {{- else -}} + {{- if ne $newVolumeClaimTemplateStorageSize $currentVolumeClaimTemplateSpec.resources.requests.storage -}} + {{- $needsRecreation = true -}} + {{- $templates = set $templates $newVolumeClaimTemplate.metadata.name $newVolumeClaimTemplateStorageSize -}} + {{- end -}} + {{- end -}} + {{- end -}} + {{- end -}} + {{- end -}} + {{- if $needsRecreation -}} +--- +apiVersion: batch/v1 +kind: Job +metadata: + name: "{{ $newStatefulSet.metadata.name }}-recreate" + namespace: "{{ $newStatefulSet.metadata.namespace }}" + labels: + {{- include "loki.labels" . | nindent 4 }} + app.kubernetes.io/component: "{{ $target }}-recreate-job" + annotations: + "helm.sh/hook": pre-upgrade + "helm.sh/hook-weight": "-5" + "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded +spec: + ttlSecondsAfterFinished: 300 + template: + metadata: + labels: + {{- include "loki.labels" . | nindent 8 }} + app.kubernetes.io/component: {{ $target }}-recreate-job + spec: + restartPolicy: Never + serviceAccountName: {{ $newStatefulSet.metadata.name }}-recreate + initContainers: + {{- if $ctx.Values.defaults.statefulSetRecreateJob.patchPVC }} + {{- range $index := until (int $currentStatefulset.spec.replicas) }} + {{- range $template, $size := $templates }} + - name: patch-pvc-{{ $template }}-{{ $index }} + image: {{ include "loki.image" (dict "component" $ctx.Values.defaults.statefulSetRecreateJob.image "global" $ctx.Values.global "defaultVersion" $ctx.Capabilities.KubeVersion.Version) }} + args: + - patch + - pvc + - --namespace={{ $newStatefulSet.metadata.namespace }} + - {{ printf "%s-%s-%d" $template $newStatefulSet.metadata.name $index }} + - --type=json + - '-p=[{"op": "replace", "path": "/spec/resources/requests/storage", "value": "{{ $size }}"}]' + {{- end }} + {{- end }} + {{- end }} + containers: + - name: recreate + image: {{ include "loki.image" (dict "component" $ctx.Values.defaults.statefulSetRecreateJob.image "global" $ctx.Values.global "defaultVersion" $ctx.Capabilities.KubeVersion.Version) }} + args: + - delete + - statefulset + - --namespace={{ $newStatefulSet.metadata.namespace }} + - --cascade=orphan + - --wait=true + - --ignore-not-found=true + - {{ $newStatefulSet.metadata.name }} +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ $newStatefulSet.metadata.name }}-recreate + namespace: {{ $newStatefulSet.metadata.namespace }} + labels: + {{- include "loki.labels" . | nindent 4 }} + app.kubernetes.io/component: {{ $target }}-recreate-job + annotations: + "helm.sh/hook": pre-upgrade + "helm.sh/hook-weight": "-10" + "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: {{ $newStatefulSet.metadata.name }}-recreate + namespace: {{ $newStatefulSet.metadata.namespace }} + labels: + {{- include "loki.labels" . | nindent 4 }} + app.kubernetes.io/component: {{ $target }}-recreate-job + annotations: + "helm.sh/hook": pre-upgrade + "helm.sh/hook-weight": "-10" + "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded +rules: + - apiGroups: + - apps + resources: + - statefulsets + resourceNames: + - {{ $newStatefulSet.metadata.name }} + verbs: + - delete + {{- if $templates }} + - apiGroups: + - "" + resources: + - persistentvolumeclaims + resourceNames: + {{- range $index := until (int $currentStatefulset.spec.replicas) }} + {{- range $template := $templates | keys }} + - {{ printf "%s-%s-%d" $template $newStatefulSet.metadata.name $index }} + {{- end }} + {{- end }} + verbs: + - patch + - get + {{- end }} +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: {{ $newStatefulSet.metadata.name }}-recreate + namespace: {{ $newStatefulSet.metadata.namespace }} + labels: + {{- include "loki.labels" . | nindent 4 }} + app.kubernetes.io/component: {{ $target }}-recreate-job + annotations: + "helm.sh/hook": pre-upgrade + "helm.sh/hook-weight": "-10" + "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded +subjects: + - kind: ServiceAccount + name: {{ $newStatefulSet.metadata.name }}-recreate + namespace: {{ $newStatefulSet.metadata.namespace }} +roleRef: + kind: Role + name: {{ $newStatefulSet.metadata.name }}-recreate + apiGroup: rbac.authorization.k8s.io + {{- end -}} + {{- end -}} +{{- end -}} +{{- end -}} +{{- end -}} diff --git a/packs/loki-3.7.4/charts/loki/templates/backend/clusterrole.yaml b/packs/loki-3.7.4/charts/loki/templates/backend/clusterrole.yaml new file mode 100644 index 00000000..36c8a0fe --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/backend/clusterrole.yaml @@ -0,0 +1,20 @@ +{{- if and (not .Values.rbac.namespaced) (not .Values.rbac.useExistingRole) }} +kind: ClusterRole +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + labels: + {{- include "loki.labels" . | nindent 4 }} +{{- with .Values.annotations }} + annotations: +{{ toYaml . | indent 4 }} +{{- end }} + name: {{ template "loki.fullname" . }}-clusterrole +{{- if .Values.sidecar.rules.enabled }} +rules: +- apiGroups: [""] # "" indicates the core API group + resources: ["configmaps", "secrets"] + verbs: ["get", "watch", "list"] +{{- else }} +rules: [] +{{- end }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/backend/clusterrolebinding.yaml b/packs/loki-3.7.4/charts/loki/templates/backend/clusterrolebinding.yaml new file mode 100644 index 00000000..62ed35b9 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/backend/clusterrolebinding.yaml @@ -0,0 +1,25 @@ +{{- $isSimpleScalable := eq (include "loki.deployment.isScalable" .) "true" -}} +{{- if (not .Values.rbac.namespaced) }} +kind: ClusterRoleBinding +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: {{ template "loki.fullname" . }}-clusterrolebinding + labels: + {{- include "loki.labels" . | nindent 4 }} +{{- with .Values.annotations }} + annotations: +{{ toYaml . | indent 4 }} +{{- end }} +subjects: + - kind: ServiceAccount + name: {{ include "loki.serviceAccountName" (dict "ctx" . "component" .Values.backend "target" "backend" ) }} + namespace: {{ include "loki.namespace" . }} +roleRef: + kind: ClusterRole +{{- if (not .Values.rbac.useExistingRole) }} + name: {{ template "loki.fullname" . }}-clusterrole +{{- else }} + name: {{ .Values.rbac.useExistingRole }} +{{- end }} + apiGroup: rbac.authorization.k8s.io +{{- end -}} diff --git a/packs/loki-3.7.4/charts/loki/templates/backend/hpa.yaml b/packs/loki-3.7.4/charts/loki/templates/backend/hpa.yaml new file mode 100644 index 00000000..2a624715 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/backend/hpa.yaml @@ -0,0 +1,4 @@ +{{- $isSimpleScalable := eq (include "loki.deployment.isScalable" .) "true" -}} +{{- if $isSimpleScalable }} +{{- include "loki.hpa" (dict "target" "backend" "component" .Values.backend "ctx" .) }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/backend/pdb.yaml b/packs/loki-3.7.4/charts/loki/templates/backend/pdb.yaml new file mode 100644 index 00000000..e21efec0 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/backend/pdb.yaml @@ -0,0 +1,4 @@ +{{- $isSimpleScalable := eq (include "loki.deployment.isScalable" .) "true" -}} +{{- if $isSimpleScalable }} +{{- include "loki.pdb" (dict "target" "backend" "component" .Values.backend "ctx" .) }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/backend/query-scheduler-discovery.yaml b/packs/loki-3.7.4/charts/loki/templates/backend/query-scheduler-discovery.yaml new file mode 100644 index 00000000..826cae74 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/backend/query-scheduler-discovery.yaml @@ -0,0 +1,36 @@ +{{- $isSimpleScalable := eq (include "loki.deployment.isScalable" .) "true" -}} +{{- if $isSimpleScalable }} +--- +apiVersion: v1 +kind: Service +metadata: + name: {{ include "loki.resourceName" (dict "ctx" . "component" "query-scheduler" "suffix" "discovery") }} + namespace: {{ include "loki.namespace" . }} + labels: + {{- include "loki.selectorLabels" . | nindent 4 }} + app.kubernetes.io/component: backend + prometheus.io/service-monitor: "false" + annotations: + {{- with .Values.loki.serviceAnnotations }} + {{- toYaml . | nindent 4}} + {{- end }} + {{- with .Values.backend.service.annotations }} + {{- toYaml . | nindent 4}} + {{- end }} +spec: + type: ClusterIP + clusterIP: None + publishNotReadyAddresses: true + ports: + - name: http-metrics + port: {{ .Values.loki.server.http_listen_port }} + targetPort: http-metrics + protocol: TCP + - name: grpc + port: {{ .Values.loki.server.grpc_listen_port }} + targetPort: grpc + protocol: TCP + selector: + {{- include "loki.selectorLabels" . | nindent 4 }} + app.kubernetes.io/component: backend +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/backend/service.yaml b/packs/loki-3.7.4/charts/loki/templates/backend/service.yaml new file mode 100644 index 00000000..e1f9b2f0 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/backend/service.yaml @@ -0,0 +1,4 @@ +{{- $isSimpleScalable := eq (include "loki.deployment.isScalable" .) "true" -}} +{{- if $isSimpleScalable }} +{{- include "loki.service" (dict "target" "backend" "component" .Values.backend "ctx" .) }} +{{- end -}} diff --git a/packs/loki-3.7.4/charts/loki/templates/backend/serviceaccount.yaml b/packs/loki-3.7.4/charts/loki/templates/backend/serviceaccount.yaml new file mode 100644 index 00000000..59bba79d --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/backend/serviceaccount.yaml @@ -0,0 +1,4 @@ +{{- $isSimpleScalable := eq (include "loki.deployment.isScalable" .) "true" -}} +{{- if and $isSimpleScalable (not .Values.read.legacyReadTarget ) }} +{{- include "loki.serviceAccount" (dict "target" "backend" "component" .Values.backend "ctx" .) }} +{{- end -}} diff --git a/packs/loki-3.7.4/charts/loki/templates/backend/so.yaml b/packs/loki-3.7.4/charts/loki/templates/backend/so.yaml new file mode 100644 index 00000000..4cf1b981 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/backend/so.yaml @@ -0,0 +1,4 @@ +{{- $isSimpleScalable := eq (include "loki.deployment.isScalable" .) "true" -}} +{{- if $isSimpleScalable }} +{{- include "loki.keda" (dict "target" "backend" "component" .Values.backend "ctx" .) }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/backend/workload.yaml b/packs/loki-3.7.4/charts/loki/templates/backend/workload.yaml new file mode 100644 index 00000000..b3e83f8a --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/backend/workload.yaml @@ -0,0 +1,4 @@ +{{- $isSimpleScalable := eq (include "loki.deployment.isScalable" .) "true" -}} +{{- if $isSimpleScalable }} +{{- include "loki.component" (dict "ctx" . "component" .Values.backend "target" "backend" "args" (list "-legacy-read-mode=false")) }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/bloom-builder/hpa.yaml b/packs/loki-3.7.4/charts/loki/templates/bloom-builder/hpa.yaml new file mode 100644 index 00000000..18992104 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/bloom-builder/hpa.yaml @@ -0,0 +1,4 @@ +{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} +{{- if $isDistributed }} +{{- include "loki.hpa" (dict "target" "bloom-builder" "component" .Values.bloomBuilder "ctx" . "kind" "Deployment") }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/bloom-builder/pdb.yaml b/packs/loki-3.7.4/charts/loki/templates/bloom-builder/pdb.yaml new file mode 100644 index 00000000..b0078d1f --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/bloom-builder/pdb.yaml @@ -0,0 +1,4 @@ +{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} +{{- if $isDistributed }} +{{- include "loki.pdb" (dict "target" "bloom-builder" "component" .Values.bloomBuilder "ctx" .) }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/bloom-builder/service.yaml b/packs/loki-3.7.4/charts/loki/templates/bloom-builder/service.yaml new file mode 100644 index 00000000..8cb88df4 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/bloom-builder/service.yaml @@ -0,0 +1,4 @@ +{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} +{{- if (and $isDistributed (gt (int .Values.bloomBuilder.replicas) 0)) -}} +{{- include "loki.service" (dict "target" "bloom-builder" "component" .Values.bloomBuilder "ctx" .) }} +{{- end -}} diff --git a/packs/loki-3.7.4/charts/loki/templates/bloom-builder/serviceaccount.yaml b/packs/loki-3.7.4/charts/loki/templates/bloom-builder/serviceaccount.yaml new file mode 100644 index 00000000..59bf2b45 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/bloom-builder/serviceaccount.yaml @@ -0,0 +1,4 @@ +{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} +{{- if (and $isDistributed (gt (int .Values.bloomPlanner.replicas) 0)) -}} +{{- include "loki.serviceAccount" (dict "target" "bloom-builder" "component" .Values.bloomBuilder "ctx" .) }} +{{- end -}} diff --git a/packs/loki-3.7.4/charts/loki/templates/bloom-builder/so.yaml b/packs/loki-3.7.4/charts/loki/templates/bloom-builder/so.yaml new file mode 100644 index 00000000..a510333d --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/bloom-builder/so.yaml @@ -0,0 +1,4 @@ +{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} +{{- if $isDistributed }} +{{- include "loki.keda" (dict "target" "bloom-builder" "component" .Values.bloomBuilder "ctx" . "kind" "Deployment") }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/bloom-builder/workload.yaml b/packs/loki-3.7.4/charts/loki/templates/bloom-builder/workload.yaml new file mode 100644 index 00000000..ddafa1c9 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/bloom-builder/workload.yaml @@ -0,0 +1,4 @@ +{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} +{{- if $isDistributed }} +{{- include "loki.component" (dict "ctx" . "component" .Values.bloomBuilder "target" "bloom-builder") }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/bloom-gateway/pdb.yaml b/packs/loki-3.7.4/charts/loki/templates/bloom-gateway/pdb.yaml new file mode 100644 index 00000000..5bfd90a0 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/bloom-gateway/pdb.yaml @@ -0,0 +1,4 @@ +{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} +{{- if $isDistributed }} +{{- include "loki.pdb" (dict "target" "bloom-gateway" "component" .Values.bloomGateway "ctx" .) }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/bloom-gateway/service.yaml b/packs/loki-3.7.4/charts/loki/templates/bloom-gateway/service.yaml new file mode 100644 index 00000000..b12f2445 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/bloom-gateway/service.yaml @@ -0,0 +1,4 @@ +{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} +{{- if and $isDistributed (gt (int .Values.bloomGateway.replicas) 0) -}} +{{- include "loki.service" (dict "target" "bloom-gateway" "component" .Values.bloomGateway "ctx" .) }} +{{- end -}} diff --git a/packs/loki-3.7.4/charts/loki/templates/bloom-gateway/serviceaccount.yaml b/packs/loki-3.7.4/charts/loki/templates/bloom-gateway/serviceaccount.yaml new file mode 100644 index 00000000..79632c4d --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/bloom-gateway/serviceaccount.yaml @@ -0,0 +1,4 @@ +{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} +{{- if and $isDistributed (gt (int .Values.bloomGateway.replicas) 0) -}} +{{- include "loki.serviceAccount" (dict "target" "bloom-gateway" "component" .Values.bloomGateway "ctx" .) }} +{{- end -}} diff --git a/packs/loki-3.7.4/charts/loki/templates/bloom-gateway/workload.yaml b/packs/loki-3.7.4/charts/loki/templates/bloom-gateway/workload.yaml new file mode 100644 index 00000000..72d5cbc9 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/bloom-gateway/workload.yaml @@ -0,0 +1,4 @@ +{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} +{{- if (and $isDistributed (gt (int .Values.bloomGateway.replicas) 0)) -}} +{{- include "loki.component" (dict "ctx" . "component" .Values.bloomGateway "target" "bloom-gateway") }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/bloom-planner/pdb.yaml b/packs/loki-3.7.4/charts/loki/templates/bloom-planner/pdb.yaml new file mode 100644 index 00000000..d5ef9b8b --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/bloom-planner/pdb.yaml @@ -0,0 +1,4 @@ +{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} +{{- if $isDistributed }} +{{- include "loki.pdb" (dict "target" "bloom-planner" "component" .Values.bloomPlanner "ctx" .) }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/bloom-planner/service.yaml b/packs/loki-3.7.4/charts/loki/templates/bloom-planner/service.yaml new file mode 100644 index 00000000..c55a318c --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/bloom-planner/service.yaml @@ -0,0 +1,4 @@ +{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} +{{- if (and $isDistributed (gt (int .Values.bloomPlanner.replicas) 0)) -}} +{{- include "loki.service" (dict "target" "bloom-planner" "component" .Values.bloomPlanner "ctx" .) }} +{{- end -}} diff --git a/packs/loki-3.7.4/charts/loki/templates/bloom-planner/serviceaccount.yaml b/packs/loki-3.7.4/charts/loki/templates/bloom-planner/serviceaccount.yaml new file mode 100644 index 00000000..91a59b1e --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/bloom-planner/serviceaccount.yaml @@ -0,0 +1,4 @@ +{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} +{{- if (and $isDistributed (gt (int .Values.bloomPlanner.replicas) 0)) -}} +{{- include "loki.serviceAccount" (dict "target" "bloom-planner" "component" .Values.bloomPlanner "ctx" .) }} +{{- end -}} diff --git a/packs/loki-3.7.4/charts/loki/templates/bloom-planner/workload.yaml b/packs/loki-3.7.4/charts/loki/templates/bloom-planner/workload.yaml new file mode 100644 index 00000000..8a6a7fee --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/bloom-planner/workload.yaml @@ -0,0 +1,4 @@ +{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} +{{- if (and $isDistributed (gt (int .Values.bloomPlanner.replicas) 0)) -}} +{{- include "loki.component" (dict "ctx" . "component" .Values.bloomPlanner "target" "bloom-planner") }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/chunks-cache/pdb.yaml b/packs/loki-3.7.4/charts/loki/templates/chunks-cache/pdb.yaml new file mode 100644 index 00000000..8afee55d --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/chunks-cache/pdb.yaml @@ -0,0 +1,9 @@ +{{- if and .Values.chunksCache.enabled (.Values.memcached.enabled) }} + +{{- include "loki.memcached.pdb" (dict "ctx" $ "memcacheConfig" .Values.chunksCache "valuesSection" "chunksCache" "component" "chunks-cache") }} + +{{- if .Values.chunksCache.l2.enabled }} +--- +{{ include "loki.memcached.pdb" (dict "ctx" $ "memcacheConfig" .Values.chunksCache.l2 "valuesSection" "chunksCache" "component" "chunks-cache") }} +{{- end -}} +{{- end -}} \ No newline at end of file diff --git a/packs/loki-3.7.4/charts/loki/templates/chunks-cache/service.yaml b/packs/loki-3.7.4/charts/loki/templates/chunks-cache/service.yaml new file mode 100644 index 00000000..afa554b6 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/chunks-cache/service.yaml @@ -0,0 +1,9 @@ +{{- if .Values.chunksCache.enabled }} + +{{- include "loki.memcached.service" (dict "ctx" $ "memcacheConfig" .Values.chunksCache "valuesSection" "chunksCache" "component" "chunks-cache") }} + +{{- if .Values.chunksCache.l2.enabled }} +--- +{{ include "loki.memcached.service" (dict "ctx" $ "memcacheConfig" .Values.chunksCache.l2 "valuesSection" "chunksCache" "component" "chunks-cache") }} +{{- end -}} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/chunks-cache/statefulset.yaml b/packs/loki-3.7.4/charts/loki/templates/chunks-cache/statefulset.yaml new file mode 100644 index 00000000..82c8fd26 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/chunks-cache/statefulset.yaml @@ -0,0 +1,9 @@ +{{- if .Values.chunksCache.enabled }} + +{{- include "loki.memcached.statefulSet" (dict "ctx" $ "memcacheConfig" .Values.chunksCache "valuesSection" "chunksCache" "component" "chunks-cache") }} + +{{- if .Values.chunksCache.l2.enabled }} +--- +{{ include "loki.memcached.statefulSet" (dict "ctx" $ "memcacheConfig" .Values.chunksCache.l2 "valuesSection" "chunksCache" "component" "chunks-cache") }} +{{- end -}} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/ciliumnetworkpolicy.yaml b/packs/loki-3.7.4/charts/loki/templates/ciliumnetworkpolicy.yaml new file mode 100644 index 00000000..8110cc48 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/ciliumnetworkpolicy.yaml @@ -0,0 +1,243 @@ +{{- if and (.Values.networkPolicy.enabled) (eq .Values.networkPolicy.flavor "cilium") }} +--- +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: {{ include "loki.name" . }}-namespace-only + namespace: {{ include "loki.namespace" . }} + labels: + {{- include "loki.labels" . | nindent 4 }} +spec: + endpointSelector: {} + egress: + - toEndpoints: + - {} + ingress: + - fromEndpoints: + - {} + +--- +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: {{ include "loki.name" . }}-egress-dns + namespace: {{ include "loki.namespace" . }} + labels: + {{- include "loki.labels" . | nindent 4 }} +spec: + endpointSelector: + matchLabels: + {{- include "loki.selectorLabels" . | nindent 6 }} + egress: + - toPorts: + - ports: + - port: "53" + protocol: UDP + - port: "53" + protocol: TCP + toEndpoints: + - {} + +--- +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: {{ include "loki.name" . }}-ingress + namespace: {{ include "loki.namespace" . }} + labels: + {{- include "loki.labels" . | nindent 4 }} +spec: + endpointSelector: + matchExpressions: + - key: app.kubernetes.io/component + operator: In + values: + {{- if .Values.gateway.enabled }} + - gateway + {{- else }} + - read + - write + {{- end }} + matchLabels: + {{- include "loki.selectorLabels" . | nindent 6 }} + ingress: + - toPorts: + - ports: + - port: http + protocol: TCP + {{- if .Values.networkPolicy.ingress.namespaceSelector }} + fromEndpoints: + - matchLabels: + {{- toYaml .Values.networkPolicy.ingress.namespaceSelector | nindent 8 }} + {{- if .Values.networkPolicy.ingress.podSelector }} + {{- toYaml .Values.networkPolicy.ingress.podSelector | nindent 8 }} + {{- end }} + {{- end }} + +--- +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: {{ include "loki.name" . }}-ingress-metrics + namespace: {{ include "loki.namespace" .}} + labels: + {{- include "loki.labels" . | nindent 4 }} +spec: + endpointSelector: + matchLabels: + {{- include "loki.selectorLabels" . | nindent 6 }} + ingress: + - toPorts: + - ports: + - port: http-metrics + protocol: TCP + {{- if or .Values.networkPolicy.metrics.cidrs .Values.networkPolicy.metrics.namespaceSelector }} + {{- range $cidr := .Values.networkPolicy.metrics.cidrs }} + toCIDR: + - {{ $cidr }} + {{- end }} + {{- if .Values.networkPolicy.metrics.namespaceSelector }} + fromEndpoints: + - matchLabels: + {{- toYaml .Values.networkPolicy.metrics.namespaceSelector | nindent 8 }} + {{- if .Values.networkPolicy.metrics.podSelector }} + {{- toYaml .Values.networkPolicy.metrics.podSelector | nindent 8 }} + {{- end }} + {{- end }} + {{- end }} + +--- +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: {{ include "loki.name" . }}-egress-alertmanager + namespace: {{ include "loki.namespace" . }} + labels: + {{- include "loki.labels" . | nindent 4 }} +spec: + endpointSelector: + matchLabels: + {{- include "loki.selectorLabels" . | nindent 6 }} + app.kubernetes.io/component: backend + egress: + - toPorts: + - ports: + - port: "{{ .Values.networkPolicy.alertmanager.port }}" + protocol: TCP + {{- if .Values.networkPolicy.alertmanager.namespaceSelector }} + toEndpoints: + - matchLabels: + {{- toYaml .Values.networkPolicy.alertmanager.namespaceSelector | nindent 8 }} + {{- if .Values.networkPolicy.alertmanager.podSelector }} + {{- toYaml .Values.networkPolicy.alertmanager.podSelector | nindent 8 }} + {{- end }} + {{- end }} + +{{- if .Values.networkPolicy.externalStorage.ports }} +--- +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: {{ include "loki.name" . }}-egress-external-storage + namespace: {{ include "loki.namespace" . }} + labels: + {{- include "loki.labels" . | nindent 4 }} +spec: + endpointSelector: + matchLabels: + {{- include "loki.selectorLabels" . | nindent 6 }} + egress: + - toPorts: + - ports: + {{- range $port := .Values.networkPolicy.externalStorage.ports }} + - port: "{{ $port }}" + protocol: TCP + {{- end }} + {{- if .Values.networkPolicy.externalStorage.cidrs }} + {{- range $cidr := .Values.networkPolicy.externalStorage.cidrs }} + toCIDR: + - {{ $cidr }} + {{- end }} + {{- end }} +{{- end }} + +{{- if .Values.networkPolicy.egressWorld.enabled }} +{{- $global := . }} +{{- $componentsList := list "read" "write" "backend" }} +{{- if .Values.tableManager.enabled }} +{{- $componentsList = append $componentsList "table-manager" }} +{{- end }} +{{- range $component := $componentsList }} +{{- with $global }} +--- +apiVersion: "cilium.io/v2" +kind: CiliumNetworkPolicy +metadata: + name: {{ include "loki.name" . }}-{{ $component }}-world-egress + namespace: {{ include "loki.namespace" . }} +spec: + endpointSelector: + matchLabels: + {{- include "loki.selectorLabels" . | nindent 6 }} + {{- if eq $component "read" }} + app.kubernetes.io/component: read + {{- else if eq $component "write" }} + app.kubernetes.io/component: write + {{- else if eq $component "table-manager" }} + app.kubernetes.io/component: table-manager + {{- else }} + app.kubernetes.io/component: backend + {{- end }} + egress: + - toEntities: + - world +{{- end }} +{{- end }} +{{- end }} + +{{- if .Values.networkPolicy.egressKubeApiserver.enabled }} +--- +apiVersion: "cilium.io/v2" +kind: CiliumNetworkPolicy +metadata: + name: {{ include "loki.name" . }}-backend-kubeapiserver-egress + namespace: {{ include "loki.namespace" . }} +spec: + endpointSelector: + matchLabels: + {{- include "loki.selectorLabels" . | nindent 6 }} + app.kubernetes.io/component: backend + egress: + - toEntities: + - kube-apiserver +{{- end }} + +{{- end }} + +{{- if and .Values.networkPolicy.discovery.port (eq .Values.networkPolicy.flavor "cilium") }} +--- +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: {{ include "loki.name" . }}-egress-discovery + namespace: {{ include "loki.namespace" . }} + labels: + {{- include "loki.labels" . | nindent 4 }} +spec: + endpointSelector: + matchLabels: + {{- include "loki.selectorLabels" . | nindent 6 }} + egress: + - toPorts: + - ports: + - port: "{{ .Values.networkPolicy.discovery.port }}" + protocol: TCP + {{- if .Values.networkPolicy.discovery.namespaceSelector }} + toEndpoints: + - matchLabels: + {{- toYaml .Values.networkPolicy.discovery.namespaceSelector | nindent 8 }} + {{- if .Values.networkPolicy.discovery.podSelector }} + {{- toYaml .Values.networkPolicy.discovery.podSelector | nindent 8 }} + {{- end }} + {{- end }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/compactor/service.yaml b/packs/loki-3.7.4/charts/loki/templates/compactor/service.yaml new file mode 100644 index 00000000..2d637f79 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/compactor/service.yaml @@ -0,0 +1,4 @@ +{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} +{{- if $isDistributed }} +{{- include "loki.service" (dict "target" "compactor" "component" .Values.compactor "ctx" .) }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/compactor/serviceaccount.yaml b/packs/loki-3.7.4/charts/loki/templates/compactor/serviceaccount.yaml new file mode 100644 index 00000000..f7395302 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/compactor/serviceaccount.yaml @@ -0,0 +1,4 @@ +{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} +{{- if $isDistributed }} +{{- include "loki.serviceAccount" (dict "target" "compactor" "component" .Values.compactor "ctx" .) }} +{{- end -}} diff --git a/packs/loki-3.7.4/charts/loki/templates/compactor/workload.yaml b/packs/loki-3.7.4/charts/loki/templates/compactor/workload.yaml new file mode 100644 index 00000000..6a101334 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/compactor/workload.yaml @@ -0,0 +1,4 @@ +{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} +{{- if $isDistributed }} +{{- include "loki.component" (dict "ctx" . "component" .Values.compactor "target" "compactor") }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/config.yaml b/packs/loki-3.7.4/charts/loki/templates/config.yaml new file mode 100644 index 00000000..5d335955 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/config.yaml @@ -0,0 +1,21 @@ +{{- if .Values.loki.generatedConfigObjectName -}} +apiVersion: v1 +{{- if eq .Values.loki.configStorageType "Secret" }} +kind: Secret +{{- else }} +kind: ConfigMap +{{- end }} +metadata: + name: {{ tpl .Values.loki.generatedConfigObjectName . }} + namespace: {{ include "loki.namespace" . }} + labels: + {{- include "loki.labels" . | nindent 4 }} +{{- if eq .Values.loki.configStorageType "Secret" }} +data: + config.yaml: {{ include "loki.calculatedConfig" . | b64enc }} +{{- else }} +data: + config.yaml: | + {{ include "loki.calculatedConfig" . | nindent 4 }} +{{- end -}} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/distributor/hpa.yaml b/packs/loki-3.7.4/charts/loki/templates/distributor/hpa.yaml new file mode 100644 index 00000000..5d0e6c6a --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/distributor/hpa.yaml @@ -0,0 +1,4 @@ +{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} +{{- if $isDistributed }} +{{- include "loki.hpa" (dict "target" "distributor" "component" .Values.distributor "ctx" . "kind" "Deployment") }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/distributor/pdb.yaml b/packs/loki-3.7.4/charts/loki/templates/distributor/pdb.yaml new file mode 100644 index 00000000..158a5dd6 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/distributor/pdb.yaml @@ -0,0 +1,4 @@ +{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} +{{- if $isDistributed }} +{{- include "loki.pdb" (dict "target" "distributor" "component" .Values.distributor "ctx" .) }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/distributor/service.yaml b/packs/loki-3.7.4/charts/loki/templates/distributor/service.yaml new file mode 100644 index 00000000..d7aa002c --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/distributor/service.yaml @@ -0,0 +1,4 @@ +{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} +{{- if $isDistributed -}} +{{- include "loki.service" (dict "target" "distributor" "component" .Values.distributor "ctx" .) }} +{{- end -}} diff --git a/packs/loki-3.7.4/charts/loki/templates/distributor/serviceaccount.yaml b/packs/loki-3.7.4/charts/loki/templates/distributor/serviceaccount.yaml new file mode 100644 index 00000000..dcac1854 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/distributor/serviceaccount.yaml @@ -0,0 +1,4 @@ +{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} +{{- if $isDistributed -}} +{{- include "loki.serviceAccount" (dict "target" "distributor" "component" .Values.distributor "ctx" .) }} +{{- end -}} diff --git a/packs/loki-3.7.4/charts/loki/templates/distributor/so.yaml b/packs/loki-3.7.4/charts/loki/templates/distributor/so.yaml new file mode 100644 index 00000000..99c506db --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/distributor/so.yaml @@ -0,0 +1,4 @@ +{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} +{{- if $isDistributed }} +{{- include "loki.keda" (dict "target" "distributor" "component" .Values.distributor "ctx" . "kind" "Deployment") }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/distributor/workload.yaml b/packs/loki-3.7.4/charts/loki/templates/distributor/workload.yaml new file mode 100644 index 00000000..1d1206f2 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/distributor/workload.yaml @@ -0,0 +1,18 @@ +{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} +{{- if $isDistributed }} +{{- $args := list }} +{{- if .Values.ingester.zoneAwareReplication.enabled }} + {{- if and (.Values.ingester.zoneAwareReplication.migration.enabled) (not .Values.ingester.zoneAwareReplication.migration.writePath) }} + {{- $args = list "-distributor.zone-awareness-enabled=false" }} + {{- else }} + {{- $args = list "-distributor.zone-awareness-enabled=true" }} + {{- end }} +{{- end }} +{{/* Inject -shutdown-delay before extraArgs so a user-supplied extraArgs override can't drop it. "0s" (default) renders nothing. */}} +{{- with .Values.distributor.shutdownDelay }} +{{- if ne (. | toString) "0s" }} +{{- $args = append $args (printf "-shutdown-delay=%s" .) }} +{{- end }} +{{- end }} +{{- include "loki.component" (dict "ctx" . "component" .Values.distributor "target" "distributor" "args" $args) }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/extra-manifests.yaml b/packs/loki-3.7.4/charts/loki/templates/extra-manifests.yaml new file mode 100644 index 00000000..87b019f0 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/extra-manifests.yaml @@ -0,0 +1,15 @@ +{{- /* Normalize extraObjects to a list, easier to loop over */ -}} +{{- $extraObjects := .Values.extraObjects | default (list) -}} + +{{- if kindIs "map" $extraObjects -}} + {{- $extraObjects = values $extraObjects -}} +{{- end -}} + +{{- range $extraObjects }} +--- + {{- if kindIs "map" . }} + {{- tpl (toYaml .) $ | nindent 0 }} + {{- else if kindIs "string" . }} + {{- tpl . $ | nindent 0 }} + {{- end }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/gateway/_helpers.tpl b/packs/loki-3.7.4/charts/loki/templates/gateway/_helpers.tpl new file mode 100644 index 00000000..88162941 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/gateway/_helpers.tpl @@ -0,0 +1,39 @@ +{{/* +gateway fullname +*/}} +{{- define "loki.gatewayFullname" -}} +{{ include "loki.fullname" . }}-gateway +{{- end }} + +{{/* +gateway common labels +*/}} +{{- define "loki.gatewayLabels" -}} +{{ include "loki.labels" . }} +app.kubernetes.io/component: gateway +{{- end }} + +{{/* +gateway selector labels +*/}} +{{- define "loki.gatewaySelectorLabels" -}} +{{ include "loki.selectorLabels" . }} +app.kubernetes.io/component: gateway +{{- end }} + +{{/* +gateway auth secret name +*/}} +{{- define "loki.gatewayAuthSecret" -}} +{{ .Values.gateway.basicAuth.existingSecret | default (include "loki.gatewayFullname" . ) }} +{{- end }} + +{{/* +gateway priority class name +*/}} +{{- define "loki.gatewayPriorityClassName" -}} +{{- $pcn := coalesce .Values.gateway.priorityClassName .Values.defaults.priorityClassName .Values.global.priorityClassName -}} +{{- if $pcn }} +priorityClassName: {{ $pcn }} +{{- end }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/gateway/configmap.yaml b/packs/loki-3.7.4/charts/loki/templates/gateway/configmap.yaml new file mode 100644 index 00000000..1f1e5b1c --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/gateway/configmap.yaml @@ -0,0 +1,201 @@ +{{- if .Values.gateway.enabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "loki.gatewayFullname" . }} + namespace: {{ include "loki.namespace" . }} + labels: + {{- include "loki.gatewayLabels" . | nindent 4 }} +data: + nginx.conf: | + {{- tpl .Values.gateway.nginxConfig.file . | nindent 4 }} + {{- if .Values.gateway.metrics.enabled }} + access-log-exporter.yaml: | + presets: + loki: + metrics: + - name: "http_requests_total" + type: "counter" + help: "The total number of client requests." + labels: + - name: "host" + lineIndex: 0 + - name: "method" + lineIndex: 1 + - name: "status" + lineIndex: 2 + - name: "path" + lineIndex: 11 + replacements: + - regexp: "^$" + replacement: "/" + - regexp: "^(.+)\\?.+" + replacement: "$1" + + - name: "http_requests_completed_total" + type: "counter" + help: "The total number of completed requests." + valueIndex: 3 + replacements: + - string: "OK" + replacement: "1" + labels: + - name: "host" + lineIndex: 0 + - name: "method" + lineIndex: 1 + - name: "status" + lineIndex: 2 + - name: "path" + lineIndex: 11 + replacements: + - regexp: "^$" + replacement: "/" + - regexp: "^(.+)\\?.+" + replacement: "$1" + + - name: "http_request_size_bytes" + type: "histogram" + buckets: [ 10,1000,100000,1000000,5000000,50000000,200000000 ] + help: "The request length (including request line, header, and request body)" + valueIndex: 5 + labels: + - name: "host" + lineIndex: 0 + - name: "method" + lineIndex: 1 + - name: "status" + lineIndex: 2 + - name: "path" + lineIndex: 11 + replacements: + - regexp: "^$" + replacement: "/" + - regexp: "^(.+)\\?.+" + replacement: "$1" + + - name: "http_response_size_bytes" + type: "histogram" + buckets: [ 10,1000,100000,1000000,5000000,50000000,200000000 ] + help: "The response length (including request line, header, and request body)" + valueIndex: 6 + labels: + - name: "host" + lineIndex: 0 + - name: "method" + lineIndex: 1 + - name: "status" + lineIndex: 2 + - name: "path" + lineIndex: 11 + replacements: + - regexp: "^$" + replacement: "/" + - regexp: "^(.+)\\?.+" + replacement: "$1" + + - name: "http_request_duration_seconds" + type: "histogram" + buckets: [ .005, .01, .025, .05, .1, .25, .5, 1, 2.5, 5, 10 ] + help: "The time spent on receiving and response the response to the client" + valueIndex: 4 + math: + enabled: true + div: 1000 + labels: + - name: "host" + lineIndex: 0 + - name: "method" + lineIndex: 1 + - name: "status" + lineIndex: 2 + - name: "path" + lineIndex: 11 + replacements: + - regexp: "^$" + replacement: "/" + - regexp: "^(.+)\\?.+" + replacement: "$1" + + - name: "http_upstream_connect_duration_seconds" + type: "histogram" + buckets: [ .005, .01, .025, .05, .1, .25, .5, 1, 2.5, 5, 10 ] + help: "The time spent on establishing a connection with the upstream server" + valueIndex: 8 + math: + enabled: true + div: 1000 + upstream: + enabled: true + addrLineIndex: 7 + excludes: [] + labels: + - name: "host" + lineIndex: 0 + - name: "method" + lineIndex: 1 + - name: "status" + lineIndex: 2 + - name: "path" + lineIndex: 11 + replacements: + - regexp: "^$" + replacement: "/" + - regexp: "^(.+)\\?.+" + replacement: "$1" + + - name: "http_upstream_header_duration_seconds" + type: "histogram" + help: "The time spent on receiving the response header from the upstream server" + buckets: [ .005, .01, .025, .05, .1, .25, .5, 1, 2.5, 5, 10 ] + valueIndex: 9 + math: + enabled: true + div: 1000 + upstream: + enabled: true + addrLineIndex: 7 + excludes: [] + labels: + - name: "host" + lineIndex: 0 + - name: "method" + lineIndex: 1 + - name: "status" + lineIndex: 2 + - name: "path" + lineIndex: 11 + replacements: + - regexp: "^$" + replacement: "/" + - regexp: "^(.+)\\?.+" + replacement: "$1" + + - name: "http_upstream_request_duration_seconds" + type: "histogram" + help: "The time spent on receiving the response from the upstream server" + buckets: [ .005, .01, .025, .05, .1, .25, .5, 1, 2.5, 5, 10 ] + valueIndex: 10 + math: + enabled: true + div: 1000 + upstream: + enabled: true + addrLineIndex: 7 + excludes: [] + labels: + - name: "host" + lineIndex: 0 + - name: "method" + lineIndex: 1 + - name: "status" + lineIndex: 2 + - name: "path" + lineIndex: 11 + replacements: + - regexp: "^$" + replacement: "/" + - regexp: "^(.+)\\?.+" + replacement: "$1" + {{- end }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/gateway/deployment.yaml b/packs/loki-3.7.4/charts/loki/templates/gateway/deployment.yaml new file mode 100644 index 00000000..3c684ad4 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/gateway/deployment.yaml @@ -0,0 +1,208 @@ +{{- if and .Values.gateway.enabled }} +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "loki.gatewayFullname" . }} + namespace: {{ include "loki.namespace" . }} + labels: + {{- include "loki.gatewayLabels" . | nindent 4 }} + {{- if or (not (empty .Values.loki.annotations)) (not (empty .Values.gateway.annotations))}} + annotations: + {{- with .Values.loki.annotations }} + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.gateway.annotations }} + {{- toYaml . | nindent 4 }} + {{- end }} + {{- end }} +spec: +{{- if and (not .Values.gateway.autoscaling.enabled) (not .Values.gateway.kedaAutoscaling.enabled) }} + replicas: {{ .Values.gateway.replicas }} +{{- end }} +{{- with .Values.gateway.deploymentStrategy }} + strategy: +{{ toYaml . | trim | indent 4 }} +{{- end }} + revisionHistoryLimit: {{ .Values.loki.revisionHistoryLimit }} + selector: + matchLabels: + {{- include "loki.gatewaySelectorLabels" . | nindent 6 }} + template: + metadata: + annotations: + checksum/config: {{ include "loki.configMapOrSecretContentHash" (dict "ctx" . "name" "/gateway/configmap.yaml") }} + {{- with .Values.gateway.podAnnotations }} + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- with .Values.loki.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.gateway.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + {{- include "loki.gatewaySelectorLabels" . | nindent 8 }} + spec: + serviceAccountName: {{ include "loki.serviceAccountName" (dict "ctx" . "component" .Values.gateway "target" "gateway" ) }} + {{- if (kindIs "bool" .Values.gateway.automountServiceAccountToken) }} + automountServiceAccountToken: {{ .Values.gateway.automountServiceAccountToken }} + {{- else if (kindIs "bool" .Values.defaults.automountServiceAccountToken) }} + automountServiceAccountToken: {{ .Values.defaults.automountServiceAccountToken }} + {{- end }} + {{- $esl := include "loki.enableServiceLinks" (dict "component" .Values.gateway "ctx" .) }} + {{- if $esl }} + {{ $esl }} + {{- end }} + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end -}} + {{- if and (semverCompare ">=1.33-0" (include "loki.kubeVersion" .)) (kindIs "bool" .Values.gateway.hostUsers) }} + hostUsers: {{ .Values.gateway.hostUsers }} + {{- end }} + {{- include "loki.gatewayPriorityClassName" . | nindent 6 }} + securityContext: + {{- toYaml .Values.gateway.podSecurityContext | nindent 8 }} + terminationGracePeriodSeconds: {{ .Values.gateway.terminationGracePeriodSeconds }} + containers: + - name: nginx + image: {{ include "loki.image" (dict "ctx" . "component" .Values.gateway.image) }} + imagePullPolicy: {{ .Values.gateway.image.pullPolicy }} + ports: + - name: http + containerPort: {{ .Values.gateway.containerPort }} + protocol: TCP + {{- with .Values.gateway.extraEnv }} + env: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.gateway.extraEnvFrom }} + envFrom: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.gateway.livenessProbe }} + livenessProbe: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.gateway.readinessProbe }} + readinessProbe: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.gateway.startupProbe }} + startupProbe: + {{- toYaml . | nindent 12 }} + {{- end }} + securityContext: + {{- toYaml .Values.gateway.containerSecurityContext | nindent 12 }} + {{- with .Values.gateway.lifecycle }} + lifecycle: + {{- toYaml . | nindent 12 }} + {{- end }} + volumeMounts: + - name: config + mountPath: /etc/nginx + {{- if .Values.gateway.basicAuth.enabled }} + - name: auth + mountPath: /etc/nginx/secrets + {{- end }} + - name: tmp + mountPath: /tmp + - name: docker-entrypoint-d-override + mountPath: /docker-entrypoint.d + {{- if .Values.gateway.extraVolumeMounts }} + {{- toYaml .Values.gateway.extraVolumeMounts | nindent 12 }} + {{- end }} + {{- with (coalesce .Values.gateway.resources .Values.defaults.resources) }} + resources: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.gateway.resizePolicy }} + resizePolicy: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- if .Values.gateway.metrics.enabled }} + - name: exporter + image: {{ include "loki.image" (dict "ctx" . "component" .Values.gateway.metrics.image) }} + imagePullPolicy: {{ .Values.gateway.metrics.image.pullPolicy }} + ports: + - containerPort: 4040 + name: http-metrics + - containerPort: 8514 + name: syslog + args: + - --nginx.scrape-url + - http://127.0.0.1:{{ .Values.gateway.containerPort }}/stub_status + - --preset + - loki + {{- with .Values.gateway.metrics.extraArgs }} + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.gateway.metrics.resources }} + resources: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.gateway.metrics.resizePolicy }} + resizePolicy: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.gateway.metrics.containerSecurityContext }} + securityContext: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.gateway.metrics.readinessProbe }} + readinessProbe: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.gateway.metrics.livenessProbe }} + livenessProbe: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.gateway.metrics.startupProbe }} + startupProbe: + {{- toYaml . | nindent 12 }} + {{- end }} + volumeMounts: + - name: config + mountPath: /config.yaml + subPath: access-log-exporter.yaml + {{- end }} + {{- if .Values.gateway.extraContainers }} + {{- toYaml .Values.gateway.extraContainers | nindent 8}} + {{- end }} + {{- with .Values.gateway.affinity }} + affinity: + {{- tpl ( . | toYaml) $ | nindent 8 }} + {{- end }} + {{- with (coalesce .Values.gateway.dnsConfig .Values.defaults.dnsConfig .Values.loki.dnsConfig) }} + dnsConfig: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with (coalesce .Values.gateway.nodeSelector .Values.defaults.nodeSelector) }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.gateway.topologySpreadConstraints }} + topologySpreadConstraints: + {{- tpl ( . | toYaml) $ | nindent 8 }} + {{- end }} + {{- with (coalesce .Values.gateway.tolerations .Values.defaults.tolerations) }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} + volumes: + - name: config + configMap: + name: {{ include "loki.gatewayFullname" . }} + {{- if .Values.gateway.basicAuth.enabled }} + - name: auth + secret: + secretName: {{ include "loki.gatewayAuthSecret" . }} + {{- end }} + - name: tmp + emptyDir: {} + - name: docker-entrypoint-d-override + emptyDir: {} + {{- if .Values.gateway.extraVolumes }} + {{- toYaml .Values.gateway.extraVolumes | nindent 8 }} + {{- end }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/gateway/hpa.yaml b/packs/loki-3.7.4/charts/loki/templates/gateway/hpa.yaml new file mode 100644 index 00000000..0d27804e --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/gateway/hpa.yaml @@ -0,0 +1,3 @@ +{{- if .Values.gateway.autoscaling.enabled }} +{{- include "loki.hpa" (dict "target" "gateway" "component" .Values.gateway "ctx" . "kind" "Deployment") }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/gateway/ingress.yaml b/packs/loki-3.7.4/charts/loki/templates/gateway/ingress.yaml new file mode 100644 index 00000000..a09084f5 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/gateway/ingress.yaml @@ -0,0 +1,49 @@ +{{- if and .Values.gateway.enabled -}} +{{- if .Values.gateway.ingress.enabled -}} +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: {{ include "loki.gatewayFullname" . }} + namespace: {{ include "loki.namespace" . }} + labels: + {{- include "loki.gatewayLabels" . | nindent 4 }} + {{- range $labelKey, $labelValue := .Values.gateway.ingress.labels }} + {{ $labelKey }}: {{ $labelValue | toYaml }} + {{- end }} + {{- with .Values.gateway.ingress.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- with .Values.gateway.ingress.ingressClassName }} + ingressClassName: {{ . }} + {{- end -}} + {{- if .Values.gateway.ingress.tls }} + tls: + {{- range .Values.gateway.ingress.tls }} + - hosts: + {{- range .hosts }} + - {{ tpl . $ | quote }} + {{- end }} + {{- with .secretName }} + secretName: {{ . }} + {{- end }} + {{- end }} + {{- end }} + rules: + {{- range .Values.gateway.ingress.hosts }} + - host: {{ tpl .host $ | quote }} + http: + paths: + {{- range .paths }} + - path: {{ .path }} + pathType: {{ .pathType }} + backend: + service: + name: {{ include "loki.gatewayFullname" $ }} + port: + number: {{ $.Values.gateway.service.port }} + {{- end }} + {{- end }} +{{- end }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/gateway/pdb.yaml b/packs/loki-3.7.4/charts/loki/templates/gateway/pdb.yaml new file mode 100644 index 00000000..7cb30e08 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/gateway/pdb.yaml @@ -0,0 +1,3 @@ +{{- if .Values.gateway.enabled }} +{{- include "loki.pdb" (dict "target" "gateway" "component" .Values.gateway "ctx" .) }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/gateway/route-gateway.yaml b/packs/loki-3.7.4/charts/loki/templates/gateway/route-gateway.yaml new file mode 100644 index 00000000..733d9c7d --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/gateway/route-gateway.yaml @@ -0,0 +1,9 @@ +{{- if .Values.gateway.enabled -}} +{{- range $name, $route := .Values.gateway.route -}} +{{- if $route.enabled -}} +{{- $routeName := ternary (include "loki.gatewayFullname" $) (printf "%s-%s" (include "loki.gatewayFullname" $) $name) (eq $name "main") -}} +{{- $rules := include "loki.route.gatewayRule" (dict "ctx" $ "route" $route "serviceName" (include "loki.gatewayFullname" $) "port" $.Values.gateway.service.port) -}} +{{- include "loki.route" (dict "ctx" $ "route" $route "name" $routeName "rules" $rules "labelsTemplate" "loki.gatewayLabels") }} +{{- end -}} +{{- end -}} +{{- end -}} diff --git a/packs/loki-3.7.4/charts/loki/templates/gateway/secret.yaml b/packs/loki-3.7.4/charts/loki/templates/gateway/secret.yaml new file mode 100644 index 00000000..a51256e9 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/gateway/secret.yaml @@ -0,0 +1,14 @@ +{{- with .Values.gateway }} +{{- if and .enabled .basicAuth.enabled (not .basicAuth.existingSecret) }} +apiVersion: v1 +kind: Secret +metadata: + name: {{ include "loki.gatewayFullname" $ }} + namespace: {{ include "loki.namespace" $ }} + labels: + {{- include "loki.gatewayLabels" $ | nindent 4 }} +stringData: + .htpasswd: | + {{- tpl .basicAuth.htpasswd $ | nindent 4 }} +{{- end }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/gateway/service-exporter.yaml b/packs/loki-3.7.4/charts/loki/templates/gateway/service-exporter.yaml new file mode 100644 index 00000000..7465fca5 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/gateway/service-exporter.yaml @@ -0,0 +1,31 @@ +{{- if and .Values.gateway.enabled .Values.gateway.metrics.enabled }} +apiVersion: v1 +kind: Service +metadata: + name: {{ include "loki.gatewayFullname" . }}-exporter + namespace: {{ include "loki.namespace" . }} + labels: + {{- include "loki.gatewayLabels" . | nindent 4 }} + {{- with .Values.loki.serviceLabels }} + {{- toYaml . | nindent 4}} + {{- end }} + {{- with .Values.gateway.metrics.service.labels }} + {{- toYaml . | nindent 4}} + {{- end }} + annotations: + {{- with .Values.loki.serviceAnnotations }} + {{- toYaml . | nindent 4}} + {{- end }} + {{- with .Values.gateway.metrics.service.annotations }} + {{- toYaml . | nindent 4}} + {{- end }} +spec: + type: ClusterIP + ports: + - name: http-metrics + port: 4040 + targetPort: http-metrics + protocol: TCP + selector: + {{- include "loki.gatewaySelectorLabels" . | nindent 4 }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/gateway/service.yaml b/packs/loki-3.7.4/charts/loki/templates/gateway/service.yaml new file mode 100644 index 00000000..e1a177ce --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/gateway/service.yaml @@ -0,0 +1,58 @@ +{{- if .Values.gateway.enabled }} +apiVersion: v1 +kind: Service +metadata: + name: {{ include "loki.resourceName" (dict "ctx" . "component" "gateway") }} + namespace: {{ include "loki.namespace" . }} + labels: + {{- include "loki.gatewayLabels" . | nindent 4 }} + {{- with .Values.loki.serviceLabels }} + {{- toYaml . | nindent 4}} + {{- end }} + {{- with .Values.gateway.service.labels }} + {{- toYaml . | nindent 4}} + {{- end }} + prometheus.io/service-monitor: "false" + annotations: + {{- with .Values.loki.serviceAnnotations }} + {{- toYaml . | nindent 4}} + {{- end }} + {{- with .Values.gateway.service.annotations }} + {{- toYaml . | nindent 4}} + {{- end }} +spec: + type: {{ .Values.gateway.service.type }} + {{- with .Values.gateway.service.clusterIP }} + clusterIP: {{ . }} + {{- end }} + {{- if and (eq "LoadBalancer" .Values.gateway.service.type) .Values.gateway.service.loadBalancerIP }} + loadBalancerIP: {{ .Values.gateway.service.loadBalancerIP }} + {{- end }} + ports: + - name: http + port: {{ .Values.gateway.service.port }} + targetPort: http + {{- if and (eq "NodePort" .Values.gateway.service.type) .Values.gateway.service.nodePort }} + nodePort: {{ .Values.gateway.service.nodePort }} + {{- end }} + protocol: TCP + selector: + {{- include "loki.gatewaySelectorLabels" . | nindent 4 }} +{{- with .Values.gateway.service.trafficDistribution | default .Values.loki.service.trafficDistribution }} + trafficDistribution: {{ . }} +{{- end }} +{{- with .Values.gateway.service.sessionAffinity }} + sessionAffinity: {{ . }} +{{- end }} +{{- with .Values.gateway.service.sessionAffinityConfig }} + sessionAffinityConfig: + {{- toYaml . | nindent 4 }} +{{- end }} +{{- with (coalesce .Values.gateway.service.ipFamilyPolicy .Values.defaults.service.ipFamilyPolicy) }} + ipFamilyPolicy: {{ . }} +{{- end }} +{{- with (coalesce .Values.gateway.service.ipFamilies .Values.defaults.service.ipFamilies) }} + ipFamilies: + {{- toYaml . | nindent 4 }} +{{- end }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/gateway/serviceaccount.yaml b/packs/loki-3.7.4/charts/loki/templates/gateway/serviceaccount.yaml new file mode 100644 index 00000000..59a935d5 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/gateway/serviceaccount.yaml @@ -0,0 +1,3 @@ +{{- if .Values.gateway.enabled }} +{{- include "loki.serviceAccount" (dict "target" "gateway" "component" .Values.gateway "ctx" .) }} +{{- end -}} diff --git a/packs/loki-3.7.4/charts/loki/templates/gateway/so.yaml b/packs/loki-3.7.4/charts/loki/templates/gateway/so.yaml new file mode 100644 index 00000000..750ca323 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/gateway/so.yaml @@ -0,0 +1 @@ +{{- include "loki.keda" (dict "target" "gateway" "component" .Values.gateway "ctx" . "kind" "Deployment") }} diff --git a/packs/loki-3.7.4/charts/loki/templates/index-gateway/pdb.yaml b/packs/loki-3.7.4/charts/loki/templates/index-gateway/pdb.yaml new file mode 100644 index 00000000..2011e48c --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/index-gateway/pdb.yaml @@ -0,0 +1,4 @@ +{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} +{{- if $isDistributed }} +{{- include "loki.pdb" (dict "target" "index-gateway" "component" .Values.indexGateway "ctx" .) }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/index-gateway/service.yaml b/packs/loki-3.7.4/charts/loki/templates/index-gateway/service.yaml new file mode 100644 index 00000000..87e842a9 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/index-gateway/service.yaml @@ -0,0 +1,4 @@ +{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} +{{- if $isDistributed }} +{{- include "loki.service" (dict "target" "index-gateway" "component" .Values.indexGateway "ctx" .) }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/index-gateway/serviceaccount.yaml b/packs/loki-3.7.4/charts/loki/templates/index-gateway/serviceaccount.yaml new file mode 100644 index 00000000..e10cc188 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/index-gateway/serviceaccount.yaml @@ -0,0 +1,4 @@ +{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} +{{- if $isDistributed }} +{{- include "loki.serviceAccount" (dict "target" "index-gateway" "component" .Values.indexGateway "ctx" .) }} +{{- end -}} diff --git a/packs/loki-3.7.4/charts/loki/templates/index-gateway/workload.yaml b/packs/loki-3.7.4/charts/loki/templates/index-gateway/workload.yaml new file mode 100644 index 00000000..e9771910 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/index-gateway/workload.yaml @@ -0,0 +1,4 @@ +{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} +{{- if $isDistributed }} +{{- include "loki.component" (dict "ctx" . "component" .Values.indexGateway "target" "index-gateway") }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/ingester/_helpers.tpl b/packs/loki-3.7.4/charts/loki/templates/ingester/_helpers.tpl new file mode 100644 index 00000000..a1229620 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/ingester/_helpers.tpl @@ -0,0 +1,35 @@ +{{/* +expects global context +*/}} +{{- define "loki.ingester.replicaCount" -}} +{{- ceil (divf .Values.ingester.replicas 3) -}} +{{- end -}} + +{{/* +expects a dict +{ + "replicas": replicas in a zone, + "ctx": global context +} +*/}} +{{- define "loki.ingester.maxUnavailable" -}} +{{- max 1 (ceil (mulf .replicas (divf (int .ctx.Values.ingester.zoneAwareReplication.maxUnavailablePct) 100))) -}} +{{- end -}} + +{{/* +Return rollout-group prefix if it is set +*/}} +{{- define "loki.prefixRolloutGroup" -}} +{{- if .Values.ingester.rolloutGroupPrefix -}} +{{- .Values.ingester.rolloutGroupPrefix -}}- +{{- end -}} +{{- end -}} + +{{/* +Return ingester name prefix if required +*/}} +{{- define "loki.prefixIngesterName" -}} +{{- if .Values.ingester.addIngesterNamePrefix -}} +loki- +{{- end -}} +{{- end -}} diff --git a/packs/loki-3.7.4/charts/loki/templates/ingester/hpa.yaml b/packs/loki-3.7.4/charts/loki/templates/ingester/hpa.yaml new file mode 100644 index 00000000..618317d6 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/ingester/hpa.yaml @@ -0,0 +1,8 @@ +{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} +{{- if and $isDistributed (or (not .Values.ingester.zoneAwareReplication.enabled) .Values.ingester.zoneAwareReplication.migration.enabled) }} +{{- include "loki.hpa" (dict "target" "ingester" "component" .Values.ingester "ctx" .) }} +{{- else if and $isDistributed .Values.ingester.zoneAwareReplication.enabled }} + {{- range $zone := list "zone-a" "zone-b" "zone-c" }} +{{- include "loki.hpa" (dict "target" "ingester" "component" $.Values.ingester "ctx" $ "suffix" $zone) }} + {{- end }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/ingester/pdb-zone.yaml b/packs/loki-3.7.4/charts/loki/templates/ingester/pdb-zone.yaml new file mode 100644 index 00000000..ee08f97b --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/ingester/pdb-zone.yaml @@ -0,0 +1,7 @@ +{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} +{{- if and $isDistributed (.Values.ingester.zoneAwareReplication.enabled) }} +{{- $extraMatchLabels := dict + "rollout-group" (printf "%singester" (include "loki.prefixRolloutGroup" .)) +-}} +{{- include "loki.pdb" (dict "target" "ingester" "component" .Values.ingester "ctx" . "suffix" "rollout" "extraMatchLabels" $extraMatchLabels) }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/ingester/pdb.yaml b/packs/loki-3.7.4/charts/loki/templates/ingester/pdb.yaml new file mode 100644 index 00000000..dc7165d8 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/ingester/pdb.yaml @@ -0,0 +1,9 @@ +{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} +{{- if and $isDistributed (or (not .Values.ingester.zoneAwareReplication.enabled) .Values.ingester.zoneAwareReplication.migration.enabled) }} +{{- $extraMatchExpressions := list (dict + "key" "rollout-group" + "operator" "NotIn" + "values" (list (printf "%singester" (include "loki.prefixRolloutGroup" .))) +) -}} +{{- include "loki.pdb" (dict "target" "ingester" "component" .Values.ingester "ctx" . "extraMatchExpressions" $extraMatchExpressions) }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/ingester/service.yaml b/packs/loki-3.7.4/charts/loki/templates/ingester/service.yaml new file mode 100644 index 00000000..93c0a2dd --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/ingester/service.yaml @@ -0,0 +1,10 @@ +{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} +{{- if $isDistributed }} +{{- include "loki.service" (dict "target" "ingester" "component" .Values.ingester "ctx" .) }} +{{- if .Values.ingester.zoneAwareReplication.enabled }} +{{- range $zone := list "zone-a" "zone-b" "zone-c" }} +--- +{{- include "loki.service" (dict "target" "ingester" "component" $.Values.ingester "ctx" $ "rolloutZoneName" $zone "serviceEnabled" false "publishNotReadyAddresses" false) }} +{{- end }} +{{- end }} +{{- end -}} diff --git a/packs/loki-3.7.4/charts/loki/templates/ingester/serviceaccount.yaml b/packs/loki-3.7.4/charts/loki/templates/ingester/serviceaccount.yaml new file mode 100644 index 00000000..06afc9b4 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/ingester/serviceaccount.yaml @@ -0,0 +1,4 @@ +{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} +{{- if $isDistributed }} +{{- include "loki.serviceAccount" (dict "target" "ingester" "component" .Values.ingester "ctx" .) }} +{{- end -}} diff --git a/packs/loki-3.7.4/charts/loki/templates/ingester/so.yaml b/packs/loki-3.7.4/charts/loki/templates/ingester/so.yaml new file mode 100644 index 00000000..42afc519 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/ingester/so.yaml @@ -0,0 +1,8 @@ +{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} +{{- if and $isDistributed (or (not .Values.ingester.zoneAwareReplication.enabled) .Values.ingester.zoneAwareReplication.migration.enabled) }} +{{- include "loki.keda" (dict "target" "ingester" "component" .Values.ingester "ctx" .) }} +{{- else if and $isDistributed .Values.ingester.zoneAwareReplication.enabled }} + {{- range $zone := list "zone-a" "zone-b" "zone-c" }} +{{- include "loki.keda" (dict "target" "ingester" "component" $.Values.ingester "ctx" $ "suffix" $zone) }} + {{- end }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/ingester/workload.yaml b/packs/loki-3.7.4/charts/loki/templates/ingester/workload.yaml new file mode 100644 index 00000000..4c07d819 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/ingester/workload.yaml @@ -0,0 +1,14 @@ +{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} +{{- if $isDistributed }} +{{- if (or (not .Values.ingester.zoneAwareReplication.enabled) .Values.ingester.zoneAwareReplication.migration.enabled) }} +{{- include "loki.component" (dict "ctx" . "component" .Values.ingester "target" "ingester" "args" (list "-ingester.availability-zone=zone-default")) }} +{{- end }} +{{- if .Values.ingester.zoneAwareReplication.enabled }} +{{- $replicas := (include "loki.ingester.replicaCount" .) -}} +{{- range $zone := list "zone-a" "zone-b" "zone-c" }} +{{- $args := (list (print "-ingester.availability-zone=" $zone) "-ingester.unregister-on-shutdown=false" "-ingester.tokens-file-path=/var/loki/ring-tokens") }} +--- +{{ include "loki.component" (dict "ctx" $ "component" $.Values.ingester "target" "ingester" "rolloutZoneName" $zone "args" $args "replicas" $replicas) }} +{{- end }} +{{- end }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/ingress.yaml b/packs/loki-3.7.4/charts/loki/templates/ingress.yaml new file mode 100644 index 00000000..4b1641d1 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/ingress.yaml @@ -0,0 +1,39 @@ +{{- if .Values.ingress.enabled }} +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: {{ include "loki.fullname" . }} + namespace: {{ include "loki.namespace" . }} + labels: + {{- include "loki.labels" . | nindent 4 }} + {{- with .Values.ingress.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.ingress.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- with .Values.ingress.ingressClassName }} + ingressClassName: {{ . }} + {{- end -}} + {{- if .Values.ingress.tls }} + tls: + {{- range .Values.ingress.tls }} + - hosts: + {{- range .hosts }} + - {{ tpl . $ | quote }} + {{- end }} + {{- with .secretName }} + secretName: {{ . }} + {{- end }} + {{- end }} + {{- end }} + rules: + {{- range $.Values.ingress.hosts }} + - host: {{ tpl . $ | quote }} + http: + paths: + {{- include "loki.ingress.servicePaths" $ | indent 10}} + {{- end }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/loki-canary/daemonset.yaml b/packs/loki-3.7.4/charts/loki/templates/loki-canary/daemonset.yaml new file mode 100644 index 00000000..efbd400d --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/loki-canary/daemonset.yaml @@ -0,0 +1,150 @@ +{{- if .Values.lokiCanary.enabled -}} +--- +apiVersion: apps/v1 +kind: {{ .Values.lokiCanary.kind }} +metadata: + name: {{ include "loki.resourceName" (dict "ctx" . "component" "canary") }} + namespace: {{ include "loki.namespace" $ }} + labels: + {{- include "loki.labels" $ | nindent 4 }} + app.kubernetes.io/component: canary + {{- with .Values.lokiCanary.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.lokiCanary.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + selector: + matchLabels: + {{- include "loki.selectorLabels" $ | nindent 6 }} + app.kubernetes.io/component: canary + {{- if eq .Values.lokiCanary.kind "Deployment" }} + replicas: {{ .Values.lokiCanary.replicas }} + strategy: + type: RollingUpdate + rollingUpdate: + maxUnavailable: 1 + revisionHistoryLimit: {{ .Values.lokiCanary.revisionHistoryLimit }} + {{- else }} + {{- with .Values.lokiCanary.updateStrategy }} + updateStrategy: + {{- toYaml . | nindent 4 }} + {{- end }} + {{- end }} + template: + metadata: + {{- with .Values.lokiCanary.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "loki.selectorLabels" . | nindent 8 }} + app.kubernetes.io/component: canary + {{- with .Values.lokiCanary.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + spec: + serviceAccountName: {{ include "loki.serviceAccountName" (dict "ctx" . "component" .Values.lokiCanary "target" "canary") }} + {{- if (kindIs "bool" .Values.lokiCanary.automountServiceAccountToken) }} + automountServiceAccountToken: {{ .Values.lokiCanary.automountServiceAccountToken }} + {{- end }} + {{- with $.Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.lokiCanary.priorityClassName }} + priorityClassName: {{ . }} + {{- end }} + {{- if (kindIs "bool" .Values.lokiCanary.hostUsers) }} + hostUsers: {{ .Values.lokiCanary.hostUsers }} + {{- end }} + {{- with .Values.lokiCanary.podSecurityContext }} + securityContext: + {{- toYaml . | nindent 8 }} + {{- end }} + containers: + - name: canary + image: {{ include "loki.image" (dict "ctx" $ "component" $.Values.lokiCanary.image "defaultVersion" $.Chart.AppVersion) }} + imagePullPolicy: {{ $.Values.lokiCanary.image.pullPolicy }} + args: + - -addr={{- default (include "loki.host" $) .Values.lokiCanary.lokiurl }} + - -labelname={{ .Values.lokiCanary.labelname }} + - -labelvalue=$(POD_NAME) + {{- if $.Values.loki.auth_enabled }} + - -user={{ dig "selfMonitoring" "tenant" "name" $.Values.lokiCanary.tenant.name $.Values.monitoring }} + - -tenant-id={{ dig "selfMonitoring" "tenant" "name" $.Values.lokiCanary.tenant.name $.Values.monitoring }} + - -pass={{ dig "selfMonitoring" "tenant" "password" $.Values.lokiCanary.tenant.password $.Values.monitoring }} + {{- end }} + {{- if .Values.lokiCanary.push }} + - -push=true + {{- end }} + {{- with .Values.lokiCanary.extraArgs }} + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.lokiCanary.containerSecurityContext }} + securityContext: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.lokiCanary.extraVolumeMounts }} + volumeMounts: + {{- toYaml . | nindent 12 }} + {{- end }} + ports: + - name: http-metrics + containerPort: 3500 + protocol: TCP + env: + - name: POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + {{- with .Values.lokiCanary.extraEnv }} + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.lokiCanary.extraEnvFrom }} + envFrom: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.lokiCanary.livenessProbe }} + livenessProbe: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.lokiCanary.readinessProbe }} + readinessProbe: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.lokiCanary.startupProbe }} + startupProbe: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.lokiCanary.resources }} + resources: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.lokiCanary.resizePolicy }} + resizePolicy: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.lokiCanary.dnsConfig }} + dnsConfig: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.lokiCanary.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.lokiCanary.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.lokiCanary.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.lokiCanary.extraVolumes }} + volumes: + {{- toYaml . | nindent 8 }} + {{- end }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/loki-canary/pdb.yaml b/packs/loki-3.7.4/charts/loki/templates/loki-canary/pdb.yaml new file mode 100644 index 00000000..33185caf --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/loki-canary/pdb.yaml @@ -0,0 +1,3 @@ +{{- if and .Values.lokiCanary.enabled (eq .Values.lokiCanary.kind "Deployment") }} +{{- include "loki.pdb" (dict "target" "canary" "component" .Values.lokiCanary "ctx" .) }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/loki-canary/service.yaml b/packs/loki-3.7.4/charts/loki/templates/loki-canary/service.yaml new file mode 100644 index 00000000..47baa59d --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/loki-canary/service.yaml @@ -0,0 +1,28 @@ +{{- if .Values.lokiCanary.enabled -}} +--- +apiVersion: v1 +kind: Service +metadata: + name: {{ include "loki.resourceName" (dict "ctx" . "component" "canary") }} + namespace: {{ include "loki.namespace" $ }} + labels: + {{- include "loki.labels" $ | nindent 4 }} + app.kubernetes.io/component: canary + {{- with .Values.lokiCanary.service.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.lokiCanary.service.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + type: ClusterIP + ports: + - name: http-metrics + port: 3500 + targetPort: http-metrics + protocol: TCP + selector: + {{- include "loki.selectorLabels" $ | nindent 4 }} + app.kubernetes.io/component: canary +{{- end -}} diff --git a/packs/loki-3.7.4/charts/loki/templates/loki-canary/serviceaccount.yaml b/packs/loki-3.7.4/charts/loki/templates/loki-canary/serviceaccount.yaml new file mode 100644 index 00000000..a1d8c1e3 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/loki-canary/serviceaccount.yaml @@ -0,0 +1,3 @@ +{{- if .Values.lokiCanary.enabled -}} +{{- include "loki.serviceAccount" (dict "ctx" . "component" .Values.lokiCanary "target" "canary") }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/memcached/_memcached-pdb.tpl b/packs/loki-3.7.4/charts/loki/templates/memcached/_memcached-pdb.tpl new file mode 100644 index 00000000..c732fbb3 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/memcached/_memcached-pdb.tpl @@ -0,0 +1,37 @@ +{{/* +memcached PDB +Params: + ctx = . context + memcacheConfig = cache config + valuesSection = name of the section in values.yaml + component = name of the component +valuesSection and component are specified separately because helm prefers camelcase for naming convention and k8s components are named with snake case. +*/}} +{{- define "loki.memcached.pdb" -}} +{{ with $.memcacheConfig }} +{{- $pdb := mergeOverwrite (pick . "maxUnavailable") .podDisruptionBudget }} +{{- if and .enabled .podDisruptionBudget.enabled (gt (int .replicas) 1) -}} +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: {{ include "loki.resourceName" (dict "ctx" $.ctx "component" $.component "suffix" .suffix) }} + namespace: {{ include "loki.namespace" $.ctx }} + {{- with $pdb.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} + labels: + {{- include "loki.selectorLabels" $.ctx | nindent 4 }} + app.kubernetes.io/component: "memcached-{{ $.component }}{{ include "loki.memcached.suffix" .suffix }}" + {{- with $pdb.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- toYaml (omit $pdb "enabled" "labels" "annotations") | nindent 2 }} + selector: + matchLabels: + {{- include "loki.selectorLabels" $.ctx | nindent 6 }} + app.kubernetes.io/component: "memcached-{{ $.component }}{{ include "loki.memcached.suffix" .suffix }}" + {{- end }} +{{- end -}} +{{- end -}} diff --git a/packs/loki-3.7.4/charts/loki/templates/memcached/_memcached-statefulset.tpl b/packs/loki-3.7.4/charts/loki/templates/memcached/_memcached-statefulset.tpl new file mode 100644 index 00000000..1bfdfa24 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/memcached/_memcached-statefulset.tpl @@ -0,0 +1,220 @@ +{{/* +memcached StatefulSet +Params: + ctx = . context + memcacheConfig = cache config + valuesSection = name of the section in values.yaml + component = name of the component +valuesSection and component are specified separately because helm prefers camelcase for naming convention and k8s components are named with snake case. +*/}} +{{- define "loki.memcached.statefulSet" -}} +{{ with $.memcacheConfig }} +{{- if and .enabled ($.ctx.Values.memcached.enabled) -}} +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: {{ include "loki.resourceName" (dict "ctx" $.ctx "component" $.component "suffix" .suffix) }} + labels: + {{- include "loki.labels" $.ctx | nindent 4 }} + app.kubernetes.io/component: "memcached-{{ $.component }}{{ include "loki.memcached.suffix" .suffix }}" + name: "memcached-{{ $.component }}{{ include "loki.memcached.suffix" .suffix }}" + annotations: + {{- toYaml .annotations | nindent 4 }} + namespace: {{ include "loki.namespace" $.ctx | quote }} +spec: + podManagementPolicy: {{ .podManagementPolicy }} + replicas: {{ .replicas }} + selector: + matchLabels: + {{- include "loki.selectorLabels" $.ctx | nindent 6 }} + app.kubernetes.io/component: "memcached-{{ $.component }}{{ include "loki.memcached.suffix" .suffix }}" + name: "memcached-{{ $.component }}{{ include "loki.memcached.suffix" .suffix }}" + updateStrategy: + {{- toYaml .statefulStrategy | nindent 4 }} + serviceName: {{ template "loki.fullname" $.ctx }}-{{ $.component }}{{ include "loki.memcached.suffix" .suffix }} + template: + metadata: + labels: + {{- include "loki.selectorLabels" $.ctx | nindent 8 }} + app.kubernetes.io/component: "memcached-{{ $.component }}{{ include "loki.memcached.suffix" .suffix }}" + name: "memcached-{{ $.component }}{{ include "loki.memcached.suffix" .suffix }}" + {{- with $.ctx.Values.loki.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + annotations: + {{- with $.ctx.Values.global.podAnnotations }} + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .podAnnotations }} + {{- toYaml . | nindent 8 }} + {{- end }} + spec: + serviceAccountName: {{ include "loki.serviceAccountName" (dict "ctx" $.ctx "component" $.ctx.Values.memcached "target" "memcached" ) }} + {{- if .priorityClassName }} + priorityClassName: {{ .priorityClassName }} + {{- end }} + {{- if and (semverCompare ">=1.33-0" (include "loki.kubeVersion" $.ctx)) (kindIs "bool" .hostUsers) }} + hostUsers: {{ .hostUsers }} + {{- end }} + securityContext: + {{- toYaml $.ctx.Values.memcached.podSecurityContext | nindent 8 }} + {{- with .dnsConfig | default $.ctx.Values.loki.dnsConfig }} + dnsConfig: + {{- toYaml . | nindent 8 }} + {{- end }} + initContainers: + {{- toYaml .initContainers | nindent 8 }} + nodeSelector: + {{- toYaml .nodeSelector | nindent 8 }} + affinity: + {{- toYaml .affinity | nindent 8 }} + topologySpreadConstraints: + {{- toYaml .topologySpreadConstraints | nindent 8 }} + tolerations: + {{- toYaml .tolerations | nindent 8 }} + terminationGracePeriodSeconds: {{ .terminationGracePeriodSeconds }} + {{- with $.ctx.Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- if .extraVolumes }} + volumes: + {{- toYaml .extraVolumes | nindent 8 }} + {{- end }} + containers: + {{- if .extraContainers }} + {{ toYaml .extraContainers | nindent 8 }} + {{- end }} + - name: memcached + image: {{ include "loki.image" (dict "ctx" $.ctx "component" $.ctx.Values.memcached.image) }} + imagePullPolicy: {{ $.ctx.Values.memcached.image.pullPolicy }} + resources: + {{- if .resources }} + {{- toYaml .resources | nindent 12 }} + {{- else }} + {{- /* Calculate requested memory as round(allocatedMemory * 1.2). But with integer built-in operators. */}} + {{- $requestMemory := div (add (mul .allocatedMemory 12) 5) 10 }} + limits: + memory: {{ $requestMemory }}Mi + requests: + cpu: {{ .allocatedCPU }} + memory: {{ $requestMemory }}Mi + {{- end }} + {{- with .resizePolicy }} + resizePolicy: + {{- toYaml . | nindent 12 }} + {{- end }} + ports: + - containerPort: {{ .port }} + name: client + {{- /* Calculate storage size as round(.persistence.storageSize * 0.9). But with integer built-in operators. */}} + {{- $persistenceSize := (div (mul (trimSuffix "Gi" .persistence.storageSize | trimSuffix "G") 9) 10 ) }} + args: + - -m {{ .allocatedMemory }} + - --extended=modern,track_sizes{{ if .persistence.enabled }},ext_path={{ .persistence.mountPath }}/file:{{ $persistenceSize }}G,ext_wbuf_size=16{{ end }}{{ with .extraExtendedOptions }},{{ . }}{{ end }} + - -I {{ .maxItemMemory }}m + - -c {{ .connectionLimit }} + - -v + - -u {{ .port }} + {{- range $key, $value := .extraArgs }} + - "-{{ $key }}{{ if $value }} {{ $value }}{{ end }}" + {{- end }} + env: + {{- with $.ctx.Values.global.extraEnv }} + {{ toYaml . | nindent 12 }} + {{- end }} + envFrom: + {{- with $.ctx.Values.global.extraEnvFrom }} + {{- toYaml . | nindent 12 }} + {{- end }} + securityContext: + {{- toYaml $.ctx.Values.memcached.containerSecurityContext | nindent 12 }} + {{- if or .persistence.enabled .extraVolumeMounts }} + volumeMounts: + {{- if .persistence.enabled }} + - name: data + mountPath: {{ .persistence.mountPath }} + {{- end }} + {{- if .extraVolumeMounts }} + {{- toYaml .extraVolumeMounts | nindent 12 }} + {{- end }} + {{- end }} + {{- with $.ctx.Values.memcached.readinessProbe }} + readinessProbe: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with $.ctx.Values.memcached.livenessProbe }} + livenessProbe: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with $.ctx.Values.memcached.startupProbe }} + startupProbe: + {{- toYaml . | nindent 12 }} + {{- end }} + + {{- if $.ctx.Values.memcachedExporter.enabled }} + - name: exporter + image: {{ include "loki.image" (dict "ctx" $.ctx "component" $.ctx.Values.memcachedExporter.image) }} + imagePullPolicy: {{ $.ctx.Values.memcachedExporter.image.pullPolicy }} + ports: + - containerPort: 9150 + name: http-metrics + args: + - "--memcached.address=localhost:{{ .port }}" + - "--web.listen-address=0.0.0.0:9150" + {{- range $key, $value := $.ctx.Values.memcachedExporter.extraArgs }} + - "--{{ $key }}{{ if $value }}={{ $value }}{{ end }}" + {{- end }} + resources: + {{- toYaml $.ctx.Values.memcachedExporter.resources | nindent 12 }} + {{- with $.ctx.Values.memcachedExporter.resizePolicy }} + resizePolicy: + {{- toYaml . | nindent 12 }} + {{- end }} + securityContext: + {{- toYaml $.ctx.Values.memcachedExporter.containerSecurityContext | nindent 12 }} + {{- with $.ctx.Values.memcachedExporter.readinessProbe }} + readinessProbe: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with $.ctx.Values.memcachedExporter.livenessProbe }} + livenessProbe: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with $.ctx.Values.memcachedExporter.startupProbe }} + startupProbe: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- if .extraVolumeMounts }} + volumeMounts: + {{- toYaml .extraVolumeMounts | nindent 12 }} + {{- end }} + {{- end }} + {{- if .persistence.enabled }} + volumeClaimTemplates: + - apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: data + {{- with .persistence.labels }} + labels: + {{- toYaml . | nindent 10 }} + {{- end }} + spec: + accessModes: [ "ReadWriteOnce" ] + {{- with .persistence.storageClass }} + storageClassName: {{ if (eq "-" .) }}""{{ else }}{{ . }}{{ end }} + {{- end }} + {{- with .persistence.volumeAttributesClassName }} + volumeAttributesClassName: {{ . }} + {{- end }} + resources: + requests: + storage: {{ .persistence.storageSize | quote }} + {{- end }} +{{- end -}} +{{- end -}} +{{- end -}} diff --git a/packs/loki-3.7.4/charts/loki/templates/memcached/_memcached-svc.tpl b/packs/loki-3.7.4/charts/loki/templates/memcached/_memcached-svc.tpl new file mode 100644 index 00000000..7b47da5f --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/memcached/_memcached-svc.tpl @@ -0,0 +1,43 @@ +{{/* +memcached Service +Params: + ctx = . context + valuesSection = name of the section in values.yaml + memcacheConfig = cache config + component = name of the component +valuesSection and component are specified separately because helm prefers camelcase for naming convetion and k8s components are named with snake case. +*/}} +{{- define "loki.memcached.service" -}} +{{ with $.memcacheConfig }} +{{- if and .enabled ($.ctx.Values.memcached.enabled) -}} +apiVersion: v1 +kind: Service +metadata: + name: {{ include "loki.resourceName" (dict "ctx" $.ctx "component" $.component "suffix" .suffix) }} + labels: + {{- include "loki.labels" $.ctx | nindent 4 }} + app.kubernetes.io/component: "memcached-{{ $.component }}{{ include "loki.memcached.suffix" .suffix }}" + {{- with .service.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} + annotations: + {{- toYaml .service.annotations | nindent 4 }} + namespace: {{ include "loki.namespace" $.ctx | quote }} +spec: + type: ClusterIP + clusterIP: None + ports: + - name: memcached-client + port: {{ .port }} + targetPort: client + {{ if $.ctx.Values.memcachedExporter.enabled -}} + - name: http-metrics + port: 9150 + targetPort: http-metrics + {{ end }} + selector: + {{- include "loki.selectorLabels" $.ctx | nindent 4 }} + app.kubernetes.io/component: "memcached-{{ $.component }}{{ include "loki.memcached.suffix" .suffix }}" +{{- end -}} +{{- end -}} +{{- end -}} diff --git a/packs/loki-3.7.4/charts/loki/templates/memcached/serviceaccount.yaml b/packs/loki-3.7.4/charts/loki/templates/memcached/serviceaccount.yaml new file mode 100644 index 00000000..5384432b --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/memcached/serviceaccount.yaml @@ -0,0 +1,3 @@ +{{- if or .Values.chunksCache.enabled .Values.memcached.enabled }} +{{- include "loki.serviceAccount" (dict "target" "memcached" "component" .Values.memcached "ctx" .) }} +{{- end -}} diff --git a/packs/loki-3.7.4/charts/loki/templates/monitoring/additional-prometheus-rules.yaml b/packs/loki-3.7.4/charts/loki/templates/monitoring/additional-prometheus-rules.yaml new file mode 100644 index 00000000..1539a0a7 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/monitoring/additional-prometheus-rules.yaml @@ -0,0 +1,20 @@ +{{- range $name, $rule := .Values.monitoring.additionalPrometheusRules }} +--- +apiVersion: monitoring.coreos.com/v1 +kind: PrometheusRule +metadata: + name: {{ printf "%s-%s" (include "loki.fullname" $) $name | trunc 63 | trimSuffix "-" }} + namespace: {{ $.Values.monitoring.namespace | default (include "loki.namespace" $) }} + labels: + {{- include "loki.labels" $ | nindent 4 }} + {{- with $.Values.monitoring.rules.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with $.Values.monitoring.rules.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + groups: + {{- toYaml $rule.groups | nindent 4 }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/monitoring/alerts/loki_alerts.yaml b/packs/loki-3.7.4/charts/loki/templates/monitoring/alerts/loki_alerts.yaml new file mode 100644 index 00000000..424f70ea --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/monitoring/alerts/loki_alerts.yaml @@ -0,0 +1,190 @@ +{{- /* +Generated from 'loki-alerts' group from https://github.com/grafana/loki.git +Do not change in-place! In order to change this file first read following link: +https://github.com/grafana-community/helm-charts/tree/main/charts/loki/hack +*/ -}} +{{- if and .Values.monitoring.alerts.enabled }} +apiVersion: monitoring.coreos.com/v1 +kind: PrometheusRule +metadata: + name: {{ include "loki.resourceName" (dict "ctx" $ "component" "loki-alerts") }} + namespace: {{ .Values.monitoring.namespace | default (include "loki.namespace" $) }} + labels: + {{- include "loki.labels" $ | nindent 4 }} + {{- with .Values.monitoring.alerts.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.monitoring.alerts.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + groups: + - name: loki_alerts + rules: +{{- if not (.Values.monitoring.alerts.disabled.LokiRequestErrors | default false) }} + - alert: LokiRequestErrors + annotations: +{{- if .Values.monitoring.alerts.additionalRuleAnnotations }} +{{ toYaml .Values.monitoring.alerts.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: '{{`{{`}} $labels.{{ $.Values.monitoring.appInstanceLabelName }} {{`}}`}} {{`{{`}} $labels.job {{`}}`}} {{`{{`}} $labels.route {{`}}`}} is experiencing {{`{{`}} printf "%.2f" $value {{`}}`}}% errors. + + ' + summary: Loki request error rate is high. + expr: |- + 100 * sum(rate(loki_request_duration_seconds_count{status_code=~"5.."}[2m])) by ({{ range $.Values.monitoring.alerts.additionalAggregationLabels }}{{ . }},{{ end }}{{ if and $.Values.monitoring.multiCluster.enabled $.Values.monitoring.multiCluster.clusterName }}cluster, {{ end }}{{ $.Values.monitoring.appInstanceLabelName }}, namespace, job, route) + / + sum(rate(loki_request_duration_seconds_count[2m])) by ({{ range $.Values.monitoring.alerts.additionalAggregationLabels }}{{ . }},{{ end }}{{ if and $.Values.monitoring.multiCluster.enabled $.Values.monitoring.multiCluster.clusterName }}cluster, {{ end }}{{ $.Values.monitoring.appInstanceLabelName }}, namespace, job, route) + > 10 + for: {{ dig "LokiRequestErrors" "for" "15m" .Values.monitoring.alerts.overrides }} + {{- with .Values.monitoring.alerts.keepFiringFor }} + keep_firing_for: "{{ . }}" + {{- end }} + labels: + severity: {{ dig "LokiRequestErrors" "severity" "critical" .Values.monitoring.alerts.overrides }} + {{- if and .Values.monitoring.multiCluster.enabled .Values.monitoring.multiCluster.clusterName }} + cluster: "{{ tpl .Values.monitoring.multiCluster.clusterName $ }}" + {{- end }} + {{ $.Values.monitoring.appInstanceLabelName }}: "{{ tpl $.Values.monitoring.appInstanceLabelValue $ }}" + {{- with .Values.monitoring.alerts.additionalRuleLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} +{{- end }} +{{- if not (.Values.monitoring.alerts.disabled.LokiRequestPanics | default false) }} + - alert: LokiRequestPanics + annotations: +{{- if .Values.monitoring.alerts.additionalRuleAnnotations }} +{{ toYaml .Values.monitoring.alerts.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: '{{`{{`}} $labels.{{ $.Values.monitoring.appInstanceLabelName }} {{`}}`}} {{`{{`}} $labels.job {{`}}`}} is experiencing {{`{{`}} printf "%.2f" $value {{`}}`}}% increase of panics. + + ' + summary: Loki requests are causing code panics. + expr: sum(increase(loki_panic_total[10m])) by ({{ range $.Values.monitoring.alerts.additionalAggregationLabels }}{{ . }},{{ end }}{{ if and $.Values.monitoring.multiCluster.enabled $.Values.monitoring.multiCluster.clusterName }}cluster, {{ end }}{{ $.Values.monitoring.appInstanceLabelName }}, namespace, job) > 0 + labels: + severity: {{ dig "LokiRequestPanics" "severity" "critical" .Values.monitoring.alerts.overrides }} + {{- if and .Values.monitoring.multiCluster.enabled .Values.monitoring.multiCluster.clusterName }} + cluster: "{{ tpl .Values.monitoring.multiCluster.clusterName $ }}" + {{- end }} + {{ $.Values.monitoring.appInstanceLabelName }}: "{{ tpl $.Values.monitoring.appInstanceLabelValue $ }}" + {{- with .Values.monitoring.alerts.additionalRuleLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} +{{- end }} +{{- if not (.Values.monitoring.alerts.disabled.LokiRequestLatency | default false) }} + - alert: LokiRequestLatency + annotations: +{{- if .Values.monitoring.alerts.additionalRuleAnnotations }} +{{ toYaml .Values.monitoring.alerts.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: '{{`{{`}} $labels.{{ $.Values.monitoring.appInstanceLabelName }} {{`}}`}} {{`{{`}} $labels.job {{`}}`}} {{`{{`}} $labels.route {{`}}`}} is experiencing {{`{{`}} printf "%.2f" $value {{`}}`}}s 99th percentile latency. + + ' + summary: Loki request error latency is high. + expr: cluster_namespace_job_route:loki_request_duration_seconds:99quantile{route!~"(?i).*tail.*|/schedulerpb.SchedulerForQuerier/QuerierLoop"} > 1 + for: {{ dig "LokiRequestLatency" "for" "15m" .Values.monitoring.alerts.overrides }} + {{- with .Values.monitoring.alerts.keepFiringFor }} + keep_firing_for: "{{ . }}" + {{- end }} + labels: + severity: {{ dig "LokiRequestLatency" "severity" "critical" .Values.monitoring.alerts.overrides }} + {{- if and .Values.monitoring.multiCluster.enabled .Values.monitoring.multiCluster.clusterName }} + cluster: "{{ tpl .Values.monitoring.multiCluster.clusterName $ }}" + {{- end }} + {{ $.Values.monitoring.appInstanceLabelName }}: "{{ tpl $.Values.monitoring.appInstanceLabelValue $ }}" + {{- with .Values.monitoring.alerts.additionalRuleLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} +{{- end }} +{{- if not (.Values.monitoring.alerts.disabled.LokiTooManyCompactorsRunning | default false) }} + - alert: LokiTooManyCompactorsRunning + annotations: +{{- if .Values.monitoring.alerts.additionalRuleAnnotations }} +{{ toYaml .Values.monitoring.alerts.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: '{{`{{`}} $labels.{{ $.Values.monitoring.appInstanceLabelName }} {{`}}`}} {{`{{`}} $labels.namespace {{`}}`}} has had {{`{{`}} printf "%.0f" $value {{`}}`}} compactors running for more than 5m. Only one compactor should run at a time. + + ' + summary: Loki deployment is running more than one compactor. + expr: sum(loki_boltdb_shipper_compactor_running) by ({{ range $.Values.monitoring.alerts.additionalAggregationLabels }}{{ . }},{{ end }}{{ if and $.Values.monitoring.multiCluster.enabled $.Values.monitoring.multiCluster.clusterName }}cluster, {{ end }}{{ $.Values.monitoring.appInstanceLabelName }}, namespace) > 1 + for: {{ dig "LokiTooManyCompactorsRunning" "for" "5m" .Values.monitoring.alerts.overrides }} + {{- with .Values.monitoring.alerts.keepFiringFor }} + keep_firing_for: "{{ . }}" + {{- end }} + labels: + severity: {{ dig "LokiTooManyCompactorsRunning" "severity" "warning" .Values.monitoring.alerts.overrides }} + {{- if and .Values.monitoring.multiCluster.enabled .Values.monitoring.multiCluster.clusterName }} + cluster: "{{ tpl .Values.monitoring.multiCluster.clusterName $ }}" + {{- end }} + {{ $.Values.monitoring.appInstanceLabelName }}: "{{ tpl $.Values.monitoring.appInstanceLabelValue $ }}" + {{- with .Values.monitoring.alerts.additionalRuleLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} +{{- end }} +{{- if not (.Values.monitoring.alerts.disabled.LokiCompactorHasNotSuccessfullyRunCompaction | default false) }} + - alert: LokiCompactorHasNotSuccessfullyRunCompaction + annotations: +{{- if .Values.monitoring.alerts.additionalRuleAnnotations }} +{{ toYaml .Values.monitoring.alerts.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: '{{`{{`}} $labels.{{ $.Values.monitoring.appInstanceLabelName }} {{`}}`}} {{`{{`}} $labels.namespace {{`}}`}} has not run compaction in the last 3 hours since the last compaction. This may indicate a problem with the compactor. + + ' + summary: Loki compaction has not run in the last 3 hours since the last compaction. + expr: |- + # The "last successful run" metric is updated even if the compactor owns no tenants, + # so this alert correctly doesn't fire if compactor has nothing to do. + min ( + time() - (loki_boltdb_shipper_compact_tables_operation_last_successful_run_timestamp_seconds{} > 0) + ) + by ({{ range $.Values.monitoring.alerts.additionalAggregationLabels }}{{ . }},{{ end }}{{ if and $.Values.monitoring.multiCluster.enabled $.Values.monitoring.multiCluster.clusterName }}cluster, {{ end }}{{ $.Values.monitoring.appInstanceLabelName }}, namespace) + > 60 * 60 * 3 + for: {{ dig "LokiCompactorHasNotSuccessfullyRunCompaction" "for" "1h" .Values.monitoring.alerts.overrides }} + {{- with .Values.monitoring.alerts.keepFiringFor }} + keep_firing_for: "{{ . }}" + {{- end }} + labels: + severity: {{ dig "LokiCompactorHasNotSuccessfullyRunCompaction" "severity" "critical" .Values.monitoring.alerts.overrides }} + {{- if and .Values.monitoring.multiCluster.enabled .Values.monitoring.multiCluster.clusterName }} + cluster: "{{ tpl .Values.monitoring.multiCluster.clusterName $ }}" + {{- end }} + {{ $.Values.monitoring.appInstanceLabelName }}: "{{ tpl $.Values.monitoring.appInstanceLabelValue $ }}" + {{- with .Values.monitoring.alerts.additionalRuleLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} +{{- end }} +{{- if not (.Values.monitoring.alerts.disabled.LokiCompactorHasNotSuccessfullyRunCompaction | default false) }} + - alert: LokiCompactorHasNotSuccessfullyRunCompaction + annotations: +{{- if .Values.monitoring.alerts.additionalRuleAnnotations }} +{{ toYaml .Values.monitoring.alerts.additionalRuleAnnotations | indent 8 }} +{{- end }} + description: '{{`{{`}} $labels.{{ $.Values.monitoring.appInstanceLabelName }} {{`}}`}} {{`{{`}} $labels.namespace {{`}}`}} has not run compaction in the last 3h since startup. This may indicate a problem with the compactor. + + ' + summary: Loki compaction has not run in the last 3h since startup. + expr: |- + # The "last successful run" metric is updated even if the compactor owns no tenants, + # so this alert correctly doesn't fire if compactor has nothing to do. + max( + max_over_time( + loki_boltdb_shipper_compact_tables_operation_last_successful_run_timestamp_seconds{}[3h] + ) + ) by ({{ range $.Values.monitoring.alerts.additionalAggregationLabels }}{{ . }},{{ end }}{{ if and $.Values.monitoring.multiCluster.enabled $.Values.monitoring.multiCluster.clusterName }}cluster, {{ end }}{{ $.Values.monitoring.appInstanceLabelName }}, namespace) + == 0 + for: {{ dig "LokiCompactorHasNotSuccessfullyRunCompaction" "for" "1h" .Values.monitoring.alerts.overrides }} + {{- with .Values.monitoring.alerts.keepFiringFor }} + keep_firing_for: "{{ . }}" + {{- end }} + labels: + severity: {{ dig "LokiCompactorHasNotSuccessfullyRunCompaction" "severity" "critical" .Values.monitoring.alerts.overrides }} + {{- if and .Values.monitoring.multiCluster.enabled .Values.monitoring.multiCluster.clusterName }} + cluster: "{{ tpl .Values.monitoring.multiCluster.clusterName $ }}" + {{- end }} + {{ $.Values.monitoring.appInstanceLabelName }}: "{{ tpl $.Values.monitoring.appInstanceLabelValue $ }}" + {{- with .Values.monitoring.alerts.additionalRuleLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} +{{- end }} +{{- end }} \ No newline at end of file diff --git a/packs/loki-3.7.4/charts/loki/templates/monitoring/dashboards/_helpers-dashboards.tpl b/packs/loki-3.7.4/charts/loki/templates/monitoring/dashboards/_helpers-dashboards.tpl new file mode 100644 index 00000000..09353708 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/monitoring/dashboards/_helpers-dashboards.tpl @@ -0,0 +1,25 @@ +{{/* Expand the name of the dashboards resources */}} +{{- define "loki.dashboardsName" -}} +{{- include "loki.name" . }}-dashboards +{{- end }} + +{{/* To help configure Grafana operator folder settings (folder, folderUID, or folderRef) */}} +{{- define "loki.grafana.operator.folder" }} +{{- $folder := .Values.monitoring.dashboards.grafanaOperator.folder }} +{{- $folderUID := .Values.monitoring.dashboards.grafanaOperator.folderUID }} +{{- $folderRef := .Values.monitoring.dashboards.grafanaOperator.folderRef }} +{{- if not (or + (and $folder (not $folderUID) (not $folderRef)) + (and (not $folder) $folderUID (not $folderRef)) + (and (not $folder) (not $folderUID) $folderRef) +)}} +{{- fail "monitoring.dashboards.grafanaOperator: only one of folder, folderUID, or folderRef must be set" }} +{{- end }} +{{- if $folder }} +folder: {{ $folder | quote }} +{{- else if $folderUID }} +folderUID: {{ $folderUID | quote }} +{{- else if $folderRef }} +folderRef: {{ $folderRef | quote }} +{{- end }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/monitoring/dashboards/loki-bloom-build.yaml b/packs/loki-3.7.4/charts/loki/templates/monitoring/dashboards/loki-bloom-build.yaml new file mode 100644 index 00000000..d0188f18 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/monitoring/dashboards/loki-bloom-build.yaml @@ -0,0 +1,50 @@ +{{- /* +Generated from 'loki-bloom-build' from https://github.com/grafana/loki.git +Do not change in-place! In order to change this file first read following link: +https://github.com/grafana-community/helm-charts/tree/main/charts/loki/hack +*/ -}} +{{- if and .Values.monitoring.dashboards.enabled (dig "loki-bloom-build" "enabled" true .Values.monitoring.dashboards) }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "loki.resourceName" (dict "ctx" $ "component" "dashboards" "suffix" "loki-bloom-build") }} + namespace: {{ .Values.monitoring.namespace | default (include "loki.namespace" $) }} + labels: + {{- include "loki.labels" $ | nindent 4 }} + {{- with .Values.monitoring.dashboards.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.monitoring.dashboards.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +data: + loki-bloom-build.json: |- + {{`{"annotations":{"list":[]},"editable":`}}{{ .Values.monitoring.dashboards.defaultDashboardsEditable }}{{`,"fiscalYearStartMonth":0,"gnetId":null,"graphTooltip":0,"hideControls":false,"links":[{"asDropdown":true,"icon":"external link","includeVars":true,"keepTime":true,"tags":["loki"],"targetBlank":false,"title":"Loki Dashboards","type":"dashboards"}],"panels":[{"collapsed":false,"gridPos":{"h":1,"w":24,"x":0,"y":0},"id":111,"panels":[],"targets":[],"title":"Overview","type":"row"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"description":"Cell-wide compaction progress. Should increase till completion throughout each compaction period.","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":15,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineStyle":{"fill":"solid"},"lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":80}]},"unit":"percentunit"},"overrides":[{"matcher":{"id":"byRegexp","options":"/(Planned|success|failure)/"},"properties":[{"id":"unit","value":"none"},{"id":"custom.fillOpacity","value":0}]}]},"gridPos":{"h":7,"w":12,"x":0,"y":1},"id":42,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77663","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"sum(loki_bloomplanner_tenant_tasks_completed{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"$namespace/bloom-planner\"})\n/\nsum(loki_bloomplanner_tenant_tasks_planned{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"$namespace/bloom-planner\"})","hide":false,"instant":false,"legendFormat":"Progress","range":true,"refId":"D"}],"title":"Overall progress","type":"timeseries"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"description":"Cell-wide compaction progress. Should increase till completion throughout each compaction period.","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":0,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineStyle":{"fill":"solid"},"lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":80}]},"unit":"percentunit"},"overrides":[{"matcher":{"id":"byRegexp","options":"/(Planned|success|failure)/"},"properties":[{"id":"unit","value":"none"},{"id":"custom.fillOpacity","value":0}]}]},"gridPos":{"h":7,"w":12,"x":12,"y":1},"id":116,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77663","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"sum by (tenant) (loki_bloomplanner_tenant_tasks_completed{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"$namespace/bloom-planner\"})\n/\nsum by (tenant) (loki_bloomplanner_tenant_tasks_planned{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"$namespace/bloom-planner\"})","hide":false,"instant":false,"legendFormat":"{{tenant}}","range":true,"refId":"D"}],"title":"Progress by tenant","type":"timeseries"},{"datasource":{"type":"loki","uid":"${loki_datasource}"},"description":"Blooms size vs uncompressed chunk size.","fieldConfig":{"defaults":{},"overrides":[]},"gridPos":{"h":7,"w":17,"x":0,"y":8},"id":51,"options":{"dedupStrategy":"none","enableLogDetails":true,"prettifyLogMessage":false,"showCommonLabels":false,"showLabels":false,"showTime":false,"sortOrder":"Descending","wrapLogMessage":false},"panels":[],"pluginVersion":"11.4.0-77663","targets":[{"datasource":{"type":"loki","uid":"${loki_datasource}"},"editorMode":"code","expr":"{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-planner\"} |= \"level=error\" |= \"component=bloom-planner\"","queryType":"range","refId":"B"}],"title":"Errors Planner","type":"logs"},{"datasource":{"type":"loki","uid":"${loki_datasource}"},"fieldConfig":{"defaults":{"color":{"fixedColor":"red","mode":"fixed"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"bars","fillOpacity":0,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineWidth":1,"pointSize":3,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":1}]}},"overrides":[]},"gridPos":{"h":7,"w":7,"x":17,"y":8},"id":53,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77663","targets":[{"datasource":{"type":"loki","uid":"${loki_datasource}"},"editorMode":"code","expr":"sum(count_over_time({`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-planner\"} |= \"level=error\" |= \"component=bloom-planner\" [$__auto]))","legendFormat":"Error rate","queryType":"range","refId":"A"}],"title":"Errors Rate Planner","type":"timeseries"},{"datasource":{"type":"loki","uid":"${loki_datasource}"},"description":"Blooms size vs uncompressed chunk size.","fieldConfig":{"defaults":{},"overrides":[]},"gridPos":{"h":7,"w":17,"x":0,"y":15},"id":133,"options":{"dedupStrategy":"none","enableLogDetails":true,"prettifyLogMessage":false,"showCommonLabels":false,"showLabels":false,"showTime":false,"sortOrder":"Descending","wrapLogMessage":false},"panels":[],"pluginVersion":"11.4.0-77663","targets":[{"datasource":{"type":"loki","uid":"${loki_datasource}"},"editorMode":"code","expr":"{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-builder\"} |= \"level=error\" |= \"component=bloom-builder\"","queryType":"range","refId":"B"}],"title":"Errors Builder","type":"logs"},{"datasource":{"type":"loki","uid":"${loki_datasource}"},"fieldConfig":{"defaults":{"color":{"fixedColor":"red","mode":"fixed"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"bars","fillOpacity":0,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineWidth":1,"pointSize":3,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":1}]}},"overrides":[]},"gridPos":{"h":7,"w":7,"x":17,"y":15},"id":134,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77663","targets":[{"datasource":{"type":"loki","uid":"${loki_datasource}"},"editorMode":"code","expr":"sum(count_over_time({`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-builder\"} |= \"level=error\" |= \"component=bloom-builder\" [$__auto]))","legendFormat":"Error rate","queryType":"range","refId":"A"}],"title":"Errors Rate Builder","type":"timeseries"},{"collapsed":true,"gridPos":{"h":1,"w":24,"x":0,"y":22},"id":112,"panels":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"description":"","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","axisSoftMin":0,"barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":0,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineStyle":{"fill":"solid"},"lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":80}]},"unit":"none"},"overrides":[{"matcher":{"id":"byRegexp","options":"/(success|failure)/"},"properties":[{"id":"custom.fillOpacity","value":100},{"id":"custom.stacking","value":{"group":"A","mode":"normal"}}]},{"matcher":{"id":"byName","options":"Planned"},"properties":[{"id":"color","value":{"fixedColor":"yellow","mode":"fixed"}},{"id":"custom.fillOpacity","value":15}]},{"matcher":{"id":"byName","options":"Completed - success"},"properties":[{"id":"color","value":{"fixedColor":"green","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"Completed - failure"},"properties":[{"id":"color","value":{"fixedColor":"red","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"Queued"},"properties":[{"id":"custom.fillOpacity","value":0},{"id":"color","value":{"fixedColor":"blue","mode":"fixed"}}]}]},"gridPos":{"h":8,"w":12,"x":0,"y":64},"id":125,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77663","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"sum(loki_bloomplanner_tenant_tasks_planned{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-planner\"}) > 0","hide":false,"instant":false,"legendFormat":"Planned","range":true,"refId":"B"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"sum by (status) (loki_bloomplanner_tenant_tasks_completed{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-planner\"}) > 0","hide":false,"instant":false,"legendFormat":"Completed - {{status}}","range":true,"refId":"A"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"loki_bloomplanner_inflight_tasks{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-planner\", quantile=\"0.95\"}","hide":false,"instant":false,"legendFormat":"inflight p95","range":true,"refId":"C"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"sum(loki_bloomplanner_queue_length{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-planner\"}) > 0","hide":false,"instant":false,"legendFormat":"Queued","range":true,"refId":"D"}],"title":"Tasks","type":"timeseries"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"description":"","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":0,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineStyle":{"fill":"solid"},"lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":80}]},"unit":"none"},"overrides":[{"matcher":{"id":"byRegexp","options":"/(success|failure)/"},"properties":[{"id":"custom.fillOpacity","value":100},{"id":"custom.stacking","value":{"group":"A","mode":"normal"}}]},{"matcher":{"id":"byName","options":"Planned"},"properties":[{"id":"color","value":{"fixedColor":"yellow","mode":"fixed"}},{"id":"custom.fillOpacity","value":15}]},{"matcher":{"id":"byName","options":"Completed - success"},"properties":[{"id":"color","value":{"fixedColor":"green","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"Completed - failure"},"properties":[{"id":"color","value":{"fixedColor":"red","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"Connected builders"},"properties":[{"id":"custom.axisPlacement","value":"right"}]},{"matcher":{"id":"byName","options":"IDLE Builders"},"properties":[{"id":"custom.axisPlacement","value":"right"}]},{"matcher":{"id":"byName","options":"Builders processing task"},"properties":[{"id":"custom.axisPlacement","value":"right"}]}]},"gridPos":{"h":8,"w":12,"x":12,"y":64},"id":126,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77663","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"sum(loki_bloomplanner_connected_builders{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-planner\"})","hide":false,"instant":false,"legendFormat":"Connected builders","range":true,"refId":"A"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"count(loki_bloombuilder_processing_task{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-builder\"} > 0)","hide":false,"instant":false,"legendFormat":"Builders processing task","range":true,"refId":"C"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"count(loki_bloombuilder_processing_task{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-builder\"} == 0)","hide":false,"instant":false,"legendFormat":"IDLE Builders","range":true,"refId":"D"}],"title":"Tasks per builder","type":"timeseries"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"description":"","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":0,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null}]},"unit":"short"},"overrides":[]},"gridPos":{"h":7,"w":12,"x":0,"y":72},"id":81,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77663","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"# series checked per compaction\nhistogram_quantile(\n 0.99, \n sum by (le) (\n rate(loki_bloombuilder_series_per_task_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-builder\"}[$__rate_interval])\n )\n)","hide":false,"instant":false,"legendFormat":"p99","range":true,"refId":"C"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"# series checked per compaction\nhistogram_quantile(\n 0.9, \n sum by (le) (\n rate(loki_bloombuilder_series_per_task_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-builder\"}[$__rate_interval])\n )\n)","hide":false,"instant":false,"legendFormat":"p90","range":true,"refId":"B"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"# series checked per compaction\nhistogram_quantile(\n 0.75, \n sum by (le) (\n rate(loki_bloombuilder_series_per_task_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-builder\"}[$__rate_interval])\n )\n)","hide":false,"instant":false,"legendFormat":"p75","range":true,"refId":"D"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"# series checked per compaction\nhistogram_quantile(\n 0.5, \n sum by (le) (\n rate(loki_bloombuilder_series_per_task_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-builder\"}[$__rate_interval])\n )\n)","hide":false,"instant":false,"legendFormat":"p50","range":true,"refId":"A"}],"title":"Series per task (includes series copied from other blocks)","type":"timeseries"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":0,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null}]},"unit":"bytes"},"overrides":[]},"gridPos":{"h":7,"w":12,"x":12,"y":72},"id":91,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77663","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"# series checked per compaction\nhistogram_quantile(\n 0.99, \n sum by (le) (\n rate(loki_bloombuilder_bytes_per_task_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-builder\"}[$__rate_interval])\n )\n)","hide":false,"instant":false,"legendFormat":"p99","range":true,"refId":"C"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"# series checked per compaction\nhistogram_quantile(\n 0.9, \n sum by (le) (\n rate(loki_bloombuilder_bytes_per_task_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-builder\"}[$__rate_interval])\n )\n)","hide":false,"instant":false,"legendFormat":"p90","range":true,"refId":"B"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"# series checked per compaction\nhistogram_quantile(\n 0.5, \n sum by (le) (\n rate(loki_bloombuilder_bytes_per_task_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-builder\"}[$__rate_interval])\n )\n)","hide":false,"instant":false,"legendFormat":"p50","range":true,"refId":"A"}],"title":"Number of bytes from chunks added to blocks during each compaction.","type":"timeseries"},{"fieldConfig":{"defaults":{},"overrides":[]},"gridPos":{"h":2,"w":24,"x":0,"y":79},"id":117,"options":{"code":{"language":"plaintext","showLineNumbers":false,"showMiniMap":false},"content":"Identify the tenant using the **_Progress by tenant_** panel from the overview and set tenant variable","mode":"markdown"},"panels":[],"pluginVersion":"11.4.0-77663","targets":[],"title":"Tip","transparent":true,"type":"text"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"description":"","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","axisSoftMin":0,"barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":0,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineStyle":{"fill":"solid"},"lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":80}]},"unit":"none"},"overrides":[{"matcher":{"id":"byRegexp","options":"/(success|failure)/"},"properties":[{"id":"custom.fillOpacity","value":100},{"id":"custom.stacking","value":{"group":"A","mode":"normal"}}]},{"matcher":{"id":"byName","options":"Planned"},"properties":[{"id":"color","value":{"fixedColor":"yellow","mode":"fixed"}},{"id":"custom.fillOpacity","value":15}]},{"matcher":{"id":"byName","options":"Completed - success"},"properties":[{"id":"color","value":{"fixedColor":"green","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"Completed - failure"},"properties":[{"id":"color","value":{"fixedColor":"red","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"Queued"},"properties":[{"id":"color","value":{"fixedColor":"blue","mode":"fixed"}},{"id":"custom.fillOpacity","value":0}]}]},"gridPos":{"h":8,"w":12,"x":0,"y":81},"id":114,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77663","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"sum(loki_bloomplanner_tenant_tasks_planned{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-planner\", tenant=\"$tenant\"}) > 0","hide":false,"instant":false,"legendFormat":"Planned","range":true,"refId":"B"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"sum by (status) (loki_bloomplanner_tenant_tasks_completed{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-planner\", tenant=\"$tenant\"}) > 0","hide":false,"instant":false,"legendFormat":"Completed - {{status}}","range":true,"refId":"A"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"sum(loki_bloomplanner_queue_length{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-planner\", user=\"$tenant\"}) > 0","hide":false,"instant":false,"legendFormat":"Queued","range":true,"refId":"C"}],"title":"Tasks per tenant","type":"timeseries"},{"datasource":{"type":"loki","uid":"${loki_datasource}"},"fieldConfig":{"defaults":{},"overrides":[]},"gridPos":{"h":8,"w":12,"x":12,"y":81},"id":115,"options":{"dedupStrategy":"none","enableLogDetails":true,"prettifyLogMessage":false,"showCommonLabels":false,"showLabels":false,"showTime":false,"sortOrder":"Descending","wrapLogMessage":false},"panels":[],"pluginVersion":"11.4.0-77663","targets":[{"datasource":{"type":"loki","uid":"${loki_datasource}"},"editorMode":"code","expr":"{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"$namespace/bloom-planner\"}\n|= \"level=error\"\n|= \"tenant=$tenant\"","queryType":"range","refId":"B"}],"title":"Tenant errors","type":"logs"}],"targets":[],"title":"Tasks","type":"row"},{"collapsed":true,"gridPos":{"h":1,"w":24,"x":0,"y":23},"id":95,"panels":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"description":"How many tokens each builder is appending to blooms. Accounts for tokens that are not actually added to the blooms since they are already there. See the panel on the right for a drill down on the collision.\n","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":0,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineWidth":1,"pointSize":5,"scaleDistribution":{"log":2,"type":"log"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":80}]},"unit":"short"},"overrides":[]},"gridPos":{"h":8,"w":12,"x":0,"y":90},"id":96,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77663","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"sum(rate(loki_bloom_tokens_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-builder\"}[$__rate_interval]))\n/\nsum(count(loki_bloom_tokens_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-builder\"}))","hide":false,"instant":false,"legendFormat":"Per core","range":true,"refId":"B"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"sum(rate(loki_bloom_inserts_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-builder\"}[$__rate_interval]))","hide":false,"instant":false,"legendFormat":"Total","range":true,"refId":"C"}],"title":"Tokens rate","type":"timeseries"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"description":"Collision type may be `}}`{{`false`}}`{{` (no collision), `}}`{{`cache`}}`{{` (found in token cache) or true (found in bloom filter).\n\nType may be either `}}`{{`raw`}}`{{` (the original ngram) or `}}`{{`chunk_prefixed`}}`{{` (the ngram with the chunk prefix)","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":0,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":80}]},"unit":"percentunit"},"overrides":[]},"gridPos":{"h":8,"w":12,"x":12,"y":90},"id":97,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77663","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"# tokens/s by type+collision\nsum by (collision) (\n rate(loki_bloom_inserts_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-builder\"}[$__rate_interval])\n) \n/ on () group_left\nsum (\n rate(loki_bloom_inserts_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-builder\"}[$__rate_interval])\n)","hide":false,"instant":false,"legendFormat":"__auto","range":true,"refId":"B"}],"title":"tokens/s by collision type","type":"timeseries"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"description":"The sizes of the blooms created by the compactor. We build one bloom per series. The more unique ngrams and chunks the series has, the bigger their blooms will be.","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":0,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineWidth":1,"pointSize":5,"scaleDistribution":{"log":2,"type":"log"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":80}]},"unit":"bytes"},"overrides":[]},"gridPos":{"h":8,"w":12,"x":0,"y":98},"id":98,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77663","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"histogram_quantile(\n 1.0,\n sum by (le) (\n rate(loki_bloom_size_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-builder\"}[$__rate_interval])\n )\n)","hide":false,"instant":false,"legendFormat":"max","range":true,"refId":"D"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"histogram_quantile(\n 0.99, \n sum by (le) (\n rate(loki_bloom_size_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-builder\"}[$__rate_interval])\n )\n)","hide":false,"instant":false,"legendFormat":"p99","range":true,"refId":"E"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"histogram_quantile(\n 0.50, \n sum by (le) (\n rate(loki_bloom_size_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-builder\"}[$__rate_interval])\n )\n)","hide":false,"instant":false,"legendFormat":"p50","range":true,"refId":"F"}],"title":"Bloom size","type":"timeseries"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"description":"How many chunks are we indexing in the blooms. Either:\n- `}}`{{`copied`}}`{{` from a pre-existing bloom block, or \n- `}}`{{`iterated`}}`{{` through all its entries if processed for the first time.","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":0,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":80}]},"unit":"short"},"overrides":[]},"gridPos":{"h":8,"w":12,"x":12,"y":98},"id":99,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77663","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"# chunks indexed, by iteration or copied from a pre-existing bloom\nsum(rate(loki_bloom_chunks_indexed_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-builder\"}[$__rate_interval])) by (type)","hide":false,"instant":false,"legendFormat":"__auto","range":true,"refId":"B"}],"title":"Chunks indexed","type":"timeseries"}],"targets":[],"title":"Bloom building","type":"row"},{"collapsed":true,"gridPos":{"h":1,"w":24,"x":0,"y":24},"id":56,"panels":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"description":"Shows the expected number of cpu cores we need to provision to build blooms as fast as we ingest data so a build iteration doesn't take longer than the build interval.\n\nWe may decide to have more to speed up building blooms.","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":0,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null}]}},"overrides":[]},"gridPos":{"h":7,"w":12,"x":0,"y":2030},"id":94,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77663","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"# This query shows the expected number of cpu cores we need to not fall behind\n# building blooms for data we're ingesting.\n# conceptually, the formula is:\n# (cell_bytes * space_amplification / bloom_bytes_processed_per_core)\n\n# number of replicas needed\nsum(avg_over_time(loki_cell:bytes:rate1m{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\"}[$__rate_interval]))\n*\n## Space amplification (how much data do we write compared to what we ingest?)\n(\n # rep factor\n 3 *\n sum(\n # 1 - dedupe_ratio\n 1 - \n sum(rate(loki_chunk_store_deduped_chunks_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\"}[$__rate_interval])) by (`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster, `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`, namespace)\n /\n sum(rate(loki_ingester_chunks_flushed_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\"}[$__rate_interval])) by (`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster, `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`, namespace)\n )\n)\n/\n(\nsum(rate(loki_bloombuilder_chunk_series_size_sum{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", container=\"bloom-builder\"}[$__rate_interval]))\n/\nsum(rate(container_cpu_usage_seconds_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", container=\"bloom-builder\"}[$__rate_interval]))\n)","hide":false,"instant":false,"legendFormat":"Needed","range":true,"refId":"B"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"sum(rate(container_cpu_usage_seconds_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", container=\"bloom-builder\"}[$__rate_interval]))","hide":false,"instant":false,"legendFormat":"Available","range":true,"refId":"A"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"min(kube_pod_container_resource_requests{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"bloom-builder\", resource=\"cpu\"} > 0)\n*\ncount(kube_pod_container_resource_requests{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"bloom-builder\", resource=\"cpu\"} > 0)","hide":false,"instant":false,"legendFormat":"Provisioned","range":true,"refId":"C"}],"title":"Required CPUs to not lag behind","type":"timeseries"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"description":"","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":15,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineStyle":{"fill":"solid"},"lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":80}]},"unit":"Bps"},"overrides":[]},"gridPos":{"h":7,"w":12,"x":12,"y":2030},"id":72,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77663","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"# MB/s/core chunk data processed\nsum(rate(loki_bloombuilder_chunk_series_size_sum{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"$namespace/bloom-builder\"}[$__rate_interval]))\n/\nsum(rate(container_cpu_usage_seconds_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=\"bloom-builder\"}[$__rate_interval]))","hide":false,"instant":false,"legendFormat":"Total","range":true,"refId":"B"}],"title":"MB/s per core","type":"timeseries"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":0,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null}]}},"overrides":[]},"gridPos":{"h":7,"w":12,"x":0,"y":2037},"id":1,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77663","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"min(kube_pod_container_resource_requests{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"bloom-builder\", resource=\"cpu\"} > 0)","hide":false,"instant":false,"legendFormat":"Request","range":true,"refId":"B"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"min(kube_pod_container_resource_limits{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"bloom-builder\", resource=\"cpu\"} > 0)","hide":false,"instant":false,"legendFormat":"Limit","range":true,"refId":"C"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"quantile(\n 0.99,\n rate(container_cpu_usage_seconds_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"bloom-builder\"}[$__rate_interval])\n)","instant":false,"legendFormat":"p99","range":true,"refId":"A"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"quantile(\n 0.50,\n rate(container_cpu_usage_seconds_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"bloom-builder\"}[$__rate_interval])\n)","hide":false,"instant":false,"legendFormat":"p50","range":true,"refId":"D"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"avg(\n rate(container_cpu_usage_seconds_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"bloom-builder\"}[$__rate_interval])\n)","hide":false,"instant":false,"legendFormat":"Avg","range":true,"refId":"E"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"max(\n rate(container_cpu_usage_seconds_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"bloom-builder\"}[$__rate_interval])\n)","hide":false,"instant":false,"legendFormat":"Max","range":true,"refId":"F"}],"title":"CPU","type":"timeseries"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":0,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":80}]}},"overrides":[]},"gridPos":{"h":7,"w":12,"x":12,"y":2037},"id":75,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77663","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"sum by(pod) (rate(container_cpu_usage_seconds_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"bloom-builder\"}[$__rate_interval]))","instant":false,"legendFormat":"{{pod}}","range":true,"refId":"A"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"min(kube_pod_container_resource_requests{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"bloom-builder\", resource=\"cpu\"} > 0)","hide":false,"instant":false,"legendFormat":"Request","range":true,"refId":"B"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"min(kube_pod_container_resource_limits{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"bloom-builder\", resource=\"cpu\"} > 0)","hide":false,"instant":false,"legendFormat":"Limit","range":true,"refId":"C"}],"title":"CPU per pod","type":"timeseries"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":0,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":80}]},"unit":"bytes"},"overrides":[]},"gridPos":{"h":7,"w":12,"x":0,"y":2044},"id":76,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77663","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"min(kube_pod_container_resource_requests{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"bloom-builder\", resource=\"memory\"} > 0)","hide":false,"instant":false,"legendFormat":"Request","range":true,"refId":"B"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"min(container_spec_memory_limit_bytes{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"bloom-builder\"} > 0)","hide":false,"instant":false,"legendFormat":"Limit","range":true,"refId":"C"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"quantile (\n 0.99,\n container_memory_working_set_bytes{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"bloom-builder\"}\n)","instant":false,"legendFormat":"p99","range":true,"refId":"A"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"quantile (\n 0.50,\n container_memory_working_set_bytes{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"bloom-builder\"}\n)","hide":false,"instant":false,"legendFormat":"p50","range":true,"refId":"D"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"avg (\n container_memory_working_set_bytes{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"bloom-builder\"}\n)","hide":false,"instant":false,"legendFormat":"Avg","range":true,"refId":"E"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"max (\n container_memory_working_set_bytes{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"bloom-builder\"}\n)","hide":false,"instant":false,"legendFormat":"Max","range":true,"refId":"F"}],"title":"Memory (workingset)","type":"timeseries"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":0,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":80}]},"unit":"bytes"},"overrides":[]},"gridPos":{"h":7,"w":12,"x":12,"y":2044},"id":5,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77663","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"max by(pod) (container_memory_working_set_bytes{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"bloom-builder\"})","instant":false,"legendFormat":"{{pod}}","range":true,"refId":"A"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"min(kube_pod_container_resource_requests{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"bloom-builder\", resource=\"memory\"} > 0)","hide":false,"instant":false,"legendFormat":"Request","range":true,"refId":"B"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"min(container_spec_memory_limit_bytes{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"bloom-builder\"} > 0)","hide":false,"instant":false,"legendFormat":"Limit","range":true,"refId":"C"}],"title":"Memory per pod (workingset)","type":"timeseries"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"description":"","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":15,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineStyle":{"fill":"solid"},"lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":80}]},"unit":"none"},"overrides":[]},"gridPos":{"h":7,"w":12,"x":0,"y":2051},"id":27,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77663","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"sum (\n increase(\n kube_pod_container_status_restarts_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", container=\"bloom-builder\"}[10m]\n )\n) > 0","instant":false,"legendFormat":"Restarts","range":true,"refId":"A"}],"title":"Container restarts","type":"timeseries"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"description":"","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":15,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineStyle":{"fill":"solid"},"lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":80}]},"unit":"none"},"overrides":[]},"gridPos":{"h":7,"w":12,"x":12,"y":2051},"id":77,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77663","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"(\n sum by (pod) (\n increase(\n kube_pod_container_status_restarts_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", container=\"bloom-builder\"}[10m]\n )\n )\n * on (pod) group_right\n max by (pod, reason) (\n kube_pod_container_status_last_terminated_reason{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", container=\"bloom-builder\"}\n )\n) > 0","instant":false,"legendFormat":"{{reason}} / {{pod}}","range":true,"refId":"A"}],"title":"Container restarts reason per pod","type":"timeseries"}],"targets":[],"title":"Builder Resource Usage","type":"row"},{"collapsed":true,"gridPos":{"h":1,"w":24,"x":0,"y":25},"id":118,"panels":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":0,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null}]}},"overrides":[]},"gridPos":{"h":7,"w":12,"x":0,"y":2302},"id":119,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77663","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"min(kube_pod_container_resource_requests{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"bloom-planner\", resource=\"cpu\"} > 0)","hide":false,"instant":false,"legendFormat":"Request","range":true,"refId":"B"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"min(kube_pod_container_resource_limits{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"bloom-planner\", resource=\"cpu\"} > 0)","hide":false,"instant":false,"legendFormat":"Limit","range":true,"refId":"C"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"quantile(\n 0.99,\n rate(container_cpu_usage_seconds_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"bloom-planner\"}[$__rate_interval])\n)","instant":false,"legendFormat":"p99","range":true,"refId":"A"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"quantile(\n 0.50,\n rate(container_cpu_usage_seconds_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"bloom-planner\"}[$__rate_interval])\n)","hide":false,"instant":false,"legendFormat":"p50","range":true,"refId":"D"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"avg(\n rate(container_cpu_usage_seconds_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"bloom-planner\"}[$__rate_interval])\n)","hide":false,"instant":false,"legendFormat":"Avg","range":true,"refId":"E"}],"title":"CPU","type":"timeseries"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":0,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":80}]}},"overrides":[]},"gridPos":{"h":7,"w":12,"x":12,"y":2302},"id":120,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77663","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"sum by(pod) (rate(container_cpu_usage_seconds_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"bloom-planner\"}[$__rate_interval]))","instant":false,"legendFormat":"{{pod}}","range":true,"refId":"A"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"min(kube_pod_container_resource_requests{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"bloom-planner\", resource=\"cpu\"} > 0)","hide":false,"instant":false,"legendFormat":"Request","range":true,"refId":"B"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"min(kube_pod_container_resource_limits{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"bloom-planner\", resource=\"cpu\"} > 0)","hide":false,"instant":false,"legendFormat":"Limit","range":true,"refId":"C"}],"title":"CPU per pod","type":"timeseries"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":0,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":80}]},"unit":"bytes"},"overrides":[]},"gridPos":{"h":7,"w":12,"x":0,"y":2309},"id":121,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77663","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"min(kube_pod_container_resource_requests{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"bloom-planner\", resource=\"memory\"} > 0)","hide":false,"instant":false,"legendFormat":"Request","range":true,"refId":"B"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"min(container_spec_memory_limit_bytes{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"bloom-planner\"} > 0)","hide":false,"instant":false,"legendFormat":"Limit","range":true,"refId":"C"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"quantile (\n 0.99,\n container_memory_working_set_bytes{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"bloom-planner\"}\n)","instant":false,"legendFormat":"p99","range":true,"refId":"A"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"quantile (\n 0.50,\n container_memory_working_set_bytes{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"bloom-builder\"}\n)","hide":false,"instant":false,"legendFormat":"p50","range":true,"refId":"D"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"avg (\n container_memory_working_set_bytes{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"bloom-builder\"}\n)","hide":false,"instant":false,"legendFormat":"Avg","range":true,"refId":"E"}],"title":"Memory (workingset)","type":"timeseries"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":0,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":80}]},"unit":"bytes"},"overrides":[]},"gridPos":{"h":7,"w":12,"x":12,"y":2309},"id":122,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77663","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"max by(pod) (container_memory_working_set_bytes{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"bloom-planner\"})","instant":false,"legendFormat":"{{pod}}","range":true,"refId":"A"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"min(kube_pod_container_resource_requests{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"bloom-planner\", resource=\"memory\"} > 0)","hide":false,"instant":false,"legendFormat":"Request","range":true,"refId":"B"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"min(container_spec_memory_limit_bytes{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"bloom-planner\"} > 0)","hide":false,"instant":false,"legendFormat":"Limit","range":true,"refId":"C"}],"title":"Memory per pod (workingset)","type":"timeseries"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"description":"","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":15,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineStyle":{"fill":"solid"},"lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":80}]},"unit":"none"},"overrides":[]},"gridPos":{"h":7,"w":12,"x":0,"y":2316},"id":123,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77663","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"sum (\n increase(\n kube_pod_container_status_restarts_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", container=\"bloom-planner\"}[10m]\n )\n) > 0","instant":false,"legendFormat":"Restarts","range":true,"refId":"A"}],"title":"Container restarts","type":"timeseries"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"description":"","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":15,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineStyle":{"fill":"solid"},"lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":80}]},"unit":"none"},"overrides":[]},"gridPos":{"h":7,"w":12,"x":12,"y":2316},"id":124,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77663","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"(\n sum by (pod) (\n increase(\n kube_pod_container_status_restarts_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", container=\"bloom-planner\"}[10m]\n )\n )\n * on (pod) group_right\n max by (pod, reason) (\n kube_pod_container_status_last_terminated_reason{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", container=\"bloom-planner\"}\n )\n) > 0","instant":false,"legendFormat":"{{reason}} / {{pod}}","range":true,"refId":"A"}],"title":"Container restarts reason per pod","type":"timeseries"}],"targets":[],"title":"Planner Resource Usage","type":"row"},{"collapsed":true,"gridPos":{"h":1,"w":24,"x":0,"y":26},"id":110,"panels":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":0,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null}]}},"overrides":[]},"gridPos":{"h":7,"w":9,"x":0,"y":2497},"id":108,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77663","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"sum(increase(loki_bloombuilder_metas_created_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-builder\"}[$__rate_interval]))","hide":false,"instant":false,"legendFormat":"Metas","range":true,"refId":"A"}],"title":"Created Metas","type":"timeseries"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"fieldConfig":{"defaults":{"color":{"mode":"thresholds"},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null}]}},"overrides":[]},"gridPos":{"h":7,"w":3,"x":9,"y":2497},"id":140,"options":{"colorMode":"value","graphMode":"area","justifyMode":"auto","orientation":"auto","percentChangeColorMode":"standard","reduceOptions":{"calcs":["lastNotNull"],"fields":"","values":false},"showPercentChange":false,"textMode":"auto","wideLayout":true},"panels":[],"pluginVersion":"11.4.0-77663","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","exemplar":false,"expr":"sum(increase(loki_bloombuilder_metas_created_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-builder\"}[$__range]))","format":"table","hide":false,"instant":true,"legendFormat":"Metas","range":false,"refId":"A"}],"title":"Created Metas","type":"stat"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"description":"Compactors delete metas and blocks marked for deletion in the metas tombstones.","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":0,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null}]}},"overrides":[]},"gridPos":{"h":7,"w":12,"x":12,"y":2497},"id":105,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77663","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"sum by (phase) (increase(loki_bloomplanner_metas_deleted_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-planner\"}[$__rate_interval]))","hide":false,"instant":false,"legendFormat":"Deleted during {{phase}}","range":true,"refId":"A"}],"title":"Deleted Metas","type":"timeseries"}],"targets":[],"title":"Metas building","type":"row"},{"collapsed":true,"gridPos":{"h":1,"w":24,"x":0,"y":27},"id":103,"panels":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":0,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null}]}},"overrides":[]},"gridPos":{"h":7,"w":9,"x":0,"y":2505},"id":107,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77663","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"sum(increase(loki_bloombuilder_blocks_created_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-builder\"}[$__rate_interval]))","hide":false,"instant":false,"legendFormat":"Blocks","range":true,"refId":"A"}],"title":"Created Blocks","type":"timeseries"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"fieldConfig":{"defaults":{"color":{"mode":"thresholds"},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null}]}},"overrides":[]},"gridPos":{"h":7,"w":3,"x":9,"y":2505},"id":139,"options":{"colorMode":"value","graphMode":"area","justifyMode":"auto","orientation":"auto","percentChangeColorMode":"standard","reduceOptions":{"calcs":["lastNotNull"],"fields":"","values":false},"showPercentChange":false,"textMode":"auto","wideLayout":true},"panels":[],"pluginVersion":"11.4.0-77663","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","exemplar":false,"expr":"sum(increase(loki_bloombuilder_blocks_created_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-builder\"}[$__range]))","format":"time_series","hide":false,"instant":true,"legendFormat":"Blocks","range":false,"refId":"A"}],"title":"Created Blocks","type":"stat"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"description":"Compactors delete metas and blocks marked for deletion in the metas tombstones.","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":0,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null}]}},"overrides":[]},"gridPos":{"h":7,"w":12,"x":12,"y":2505},"id":106,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77663","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"sum by (phase) (increase(loki_bloomplanner_blocks_deleted_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-planner\"}[$__rate_interval]))","hide":false,"instant":false,"legendFormat":"Deleted during {{phase}}","range":true,"refId":"A"}],"title":"Deleted Blocks","type":"timeseries"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"description":"Number of overlapping bloom blocks reused when creating new blocks\n","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":0,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null}]}},"overrides":[]},"gridPos":{"h":7,"w":12,"x":0,"y":2512},"id":109,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77663","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"sum(increase(loki_bloombuilder_blocks_reused_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-builder\"}[$__rate_interval]))","hide":false,"instant":false,"legendFormat":"Blocks","range":true,"refId":"A"}],"title":"Blocks reused","type":"timeseries"}],"targets":[],"title":"Blocks building","type":"row"},{"collapsed":true,"gridPos":{"h":1,"w":24,"x":0,"y":28},"id":135,"panels":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"description":"Is the retention currently running?","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"fieldMinMax":false,"mappings":[{"options":{"0":{"color":"yellow","index":0,"text":"No"},"1":{"color":"green","index":1,"text":"Yes"}},"type":"value"}],"max":0,"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null}]},"unit":"none"},"overrides":[]},"gridPos":{"h":7,"w":3,"x":0,"y":2573},"id":136,"options":{"colorMode":"value","graphMode":"area","justifyMode":"auto","orientation":"auto","percentChangeColorMode":"standard","reduceOptions":{"calcs":["lastNotNull"],"fields":"","values":false},"showPercentChange":false,"textMode":"auto","wideLayout":true},"panels":[],"pluginVersion":"11.4.0-77663","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","exemplar":false,"expr":"sum by (`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster, `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`, namespace) (loki_bloomplanner_retention_running{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-planner\"})","instant":true,"legendFormat":"__auto","range":false,"refId":"A"}],"title":"Running now?","type":"stat"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"description":"Is the retention currently running?","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","axisSoftMax":1,"axisSoftMin":0,"barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":0,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"fieldMinMax":false,"mappings":[],"max":2,"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null}]},"unit":"bool_yes_no"},"overrides":[]},"gridPos":{"h":7,"w":9,"x":3,"y":2573},"id":137,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77663","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"sum by (`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster, `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`, namespace) (loki_bloomplanner_retention_running{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-planner\"})","legendFormat":"__auto","range":true,"refId":"A"}],"title":"Retention running","type":"timeseries"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"description":"How much time applying retention took","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":0,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"fieldMinMax":false,"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null}]},"unit":"dtdurations"},"overrides":[]},"gridPos":{"h":7,"w":12,"x":12,"y":2573},"id":138,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77663","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"histogram_quantile(0.9, \n sum by (status, le) (\n rate(loki_bloomplanner_retention_time_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-planner\"}[$__rate_interval])\n )\n)","legendFormat":"__auto","range":true,"refId":"A"}],"title":"Retention time","type":"timeseries"}],"targets":[],"title":"Retention","type":"row"},{"collapsed":true,"gridPos":{"h":1,"w":24,"x":0,"y":29},"id":62,"panels":[{"description":"","fieldConfig":{"defaults":{},"overrides":[]},"gridPos":{"h":4,"w":24,"x":0,"y":2581},"id":71,"options":{"code":{"language":"plaintext","showLineNumbers":false,"showMiniMap":false},"content":"During the planning phase, the planner downloads the metas and TSDBs to build the plan.\n\nOnce all blocks and metas are built, the builder flushes them to the object store.\n\nAfter each iteration, the planner deletes the metas and blocks marked for deletion in the tombstones.","mode":"markdown"},"panels":[],"pluginVersion":"11.4.0-77663","targets":[],"title":"","transparent":true,"type":"text"},{"description":"","fieldConfig":{"defaults":{},"overrides":[]},"gridPos":{"h":13,"w":2,"x":0,"y":2585},"id":63,"options":{"code":{"language":"plaintext","showLineNumbers":false,"showMiniMap":false},"content":"---\n#### GCS\n","mode":"markdown"},"panels":[],"pluginVersion":"11.4.0-77663","targets":[],"title":"","transparent":true,"type":"text"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"description":"","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":25,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null}]},"unit":"none"},"overrides":[]},"gridPos":{"h":7,"w":11,"x":2,"y":2585},"id":61,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77663","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"sum by (container, status_code, operation) (rate(loki_gcs_request_duration_seconds_count{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-planner\"} [$__rate_interval]))","hide":false,"instant":false,"legendFormat":"{{operation}} {{status_code}}","range":true,"refId":"B"}],"title":"QPS Planner","type":"timeseries"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"description":"","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":25,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null}]},"unit":"s"},"overrides":[]},"gridPos":{"h":7,"w":11,"x":13,"y":2585},"id":64,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77663","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"histogram_quantile(0.99, sum by (operation, le) (rate(loki_gcs_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-planner\"} [$__rate_interval])))","hide":false,"instant":false,"legendFormat":"{{operation}} p99","range":true,"refId":"D"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"histogram_quantile(0.90, sum by (operation, le) (rate(loki_gcs_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-planner\"} [$__rate_interval])))","hide":false,"instant":false,"legendFormat":"{{operation}} p90","range":true,"refId":"E"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"histogram_quantile(0.50, sum by (operation, le) (rate(loki_gcs_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-planner\"} [$__rate_interval])))","hide":false,"instant":false,"legendFormat":"{{operation}} p50","range":true,"refId":"F"}],"title":"Latency Planner","type":"timeseries"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"description":"","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":25,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null}]},"unit":"none"},"overrides":[]},"gridPos":{"h":7,"w":11,"x":2,"y":2592},"id":127,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77663","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"sum by (container, status_code, operation) (rate(loki_gcs_request_duration_seconds_count{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-builder\"} [$__rate_interval]))","hide":false,"instant":false,"legendFormat":"{{operation}} {{status_code}}","range":true,"refId":"B"}],"title":"QPS Builder","type":"timeseries"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"description":"","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":25,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null}]},"unit":"s"},"overrides":[]},"gridPos":{"h":7,"w":11,"x":13,"y":2592},"id":128,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77663","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"histogram_quantile(0.99, sum by (operation, le) (rate(loki_gcs_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-builder\"} [$__rate_interval])))","hide":false,"instant":false,"legendFormat":"{{operation}} p99","range":true,"refId":"D"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"histogram_quantile(0.90, sum by (operation, le) (rate(loki_gcs_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-builder\"} [$__rate_interval])))","hide":false,"instant":false,"legendFormat":"{{operation}} p90","range":true,"refId":"E"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"histogram_quantile(0.50, sum by (operation, le) (rate(loki_gcs_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-builder\"} [$__rate_interval])))","hide":false,"instant":false,"legendFormat":"{{operation}} p50","range":true,"refId":"F"}],"title":"Latency Planner","type":"timeseries"},{"description":"","fieldConfig":{"defaults":{},"overrides":[]},"gridPos":{"h":14,"w":2,"x":0,"y":2598},"id":65,"options":{"code":{"language":"plaintext","showLineNumbers":false,"showMiniMap":false},"content":"---\n#### S3\n","mode":"markdown"},"panels":[],"pluginVersion":"11.4.0-77663","targets":[],"title":"","transparent":true,"type":"text"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"description":"","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":25,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null}]},"unit":"none"},"overrides":[]},"gridPos":{"h":7,"w":11,"x":2,"y":2599},"id":67,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77663","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"sum by (status_code, operation) (rate(loki_s3_request_duration_seconds_count{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-planner\"} [$__rate_interval]))","hide":false,"instant":false,"legendFormat":"{{operation}} {{status_code}}","range":true,"refId":"B"}],"title":"QPS Planner","type":"timeseries"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"description":"","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":25,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null}]},"unit":"s"},"overrides":[]},"gridPos":{"h":7,"w":11,"x":13,"y":2599},"id":69,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77663","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"histogram_quantile(0.99, sum by (operation, le) (rate(loki_s3_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-planner\"} [$__rate_interval])))","hide":false,"instant":false,"legendFormat":"{{operation}} p99","range":true,"refId":"D"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"histogram_quantile(0.90, sum by (operation, le) (rate(loki_s3_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-planner\"} [$__rate_interval])))","hide":false,"instant":false,"legendFormat":"{{operation}} p90","range":true,"refId":"E"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"histogram_quantile(0.50, sum by (operation, le) (rate(loki_s3_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-planner\", job=\"\"} [$__rate_interval])))","hide":false,"instant":false,"legendFormat":"{{operation}} p50","range":true,"refId":"F"}],"title":"Latency Planner","type":"timeseries"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"description":"","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":25,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null}]},"unit":"none"},"overrides":[]},"gridPos":{"h":7,"w":11,"x":2,"y":2606},"id":129,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77663","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"sum by (status_code, operation) (rate(loki_s3_request_duration_seconds_count{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-builder\"} [$__rate_interval]))","hide":false,"instant":false,"legendFormat":"{{operation}} {{status_code}}","range":true,"refId":"B"}],"title":"QPS Builder","type":"timeseries"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"description":"","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":25,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null}]},"unit":"s"},"overrides":[]},"gridPos":{"h":7,"w":11,"x":13,"y":2606},"id":130,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77663","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"histogram_quantile(0.99, sum by (operation, le) (rate(loki_s3_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-builder\"} [$__rate_interval])))","hide":false,"instant":false,"legendFormat":"{{operation}} p99","range":true,"refId":"D"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"histogram_quantile(0.90, sum by (operation, le) (rate(loki_s3_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-builder\"} [$__rate_interval])))","hide":false,"instant":false,"legendFormat":"{{operation}} p90","range":true,"refId":"E"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"histogram_quantile(0.50, sum by (operation, le) (rate(loki_s3_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-builder\"} [$__rate_interval])))","hide":false,"instant":false,"legendFormat":"{{operation}} p50","range":true,"refId":"F"}],"title":"Latency Builder","type":"timeseries"},{"description":"","fieldConfig":{"defaults":{},"overrides":[]},"gridPos":{"h":7,"w":2,"x":0,"y":2612},"id":66,"options":{"code":{"language":"plaintext","showLineNumbers":false,"showMiniMap":false},"content":"---\n#### Azure\nBlob Storage","mode":"markdown"},"panels":[],"pluginVersion":"11.4.0-77663","targets":[],"title":"","transparent":true,"type":"text"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"description":"","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":25,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null}]},"unit":"none"},"overrides":[]},"gridPos":{"h":7,"w":11,"x":2,"y":2613},"id":68,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77663","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"sum by (status_code, operation) (rate(loki_azure_blob_request_duration_seconds_count{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-planner\"} [$__rate_interval]))","hide":false,"instant":false,"legendFormat":"{{operation}} {{status_code}}","range":true,"refId":"B"}],"title":"QPS Planner","type":"timeseries"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"description":"","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":25,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null}]},"unit":"s"},"overrides":[]},"gridPos":{"h":7,"w":11,"x":13,"y":2613},"id":70,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77663","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"histogram_quantile(0.99, sum by (operation, le) (rate(loki_azure_blob_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-planner\"} [$__rate_interval])))","hide":false,"instant":false,"legendFormat":"{{operation}} p99","range":true,"refId":"D"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"histogram_quantile(0.90, sum by (operation, le) (rate(loki_azure_blob_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-planner\"} [$__rate_interval])))","hide":false,"instant":false,"legendFormat":"{{operation}} p90","range":true,"refId":"E"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"histogram_quantile(0.50, sum by (operation, le) (rate(loki_azure_blob_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-planner\"} [$__rate_interval])))","hide":false,"instant":false,"legendFormat":"{{operation}} p50","range":true,"refId":"F"}],"title":"Latency Planner","type":"timeseries"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"description":"","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":25,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null}]},"unit":"none"},"overrides":[]},"gridPos":{"h":7,"w":11,"x":2,"y":2620},"id":131,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77663","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"sum by (status_code, operation) (rate(loki_azure_blob_request_duration_seconds_count{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-builder\"} [$__rate_interval]))","hide":false,"instant":false,"legendFormat":"{{operation}} {{status_code}}","range":true,"refId":"B"}],"title":"QPS Builder","type":"timeseries"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"description":"","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":25,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null}]},"unit":"s"},"overrides":[]},"gridPos":{"h":7,"w":11,"x":13,"y":2620},"id":132,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77663","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"histogram_quantile(0.99, sum by (operation, le) (rate(loki_azure_blob_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-builder\"} [$__rate_interval])))","hide":false,"instant":false,"legendFormat":"{{operation}} p99","range":true,"refId":"D"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"histogram_quantile(0.90, sum by (operation, le) (rate(loki_azure_blob_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-builder\"} [$__rate_interval])))","hide":false,"instant":false,"legendFormat":"{{operation}} p90","range":true,"refId":"E"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"histogram_quantile(0.50, sum by (operation, le) (rate(loki_azure_blob_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-builder\"} [$__rate_interval])))","hide":false,"instant":false,"legendFormat":"{{operation}} p50","range":true,"refId":"F"}],"title":"Latency Builder","type":"timeseries"}],"targets":[],"title":"Object Store","type":"row"}],"preload":false,"refresh":"10s","rows":[],"schemaVersion":14,"style":"dark","tags":["loki"],"templating":{"list":[{"current":{"text":"default","value":"default"},"hide":0,"label":"Data source","name":"datasource","options":[],"query":"prometheus","refresh":1,"regex":"","type":"datasource"},`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`{"allValue":null,"current":{"text":"prod","value":"prod"},"datasource":"$datasource","hide":0,"includeAll":false,"label":"cluster","multi":false,"name":"cluster","options":[],"query":"label_values(loki_build_info, cluster)","refresh":1,"regex":"","sort":2,"tagValuesQuery":"","tags":[],"tagsQuery":"","type":"query","useTags":false},`}}{{ end }}{{`{"current":{"text":"prod","value":"prod"},"datasource":"$datasource","hide":0,"includeAll":false,"label":"`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`","multi":false,"name":"`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`","options":[],"query":"label_values(loki_build_info, `}}{{ $.Values.monitoring.appInstanceLabelName }}{{`)","refresh":1,"regex":"","sort":2,"tagValuesQuery":"","tags":[],"tagsQuery":"","type":"query","useTags":false},{"allValue":null,"current":{"text":"prod","value":"prod"},"datasource":"$datasource","hide":0,"includeAll":false,"label":"namespace","multi":false,"name":"namespace","options":[],"query":"label_values(loki_build_info{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\"}, namespace)","refresh":1,"regex":"","sort":2,"tagValuesQuery":"","tags":[],"tagsQuery":"","type":"query","useTags":false},{"hide":0,"label":null,"name":"loki_datasource","options":[],"query":"loki","refresh":1,"regex":"","type":"datasource"},{"allValue":".+","current":{},"datasource":"$datasource","hide":0,"includeAll":true,"label":"Tenant","multi":false,"name":"tenant","options":[],"query":"label_values(loki_bloomplanner_tenant_tasks_planned{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\"}, tenant)","refresh":0,"regex":"","sort":3,"tagValuesQuery":"","tags":[],"tagsQuery":"","type":"query","useTags":false}]},"time":{"from":"now-1h","to":"now"},"timepicker":{"refresh_intervals":["5s","10s","30s","1m","5m","15m","30m","1h","2h","1d"],"time_options":["5m","15m","1h","6h","12h","24h","2d","7d","30d"]},"timezone": "`}}{{ .Values.monitoring.dashboards.defaultDashboardsTimezone }}{{`","title":"Loki / Bloom Build","uid":"bloom-build","version":0,"weekStart":""}`}} +{{- end }} +--- +{{- if and .Values.monitoring.dashboards.enabled .Values.monitoring.dashboards.grafanaOperator.enabled (dig "loki-bloom-build" "enabled" true .Values.monitoring.dashboards) }} +apiVersion: grafana.integreatly.org/v1beta1 +kind: GrafanaDashboard +metadata: + name: {{ include "loki.resourceName" (dict "ctx" $ "component" "dashboards" "suffix" "loki-bloom-build") }} + namespace: {{ .Values.monitoring.namespace | default (include "loki.namespace" $) }} + {{- with (mergeOverwrite dict .Values.monitoring.dashboards.annotations .Values.monitoring.dashboards.grafanaOperator.annotations) }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} + labels: + {{- include "loki.labels" $ | nindent 4 }} + {{- with (mergeOverwrite dict .Values.monitoring.dashboards.labels .Values.monitoring.dashboards.grafanaOperator.labels) }} + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + allowCrossNamespaceImport: true + resyncPeriod: {{ .Values.monitoring.dashboards.grafanaOperator.resyncPeriod | default "10m" | quote }} + {{- include "loki.grafana.operator.folder" $ | nindent 2 }} + instanceSelector: + {{- toYaml .Values.monitoring.dashboards.grafanaOperator.instanceSelector | nindent 4 }} + configMapRef: + name: {{ include "loki.resourceName" (dict "ctx" $ "component" "dashboards" "suffix" "loki-bloom-build") }} + key: loki-bloom-build.json +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/monitoring/dashboards/loki-bloom-gateway.yaml b/packs/loki-3.7.4/charts/loki/templates/monitoring/dashboards/loki-bloom-gateway.yaml new file mode 100644 index 00000000..820fa632 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/monitoring/dashboards/loki-bloom-gateway.yaml @@ -0,0 +1,50 @@ +{{- /* +Generated from 'loki-bloom-gateway' from https://github.com/grafana/loki.git +Do not change in-place! In order to change this file first read following link: +https://github.com/grafana-community/helm-charts/tree/main/charts/loki/hack +*/ -}} +{{- if and .Values.monitoring.dashboards.enabled (dig "loki-bloom-gateway" "enabled" true .Values.monitoring.dashboards) }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "loki.resourceName" (dict "ctx" $ "component" "dashboards" "suffix" "loki-bloom-gateway") }} + namespace: {{ .Values.monitoring.namespace | default (include "loki.namespace" $) }} + labels: + {{- include "loki.labels" $ | nindent 4 }} + {{- with .Values.monitoring.dashboards.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.monitoring.dashboards.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +data: + loki-bloom-gateway.json: |- + {{`{"annotations":{"list":[]},"editable":`}}{{ .Values.monitoring.dashboards.defaultDashboardsEditable }}{{`,"fiscalYearStartMonth":0,"gnetId":null,"graphTooltip":0,"hideControls":false,"links":[{"asDropdown":true,"icon":"external link","includeVars":true,"keepTime":true,"tags":["loki"],"targetBlank":false,"title":"Loki Dashboards","type":"dashboards"}],"panels":[{"collapsed":false,"gridPos":{"h":1,"w":24,"x":0,"y":0},"id":73,"panels":[],"targets":[],"title":"Overview","type":"row"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"description":"Percentage of chunks that are filtered by using bloom filters","fieldConfig":{"defaults":{"color":{"mode":"thresholds"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":0,"gradientMode":"scheme","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineStyle":{"fill":"solid"},"lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"area"}},"mappings":[],"max":1,"min":0,"thresholds":{"mode":"absolute","steps":[{"color":"red","value":null},{"color":"orange","value":0.5},{"color":"yellow","value":0.75},{"color":"green","value":0.9}]},"unit":"percentunit"},"overrides":[]},"gridPos":{"h":6,"w":12,"x":0,"y":1},"id":23,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77765","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"sum(rate(loki_bloom_gateway_filtered_chunks_sum{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-gateway\"}[$__rate_interval]))\n/\nsum(rate(loki_bloom_gateway_requested_chunks_sum{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-gateway\"}[$__rate_interval]))","hide":false,"instant":false,"legendFormat":"Chunks","range":true,"refId":"A"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","exemplar":false,"expr":"sum(rate(loki_bloom_gateway_filtered_series_sum{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-gateway\"}[$__rate_interval]))\n/\nsum(rate(loki_bloom_gateway_requested_series_sum{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-gateway\"}[$__rate_interval]))","hide":false,"instant":false,"legendFormat":"Series","range":true,"refId":"B"}],"title":"Filter ratio - Bloom Gateway (server)","type":"timeseries"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"description":"Percentage of chunks that are filtered by using bloom filters","fieldConfig":{"defaults":{"color":{"mode":"thresholds"},"mappings":[],"max":1,"min":0,"thresholds":{"mode":"absolute","steps":[{"color":"red","value":null},{"color":"orange","value":0.5},{"color":"yellow","value":0.75},{"color":"green","value":0.9}]},"unit":"percentunit"},"overrides":[]},"gridPos":{"h":6,"w":6,"x":12,"y":1},"id":75,"options":{"minVizHeight":75,"minVizWidth":75,"orientation":"auto","reduceOptions":{"calcs":["lastNotNull"],"fields":"","values":false},"showThresholdLabels":false,"showThresholdMarkers":true,"sizing":"auto"},"panels":[],"pluginVersion":"11.4.0-77765","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","exemplar":false,"expr":"sum(increase(loki_bloom_gateway_filtered_chunks_sum{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-gateway\"}[$__range]))\n/\nsum(increase(loki_bloom_gateway_requested_chunks_sum{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-gateway\"}[$__range]))","instant":true,"legendFormat":"Chunks","range":false,"refId":"A"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","exemplar":false,"expr":"sum(increase(loki_bloom_gateway_filtered_series_sum{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-gateway\"}[$__range]))\n/\nsum(increase(loki_bloom_gateway_requested_series_sum{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-gateway\"}[$__range]))","hide":false,"instant":true,"legendFormat":"Series","range":false,"refId":"B"}],"title":"Filter ratio","type":"gauge"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"description":"","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":10,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineStyle":{"fill":"solid"},"lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":80}]},"unit":"none"},"overrides":[{"matcher":{"id":"byName","options":"Desired"},"properties":[{"id":"custom.fillOpacity","value":0},{"id":"custom.lineStyle","value":{"dash":[10,10],"fill":"dash"}},{"id":"custom.lineWidth","value":2}]}]},"gridPos":{"h":6,"w":6,"x":18,"y":1},"id":72,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77765","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"kube_statefulset_status_replicas_ready{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", statefulset=\"bloom-gateway\"}","hide":false,"instant":false,"legendFormat":"Ready","range":true,"refId":"D"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"kube_statefulset_replicas{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", statefulset=\"bloom-gateway\"}","hide":false,"instant":false,"legendFormat":"Desired","range":true,"refId":"B"}],"title":"Readiness","type":"timeseries"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"description":"Percentage of chunks that are filtered by using bloom filters","fieldConfig":{"defaults":{"color":{"mode":"thresholds"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":0,"gradientMode":"scheme","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineStyle":{"fill":"solid"},"lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"area"}},"mappings":[],"max":1,"min":0,"thresholds":{"mode":"absolute","steps":[{"color":"red","value":null},{"color":"orange","value":0.5},{"color":"yellow","value":0.75},{"color":"green","value":0.9}]},"unit":"percentunit"},"overrides":[]},"gridPos":{"h":6,"w":12,"x":0,"y":7},"id":93,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77765","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"sum(rate(loki_bloom_gateway_querier_chunks_filtered_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/index-gateway\"}[$__rate_interval]))\n/\nsum(rate(loki_bloom_gateway_querier_chunks_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/index-gateway\"}[$__rate_interval]))","instant":false,"legendFormat":"Chunks","range":true,"refId":"A"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","exemplar":false,"expr":"sum(rate(loki_bloom_gateway_querier_series_filtered_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/index-gateway\"}[$__rate_interval]))\n/\nsum(rate(loki_bloom_gateway_querier_series_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/index-gateway\"}[$__rate_interval]))","hide":false,"instant":false,"legendFormat":"Series","range":true,"refId":"B"}],"title":"Filter ratio - Index Gateway (client)","type":"timeseries"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"description":"Percentage of chunks that are filtered by using bloom filters","fieldConfig":{"defaults":{"color":{"mode":"thresholds"},"mappings":[],"max":1,"min":0,"thresholds":{"mode":"absolute","steps":[{"color":"red","value":null},{"color":"orange","value":0.5},{"color":"yellow","value":0.75},{"color":"green","value":0.9}]},"unit":"percentunit"},"overrides":[]},"gridPos":{"h":6,"w":6,"x":12,"y":7},"id":94,"options":{"minVizHeight":75,"minVizWidth":75,"orientation":"auto","reduceOptions":{"calcs":["lastNotNull"],"fields":"","values":false},"showThresholdLabels":false,"showThresholdMarkers":true,"sizing":"auto"},"panels":[],"pluginVersion":"11.4.0-77765","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","exemplar":false,"expr":"sum(increase(loki_bloom_gateway_querier_chunks_filtered_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/index-gateway\"}[$__range]))\n/\nsum(increase(loki_bloom_gateway_querier_chunks_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/index-gateway\"}[$__range]))","instant":true,"legendFormat":"Chunks","range":false,"refId":"A"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","exemplar":false,"expr":"sum(increase(loki_bloom_gateway_querier_series_filtered_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/index-gateway\"}[$__range]))\n/\nsum(increase(loki_bloom_gateway_querier_series_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/index-gateway\"}[$__range]))","hide":false,"instant":true,"legendFormat":"Series","range":false,"refId":"B"}],"title":"Filter ratio","type":"gauge"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"description":"","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":50,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineStyle":{"fill":"solid"},"lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":80}]},"unit":"none"},"overrides":[]},"gridPos":{"h":6,"w":6,"x":18,"y":7},"id":37,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77765","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"(\n max by (pod, reason) (kube_pod_container_status_last_terminated_reason{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", container=\"bloom-gateway\"})\n * on (pod) group_left\n sum by (pod) (increase(kube_pod_container_status_restarts_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", container=\"bloom-gateway\"}[$__rate_interval]))\n) > 0","hide":false,"instant":false,"interval":"`}}{{ .Values.monitoring.dashboards.defaultDashboardsInterval }}{{`","legendFormat":"{{pod}} ({{reason}})","range":true,"refId":"C"}],"title":"Container restarts","type":"timeseries"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"description":"Percentage of chunks that are filtered by using bloom filters","fieldConfig":{"defaults":{"color":{"mode":"thresholds"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":0,"gradientMode":"scheme","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineStyle":{"fill":"solid"},"lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"area"}},"mappings":[],"max":1,"min":0,"thresholds":{"mode":"absolute","steps":[{"color":"red","value":null},{"color":"orange","value":0.5},{"color":"yellow","value":0.75},{"color":"green","value":0.9}]},"unit":"percentunit"},"overrides":[]},"gridPos":{"h":6,"w":12,"x":0,"y":13},"id":99,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77765","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"(\n sum(rate(loki_index_gateway_prefilter_chunks_sum{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/index-gateway\"}[$__rate_interval])) by (route)\n -\n sum(rate(loki_index_gateway_postfilter_chunks_sum{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/index-gateway\"}[$__rate_interval])) by (route)\n)\n/\nsum(rate(loki_index_gateway_prefilter_chunks_sum{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/index-gateway\"}[$__rate_interval])) by (route)","instant":false,"legendFormat":"chunks {{ route}}","range":true,"refId":"A"}],"title":"Filter ratio - Index Gateway by route","type":"timeseries"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"description":"","fieldConfig":{"defaults":{"color":{"mode":"thresholds"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":0,"gradientMode":"scheme","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineStyle":{"fill":"solid"},"lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"area"}},"mappings":[],"max":1,"min":0,"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"#EAB839","value":0.1},{"color":"#EF843C","value":0.25},{"color":"red","value":0.5}]},"unit":"percentunit"},"overrides":[]},"gridPos":{"h":6,"w":12,"x":12,"y":13},"id":100,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77765","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","exemplar":false,"expr":"sum(rate(loki_bloom_gateway_querier_series_skipped_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/index-gateway\"}[$__rate_interval]))\n/\nsum(rate(loki_bloom_gateway_querier_series_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/index-gateway\"}[$__rate_interval]))","hide":false,"instant":false,"legendFormat":"series","range":true,"refId":"A"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","exemplar":false,"expr":"sum(rate(loki_bloom_gateway_querier_chunks_skipped_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/index-gateway\"}[$__rate_interval]))\n/\nsum(rate(loki_bloom_gateway_querier_chunks_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/index-gateway\"}[$__rate_interval]))","hide":false,"instant":false,"legendFormat":"chunks","range":true,"refId":"B"}],"title":"Data skipped because they don't match any bocks","type":"timeseries"},{"collapsed":true,"gridPos":{"h":1,"w":24,"x":0,"y":19},"id":96,"panels":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"description":"","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":50,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"percent"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":80}]},"unit":"percentunit"},"overrides":[]},"gridPos":{"h":7,"w":12,"x":0,"y":447},"id":97,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77765","targets":[{"datasource":{"type":"prometheus","uid":"000000134"},"editorMode":"code","expr":"sum(rate(loki_bloom_recorder_chunks_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-gateway\", type=~\"(found|skipped|missed)\"}[$__rate_interval])) by (type)\n/ on () group_left\nsum(rate(loki_bloom_recorder_chunks_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-gateway\", type=\"requested\"}[$__rate_interval]))","instant":false,"legendFormat":"__auto","range":true,"refId":"A"},{"datasource":{"type":"prometheus","uid":"000000134"},"editorMode":"code","expr":"sum(rate(loki_bloom_recorder_chunks_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-gateway\", type=\"filtered\"}[$__rate_interval])) by (type)\n/ on () group_left\nsum(rate(loki_bloom_recorder_chunks_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-gateway\", type=\"requested\"}[$__rate_interval]))","hide":true,"instant":false,"legendFormat":"__auto","range":true,"refId":"B"}],"title":"Found/Skipped/Missing chunks","type":"timeseries"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"description":"","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":50,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"max":1,"min":0,"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":80}]},"unit":"percentunit"},"overrides":[]},"gridPos":{"h":7,"w":12,"x":12,"y":447},"id":98,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77765","targets":[{"datasource":{"type":"prometheus","uid":"000000134"},"editorMode":"code","expr":"sum(rate(loki_bloom_recorder_chunks_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-gateway\", type=\"filtered\"}[$__rate_interval])) by (type)\n/ on () group_left\nsum(rate(loki_bloom_recorder_chunks_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-gateway\", type=\"found\"}[$__rate_interval]))","hide":false,"instant":false,"legendFormat":"__auto","range":true,"refId":"B"}],"title":"Filtered chunks","type":"timeseries"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"description":"","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":50,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"percent"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":80}]},"unit":"percentunit"},"overrides":[]},"gridPos":{"h":7,"w":12,"x":0,"y":454},"id":107,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77765","targets":[{"datasource":{"type":"prometheus","uid":"000000134"},"editorMode":"code","expr":"sum(rate(loki_bloom_recorder_series_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-gateway\", type=~\"(found|skipped|missed)\"}[$__rate_interval])) by (type)\n/ on () group_left\nsum(rate(loki_bloom_recorder_series_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-gateway\", type=\"requested\"}[$__rate_interval]))","instant":false,"legendFormat":"__auto","range":true,"refId":"A"}],"title":"Found/Skipped/Missing series","type":"timeseries"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"description":"","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":50,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"max":1,"min":0,"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":80}]},"unit":"percentunit"},"overrides":[]},"gridPos":{"h":7,"w":12,"x":12,"y":454},"id":108,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77765","targets":[{"datasource":{"type":"prometheus","uid":"000000134"},"editorMode":"code","expr":"sum(rate(loki_bloom_recorder_series_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-gateway\", type=\"filtered\"}[$__rate_interval])) by (type)\n/ on () group_left\nsum(rate(loki_bloom_recorder_series_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-gateway\", type=\"found\"}[$__rate_interval]))","hide":false,"instant":false,"legendFormat":"__auto","range":true,"refId":"B"}],"title":"Filtered series","type":"timeseries"}],"targets":[],"title":"Bloom Recorder","type":"row"},{"collapsed":true,"gridPos":{"h":1,"w":24,"x":0,"y":20},"id":95,"panels":[{"datasource":{"type":"loki","uid":"${loki_datasource}"},"fieldConfig":{"defaults":{},"overrides":[]},"gridPos":{"h":9,"w":15,"x":0,"y":920},"id":48,"options":{"dedupStrategy":"none","enableLogDetails":true,"prettifyLogMessage":false,"showCommonLabels":false,"showLabels":false,"showTime":false,"sortOrder":"Descending","wrapLogMessage":true},"panels":[],"pluginVersion":"11.4.0-77765","targets":[{"datasource":{"type":"loki","uid":"${loki_datasource}"},"editorMode":"code","expr":"{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", container=\"bloom-gateway\"} |= \"level=error\" or \"panic:\" | logfmt","queryType":"range","refId":"A"},{"datasource":{"type":"loki","uid":"${loki_datasource}"},"editorMode":"code","expr":"{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", container=\"bloom-gateway\"} |= \"level=warn\" | logfmt","queryType":"range","refId":"B"}],"title":"Errors","type":"logs"},{"datasource":{"type":"loki","uid":"${loki_datasource}"},"fieldConfig":{"defaults":{"color":{"fixedColor":"red","mode":"fixed"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"bars","fillOpacity":0,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineWidth":1,"pointSize":5,"scaleDistribution":{"log":2,"type":"symlog"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":1}]}},"overrides":[{"matcher":{"id":"byName","options":"warn"},"properties":[{"id":"color","value":{"fixedColor":"orange","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"error"},"properties":[{"id":"color","value":{"fixedColor":"red","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"panic"},"properties":[{"id":"color","value":{"fixedColor":"semi-dark-red","mode":"fixed"}}]}]},"gridPos":{"h":9,"w":9,"x":15,"y":920},"id":52,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77765","targets":[{"datasource":{"type":"loki","uid":"${loki_datasource}"},"editorMode":"code","expr":"sum by (level) (count_over_time({`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", container=\"bloom-gateway\"} |~ \"level=(warn|error)\" | logfmt [$__auto]))","queryType":"range","refId":"A"},{"datasource":{"type":"loki","uid":"${loki_datasource}"},"editorMode":"code","expr":"sum (count_over_time({`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", container=\"bloom-gateway\"} |= \"panic:\" | logfmt [$__auto]))","queryType":"range","refId":"B"}],"title":"Errors Rate","type":"timeseries"}],"targets":[],"title":"Logs","type":"row"},{"collapsed":true,"gridPos":{"h":1,"w":24,"x":0,"y":21},"id":56,"panels":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":0,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green"},{"color":"red","value":80}]}},"overrides":[]},"gridPos":{"h":14,"w":12,"x":0,"y":1764},"id":10,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77663","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"sum by(pod) (rate(container_cpu_usage_seconds_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"bloom-gateway\"}[$__rate_interval]))","instant":false,"legendFormat":"{{pod}}","range":true,"refId":"A"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"min(kube_pod_container_resource_requests{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"bloom-gateway\", resource=\"cpu\"} > 0)","hide":false,"instant":false,"legendFormat":"Request","range":true,"refId":"B"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"min(kube_pod_container_resource_limits{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"bloom-gateway\", resource=\"cpu\"} > 0)","hide":false,"instant":false,"legendFormat":"Limit","range":true,"refId":"C"}],"title":"CPU","type":"timeseries"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":0,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green"},{"color":"red","value":80}]},"unit":"bytes"},"overrides":[]},"gridPos":{"h":7,"w":12,"x":12,"y":1764},"id":11,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77663","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"max by(pod) (container_memory_working_set_bytes{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"bloom-gateway\"})","instant":false,"legendFormat":"{{pod}}","range":true,"refId":"A"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"min(kube_pod_container_resource_requests{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"bloom-gateway\", resource=\"memory\"} > 0)","hide":false,"instant":false,"legendFormat":"Request","range":true,"refId":"B"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"min(container_spec_memory_limit_bytes{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"bloom-gateway\"} > 0)","hide":false,"instant":false,"legendFormat":"Limit","range":true,"refId":"C"}],"title":"Memory (workingset)","type":"timeseries"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"description":"","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":0,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green"},{"color":"red","value":80}]},"unit":"bytes"},"overrides":[]},"gridPos":{"h":7,"w":12,"x":12,"y":2140},"id":81,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77663","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"max by(pod) (container_memory_working_set_bytes{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"bloom-gateway\"})","hide":true,"instant":false,"legendFormat":"{{pod}}","range":true,"refId":"A"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"min(kube_pod_container_resource_requests{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"bloom-gateway\", resource=\"memory\"} > 0)","hide":false,"instant":false,"legendFormat":"Request","range":true,"refId":"B"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"min(container_spec_memory_limit_bytes{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"bloom-gateway\"} > 0)","hide":false,"instant":false,"legendFormat":"Limit","range":true,"refId":"C"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"sum(go_memstats_heap_inuse_bytes{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"bloom-gateway\"}) by (pod)","hide":false,"instant":false,"legendFormat":"__auto","range":true,"refId":"D"}],"title":"Memory (heap inuse)","type":"timeseries"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"description":"","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":10,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineStyle":{"fill":"solid"},"lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green"},{"color":"red","value":80}]}},"overrides":[]},"gridPos":{"h":7,"w":8,"x":0,"y":2147},"id":87,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77663","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"sum by (pod) (rate(go_gc_cycles_total_gc_cycles_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", container=\"bloom-gateway\"}[$__rate_interval]))","hide":false,"instant":false,"legendFormat":"__auto","range":true,"refId":"B"}],"title":"GC rate","type":"timeseries"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"description":"","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":10,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineStyle":{"fill":"solid"},"lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green"},{"color":"red","value":80}]},"unit":"s"},"overrides":[]},"gridPos":{"h":7,"w":8,"x":8,"y":2147},"id":88,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77663","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"sum by (pod) (rate(go_gc_duration_seconds_sum{container=\"bloom-gateway\"}[$__rate_interval]))\n/\nsum by (pod) (rate(go_gc_duration_seconds_count{container=\"bloom-gateway\"}[$__rate_interval]))","hide":false,"legendFormat":"__auto","range":true,"refId":"A"}],"title":"GC duration","type":"timeseries"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"description":"","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":10,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineStyle":{"fill":"solid"},"lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green"},{"color":"red","value":80}]},"unit":"s"},"overrides":[]},"gridPos":{"h":7,"w":8,"x":16,"y":2147},"id":89,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77663","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"histogram_quantile(0.99, sum(rate(go_gc_pauses_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", container=\"bloom-gateway\"}[$__rate_interval])) by (le))","hide":false,"legendFormat":"__auto","range":true,"refId":"A"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"histogram_quantile(0.90, sum(rate(go_gc_pauses_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", container=\"bloom-gateway\"}[$__rate_interval])) by (le))","hide":false,"legendFormat":"__auto","range":true,"refId":"B"}],"title":"GC pauses","type":"timeseries"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"description":"","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":10,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green"},{"color":"red","value":80}]},"unit":"binBps"},"overrides":[]},"gridPos":{"h":7,"w":12,"x":0,"y":2154},"id":84,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77663","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"sum by(instance, pod) (rate(node_disk_read_bytes_total[$__rate_interval]))\n+ ignoring(pod) group_right() \n(count by(instance, pod) (container_fs_reads_bytes_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=\"bloom-gateway\", device!~\".*sda.*\"}) * 0)","hide":false,"instant":false,"interval":"`}}{{ .Values.monitoring.dashboards.defaultDashboardsInterval }}{{`","legendFormat":"{{pod}}","range":true,"refId":"D"}],"title":"Disk reads","type":"timeseries"},{"datasource":{"default":false,"type":"prometheus","uid":"${datasource}"},"description":"","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":10,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green"},{"color":"red","value":80}]},"unit":"binBps"},"overrides":[]},"gridPos":{"h":7,"w":12,"x":12,"y":2154},"id":85,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77663","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"sum by(instance, pod) (rate(node_disk_written_bytes_total[$__rate_interval]))\n+ ignoring(pod) group_right() \n(count by(instance, pod) (container_fs_writes_bytes_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=\"bloom-gateway\", device!~\".*sda.*\"}) * 0)","hide":false,"instant":false,"legendFormat":"{{pod}}","range":true,"refId":"D"}],"title":"Disk writes","type":"timeseries"},{"datasource":{"default":false,"type":"prometheus","uid":"${datasource}"},"description":"","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":10,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"normal"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green"},{"color":"red","value":80}]},"unit":"binBps"},"overrides":[]},"gridPos":{"h":7,"w":24,"x":0,"y":2161},"id":102,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77663","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"sum(sum by (instance) (rate(node_disk_read_bytes_total[$__rate_interval]))\n+ on(instance) group_right() \n(count by (instance) (container_fs_reads_bytes_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=\"bloom-gateway\", device!~\".*sda.*\"}) * 0))","hide":false,"instant":false,"interval":"`}}{{ .Values.monitoring.dashboards.defaultDashboardsInterval }}{{`","legendFormat":"Reads","range":true,"refId":"D"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"sum(sum by(instance) (rate(node_disk_written_bytes_total[$__rate_interval]))\n+ on(instance) group_right() \n(count by(instance) (container_fs_writes_bytes_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=\"bloom-gateway\", device!~\".*sda.*\"}) * 0)) * -1","hide":false,"instant":false,"legendFormat":"Writes","range":true,"refId":"A"}],"title":"Disk reads/writes","type":"timeseries"}],"targets":[],"title":"Resource usage","type":"row"},{"collapsed":true,"gridPos":{"h":1,"w":24,"x":0,"y":22},"id":2,"panels":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":100,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineWidth":0,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"normal"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green"}]}},"overrides":[{"matcher":{"id":"byName","options":"cancel"},"properties":[{"id":"color","value":{"mode":"fixed"}}]},{"matcher":{"id":"byName","options":"success"},"properties":[{"id":"color","value":{"fixedColor":"green","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"error"},"properties":[{"id":"color","value":{"fixedColor":"red","mode":"fixed"}}]}]},"gridPos":{"h":7,"w":12,"x":0,"y":1175},"id":13,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77663","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"sum by (status_code) (\n rate(loki_request_duration_seconds_count{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\",job=\"$namespace/bloom-gateway\", route=\"/logproto.BloomGateway/FilterChunkRefs\"}[$__rate_interval])\n)","hide":false,"instant":false,"legendFormat":"__auto","range":true,"refId":"B"}],"title":"QPS","type":"timeseries"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":20,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green"}]}},"overrides":[{"matcher":{"id":"byName","options":"cancel"},"properties":[{"id":"color","value":{"mode":"fixed"}}]},{"matcher":{"id":"byName","options":"success"},"properties":[{"id":"color","value":{"fixedColor":"green","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"error"},"properties":[{"id":"color","value":{"fixedColor":"red","mode":"fixed"}}]}]},"gridPos":{"h":7,"w":12,"x":12,"y":1175},"id":86,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77663","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"sum by (pod) (\n rate(loki_request_duration_seconds_count{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\",job=~\"($namespace)/.*-bloom-gateway\", route=\"/logproto.BloomGateway/FilterChunkRefs\"}[$__rate_interval])\n)","hide":false,"instant":false,"legendFormat":"__auto","range":true,"refId":"B"}],"title":"QPS per Pod","type":"timeseries"},{"datasource":{"default":false,"type":"prometheus","uid":"${datasource}"},"description":"","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":10,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green"}]},"unit":"s"},"overrides":[]},"gridPos":{"h":7,"w":12,"x":0,"y":1249},"id":14,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77663","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"histogram_quantile(0.50, sum by (le,route) (cluster_job_route:loki_request_duration_seconds_bucket:sum_rate{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"($namespace)/.*-bloom-gateway\", route=~\"/logproto.BloomGateway/FilterChunkRefs\"}))","hide":false,"instant":false,"legendFormat":"{{ route }} 50th percentile","range":true,"refId":"B"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"sum(cluster_job_route:loki_request_duration_seconds_sum:sum_rate{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"($namespace)/.*-bloom-gateway\", route=~\"/logproto.BloomGateway/FilterChunkRefs\"}) by (route) / sum(cluster_job_route:loki_request_duration_seconds_count:sum_rate{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"($namespace)/.*-bloom-gateway\", route=~\"/logproto.BloomGateway/FilterChunkRefs\"}) by (route) ","hide":false,"instant":false,"legendFormat":"{{ route }} Average","range":true,"refId":"C"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"histogram_quantile(0.99, sum by (le,route) (cluster_job_route:loki_request_duration_seconds_bucket:sum_rate{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"($namespace)/.*-bloom-gateway\", route=~\"/logproto.BloomGateway/FilterChunkRefs\"}))","hide":false,"instant":false,"legendFormat":"{{ route }} 99th percentile","range":true,"refId":"D"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"histogram_quantile(1, sum by (le,route) (cluster_job_route:loki_request_duration_seconds_bucket:sum_rate{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"($namespace)/.*-bloom-gateway\", route=~\"/logproto.BloomGateway/FilterChunkRefs\"}))","hide":false,"instant":false,"legendFormat":"{{ route }} max","range":true,"refId":"A"}],"title":"Latency","type":"timeseries"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":10,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green"}]},"unit":"s"},"overrides":[]},"gridPos":{"h":7,"w":12,"x":12,"y":1249},"id":15,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77663","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"histogram_quantile(0.99,\n sum(\n rate(loki_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"($namespace)/.*-bloom-gateway\", route=~\"/logproto.BloomGateway/FilterChunkRefs\"}[$__rate_interval])\n ) by (pod, le)\n )\n","hide":false,"instant":false,"legendFormat":"__auto","range":true,"refId":"B"}],"title":"Per Pod Latency (p99)","type":"timeseries"}],"targets":[],"title":"QPS and Latency","type":"row"},{"collapsed":true,"gridPos":{"h":1,"w":24,"x":0,"y":23},"id":58,"panels":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"description":"","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":25,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"normal"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null}]},"unit":"none"},"overrides":[]},"gridPos":{"h":7,"w":8,"x":0,"y":1176},"id":16,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77663","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"sum by (user) (loki_bloom_gateway_queue_length{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\"})","hide":false,"instant":false,"legendFormat":"{{user}}","range":true,"refId":"B"}],"title":"Queue Size","type":"timeseries"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"description":"For how long do pending tasks stay in the queue","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":0,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineWidth":1,"pointSize":1,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null}]},"unit":"s"},"overrides":[]},"gridPos":{"h":7,"w":8,"x":8,"y":1176},"id":17,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77663","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"histogram_quantile(0.99, sum by (le) (rate(loki_bloom_gateway_queue_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\"}[$__rate_interval])))","hide":false,"instant":false,"legendFormat":"p99","range":true,"refId":"E"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"histogram_quantile(0.50, sum by (le) (rate(loki_bloom_gateway_queue_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\"}[$__rate_interval])))","hide":false,"instant":false,"legendFormat":"p50","range":true,"refId":"C"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"sum (loki_bloom_gateway_queue_duration_seconds_sum{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\"})\n/\nsum (loki_bloom_gateway_queue_duration_seconds_count{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\"})","hide":false,"instant":false,"legendFormat":"avg","range":true,"refId":"D"}],"title":"Queue Latency","type":"timeseries"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"description":"Inflight requests tracks all tasks both queued and in progress","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":0,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineWidth":1,"pointSize":1,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null}]},"unit":"none"},"overrides":[]},"gridPos":{"h":7,"w":8,"x":16,"y":1176},"id":22,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77663","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"sum by (quantile) (loki_bloom_gateway_inflight_tasks{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", quantile=\"0.99\"})","hide":false,"instant":false,"legendFormat":"__auto","range":true,"refId":"A"}],"title":"Inflight tasks","type":"timeseries"}],"targets":[],"title":"Task Queue","type":"row"},{"collapsed":true,"gridPos":{"h":1,"w":24,"x":0,"y":24},"id":68,"panels":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"description":"","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":0,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green"},{"color":"red","value":80}]},"unit":"s"},"overrides":[]},"gridPos":{"h":8,"w":8,"x":0,"y":1177},"id":69,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77663","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"histogram_quantile(0.99, sum(rate(loki_bloom_gateway_process_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\",namespace=\"$namespace\",container=\"bloom-gateway\"}[$__rate_interval])) by (le, status))","instant":false,"legendFormat":"{{status}}-p99","range":true,"refId":"A"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"histogram_quantile(0.95, sum(rate(loki_bloom_gateway_process_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\",namespace=\"$namespace\",container=\"bloom-gateway\"}[$__rate_interval])) by (le, status))","hide":false,"instant":false,"legendFormat":"{{status}}-p95","range":true,"refId":"B"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"histogram_quantile(0.90, sum(rate(loki_bloom_gateway_process_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\",namespace=\"$namespace\",container=\"bloom-gateway\"}[$__rate_interval])) by (le, status))","hide":false,"instant":false,"legendFormat":"{{status}}-p90","range":true,"refId":"C"}],"title":"Processing time for tasks (per worker iteration)","type":"timeseries"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"description":"","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":0,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green"},{"color":"red","value":80}]},"unit":"s"},"overrides":[]},"gridPos":{"h":8,"w":8,"x":8,"y":1177},"id":70,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77663","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"histogram_quantile(0.99, sum(rate(loki_bloom_gateway_block_query_latency_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\",namespace=\"$namespace\",container=\"bloom-gateway\"}[$__rate_interval])) by (le, status))","instant":false,"legendFormat":"{{status}}-p99","range":true,"refId":"A"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"histogram_quantile(0.95, sum(rate(loki_bloom_gateway_block_query_latency_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\",namespace=\"$namespace\",container=\"bloom-gateway\"}[$__rate_interval])) by (le, status))","hide":false,"instant":false,"legendFormat":"{{status}}-p95","range":true,"refId":"B"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"histogram_quantile(0.90, sum(rate(loki_bloom_gateway_block_query_latency_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\",namespace=\"$namespace\",container=\"bloom-gateway\"}[$__rate_interval])) by (le, status))","hide":false,"instant":false,"legendFormat":"{{status}}-p90","range":true,"refId":"C"}],"title":"Block query latency (single block)","type":"timeseries"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"description":"","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":0,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green"},{"color":"red","value":80}]}},"overrides":[]},"gridPos":{"h":8,"w":8,"x":16,"y":1177},"id":71,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77663","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"sum(rate(loki_bloom_gateway_tasks_dequeued_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\",namespace=\"$namespace\",container=\"bloom-gateway\"}[$__rate_interval]))","instant":false,"legendFormat":"dequeued","range":true,"refId":"A"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"sum by (status) (rate(loki_bloom_gateway_tasks_processed_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\",namespace=\"$namespace\",container=\"bloom-gateway\"}[$__rate_interval]))","hide":false,"instant":false,"legendFormat":"processed {{status}}","range":true,"refId":"B"}],"title":"Tasks dequeued/processed","type":"timeseries"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"description":"","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":0,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green"},{"color":"red","value":80}]},"unit":"ops"},"overrides":[]},"gridPos":{"h":8,"w":8,"x":0,"y":1214},"id":105,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77663","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"sum(rate(loki_bloom_gateway_process_duration_seconds_count{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\",namespace=\"$namespace\",container=\"bloom-gateway\"}[$__rate_interval])) by (status)","instant":false,"legendFormat":"{{status}}","range":true,"refId":"A"}],"title":"Worker Iterations per second","type":"timeseries"}],"targets":[],"title":"Processing","type":"row"},{"collapsed":true,"gridPos":{"h":1,"w":24,"x":0,"y":25},"id":59,"panels":[{"description":"","fieldConfig":{"defaults":{},"overrides":[]},"gridPos":{"h":1,"w":24,"x":0,"y":1178},"id":19,"options":{"code":{"language":"plaintext","showLineNumbers":false,"showMiniMap":false},"content":"","mode":"markdown"},"panels":[],"pluginVersion":"11.4.0-77663","targets":[],"title":"We cache bloom blocks in memory to prevent the gateway from hitting the object store too often","transparent":true,"type":"text"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"description":"","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":0,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineStyle":{"fill":"solid"},"lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"fieldMinMax":false,"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green"}]},"unit":"bytes"},"overrides":[]},"gridPos":{"h":7,"w":12,"x":0,"y":1179},"id":20,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77663","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"sum(loki_embeddedcache_memory_bytes{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", cache=\"bloom-blocks-cache\", container=\"bloom-gateway\"}) by (pod)","hide":true,"instant":false,"legendFormat":"__auto","range":true,"refId":"A"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"sum(loki_bloom_blocks_cache_usage_bytes{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", container=\"bloom-gateway\"}) by (pod)","hide":false,"instant":false,"legendFormat":"__auto","range":true,"refId":"B"}],"title":"Cache size (per pod)","type":"timeseries"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"description":"","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":0,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineStyle":{"fill":"solid"},"lineWidth":1,"pointSize":5,"scaleDistribution":{"linearThreshold":1000,"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"fieldMinMax":false,"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green"}]},"unit":"none"},"overrides":[{"matcher":{"id":"byName","options":"Size"},"properties":[{"id":"unit","value":"bytes"},{"id":"custom.fillOpacity","value":25},{"id":"custom.lineWidth","value":0}]},{"matcher":{"id":"byName","options":"Items"},"properties":[{"id":"custom.fillOpacity","value":25},{"id":"custom.lineWidth","value":0},{"id":"unit","value":""},{"id":"custom.axisSoftMin","value":0}]}]},"gridPos":{"h":7,"w":12,"x":12,"y":1179},"id":83,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77663","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"sum(loki_bloom_blocks_cache_entries{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", container=\"bloom-gateway\"})","hide":false,"instant":false,"legendFormat":"Items","range":true,"refId":"A"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"sum(rate(loki_bloom_blocks_cache_added_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", container=\"bloom-gateway\"}[$__rate_interval]))","hide":false,"instant":false,"legendFormat":"Added","range":true,"refId":"G"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"sum(rate(loki_bloom_blocks_cache_evicted_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", container=\"bloom-gateway\"}[$__rate_interval])) by (reason)","hide":false,"instant":false,"legendFormat":"Evicted ({{reason}})","range":true,"refId":"F"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"sum(rate(loki_bloom_blocks_cache_usage_bytes{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", container=\"bloom-gateway\"}[$__rate_interval]))","hide":true,"instant":false,"legendFormat":"Size","range":true,"refId":"E"}],"title":"Cache rate","type":"timeseries"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"description":"","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":100,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineStyle":{"fill":"solid"},"lineWidth":0,"pointSize":5,"scaleDistribution":{"linearThreshold":1000,"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"normal"},"thresholdsStyle":{"mode":"off"}},"fieldMinMax":false,"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green"}]},"unit":"percentunit"},"overrides":[{"matcher":{"id":"byName","options":"hit"},"properties":[{"id":"color","value":{"fixedColor":"green","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"miss"},"properties":[{"id":"color","value":{"fixedColor":"red","mode":"fixed"}}]}]},"gridPos":{"h":7,"w":24,"x":0,"y":1186},"id":92,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77663","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"sum by (status) (\n rate(loki_bloom_blocks_cache_fetched_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", container=\"bloom-gateway\"}[$__rate_interval])\n)\n/ ignoring(status) group_left\nsum (\n rate(loki_bloom_blocks_cache_fetched_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", container=\"bloom-gateway\"}[$__rate_interval])\n)","hide":false,"instant":false,"legendFormat":"__auto","range":true,"refId":"B"}],"title":"Hit/Miss ratio","type":"timeseries"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"description":"","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":0,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineStyle":{"fill":"solid"},"lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"fieldMinMax":false,"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green"}]},"unit":"bytes"},"overrides":[{"matcher":{"id":"byRegexp","options":"/Size (.*)/"},"properties":[{"id":"unit","value":"bytes"}]}]},"gridPos":{"h":7,"w":12,"x":0,"y":1193},"id":76,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77663","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"sum(loki_embeddedcache_memory_bytes{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", cache=\"bloom-blocks-cache\", container=\"bloom-gateway\"})\n/\nsum(loki_embeddedcache_entries{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", cache=\"bloom-blocks-cache\", container=\"bloom-gateway\"})","instant":false,"legendFormat":"Size","range":true,"refId":"A"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"sum(loki_bloom_blocks_cache_usage_bytes{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", container=\"bloom-gateway\"})\n/\nsum(loki_bloom_blocks_cache_entries{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", container=\"bloom-gateway\"})","hide":false,"instant":false,"legendFormat":"Size","range":true,"refId":"B"}],"title":"Average item size","type":"timeseries"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"description":"","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":0,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineStyle":{"fill":"solid"},"lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"fieldMinMax":false,"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green"}]},"unit":"none"},"overrides":[{"matcher":{"id":"byRegexp","options":"/.* (blocks|metas) size/"},"properties":[{"id":"unit","value":"bytes"}]}]},"gridPos":{"h":7,"w":12,"x":12,"y":1193},"id":21,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77663","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"sum(rate(loki_bloom_store_metas_fetched_sum{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\",namespace=\"$namespace\", container=\"bloom-gateway\"}[$__rate_interval]))","hide":false,"instant":false,"legendFormat":"metas fetch rate","range":true,"refId":"A"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"sum(rate(loki_bloom_store_blocks_fetched_sum{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\",namespace=\"$namespace\", container=\"bloom-gateway\"}[$__rate_interval]))","hide":false,"instant":false,"legendFormat":"blocks fetch rate","range":true,"refId":"B"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"histogram_quantile(0.9, sum(rate(loki_bloom_store_blocks_fetched_size_bytes_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\"}[$__rate_interval])) by (le))","hide":false,"instant":false,"legendFormat":"p90 blocks size","range":true,"refId":"C"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"histogram_quantile(0.9, sum(rate(loki_bloom_store_metas_fetched_size_bytes_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\"}[$__rate_interval])) by (le))","hide":false,"instant":false,"legendFormat":"p90 metas size","range":true,"refId":"D"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"histogram_quantile(1.0, sum(rate(loki_bloom_store_metas_fetched_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\"}[$__rate_interval])) by (le))","hide":true,"instant":false,"legendFormat":"__auto","range":true,"refId":"E"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"histogram_quantile(0.95, sum(rate(loki_bloom_store_metas_fetched_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\"}[$__rate_interval])) by (le))","hide":true,"instant":false,"legendFormat":"__auto","range":true,"refId":"F"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"histogram_quantile(0.5, sum(rate(loki_bloom_store_metas_fetched_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\"}[$__rate_interval])) by (le))","hide":true,"instant":false,"legendFormat":"__auto","range":true,"refId":"G"}],"title":"Bloom Store","type":"timeseries"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"description":"","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":0,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineStyle":{"fill":"solid"},"lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"fieldMinMax":false,"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green"}]},"unit":"short"},"overrides":[{"matcher":{"id":"byRegexp","options":"/Size (.*)/"},"properties":[{"id":"unit","value":"bytes"}]}]},"gridPos":{"h":7,"w":12,"x":0,"y":1200},"id":101,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77663","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"sum by (job)(rate(loki_bloom_store_download_queue_size_sum{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", container=\"bloom-gateway\"}[$__rate_interval]))","hide":false,"instant":false,"interval":"`}}{{ .Values.monitoring.dashboards.defaultDashboardsInterval }}{{`","legendFormat":"Size","range":true,"refId":"B"}],"title":"Block download queue size","type":"timeseries"}],"targets":[],"title":"Blocks Cache","type":"row"},{"collapsed":true,"gridPos":{"h":1,"w":24,"x":0,"y":26},"id":60,"panels":[{"description":"","fieldConfig":{"defaults":{},"overrides":[]},"gridPos":{"h":1,"w":24,"x":0,"y":1013},"id":61,"options":{"code":{"language":"plaintext","showLineNumbers":false,"showMiniMap":false},"content":"","mode":"markdown"},"panels":[],"pluginVersion":"11.4.0-77765","targets":[],"title":"The gateway download bloom meta files and blocks from the object store.","transparent":true,"type":"text"},{"description":"","fieldConfig":{"defaults":{},"overrides":[]},"gridPos":{"h":7,"w":2,"x":0,"y":1014},"id":24,"options":{"code":{"language":"plaintext","showLineNumbers":false,"showMiniMap":false},"content":"---\n#### GCS\n","mode":"markdown"},"panels":[],"pluginVersion":"11.4.0-77765","targets":[],"title":"","transparent":true,"type":"text"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"description":"","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":25,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"normal"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null}]},"unit":"none"},"overrides":[]},"gridPos":{"h":7,"w":11,"x":2,"y":1014},"id":25,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77765","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"sum by (status_code, operation) (rate(loki_gcs_request_duration_seconds_count{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-gateway\"} [$__rate_interval]))","instant":false,"legendFormat":"{{operation}} {{status_code}}","range":true,"refId":"A"}],"title":"QPS","type":"timeseries"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"description":"","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":0,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null}]},"unit":"none"},"overrides":[]},"gridPos":{"h":7,"w":11,"x":13,"y":1014},"id":29,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77765","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"histogram_quantile(0.99, sum by (operation, le) (rate(loki_gcs_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-gateway\"} [$__rate_interval])))","instant":false,"legendFormat":"{{operation}} p99","range":true,"refId":"A"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"histogram_quantile(0.90, sum by (operation, le) (rate(loki_gcs_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-gateway\"} [$__rate_interval])))","hide":false,"instant":false,"legendFormat":"{{operation}} p90","range":true,"refId":"B"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"histogram_quantile(0.50, sum by (operation, le) (rate(loki_gcs_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-gateway\"} [$__rate_interval])))","hide":false,"instant":false,"legendFormat":"{{operation}} p50","range":true,"refId":"C"}],"title":"Latency","type":"timeseries"},{"description":"","fieldConfig":{"defaults":{},"overrides":[]},"gridPos":{"h":7,"w":2,"x":0,"y":1021},"id":62,"options":{"code":{"language":"plaintext","showLineNumbers":false,"showMiniMap":false},"content":"---\n#### S3\n","mode":"markdown"},"panels":[],"pluginVersion":"11.4.0-77765","targets":[],"title":"","transparent":true,"type":"text"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"description":"","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":25,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"normal"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null}]},"unit":"none"},"overrides":[]},"gridPos":{"h":7,"w":11,"x":2,"y":1021},"id":63,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77765","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"sum by (status_code, operation) (rate(loki_s3_request_duration_seconds_count{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-gateway\"} [$__rate_interval]))","instant":false,"legendFormat":"{{operation}} {{status_code}}","range":true,"refId":"A"}],"title":"QPS","type":"timeseries"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"description":"","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":25,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"normal"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null}]},"unit":"none"},"overrides":[]},"gridPos":{"h":7,"w":11,"x":13,"y":1021},"id":64,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77765","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"histogram_quantile(0.99, sum by (operation, le) (rate(loki_s3_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-gateway\"} [$__rate_interval])))","instant":false,"legendFormat":"{{operation}} p99","range":true,"refId":"A"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"histogram_quantile(0.90, sum by (operation, le) (rate(loki_s3_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-gateway\"} [$__rate_interval])))","hide":false,"instant":false,"legendFormat":"{{operation}} p90","range":true,"refId":"B"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"histogram_quantile(0.50, sum by (operation, le) (rate(loki_s3_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-gateway\"} [$__rate_interval])))","hide":false,"instant":false,"legendFormat":"{{operation}} p50","range":true,"refId":"C"}],"title":"Latency","type":"timeseries"},{"description":"","fieldConfig":{"defaults":{},"overrides":[]},"gridPos":{"h":7,"w":2,"x":0,"y":1028},"id":65,"options":{"code":{"language":"plaintext","showLineNumbers":false,"showMiniMap":false},"content":"---\n#### Azure\nBlob Storage\n\n","mode":"markdown"},"panels":[],"pluginVersion":"11.4.0-77765","targets":[],"title":"","transparent":true,"type":"text"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"description":"","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":25,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"normal"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null}]},"unit":"none"},"overrides":[]},"gridPos":{"h":7,"w":11,"x":2,"y":1028},"id":66,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77765","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"sum by (status_code, operation) (rate(loki_azure_blob_request_duration_seconds_count{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-gateway\"} [$__rate_interval]))","instant":false,"legendFormat":"{{operation}} {{status_code}}","range":true,"refId":"A"}],"title":"QPS","type":"timeseries"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"description":"","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":25,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"normal"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null}]},"unit":"none"},"overrides":[]},"gridPos":{"h":7,"w":11,"x":13,"y":1028},"id":67,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"maxHeight":600,"mode":"single","sort":"none"}},"panels":[],"pluginVersion":"11.4.0-77765","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"histogram_quantile(0.99, sum by (operation, le) (rate(loki_azure_blob_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-gateway\"} [$__rate_interval])))","instant":false,"legendFormat":"{{operation}} p99","range":true,"refId":"A"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"histogram_quantile(0.90, sum by (operation, le) (rate(loki_azure_blob_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-gateway\"} [$__rate_interval])))","hide":false,"instant":false,"legendFormat":"{{operation}} p90","range":true,"refId":"B"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"histogram_quantile(0.50, sum by (operation, le) (rate(loki_azure_blob_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-gateway\"} [$__rate_interval])))","hide":false,"instant":false,"legendFormat":"{{operation}} p50","range":true,"refId":"C"}],"title":"Latency","type":"timeseries"}],"targets":[],"title":"Object Store","type":"row"},{"collapsed":true,"gridPos":{"h":1,"w":24,"x":0,"y":27},"id":77,"panels":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"fieldConfig":{"defaults":{"custom":{"hideFrom":{"legend":false,"tooltip":false,"viz":false},"scaleDistribution":{"type":"linear"}}},"overrides":[]},"gridPos":{"h":8,"w":12,"x":0,"y":1044},"id":80,"options":{"calculate":false,"cellGap":1,"color":{"exponent":0.5,"fill":"dark-orange","mode":"scheme","reverse":false,"scale":"exponential","scheme":"RdYlGn","steps":64},"exemplars":{"color":"rgba(255,0,255,0.7)"},"filterValues":{"le":1e-09},"legend":{"show":true},"rowsFrame":{"layout":"auto"},"tooltip":{"mode":"single","showColorScale":false,"yHistogram":false},"yAxis":{"axisPlacement":"left","reverse":false}},"panels":[],"pluginVersion":"11.4.0-77765","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","exemplar":false,"expr":"increase(loki_bloom_gateway_dequeue_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-gateway\"}[$__rate_interval])","format":"heatmap","instant":false,"legendFormat":"__auto","range":true,"refId":"A"}],"title":"Dequeue duration","type":"heatmap"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"fieldConfig":{"defaults":{"custom":{"hideFrom":{"legend":false,"tooltip":false,"viz":false},"scaleDistribution":{"type":"linear"}}},"overrides":[]},"gridPos":{"h":8,"w":12,"x":12,"y":1044},"id":106,"options":{"calculate":false,"cellGap":1,"color":{"exponent":0.5,"fill":"dark-orange","mode":"scheme","reverse":false,"scale":"exponential","scheme":"RdYlGn","steps":64},"exemplars":{"color":"rgba(255,0,255,0.7)"},"filterValues":{"le":1e-09},"legend":{"show":true},"rowsFrame":{"layout":"auto"},"tooltip":{"mode":"single","showColorScale":false,"yHistogram":false},"yAxis":{"axisPlacement":"left","reverse":false}},"panels":[],"pluginVersion":"11.4.0-77765","targets":[{"datasource":{"type":"prometheus","uid":"${datasource}"},"editorMode":"code","expr":"increase(loki_bloom_gateway_tasks_dequeued_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=\"$namespace/bloom-gateway\"}[$__rate_interval])","format":"heatmap","hide":false,"instant":false,"legendFormat":"__auto","range":true,"refId":"B"}],"title":"Dequeue count","type":"heatmap"}],"targets":[],"title":"Misc","type":"row"}],"preload":false,"refresh":"10s","rows":[],"schemaVersion":14,"style":"dark","tags":["loki"],"templating":{"list":[{"current":{"text":"default","value":"default"},"hide":0,"label":"Data source","name":"datasource","options":[],"query":"prometheus","refresh":1,"regex":"","type":"datasource"},`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`{"allValue":null,"current":{"text":"prod","value":"prod"},"datasource":"$datasource","hide":0,"includeAll":false,"label":"cluster","multi":false,"name":"cluster","options":[],"query":"label_values(loki_build_info, cluster)","refresh":1,"regex":"","sort":2,"tagValuesQuery":"","tags":[],"tagsQuery":"","type":"query","useTags":false},`}}{{ end }}{{`{"current":{"text":"prod","value":"prod"},"datasource":"$datasource","hide":0,"includeAll":false,"label":"`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`","multi":false,"name":"`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`","options":[],"query":"label_values(loki_build_info, `}}{{ $.Values.monitoring.appInstanceLabelName }}{{`)","refresh":1,"regex":"","sort":2,"tagValuesQuery":"","tags":[],"tagsQuery":"","type":"query","useTags":false},{"allValue":null,"current":{"text":"prod","value":"prod"},"datasource":"$datasource","hide":0,"includeAll":false,"label":"namespace","multi":false,"name":"namespace","options":[],"query":"label_values(loki_build_info{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\"}, namespace)","refresh":1,"regex":"","sort":2,"tagValuesQuery":"","tags":[],"tagsQuery":"","type":"query","useTags":false},{"hide":0,"label":null,"name":"loki_datasource","options":[],"query":"loki","refresh":1,"regex":"","type":"datasource"}]},"time":{"from":"now-1h","to":"now"},"timepicker":{"refresh_intervals":["5s","10s","30s","1m","5m","15m","30m","1h","2h","1d"],"time_options":["5m","15m","1h","6h","12h","24h","2d","7d","30d"]},"timezone": "`}}{{ .Values.monitoring.dashboards.defaultDashboardsTimezone }}{{`","title":"Loki / Bloom Gateway","uid":"bloom-gateway","version":0,"weekStart":""}`}} +{{- end }} +--- +{{- if and .Values.monitoring.dashboards.enabled .Values.monitoring.dashboards.grafanaOperator.enabled (dig "loki-bloom-gateway" "enabled" true .Values.monitoring.dashboards) }} +apiVersion: grafana.integreatly.org/v1beta1 +kind: GrafanaDashboard +metadata: + name: {{ include "loki.resourceName" (dict "ctx" $ "component" "dashboards" "suffix" "loki-bloom-gateway") }} + namespace: {{ .Values.monitoring.namespace | default (include "loki.namespace" $) }} + {{- with (mergeOverwrite dict .Values.monitoring.dashboards.annotations .Values.monitoring.dashboards.grafanaOperator.annotations) }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} + labels: + {{- include "loki.labels" $ | nindent 4 }} + {{- with (mergeOverwrite dict .Values.monitoring.dashboards.labels .Values.monitoring.dashboards.grafanaOperator.labels) }} + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + allowCrossNamespaceImport: true + resyncPeriod: {{ .Values.monitoring.dashboards.grafanaOperator.resyncPeriod | default "10m" | quote }} + {{- include "loki.grafana.operator.folder" $ | nindent 2 }} + instanceSelector: + {{- toYaml .Values.monitoring.dashboards.grafanaOperator.instanceSelector | nindent 4 }} + configMapRef: + name: {{ include "loki.resourceName" (dict "ctx" $ "component" "dashboards" "suffix" "loki-bloom-gateway") }} + key: loki-bloom-gateway.json +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/monitoring/dashboards/loki-chunks.yaml b/packs/loki-3.7.4/charts/loki/templates/monitoring/dashboards/loki-chunks.yaml new file mode 100644 index 00000000..3ca78e68 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/monitoring/dashboards/loki-chunks.yaml @@ -0,0 +1,50 @@ +{{- /* +Generated from 'loki-chunks' from https://github.com/grafana/loki.git +Do not change in-place! In order to change this file first read following link: +https://github.com/grafana-community/helm-charts/tree/main/charts/loki/hack +*/ -}} +{{- if and .Values.monitoring.dashboards.enabled (dig "loki-chunks" "enabled" true .Values.monitoring.dashboards) }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "loki.resourceName" (dict "ctx" $ "component" "dashboards" "suffix" "loki-chunks") }} + namespace: {{ .Values.monitoring.namespace | default (include "loki.namespace" $) }} + labels: + {{- include "loki.labels" $ | nindent 4 }} + {{- with .Values.monitoring.dashboards.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.monitoring.dashboards.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +data: + loki-chunks.json: |- + {{`{"annotations":{"list":[]},"editable":`}}{{ .Values.monitoring.dashboards.defaultDashboardsEditable }}{{`,"gnetId":null,"graphTooltip":0,"hideControls":false,"links":[{"asDropdown":true,"icon":"external link","includeVars":true,"keepTime":true,"tags":["loki"],"targetBlank":false,"title":"Loki Dashboards","type":"dashboards"}],"refresh":"10s","rows":[{"collapse":false,"height":"250px","panels":[{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"short"},"overrides":[]},"id":1,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":6,"targets":[{"expr":"sum(loki_ingester_memory_chunks{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"$namespace/(.*ingester.*|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"})","format":"time_series","legendFormat":"series","legendLink":null}],"title":"Series","type":"timeseries"},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"short"},"overrides":[]},"id":2,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":6,"targets":[{"expr":"sum(loki_ingester_memory_chunks{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"$namespace/(.*ingester.*|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"}) / sum(loki_ingester_memory_streams{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"$namespace/(.*ingester.*|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"})","format":"time_series","legendFormat":"chunks","legendLink":null}],"title":"Chunks per series","type":"timeseries"}],"repeat":null,"repeatIteration":null,"repeatRowId":null,"showTitle":true,"title":"Active Series / Chunks","titleSize":"h6"},{"collapse":false,"height":"250px","panels":[{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"percentunit"},"overrides":[]},"id":3,"links":[],"nullPointMode":"null as zero","options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":6,"targets":[{"expr":"histogram_quantile(0.99, sum(rate(loki_ingester_chunk_utilization_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"$namespace/(.*ingester.*|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"}[$__rate_interval])) by (le)) * 1","format":"time_series","legendFormat":"99th Percentile","refId":"A"},{"expr":"histogram_quantile(0.50, sum(rate(loki_ingester_chunk_utilization_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"$namespace/(.*ingester.*|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"}[$__rate_interval])) by (le)) * 1","format":"time_series","legendFormat":"50th Percentile","refId":"B"},{"expr":"sum(rate(loki_ingester_chunk_utilization_sum{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"$namespace/(.*ingester.*|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"}[$__rate_interval])) * 1 / sum(rate(loki_ingester_chunk_utilization_count{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"$namespace/(.*ingester.*|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"}[$__rate_interval]))","format":"time_series","legendFormat":"Average","refId":"C"}],"title":"Utilization","type":"timeseries","yaxes":[{"format":"ms","label":null,"logBase":1,"max":null,"min":0,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":false}]},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"short"},"overrides":[]},"id":4,"links":[],"nullPointMode":"null as zero","options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":6,"targets":[{"expr":"histogram_quantile(0.99, sum(rate(loki_ingester_chunk_age_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"$namespace/(.*ingester.*|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"}[$__rate_interval])) by (le)) * 1e3","format":"time_series","legendFormat":"99th Percentile","refId":"A"},{"expr":"histogram_quantile(0.50, sum(rate(loki_ingester_chunk_age_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"$namespace/(.*ingester.*|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"}[$__rate_interval])) by (le)) * 1e3","format":"time_series","legendFormat":"50th Percentile","refId":"B"},{"expr":"sum(rate(loki_ingester_chunk_age_seconds_sum{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"$namespace/(.*ingester.*|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"}[$__rate_interval])) * 1e3 / sum(rate(loki_ingester_chunk_age_seconds_count{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"$namespace/(.*ingester.*|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"}[$__rate_interval]))","format":"time_series","legendFormat":"Average","refId":"C"}],"title":"Age","type":"timeseries","yaxes":[{"format":"ms","label":null,"logBase":1,"max":null,"min":0,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":false}]}],"repeat":null,"repeatIteration":null,"repeatRowId":null,"showTitle":true,"title":"Flush Stats","titleSize":"h6"},{"collapse":false,"height":"250px","panels":[{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"short"},"overrides":[]},"id":5,"links":[],"nullPointMode":"null as zero","options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":6,"targets":[{"expr":"histogram_quantile(0.99, sum(rate(loki_ingester_chunk_entries_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"$namespace/(.*ingester.*|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"}[$__rate_interval])) by (le)) * 1","format":"time_series","legendFormat":"99th Percentile","refId":"A"},{"expr":"histogram_quantile(0.50, sum(rate(loki_ingester_chunk_entries_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"$namespace/(.*ingester.*|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"}[$__rate_interval])) by (le)) * 1","format":"time_series","legendFormat":"50th Percentile","refId":"B"},{"expr":"sum(rate(loki_ingester_chunk_entries_sum{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"$namespace/(.*ingester.*|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"}[$__rate_interval])) * 1 / sum(rate(loki_ingester_chunk_entries_count{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"$namespace/(.*ingester.*|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"}[$__rate_interval]))","format":"time_series","legendFormat":"Average","refId":"C"}],"title":"Log Entries Per Chunk","type":"timeseries","yaxes":[{"format":"ms","label":null,"logBase":1,"max":null,"min":0,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":false}]},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"short"},"overrides":[]},"id":6,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":6,"targets":[{"expr":"sum(rate(loki_chunk_store_index_entries_per_chunk_sum{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"$namespace/(.*ingester.*|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"}[$__rate_interval])) / sum(rate(loki_chunk_store_index_entries_per_chunk_count{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"$namespace/(.*ingester.*|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"}[$__rate_interval]))","format":"time_series","legendFormat":"Index Entries","legendLink":null}],"title":"Index Entries Per Chunk","type":"timeseries"}],"repeat":null,"repeatIteration":null,"repeatRowId":null,"showTitle":true,"title":"Flush Stats","titleSize":"h6"},{"collapse":false,"height":"250px","panels":[{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"short"},"overrides":[]},"id":7,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":6,"targets":[{"expr":"loki_ingester_flush_queue_length{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"$namespace/(.*ingester.*|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"} or cortex_ingester_flush_queue_length{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"$namespace/(.*ingester.*|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"}","format":"time_series","legendFormat":"{{pod}}","legendLink":null}],"title":"Queue Length","type":"timeseries"},{"aliasColors":{"1xx":"#EAB839","2xx":"#7EB26D","3xx":"#6ED0E0","4xx":"#EF843C","5xx":"#E24D42","OK":"#7EB26D","cancel":"#A9A9A9","error":"#E24D42","success":"#7EB26D"},"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":100,"lineWidth":0,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"normal"}},"min":0,"thresholds":{"mode":"absolute","steps":[]},"unit":"short"},"overrides":[{"matcher":{"id":"byName","options":"1xx"},"properties":[{"id":"color","value":{"fixedColor":"#EAB839","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"2xx"},"properties":[{"id":"color","value":{"fixedColor":"#7EB26D","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"3xx"},"properties":[{"id":"color","value":{"fixedColor":"#6ED0E0","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"4xx"},"properties":[{"id":"color","value":{"fixedColor":"#EF843C","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"5xx"},"properties":[{"id":"color","value":{"fixedColor":"#E24D42","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"OK"},"properties":[{"id":"color","value":{"fixedColor":"#7EB26D","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"cancel"},"properties":[{"id":"color","value":{"fixedColor":"#A9A9A9","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"error"},"properties":[{"id":"color","value":{"fixedColor":"#E24D42","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"success"},"properties":[{"id":"color","value":{"fixedColor":"#7EB26D","mode":"fixed"}}]}]},"fill":10,"id":8,"linewidth":0,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":6,"stack":true,"targets":[{"expr":"sum by (status) (\n label_replace(label_replace(rate(loki_ingester_chunk_age_seconds_count{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"$namespace/(.*ingester.*|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"}[$__rate_interval]),\n \"status\", \"${1}xx\", \"status_code\", \"([0-9])..\"),\n \"status\", \"${1}\", \"status_code\", \"([a-zA-Z]+)\"))\n","format":"time_series","legendFormat":"{{status}}","refId":"A"}],"title":"Flush Rate","type":"timeseries"}],"repeat":null,"repeatIteration":null,"repeatRowId":null,"showTitle":true,"title":"Flush Stats","titleSize":"h6"},{"collapse":false,"height":"250px","panels":[{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"short"},"overrides":[]},"id":9,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":6,"targets":[{"expr":"sum(rate(loki_ingester_chunks_flushed_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"$namespace/(.*ingester.*|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"}[$__rate_interval]))","format":"time_series","legendFormat":"{{pod}}","legendLink":null}],"title":"Chunks Flushed/Second","type":"timeseries"},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"short"},"overrides":[]},"id":10,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":6,"stack":true,"targets":[{"expr":"sum by (reason) (rate(loki_ingester_chunks_flushed_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"$namespace/(.*ingester.*|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"}[$__rate_interval])) / ignoring(reason) group_left sum(rate(loki_ingester_chunks_flushed_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"$namespace/(.*ingester.*|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"}[$__rate_interval]))","format":"time_series","legendFormat":"{{reason}}","legendLink":null}],"title":"Chunk Flush Reason","type":"timeseries","yaxes":[{"format":"short","label":null,"logBase":1,"max":1,"min":0,"show":true},{"format":"short","label":null,"logBase":1,"max":1,"min":null,"show":false}]}],"repeat":null,"repeatIteration":null,"repeatRowId":null,"showTitle":true,"title":"Flush Stats","titleSize":"h6"},{"collapse":false,"height":"250px","panels":[{"cards":{"cardPadding":null,"cardRound":null},"color":{"cardColor":"#b4ff00","colorScale":"sqrt","colorScheme":"interpolateSpectral","exponent":0.5,"mode":"spectrum"},"dataFormat":"tsbuckets","datasource":"$datasource","heatmap":{},"hideZeroBuckets":false,"highlightCards":true,"id":11,"legend":{"show":true},"span":12,"targets":[{"expr":"sum by (le) (rate(loki_ingester_chunk_utilization_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"$namespace/(.*ingester.*|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"}[$__rate_interval]))","format":"heatmap","intervalFactor":2,"legendFormat":"{{le}}","refId":"A"}],"title":"Chunk Utilization","tooltip":{"show":true,"showHistogram":true},"type":"heatmap","xAxis":{"show":true},"xBucketNumber":null,"xBucketSize":null,"yAxis":{"decimals":0,"format":"percentunit","show":true,"splitFactor":null},"yBucketBound":"auto"}],"repeat":null,"repeatIteration":null,"repeatRowId":null,"showTitle":true,"title":"Utilization","titleSize":"h6"},{"collapse":false,"height":"250px","panels":[{"cards":{"cardPadding":null,"cardRound":null},"color":{"cardColor":"#b4ff00","colorScale":"sqrt","colorScheme":"interpolateSpectral","exponent":0.5,"mode":"spectrum"},"dataFormat":"tsbuckets","datasource":"$datasource","heatmap":{},"hideZeroBuckets":false,"highlightCards":true,"id":12,"legend":{"show":true},"span":12,"targets":[{"expr":"sum(rate(loki_ingester_chunk_size_bytes_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"$namespace/(.*ingester.*|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"}[$__rate_interval])) by (le)","format":"heatmap","intervalFactor":2,"legendFormat":"{{le}}","refId":"A"}],"title":"Chunk Size Bytes","tooltip":{"show":true,"showHistogram":true},"type":"heatmap","xAxis":{"show":true},"xBucketNumber":null,"xBucketSize":null,"yAxis":{"decimals":0,"format":"bytes","show":true,"splitFactor":null},"yBucketBound":"auto"}],"repeat":null,"repeatIteration":null,"repeatRowId":null,"showTitle":true,"title":"Utilization","titleSize":"h6"},{"collapse":false,"height":"250px","panels":[{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"bytes"},"overrides":[]},"id":13,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":12,"targets":[{"expr":"histogram_quantile(0.99, sum(rate(loki_ingester_chunk_size_bytes_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"$namespace/(.*ingester.*|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"}[$__rate_interval])) by (le))","format":"time_series","legendFormat":"p99","legendLink":null},{"expr":"histogram_quantile(0.90, sum(rate(loki_ingester_chunk_size_bytes_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"$namespace/(.*ingester.*|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"}[$__rate_interval])) by (le))","format":"time_series","legendFormat":"p90","legendLink":null},{"expr":"histogram_quantile(0.50, sum(rate(loki_ingester_chunk_size_bytes_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"$namespace/(.*ingester.*|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"}[$__rate_interval])) by (le))","format":"time_series","legendFormat":"p50","legendLink":null}],"title":"Chunk Size Quantiles","type":"timeseries"}],"repeat":null,"repeatIteration":null,"repeatRowId":null,"showTitle":true,"title":"Utilization","titleSize":"h6"},{"collapse":false,"height":"250px","panels":[{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"short"},"overrides":[]},"id":14,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":12,"targets":[{"expr":"histogram_quantile(0.5, sum(rate(loki_ingester_chunk_bounds_hours_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"$namespace/(.*ingester.*|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"}[$__rate_interval])) by (le))","format":"time_series","legendFormat":"p50","legendLink":null},{"expr":"histogram_quantile(0.99, sum(rate(loki_ingester_chunk_bounds_hours_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"$namespace/(.*ingester.*|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"}[$__rate_interval])) by (le))","format":"time_series","legendFormat":"p99","legendLink":null},{"expr":"sum(rate(loki_ingester_chunk_bounds_hours_sum{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"$namespace/(.*ingester.*|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"}[$__rate_interval])) / sum(rate(loki_ingester_chunk_bounds_hours_count{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"$namespace/(.*ingester.*|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"}[$__rate_interval]))","format":"time_series","legendFormat":"avg","legendLink":null}],"title":"Chunk Duration hours (end-start)","type":"timeseries"}],"repeat":null,"repeatIteration":null,"repeatRowId":null,"showTitle":true,"title":"Duration","titleSize":"h6"}],"schemaVersion":14,"style":"dark","tags":["loki"],"templating":{"list":[{"current":{"text":"default","value":"default"},"hide":0,"label":"Data source","name":"datasource","options":[],"query":"prometheus","refresh":1,"regex":"","type":"datasource"},`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`{"allValue":null,"current":{"text":"prod","value":"prod"},"datasource":"$datasource","hide":0,"includeAll":false,"label":"cluster","multi":false,"name":"cluster","options":[],"query":"label_values(loki_build_info, cluster)","refresh":1,"regex":"","sort":2,"tagValuesQuery":"","tags":[],"tagsQuery":"","type":"query","useTags":false},`}}{{ end }}{{`{"current":{"text":"prod","value":"prod"},"datasource":"$datasource","hide":0,"includeAll":false,"label":"`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`","multi":false,"name":"`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`","options":[],"query":"label_values(loki_build_info, `}}{{ $.Values.monitoring.appInstanceLabelName }}{{`)","refresh":1,"regex":"","sort":2,"tagValuesQuery":"","tags":[],"tagsQuery":"","type":"query","useTags":false},{"allValue":null,"current":{"text":"prod","value":"prod"},"datasource":"$datasource","hide":0,"includeAll":false,"label":"namespace","multi":false,"name":"namespace","options":[],"query":"label_values(loki_build_info{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\"}, namespace)","refresh":1,"regex":"","sort":2,"tagValuesQuery":"","tags":[],"tagsQuery":"","type":"query","useTags":false}]},"time":{"from":"now-1h","to":"now"},"timepicker":{"refresh_intervals":["5s","10s","30s","1m","5m","15m","30m","1h","2h","1d"],"time_options":["5m","15m","1h","6h","12h","24h","2d","7d","30d"]},"timezone": "`}}{{ .Values.monitoring.dashboards.defaultDashboardsTimezone }}{{`","title":"Loki / Chunks","uid":"chunks","version":0}`}} +{{- end }} +--- +{{- if and .Values.monitoring.dashboards.enabled .Values.monitoring.dashboards.grafanaOperator.enabled (dig "loki-chunks" "enabled" true .Values.monitoring.dashboards) }} +apiVersion: grafana.integreatly.org/v1beta1 +kind: GrafanaDashboard +metadata: + name: {{ include "loki.resourceName" (dict "ctx" $ "component" "dashboards" "suffix" "loki-chunks") }} + namespace: {{ .Values.monitoring.namespace | default (include "loki.namespace" $) }} + {{- with (mergeOverwrite dict .Values.monitoring.dashboards.annotations .Values.monitoring.dashboards.grafanaOperator.annotations) }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} + labels: + {{- include "loki.labels" $ | nindent 4 }} + {{- with (mergeOverwrite dict .Values.monitoring.dashboards.labels .Values.monitoring.dashboards.grafanaOperator.labels) }} + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + allowCrossNamespaceImport: true + resyncPeriod: {{ .Values.monitoring.dashboards.grafanaOperator.resyncPeriod | default "10m" | quote }} + {{- include "loki.grafana.operator.folder" $ | nindent 2 }} + instanceSelector: + {{- toYaml .Values.monitoring.dashboards.grafanaOperator.instanceSelector | nindent 4 }} + configMapRef: + name: {{ include "loki.resourceName" (dict "ctx" $ "component" "dashboards" "suffix" "loki-chunks") }} + key: loki-chunks.json +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/monitoring/dashboards/loki-deletion.yaml b/packs/loki-3.7.4/charts/loki/templates/monitoring/dashboards/loki-deletion.yaml new file mode 100644 index 00000000..abc4352a --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/monitoring/dashboards/loki-deletion.yaml @@ -0,0 +1,50 @@ +{{- /* +Generated from 'loki-deletion' from https://github.com/grafana/loki.git +Do not change in-place! In order to change this file first read following link: +https://github.com/grafana-community/helm-charts/tree/main/charts/loki/hack +*/ -}} +{{- if and .Values.monitoring.dashboards.enabled (dig "loki-deletion" "enabled" true .Values.monitoring.dashboards) }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "loki.resourceName" (dict "ctx" $ "component" "dashboards" "suffix" "loki-deletion") }} + namespace: {{ .Values.monitoring.namespace | default (include "loki.namespace" $) }} + labels: + {{- include "loki.labels" $ | nindent 4 }} + {{- with .Values.monitoring.dashboards.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.monitoring.dashboards.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +data: + loki-deletion.json: |- + {{`{"annotations":{"list":[]},"editable":`}}{{ .Values.monitoring.dashboards.defaultDashboardsEditable }}{{`,"gnetId":null,"graphTooltip":0,"hideControls":false,"links":[{"asDropdown":true,"icon":"external link","includeVars":true,"keepTime":true,"tags":["loki"],"targetBlank":false,"title":"Loki Dashboards","type":"dashboards"}],"refresh":"10s","rows":[{"collapse":false,"height":"100px","panels":[{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":1,"format":"none","id":1,"legend":{"avg":false,"current":false,"max":false,"min":false,"show":true,"total":false,"values":false},"lines":true,"linewidth":1,"links":[],"nullPointMode":"null as zero","percentage":false,"pointradius":5,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"span":6,"stack":false,"steppedLine":false,"targets":[{"expr":"sum(loki_compactor_pending_delete_requests_count{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\"})","format":"time_series","instant":true,"refId":"A"}],"thresholds":"70,80","timeFrom":null,"timeShift":null,"title":"Number of Pending Requests","tooltip":{"shared":true,"sort":2,"value_type":"individual"},"type":"singlestat","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"short","label":null,"logBase":1,"max":null,"min":0,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":false}]},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":1,"format":"dtdurations","id":2,"legend":{"avg":false,"current":false,"max":false,"min":false,"show":true,"total":false,"values":false},"lines":true,"linewidth":1,"links":[],"nullPointMode":"null as zero","percentage":false,"pointradius":5,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"span":6,"stack":false,"steppedLine":false,"targets":[{"expr":"max(loki_compactor_oldest_pending_delete_request_age_seconds{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\"})","format":"time_series","instant":true,"refId":"A"}],"thresholds":"70,80","timeFrom":null,"timeShift":null,"title":"Oldest Pending Request Age","tooltip":{"shared":true,"sort":2,"value_type":"individual"},"type":"singlestat","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"short","label":null,"logBase":1,"max":null,"min":0,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":false}]}],"repeat":null,"repeatIteration":null,"repeatRowId":null,"showTitle":false,"title":"Headlines","titleSize":"h6"},{"collapse":false,"height":"250px","panels":[{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"short"},"overrides":[]},"id":3,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":4,"targets":[{"expr":"(loki_compactor_delete_requests_received_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\"} or on() vector(0)) - on () (loki_compactor_delete_requests_processed_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\"} or on () vector(0))","format":"time_series","legendFormat":"in progress","legendLink":null}],"title":"# of Delete Requests (received - processed) ","type":"timeseries"},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"short"},"overrides":[]},"id":4,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":4,"targets":[{"expr":"sum(increase(loki_compactor_delete_requests_received_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\"}[1d]))","format":"time_series","legendFormat":"received","legendLink":null}],"title":"Delete Requests Received / Day","type":"timeseries"},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"short"},"overrides":[]},"id":5,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":4,"targets":[{"expr":"sum(increase(loki_compactor_delete_requests_processed_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\"}[1d]))","format":"time_series","legendFormat":"processed","legendLink":null}],"title":"Delete Requests Processed / Day","type":"timeseries"}],"repeat":null,"repeatIteration":null,"repeatRowId":null,"showTitle":true,"title":"Churn","titleSize":"h6"},{"collapse":false,"height":"250px","panels":[{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"short"},"overrides":[]},"id":6,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":4,"targets":[{"expr":"node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", pod=~\"(.*compactor.*|.*-backend.*|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"}","format":"time_series","legendFormat":"{{pod}}","legendLink":null}],"title":"Compactor CPU usage","type":"timeseries"},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"short"},"overrides":[]},"id":7,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":4,"targets":[{"expr":"go_memstats_heap_inuse_bytes{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", pod=~\"(.*compactor.*|.*-backend.*|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"} / 1024 / 1024 ","format":"time_series","legendFormat":" {{pod}} ","legendLink":null}],"title":"Compactor memory usage (MiB)","type":"timeseries"},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"short"},"overrides":[]},"id":8,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":4,"targets":[{"expr":"loki_boltdb_shipper_compact_tables_operation_duration_seconds{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\"}","format":"time_series","legendFormat":"{{pod}}","legendLink":null}],"title":"Compaction run duration (seconds)","type":"timeseries"}],"repeat":null,"repeatIteration":null,"repeatRowId":null,"showTitle":true,"title":"Compactor","titleSize":"h6"},{"collapse":false,"height":"250px","panels":[{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"short"},"overrides":[]},"id":9,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":6,"targets":[{"expr":"sum(increase(loki_compactor_load_pending_requests_attempts_total{status=\"fail\", `}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\"}[1h]))","format":"time_series","legendFormat":"failures","legendLink":null}],"title":"Failures in Loading Delete Requests / Hour","type":"timeseries"},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"short"},"overrides":[]},"id":10,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":6,"targets":[{"expr":"sum(rate(loki_compactor_deleted_lines{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", pod=~\"(.*compactor.*|.*-backend.*|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"}[$__rate_interval])) by (user)","format":"time_series","legendFormat":"{{user}}","legendLink":null}],"title":"Lines Deleted / Sec","type":"timeseries"}],"repeat":null,"repeatIteration":null,"repeatRowId":null,"showTitle":true,"title":"Deletion metrics","titleSize":"h6"},{"collapse":false,"height":"250px","panels":[{"datasource":"$loki_datasource","id":11,"span":6,"targets":[{"expr":"{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", pod=~\"(.*compactor.*|.*-backend.*|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"} |~ \"Started processing delete request|delete request for user marked as processed\" | logfmt | line_format \"{{.ts}} user={{.user}} delete_request_id={{.delete_request_id}} msg={{.msg}}\" ","refId":"A"}],"title":"In progress/finished","type":"logs"},{"datasource":"$loki_datasource","id":12,"span":6,"targets":[{"expr":"{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", pod=~\"(.*compactor.*|.*-backend.*|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"} |~ \"delete request for user added\" | logfmt | line_format \"{{.ts}} user={{.user}} query='{{.query}}'\"","refId":"A"}],"title":"Requests","type":"logs"}],"repeat":null,"repeatIteration":null,"repeatRowId":null,"showTitle":true,"title":"List of deletion requests","titleSize":"h6"}],"schemaVersion":14,"style":"dark","tags":["loki"],"templating":{"list":[{"current":{"text":"default","value":"default"},"hide":0,"label":"Data source","name":"datasource","options":[],"query":"prometheus","refresh":1,"regex":"","type":"datasource"},`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`{"allValue":null,"current":{"text":"prod","value":"prod"},"datasource":"$datasource","hide":0,"includeAll":false,"label":"cluster","multi":false,"name":"cluster","options":[],"query":"label_values(loki_build_info, cluster)","refresh":1,"regex":"","sort":2,"tagValuesQuery":"","tags":[],"tagsQuery":"","type":"query","useTags":false},`}}{{ end }}{{`{"current":{"text":"prod","value":"prod"},"datasource":"$datasource","hide":0,"includeAll":false,"label":"`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`","multi":false,"name":"`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`","options":[],"query":"label_values(loki_build_info, `}}{{ $.Values.monitoring.appInstanceLabelName }}{{`)","refresh":1,"regex":"","sort":2,"tagValuesQuery":"","tags":[],"tagsQuery":"","type":"query","useTags":false},{"allValue":null,"current":{"text":"prod","value":"prod"},"datasource":"$datasource","hide":0,"includeAll":false,"label":"namespace","multi":false,"name":"namespace","options":[],"query":"label_values(loki_build_info{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\"}, namespace)","refresh":1,"regex":"","sort":2,"tagValuesQuery":"","tags":[],"tagsQuery":"","type":"query","useTags":false},{"hide":0,"label":null,"name":"loki_datasource","options":[],"query":"loki","refresh":1,"regex":"","type":"datasource"}]},"time":{"from":"now-1h","to":"now"},"timepicker":{"refresh_intervals":["5s","10s","30s","1m","5m","15m","30m","1h","2h","1d"],"time_options":["5m","15m","1h","6h","12h","24h","2d","7d","30d"]},"timezone": "`}}{{ .Values.monitoring.dashboards.defaultDashboardsTimezone }}{{`","title":"Loki / Deletion","uid":"deletion","version":0}`}} +{{- end }} +--- +{{- if and .Values.monitoring.dashboards.enabled .Values.monitoring.dashboards.grafanaOperator.enabled (dig "loki-deletion" "enabled" true .Values.monitoring.dashboards) }} +apiVersion: grafana.integreatly.org/v1beta1 +kind: GrafanaDashboard +metadata: + name: {{ include "loki.resourceName" (dict "ctx" $ "component" "dashboards" "suffix" "loki-deletion") }} + namespace: {{ .Values.monitoring.namespace | default (include "loki.namespace" $) }} + {{- with (mergeOverwrite dict .Values.monitoring.dashboards.annotations .Values.monitoring.dashboards.grafanaOperator.annotations) }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} + labels: + {{- include "loki.labels" $ | nindent 4 }} + {{- with (mergeOverwrite dict .Values.monitoring.dashboards.labels .Values.monitoring.dashboards.grafanaOperator.labels) }} + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + allowCrossNamespaceImport: true + resyncPeriod: {{ .Values.monitoring.dashboards.grafanaOperator.resyncPeriod | default "10m" | quote }} + {{- include "loki.grafana.operator.folder" $ | nindent 2 }} + instanceSelector: + {{- toYaml .Values.monitoring.dashboards.grafanaOperator.instanceSelector | nindent 4 }} + configMapRef: + name: {{ include "loki.resourceName" (dict "ctx" $ "component" "dashboards" "suffix" "loki-deletion") }} + key: loki-deletion.json +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/monitoring/dashboards/loki-logs.yaml b/packs/loki-3.7.4/charts/loki/templates/monitoring/dashboards/loki-logs.yaml new file mode 100644 index 00000000..ef5a4e2f --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/monitoring/dashboards/loki-logs.yaml @@ -0,0 +1,50 @@ +{{- /* +Generated from 'loki-logs' from https://github.com/grafana/loki.git +Do not change in-place! In order to change this file first read following link: +https://github.com/grafana-community/helm-charts/tree/main/charts/loki/hack +*/ -}} +{{- if and .Values.monitoring.dashboards.enabled (dig "loki-logs" "enabled" true .Values.monitoring.dashboards) }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "loki.resourceName" (dict "ctx" $ "component" "dashboards" "suffix" "loki-logs") }} + namespace: {{ .Values.monitoring.namespace | default (include "loki.namespace" $) }} + labels: + {{- include "loki.labels" $ | nindent 4 }} + {{- with .Values.monitoring.dashboards.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.monitoring.dashboards.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +data: + loki-logs.json: |- + {{`{"annotations":{"list":[]},"editable":`}}{{ .Values.monitoring.dashboards.defaultDashboardsEditable }}{{`,"gnetId":null,"graphTooltip":0,"hideControls":false,"iteration":1583185057230,"links":[{"asDropdown":true,"icon":"external link","includeVars":true,"keepTime":true,"tags":["loki"],"targetBlank":false,"title":"Loki Dashboards","type":"dashboards"}],"panels":[{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":1,"fillGradient":0,"gridPos":{"h":4,"w":3,"x":0,"y":0},"hiddenSeries":false,"id":35,"legend":{"avg":false,"current":false,"max":false,"min":false,"show":false,"total":false,"values":false},"lines":true,"linewidth":1,"nullPointMode":"null","options":{"dataLinks":[]},"percentage":false,"pointradius":2,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"stack":false,"steppedLine":false,"targets":[{"expr":"sum by (pod)(go_goroutines{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", container=~\"$container\" })","refId":"A"}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"goroutines","tooltip":{"shared":true,"sort":0,"value_type":"individual"},"type":"timeseries","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}],"yaxis":{"align":false,"alignLevel":null}},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fieldConfig":{"defaults":{"unit":"s"}},"fill":1,"fillGradient":0,"gridPos":{"h":4,"w":3,"x":3,"y":0},"hiddenSeries":false,"id":41,"legend":{"avg":false,"current":false,"max":false,"min":false,"show":false,"total":false,"values":false},"lines":true,"linewidth":1,"nullPointMode":"null","options":{"dataLinks":[]},"percentage":false,"pointradius":2,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"stack":false,"steppedLine":false,"targets":[{"expr":"sum(go_gc_duration_seconds{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", container=~\"$container\"}) by (quantile)","legendFormat":"{{quantile}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"gc duration","tooltip":{"shared":true,"sort":0,"value_type":"individual"},"type":"timeseries","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}],"yaxis":{"align":false,"alignLevel":null}},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":1,"fillGradient":0,"gridPos":{"h":4,"w":3,"x":6,"y":0},"hiddenSeries":false,"id":36,"legend":{"avg":false,"current":false,"max":false,"min":false,"show":false,"total":false,"values":false},"lines":true,"linewidth":1,"nullPointMode":"null","options":{"dataLinks":[]},"percentage":false,"pointradius":2,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"stack":false,"steppedLine":false,"targets":[{"expr":"sum by (pod)(rate(container_cpu_usage_seconds_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", container=~\"$container\"}[$__rate_interval]))","refId":"A"}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"cpu","tooltip":{"shared":true,"sort":0,"value_type":"individual"},"type":"timeseries","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}],"yaxis":{"align":false,"alignLevel":null}},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fieldConfig":{"defaults":{"unit":"bytes"}},"fill":1,"fillGradient":0,"gridPos":{"h":4,"w":3,"x":9,"y":0},"hiddenSeries":false,"id":40,"legend":{"avg":false,"current":false,"max":false,"min":false,"show":false,"total":false,"values":false},"lines":true,"linewidth":1,"nullPointMode":"null","options":{"dataLinks":[]},"percentage":false,"pointradius":2,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"stack":false,"steppedLine":false,"targets":[{"expr":"sum by (pod)(container_memory_working_set_bytes{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", container=~\"$container\"})","refId":"A"}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"working set","tooltip":{"shared":true,"sort":0,"value_type":"individual"},"type":"timeseries","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"bytes","label":null,"logBase":1,"max":null,"min":null,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}],"yaxis":{"align":false,"alignLevel":null}},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fieldConfig":{"defaults":{"unit":"binBps"}},"fill":1,"fillGradient":0,"gridPos":{"h":4,"w":3,"x":12,"y":0},"hiddenSeries":false,"id":38,"legend":{"avg":false,"current":false,"max":false,"min":false,"show":false,"total":false,"values":false},"lines":true,"linewidth":1,"nullPointMode":"null","options":{"dataLinks":[]},"percentage":false,"pointradius":2,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"stack":false,"steppedLine":false,"targets":[{"expr":"sum by (pod)(rate(container_network_transmit_bytes_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", container=~\"$container\"}[$__rate_interval]))","refId":"A"}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"tx","tooltip":{"shared":true,"sort":0,"value_type":"individual"},"type":"timeseries","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"bytes","label":null,"logBase":1,"max":null,"min":null,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}],"yaxis":{"align":false,"alignLevel":null}},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fieldConfig":{"defaults":{"unit":"binBps"}},"fill":1,"fillGradient":0,"gridPos":{"h":4,"w":3,"x":15,"y":0},"hiddenSeries":false,"id":39,"legend":{"avg":false,"current":false,"max":false,"min":false,"show":false,"total":false,"values":false},"lines":true,"linewidth":1,"nullPointMode":"null","options":{"dataLinks":[]},"percentage":false,"pointradius":2,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"stack":false,"steppedLine":false,"targets":[{"expr":"sum by (pod)(rate(container_network_receive_bytes_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\"}[$__rate_interval]))","refId":"A"}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"rx","tooltip":{"shared":true,"sort":0,"value_type":"individual"},"type":"timeseries","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"decbytes","label":null,"logBase":1,"max":null,"min":null,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}],"yaxis":{"align":false,"alignLevel":null}},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":1,"fillGradient":0,"gridPos":{"h":4,"w":3,"x":18,"y":0},"hiddenSeries":false,"id":37,"legend":{"avg":false,"current":false,"max":false,"min":false,"show":false,"total":false,"values":false},"lines":true,"linewidth":1,"nullPointMode":"null","options":{"dataLinks":[]},"percentage":false,"pointradius":2,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"stack":false,"steppedLine":false,"targets":[{"expr":"increase(kube_pod_container_status_last_terminated_reason{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", container=~\"$container\"}[30m]) > 0","legendFormat":"{{reason}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"restarts","tooltip":{"shared":true,"sort":0,"value_type":"individual"},"type":"timeseries","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"bytes","label":null,"logBase":1,"max":null,"min":null,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}],"yaxis":{"align":false,"alignLevel":null}},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fieldConfig":{"defaults":{"unit":"ops"}},"fill":1,"fillGradient":0,"gridPos":{"h":4,"w":3,"x":21,"y":0},"hiddenSeries":false,"id":42,"legend":{"avg":false,"current":false,"max":false,"min":false,"show":false,"total":false,"values":false},"lines":true,"linewidth":1,"nullPointMode":"null","options":{"dataLinks":[]},"percentage":false,"pointradius":2,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"stack":false,"steppedLine":false,"targets":[{"expr":"sum(rate(promtail_custom_bad_words_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", exported_namespace=\"$namespace\", container=~\"$container\"}[$__rate_interval])) by (level)","legendFormat":"{{level}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"bad words","tooltip":{"shared":true,"sort":0,"value_type":"individual"},"type":"timeseries","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"bytes","label":null,"logBase":1,"max":null,"min":null,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}],"yaxis":{"align":false,"alignLevel":null}},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$loki_datasource","fieldConfig":{"defaults":{"unit":"ops"}},"fill":1,"fillGradient":0,"gridPos":{"h":7,"w":24,"x":0,"y":4},"hiddenSeries":false,"id":31,"legend":{"avg":false,"current":false,"max":false,"min":false,"show":false,"total":false,"values":false},"lines":true,"linewidth":1,"nullPointMode":"null","options":{"dataLinks":[]},"percentage":false,"pointradius":2,"points":false,"renderer":"flot","seriesOverrides":[{"alias":"warn","color":"#FF780A"},{"alias":"error","color":"#E02F44"},{"alias":"info","color":"#56A64B"},{"alias":"debug","color":"#3274D9"}],"spaceLength":10,"stack":true,"steppedLine":false,"targets":[{"expr":"sum(rate({`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", container=~\"$container\" } |logfmt| level=~\"$level\" |= \"$filter\" | __error__=\"\" [$__auto])) by (level)","intervalFactor":3,"legendFormat":"{{level}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"Log Rate","tooltip":{"shared":true,"sort":2,"value_type":"individual"},"type":"timeseries","xaxis":{"buckets":null,"mode":"time","name":null,"show":false,"values":[]},"yaxes":[{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":false}],"yaxis":{"align":false,"alignLevel":null}},{"datasource":"$loki_datasource","gridPos":{"h":19,"w":24,"x":0,"y":6},"id":29,"maxDataPoints":"","options":{"showLabels":false,"showTime":true,"sortOrder":"Descending","wrapLogMessage":true},"targets":[{"expr":"{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", container=~\"$container\"} | logfmt | level=~\"$level\" |= \"$filter\"","refId":"A"}],"timeFrom":null,"timeShift":null,"title":"Logs","type":"logs"}],"refresh":"10s","rows":[],"schemaVersion":14,"style":"dark","tags":["loki"],"templating":{"list":[{"current":{"text":"default","value":"default"},"hide":0,"label":"Data source","name":"datasource","options":[],"query":"prometheus","refresh":1,"regex":"","type":"datasource"},`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`{"allValue":null,"current":{"text":"prod","value":"prod"},"datasource":"$datasource","hide":0,"includeAll":false,"label":"cluster","multi":false,"name":"cluster","options":[],"query":"label_values(loki_build_info, cluster)","refresh":1,"regex":"","sort":2,"tagValuesQuery":"","tags":[],"tagsQuery":"","type":"query","useTags":false},`}}{{ end }}{{`{"current":{"text":"prod","value":"prod"},"datasource":"$datasource","hide":0,"includeAll":false,"label":"`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`","multi":false,"name":"`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`","options":[],"query":"label_values(loki_build_info, `}}{{ $.Values.monitoring.appInstanceLabelName }}{{`)","refresh":1,"regex":"","sort":2,"tagValuesQuery":"","tags":[],"tagsQuery":"","type":"query","useTags":false},{"allValue":null,"current":{"text":"prod","value":"prod"},"datasource":"$datasource","hide":0,"includeAll":false,"label":"namespace","multi":false,"name":"namespace","options":[],"query":"label_values(loki_build_info{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\"}, namespace)","refresh":1,"regex":"","sort":2,"tagValuesQuery":"","tags":[],"tagsQuery":"","type":"query","useTags":false},{"hide":0,"label":null,"name":"loki_datasource","options":[],"query":"loki","refresh":1,"regex":"","type":"datasource"},{"allValue":null,"current":{},"datasource":"$datasource","hide":0,"includeAll":false,"label":null,"multi":true,"name":"container","options":[],"query":"label_values(kube_pod_container_info{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\"}, container)","refresh":0,"regex":"","sort":1,"tagValuesQuery":"","tags":[],"tagsQuery":"","type":"query","useTags":false},{"allValue":null,"current":{"selected":true,"text":"","value":""},"hide":0,"includeAll":false,"label":"","multi":true,"name":"level","options":[{"selected":false,"text":"debug","value":"debug"},{"selected":false,"text":"info","value":"info"},{"selected":false,"text":"warn","value":"warn"},{"selected":false,"text":"error","value":"error"}],"query":"debug,info,warn,error","refresh":0,"type":"custom"},{"current":{"selected":false,"text":"","value":""},"label":"LogQL Filter","name":"filter","query":"","type":"textbox"}]},"time":{"from":"now-1h","to":"now"},"timepicker":{"refresh_intervals":["5s","10s","30s","1m","5m","15m","30m","1h","2h","1d"],"time_options":["5m","15m","1h","6h","12h","24h","2d","7d","30d"]},"timezone": "`}}{{ .Values.monitoring.dashboards.defaultDashboardsTimezone }}{{`","title":"Loki / Logs","uid":"logs","version":0}`}} +{{- end }} +--- +{{- if and .Values.monitoring.dashboards.enabled .Values.monitoring.dashboards.grafanaOperator.enabled (dig "loki-logs" "enabled" true .Values.monitoring.dashboards) }} +apiVersion: grafana.integreatly.org/v1beta1 +kind: GrafanaDashboard +metadata: + name: {{ include "loki.resourceName" (dict "ctx" $ "component" "dashboards" "suffix" "loki-logs") }} + namespace: {{ .Values.monitoring.namespace | default (include "loki.namespace" $) }} + {{- with (mergeOverwrite dict .Values.monitoring.dashboards.annotations .Values.monitoring.dashboards.grafanaOperator.annotations) }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} + labels: + {{- include "loki.labels" $ | nindent 4 }} + {{- with (mergeOverwrite dict .Values.monitoring.dashboards.labels .Values.monitoring.dashboards.grafanaOperator.labels) }} + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + allowCrossNamespaceImport: true + resyncPeriod: {{ .Values.monitoring.dashboards.grafanaOperator.resyncPeriod | default "10m" | quote }} + {{- include "loki.grafana.operator.folder" $ | nindent 2 }} + instanceSelector: + {{- toYaml .Values.monitoring.dashboards.grafanaOperator.instanceSelector | nindent 4 }} + configMapRef: + name: {{ include "loki.resourceName" (dict "ctx" $ "component" "dashboards" "suffix" "loki-logs") }} + key: loki-logs.json +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/monitoring/dashboards/loki-mixin-recording-rules.yaml b/packs/loki-3.7.4/charts/loki/templates/monitoring/dashboards/loki-mixin-recording-rules.yaml new file mode 100644 index 00000000..6ab0c6ed --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/monitoring/dashboards/loki-mixin-recording-rules.yaml @@ -0,0 +1,50 @@ +{{- /* +Generated from 'loki-mixin-recording-rules' from https://github.com/grafana/loki.git +Do not change in-place! In order to change this file first read following link: +https://github.com/grafana-community/helm-charts/tree/main/charts/loki/hack +*/ -}} +{{- if and .Values.monitoring.dashboards.enabled (dig "loki-mixin-recording-rules" "enabled" true .Values.monitoring.dashboards) }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "loki.resourceName" (dict "ctx" $ "component" "dashboards" "suffix" "loki-mixin-recording-rules") }} + namespace: {{ .Values.monitoring.namespace | default (include "loki.namespace" $) }} + labels: + {{- include "loki.labels" $ | nindent 4 }} + {{- with .Values.monitoring.dashboards.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.monitoring.dashboards.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +data: + loki-mixin-recording-rules.json: |- + {{`{"annotations":{"list":[]},"editable":`}}{{ .Values.monitoring.dashboards.defaultDashboardsEditable }}{{`,"fiscalYearStartMonth":0,"gnetId":null,"graphTooltip":0,"hideControls":false,"iteration":1635347545534,"links":[{"asDropdown":true,"icon":"external link","includeVars":true,"keepTime":true,"tags":["loki"],"targetBlank":false,"title":"Loki Dashboards","type":"dashboards"}],"liveNow":false,"panels":[{"datasource":"${datasource}","fieldConfig":{"defaults":{"color":{"mode":"thresholds"},"mappings":[],"noValue":"0","thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":1}]}},"overrides":[]},"gridPos":{"h":10,"w":2,"x":0,"y":0},"id":2,"options":{"colorMode":"value","graphMode":"area","justifyMode":"auto","orientation":"auto","reduceOptions":{"calcs":["lastNotNull"],"fields":"","values":false},"textMode":"auto"},"pluginVersion":"8.3.0-38205pre","targets":[{"datasource":"${datasource}","exemplar":false,"expr":"sum(loki_ruler_wal_appender_ready) by (pod, tenant) == 0","instant":true,"interval":"`}}{{ .Values.monitoring.dashboards.defaultDashboardsInterval }}{{`","legendFormat":"","refId":"A"}],"title":"Appenders Not Ready","type":"stat"},{"datasource":"${datasource}","description":"","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisLabel":"","axisPlacement":"auto","barAlignment":0,"drawStyle":"line","fillOpacity":0,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"lineInterpolation":"linear","lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":80}]}},"overrides":[]},"gridPos":{"h":10,"w":11,"x":2,"y":0},"id":4,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom"},"tooltip":{"mode":"single"}},"targets":[{"datasource":"${datasource}","exemplar":true,"expr":"sum(rate(loki_ruler_wal_samples_appended_total{tenant=~\"${tenant}\"}[$__rate_interval])) by (tenant) > 0","interval":"`}}{{ .Values.monitoring.dashboards.defaultDashboardsInterval }}{{`","legendFormat":"{{tenant}}","refId":"A"}],"title":"Samples Appended to WAL per Second","type":"timeseries"},{"datasource":"${datasource}","description":"Series are unique combinations of labels","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisLabel":"","axisPlacement":"auto","barAlignment":0,"drawStyle":"line","fillOpacity":0,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"lineInterpolation":"linear","lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":80}]}},"overrides":[]},"gridPos":{"h":10,"w":11,"x":13,"y":0},"id":5,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom"},"tooltip":{"mode":"single"}},"targets":[{"datasource":"${datasource}","exemplar":true,"expr":"sum(rate(loki_ruler_wal_storage_created_series_total{tenant=~\"${tenant}\"}[$__rate_interval])) by (tenant) > 0","interval":"`}}{{ .Values.monitoring.dashboards.defaultDashboardsInterval }}{{`","legendFormat":"{{tenant}}","refId":"A"}],"title":"Series Created per Second","type":"timeseries"},{"datasource":"${datasource}","description":"Difference between highest timestamp appended to WAL and highest timestamp successfully written to remote storage","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisLabel":"","axisPlacement":"auto","barAlignment":0,"drawStyle":"line","fillOpacity":0,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"lineInterpolation":"linear","lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":80}]},"unit":"s"},"overrides":[]},"gridPos":{"h":10,"w":12,"x":0,"y":10},"id":6,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom"},"tooltip":{"mode":"single"}},"targets":[{"datasource":"${datasource}","exemplar":true,"expr":"loki_ruler_wal_prometheus_remote_storage_highest_timestamp_in_seconds{tenant=~\"${tenant}\"}\n- on (tenant)\n (\n loki_ruler_wal_prometheus_remote_storage_queue_highest_sent_timestamp_seconds{tenant=~\"${tenant}\"}\n or vector(0)\n )","interval":"`}}{{ .Values.monitoring.dashboards.defaultDashboardsInterval }}{{`","legendFormat":"{{tenant}}","refId":"A"}],"title":"Write Behind","type":"timeseries"},{"datasource":"${datasource}","description":"","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisLabel":"","axisPlacement":"auto","barAlignment":0,"drawStyle":"line","fillOpacity":0,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"lineInterpolation":"linear","lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":80}]}},"overrides":[]},"gridPos":{"h":10,"w":12,"x":12,"y":10},"id":7,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom"},"tooltip":{"mode":"single"}},"targets":[{"datasource":"${datasource}","exemplar":true,"expr":"sum(rate(loki_ruler_wal_prometheus_remote_storage_samples_total{tenant=~\"${tenant}\"}[$__rate_interval])) by (tenant) > 0","interval":"`}}{{ .Values.monitoring.dashboards.defaultDashboardsInterval }}{{`","legendFormat":"{{tenant}}","refId":"A"}],"title":"Samples Sent per Second","type":"timeseries"},{"datasource":"${datasource}","description":"\n","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisLabel":"","axisPlacement":"auto","barAlignment":0,"drawStyle":"line","fillOpacity":0,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"lineInterpolation":"linear","lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":80}]},"unit":"bytes"},"overrides":[]},"gridPos":{"h":10,"w":12,"x":0,"y":20},"id":8,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom"},"tooltip":{"mode":"single"}},"targets":[{"datasource":"${datasource}","exemplar":true,"expr":"sum by (tenant) (loki_ruler_wal_disk_size{tenant=~\"${tenant}\"})","interval":"`}}{{ .Values.monitoring.dashboards.defaultDashboardsInterval }}{{`","legendFormat":"{{tenant}}","refId":"A"}],"title":"WAL Disk Size","type":"timeseries"},{"datasource":"${datasource}","description":"Some number of pending samples is expected, but if remote-write is failing this value will remain high","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisLabel":"","axisPlacement":"auto","barAlignment":0,"drawStyle":"line","fillOpacity":0,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"lineInterpolation":"linear","lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":80}]}},"overrides":[]},"gridPos":{"h":10,"w":12,"x":12,"y":20},"id":9,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom"},"tooltip":{"mode":"single"}},"targets":[{"datasource":"${datasource}","exemplar":true,"expr":"max(loki_ruler_wal_prometheus_remote_storage_samples_pending{tenant=~\"${tenant}\"}) by (tenant,pod) > 0","interval":"`}}{{ .Values.monitoring.dashboards.defaultDashboardsInterval }}{{`","legendFormat":"{{tenant}}","refId":"A"}],"title":"Pending Samples","type":"timeseries"}],"refresh":"10s","rows":[],"schemaVersion":14,"style":"dark","tags":["loki"],"templating":{"list":[{"current":{"text":"default","value":"default"},"hide":0,"label":"Data source","name":"datasource","options":[],"query":"prometheus","refresh":1,"regex":"","type":"datasource"},`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`{"allValue":null,"current":{"text":"prod","value":"prod"},"datasource":"$datasource","hide":0,"includeAll":false,"label":"cluster","multi":false,"name":"cluster","options":[],"query":"label_values(loki_build_info, cluster)","refresh":1,"regex":"","sort":2,"tagValuesQuery":"","tags":[],"tagsQuery":"","type":"query","useTags":false},`}}{{ end }}{{`{"current":{"text":"prod","value":"prod"},"datasource":"$datasource","hide":0,"includeAll":false,"label":"`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`","multi":false,"name":"`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`","options":[],"query":"label_values(loki_build_info, `}}{{ $.Values.monitoring.appInstanceLabelName }}{{`)","refresh":1,"regex":"","sort":2,"tagValuesQuery":"","tags":[],"tagsQuery":"","type":"query","useTags":false},{"allValue":null,"current":{"text":"prod","value":"prod"},"datasource":"$datasource","hide":0,"includeAll":false,"label":"namespace","multi":false,"name":"namespace","options":[],"query":"label_values(loki_build_info{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\"}, namespace)","refresh":1,"regex":"","sort":2,"tagValuesQuery":"","tags":[],"tagsQuery":"","type":"query","useTags":false},{"hide":0,"label":null,"name":"loki_datasource","options":[],"query":"loki","refresh":1,"regex":"","type":"datasource"},{"allValue":".+","current":{},"datasource":"$datasource","hide":0,"includeAll":true,"label":null,"multi":false,"name":"tenant","options":[],"query":"query_result(sum by (id) (grafanacloud_logs_instance_info) and sum(label_replace(loki_tenant:active_streams{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\",namespace=\"$namespace\"},\"id\",\"$1\",\"tenant\",\"(.*)\")) by(id))","refresh":0,"regex":"/\"([^\"]+)\"/","sort":1,"tagValuesQuery":"","tags":[],"tagsQuery":"","type":"query","useTags":false}]},"time":{"from":"now-1h","to":"now"},"timepicker":{"refresh_intervals":["5s","10s","30s","1m","5m","15m","30m","1h","2h","1d"],"time_options":["5m","15m","1h","6h","12h","24h","2d","7d","30d"]},"timezone": "`}}{{ .Values.monitoring.dashboards.defaultDashboardsTimezone }}{{`","title":"Loki / Recording Rules","uid":"recording-rules","version":0,"weekStart":""}`}} +{{- end }} +--- +{{- if and .Values.monitoring.dashboards.enabled .Values.monitoring.dashboards.grafanaOperator.enabled (dig "loki-mixin-recording-rules" "enabled" true .Values.monitoring.dashboards) }} +apiVersion: grafana.integreatly.org/v1beta1 +kind: GrafanaDashboard +metadata: + name: {{ include "loki.resourceName" (dict "ctx" $ "component" "dashboards" "suffix" "loki-mixin-recording-rules") }} + namespace: {{ .Values.monitoring.namespace | default (include "loki.namespace" $) }} + {{- with (mergeOverwrite dict .Values.monitoring.dashboards.annotations .Values.monitoring.dashboards.grafanaOperator.annotations) }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} + labels: + {{- include "loki.labels" $ | nindent 4 }} + {{- with (mergeOverwrite dict .Values.monitoring.dashboards.labels .Values.monitoring.dashboards.grafanaOperator.labels) }} + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + allowCrossNamespaceImport: true + resyncPeriod: {{ .Values.monitoring.dashboards.grafanaOperator.resyncPeriod | default "10m" | quote }} + {{- include "loki.grafana.operator.folder" $ | nindent 2 }} + instanceSelector: + {{- toYaml .Values.monitoring.dashboards.grafanaOperator.instanceSelector | nindent 4 }} + configMapRef: + name: {{ include "loki.resourceName" (dict "ctx" $ "component" "dashboards" "suffix" "loki-mixin-recording-rules") }} + key: loki-mixin-recording-rules.json +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/monitoring/dashboards/loki-operational.yaml b/packs/loki-3.7.4/charts/loki/templates/monitoring/dashboards/loki-operational.yaml new file mode 100644 index 00000000..4315fe54 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/monitoring/dashboards/loki-operational.yaml @@ -0,0 +1,50 @@ +{{- /* +Generated from 'loki-operational' from https://github.com/grafana/loki.git +Do not change in-place! In order to change this file first read following link: +https://github.com/grafana-community/helm-charts/tree/main/charts/loki/hack +*/ -}} +{{- if and .Values.monitoring.dashboards.enabled (dig "loki-operational" "enabled" true .Values.monitoring.dashboards) }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "loki.resourceName" (dict "ctx" $ "component" "dashboards" "suffix" "loki-operational") }} + namespace: {{ .Values.monitoring.namespace | default (include "loki.namespace" $) }} + labels: + {{- include "loki.labels" $ | nindent 4 }} + {{- with .Values.monitoring.dashboards.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.monitoring.dashboards.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +data: + loki-operational.json: |- + {{`{"annotations":{"list":[]},"editable":`}}{{ .Values.monitoring.dashboards.defaultDashboardsEditable }}{{`,"gnetId":null,"graphTooltip":0,"hideControls":false,"iteration":1588704280892,"links":[{"asDropdown":true,"icon":"external link","includeVars":true,"keepTime":true,"tags":["loki"],"targetBlank":false,"title":"Loki Dashboards","type":"dashboards"}],"panels":[{"collapsed":false,"datasource":null,"gridPos":{"h":1,"w":24,"x":0,"y":0},"id":17,"panels":[],"targets":[],"title":"Main","type":"row"},{"aliasColors":{"5xx":"red"},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{}},"overrides":[]},"fill":1,"fillGradient":0,"gridPos":{"h":5,"w":4,"x":0,"y":1},"hiddenSeries":false,"id":6,"legend":{"avg":false,"current":false,"max":false,"min":false,"show":true,"total":false,"values":false},"lines":true,"linewidth":1,"nullPointMode":"null","options":{"dataLinks":[]},"panels":[],"percentage":false,"pointradius":2,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"stack":false,"steppedLine":false,"targets":[{"expr":"sum by (status) (\nlabel_replace(\n label_replace(\n rate(loki_request_duration_seconds_count{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"($namespace)/(.*-query-frontend|.*-read|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", route=~\"api_prom_query|api_prom_label|api_prom_label_name_values|loki_api_v1_query|loki_api_v1_query_range|loki_api_v1_label|loki_api_v1_label_name_values\"}[$__rate_interval]),\n \"status\", \"${1}xx\", \"status_code\", \"([0-9])..\"),\n\"status\", \"${1}\", \"status_code\", \"([a-z]+)\")\n)","legendFormat":"{{status}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"Queries/Second","tooltip":{"shared":true,"sort":0,"value_type":"individual"},"type":"timeseries","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"short","label":null,"logBase":10,"max":null,"min":null,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}],"yaxis":{"align":false,"alignLevel":null}},{"aliasColors":{"5xx":"red"},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{}},"overrides":[]},"fill":1,"fillGradient":0,"gridPos":{"h":5,"w":4,"x":4,"y":1},"hiddenSeries":false,"id":7,"legend":{"avg":false,"current":false,"max":false,"min":false,"show":true,"total":false,"values":false},"lines":true,"linewidth":1,"nullPointMode":"null","options":{"dataLinks":[]},"panels":[],"percentage":false,"pointradius":2,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"stack":false,"steppedLine":false,"targets":[{"expr":"sum by (status) (\nlabel_replace(\n label_replace(\n rate(loki_request_duration_seconds_count{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"($namespace)/(.*-distributor|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", route=~\"api_prom_push|loki_api_v1_push|otlp_v1_logs\"}[$__rate_interval]),\n \"status\", \"${1}xx\", \"status_code\", \"([0-9])..\"),\n\"status\", \"${1}\", \"status_code\", \"([a-z]+)\"))","legendFormat":"{{status}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"Pushes/Second","tooltip":{"shared":true,"sort":0,"value_type":"individual"},"type":"timeseries","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"short","label":null,"logBase":10,"max":null,"min":null,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}],"yaxis":{"align":false,"alignLevel":null}},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{}},"overrides":[]},"fill":1,"fillGradient":0,"gridPos":{"h":5,"w":4,"x":12,"y":1},"hiddenSeries":false,"id":2,"interval":"`}}{{ .Values.monitoring.dashboards.defaultDashboardsInterval }}{{`","legend":{"avg":false,"current":false,"max":false,"min":false,"show":false,"total":false,"values":false},"lines":true,"linewidth":1,"nullPointMode":"null","options":{"dataLinks":[]},"panels":[],"percentage":false,"pointradius":2,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"stack":false,"steppedLine":false,"targets":[{"expr":"topk(10, sum(rate(loki_distributor_lines_received_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\"}[$__rate_interval])) by (tenant))","legendFormat":"{{tenant}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"Lines Per Tenant (top 10)","tooltip":{"shared":false,"sort":0,"value_type":"individual"},"type":"timeseries","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}],"yaxis":{"align":false,"alignLevel":null}},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{},"unit":"MBs"},"overrides":[]},"fill":1,"fillGradient":0,"gridPos":{"h":5,"w":4,"x":16,"y":1},"hiddenSeries":false,"id":4,"legend":{"avg":false,"current":false,"hideEmpty":true,"hideZero":true,"max":false,"min":false,"show":false,"total":false,"values":false},"lines":true,"linewidth":1,"nullPointMode":"null","options":{"dataLinks":[]},"panels":[],"percentage":false,"pointradius":2,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"stack":false,"steppedLine":false,"targets":[{"expr":"topk(10, sum(rate(loki_distributor_bytes_received_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\"}[$__rate_interval])) by (tenant)) / 1024 / 1024","legendFormat":"{{tenant}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"MBs Per Tenant (Top 10)","tooltip":{"shared":false,"sort":0,"value_type":"individual"},"type":"timeseries","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}],"yaxis":{"align":false,"alignLevel":null}},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{}},"overrides":[]},"fill":1,"fillGradient":0,"gridPos":{"h":5,"w":4,"x":20,"y":1},"hiddenSeries":false,"id":24,"legend":{"avg":false,"current":false,"max":false,"min":false,"show":false,"total":false,"values":false},"lines":true,"linewidth":1,"nullPointMode":"null","options":{"dataLinks":[]},"panels":[],"percentage":false,"pointradius":2,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"stack":false,"steppedLine":false,"targets":[{"expr":"increase(kube_pod_container_status_restarts_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\"}[10m]) > 0","hide":false,"interval":"`}}{{ .Values.monitoring.dashboards.defaultDashboardsInterval }}{{`","legendFormat":"{{container}}-{{pod}}","refId":"B"}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"Container Restarts","tooltip":{"shared":true,"sort":2,"value_type":"individual"},"type":"timeseries","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}],"yaxis":{"align":false,"alignLevel":null}},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{},"unit":"ms"},"overrides":[]},"fill":1,"fillGradient":0,"gridPos":{"h":10,"w":12,"x":0,"y":6},"hiddenSeries":false,"id":9,"legend":{"alignAsTable":true,"avg":false,"current":false,"max":false,"min":false,"rightSide":true,"show":true,"total":false,"values":false},"lines":true,"linewidth":1,"nullPointMode":"null","options":{"dataLinks":[]},"panels":[],"percentage":false,"pointradius":2,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"stack":false,"steppedLine":false,"targets":[{"expr":"histogram_quantile(0.99, sum by (le) (cluster_job_route:loki_request_duration_seconds_bucket:sum_rate{job=~\"($namespace)/(.*-distributor|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", route=~\"api_prom_push|loki_api_v1_push|otlp_v1_logs\", `}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\"})) * 1e3","legendFormat":".99","refId":"A"},{"expr":"histogram_quantile(0.75, sum by (le) (cluster_job_route:loki_request_duration_seconds_bucket:sum_rate{job=~\"($namespace)/(.*-distributor|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", route=~\"api_prom_push|loki_api_v1_push|otlp_v1_logs\", `}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\"})) * 1e3","legendFormat":".9","refId":"B"},{"expr":"histogram_quantile(0.5, sum by (le) (cluster_job_route:loki_request_duration_seconds_bucket:sum_rate{job=~\"($namespace)/(.*-distributor|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", route=~\"api_prom_push|loki_api_v1_push|otlp_v1_logs\", `}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\"})) * 1e3","legendFormat":".5","refId":"C"}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"Push Latency","tooltip":{"shared":true,"sort":0,"value_type":"individual"},"type":"timeseries","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}],"yaxis":{"align":false,"alignLevel":null}},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{},"unit":"ms"},"overrides":[]},"fill":1,"fillGradient":0,"gridPos":{"h":5,"w":6,"x":12,"y":6},"hiddenSeries":false,"id":12,"legend":{"alignAsTable":true,"avg":false,"current":false,"max":false,"min":false,"rightSide":true,"show":false,"total":false,"values":false},"lines":true,"linewidth":1,"nullPointMode":"null","options":{"dataLinks":[]},"panels":[],"percentage":false,"pointradius":2,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"stack":false,"steppedLine":false,"targets":[{"expr":"histogram_quantile(0.99, sum by (le) (cluster_job:loki_request_duration_seconds_bucket:sum_rate{job=~\"($namespace)/(.*-distributor|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", `}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\"})) * 1e3","legendFormat":".99","refId":"A"},{"expr":"histogram_quantile(0.9, sum by (le) (cluster_job:loki_request_duration_seconds_bucket:sum_rate{job=~\"($namespace)/(.*-distributor|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", `}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\"})) * 1e3","legendFormat":".9","refId":"B"},{"expr":"histogram_quantile(0.5, sum by (le) (cluster_job:loki_request_duration_seconds_bucket:sum_rate{job=~\"($namespace)/(.*-distributor|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", `}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\"})) * 1e3","legendFormat":".5","refId":"C"}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"Distributor Latency","tooltip":{"shared":true,"sort":0,"value_type":"individual"},"type":"timeseries","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}],"yaxis":{"align":false,"alignLevel":null}},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{}},"overrides":[]},"fill":0,"fillGradient":0,"gridPos":{"h":5,"w":6,"x":18,"y":6},"hiddenSeries":false,"id":71,"legend":{"alignAsTable":true,"avg":false,"current":false,"max":false,"min":false,"rightSide":true,"show":false,"total":false,"values":false},"lines":true,"linewidth":1,"nullPointMode":"null","options":{"dataLinks":[]},"panels":[],"percentage":false,"pointradius":2,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"stack":false,"steppedLine":false,"targets":[{"expr":"sum(rate(loki_request_duration_seconds_count{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", job=~\"($namespace)/(.*-distributor|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", status_code!~\"5[0-9]{2}\"}[$__rate_interval])) by (route)\n/\nsum(rate(loki_request_duration_seconds_count{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", job=~\"($namespace)/(.*-distributor|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"}[$__rate_interval])) by (route) > 0","interval":"`}}{{ .Values.monitoring.dashboards.defaultDashboardsInterval }}{{`","legendFormat":"{{route}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"Distributor Success Rate","tooltip":{"shared":true,"sort":0,"value_type":"individual"},"type":"timeseries","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"decimals":null,"format":"percentunit","label":"","logBase":1,"max":"1","min":null,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}],"yaxis":{"align":false,"alignLevel":null}},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{},"unit":"ms"},"overrides":[]},"fill":1,"fillGradient":0,"gridPos":{"h":5,"w":6,"x":12,"y":11},"hiddenSeries":false,"id":13,"legend":{"alignAsTable":true,"avg":false,"current":false,"max":false,"min":false,"rightSide":true,"show":false,"total":false,"values":false},"lines":true,"linewidth":1,"nullPointMode":"null","options":{"dataLinks":[]},"panels":[],"percentage":false,"pointradius":2,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"stack":false,"steppedLine":false,"targets":[{"expr":"histogram_quantile(0.99, sum by (le) (cluster_job_route:loki_request_duration_seconds_bucket:sum_rate{job=~\"($namespace)/(.*-partition-ingester.*|.*-ingester.*|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", route=\"/logproto.Pusher/Push\", `}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\"})) * 1e3","legendFormat":".99","refId":"A"},{"expr":"histogram_quantile(0.9, sum by (le) (cluster_job_route:loki_request_duration_seconds_bucket:sum_rate{job=~\"($namespace)/(.*-partition-ingester.*|.*-ingester.*|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", route=\"/logproto.Pusher/Push\", `}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\"})) * 1e3","hide":false,"legendFormat":".9","refId":"B"},{"expr":"histogram_quantile(0.5, sum by (le) (cluster_job_route:loki_request_duration_seconds_bucket:sum_rate{job=~\"($namespace)/(.*-partition-ingester.*|.*-ingester.*|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", route=\"/logproto.Pusher/Push\", `}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\"})) * 1e3","hide":false,"legendFormat":".5","refId":"C"}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"Ingester Latency Write","tooltip":{"shared":true,"sort":0,"value_type":"individual"},"type":"timeseries","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}],"yaxis":{"align":false,"alignLevel":null}},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{}},"overrides":[]},"fill":0,"fillGradient":0,"gridPos":{"h":5,"w":6,"x":18,"y":11},"hiddenSeries":false,"id":72,"legend":{"alignAsTable":true,"avg":false,"current":false,"max":false,"min":false,"rightSide":true,"show":false,"total":false,"values":false},"lines":true,"linewidth":1,"nullPointMode":"null","options":{"dataLinks":[]},"panels":[],"percentage":false,"pointradius":2,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"stack":false,"steppedLine":false,"targets":[{"expr":"sum(rate(loki_request_duration_seconds_count{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", job=~\"($namespace)/(.*-partition-ingester.*|.*-ingester.*|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", status_code!~\"5[0-9]{2}\", route=\"/logproto.Pusher/Push\"}[$__rate_interval])) by (route)\n/\nsum(rate(loki_request_duration_seconds_count{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", job=~\"($namespace)/(.*-partition-ingester.*|.*-ingester.*|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", route=\"/logproto.Pusher/Push\"}[$__rate_interval])) by (route) > 0","interval":"`}}{{ .Values.monitoring.dashboards.defaultDashboardsInterval }}{{`","legendFormat":"{{route}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"Ingester Success Rate Write","tooltip":{"shared":true,"sort":0,"value_type":"individual"},"type":"timeseries","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"decimals":null,"format":"percentunit","label":"","logBase":1,"max":"1","min":null,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}],"yaxis":{"align":false,"alignLevel":null}},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{},"unit":"ms"},"overrides":[]},"fill":1,"fillGradient":0,"gridPos":{"h":10,"w":12,"x":0,"y":16},"hiddenSeries":false,"id":10,"legend":{"alignAsTable":true,"avg":false,"current":false,"hideEmpty":true,"hideZero":false,"max":false,"min":false,"rightSide":true,"show":true,"total":false,"values":false},"lines":true,"linewidth":1,"nullPointMode":"null","options":{"dataLinks":[]},"panels":[],"percentage":false,"pointradius":2,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"stack":false,"steppedLine":false,"targets":[{"expr":"histogram_quantile(0.99, sum by (le,route) (cluster_job_route:loki_request_duration_seconds_bucket:sum_rate{job=~\"($namespace)/(.*-querier|.*-read|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", route=~\"api_prom_query|api_prom_labels|api_prom_label_name_values|loki_api_v1_query|loki_api_v1_query_range|loki_api_v1_label|loki_api_v1_label_name_values\", `}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\"}))","legendFormat":"{{route}}-.99","refId":"A"},{"expr":"histogram_quantile(0.9, sum by (le,route) (cluster_job_route:loki_request_duration_seconds_bucket:sum_rate{job=~\"($namespace)/(.*-querier|.*-read|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", route=~\"api_prom_query|api_prom_labels|api_prom_label_name_values|loki_api_v1_query|loki_api_v1_query_range|loki_api_v1_label|loki_api_v1_label_name_values\", `}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\"}))","legendFormat":"{{route}}-.9","refId":"B"},{"expr":"histogram_quantile(0.5, sum by (le,route) (cluster_job_route:loki_request_duration_seconds_bucket:sum_rate{job=~\"($namespace)/(.*-querier|.*-read|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", route=~\"api_prom_query|api_prom_labels|api_prom_label_name_values|loki_api_v1_query|loki_api_v1_query_range|loki_api_v1_label|loki_api_v1_label_name_values\", `}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\"}))","legendFormat":"{{route}}-.5","refId":"C"}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"Query Latency","tooltip":{"shared":true,"sort":0,"value_type":"individual"},"type":"timeseries","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}],"yaxis":{"align":false,"alignLevel":null}},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{},"unit":"ms"},"overrides":[]},"fill":1,"fillGradient":0,"gridPos":{"h":5,"w":6,"x":12,"y":16},"hiddenSeries":false,"id":14,"legend":{"alignAsTable":true,"avg":false,"current":false,"max":false,"min":false,"rightSide":true,"show":false,"total":false,"values":false},"lines":true,"linewidth":1,"nullPointMode":"null","options":{"dataLinks":[]},"panels":[],"percentage":false,"pointradius":2,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"stack":false,"steppedLine":false,"targets":[{"expr":"histogram_quantile(0.99, sum by (le,route) (cluster_job_route:loki_request_duration_seconds_bucket:sum_rate{job=~\"($namespace)/(.*-querier|.*-read|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", route=~\"api_prom_query|api_prom_labels|api_prom_label_name_values|loki_api_v1_query|loki_api_v1_query_range|loki_api_v1_label|loki_api_v1_label_name_values\", `}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\"})) * 1e3","legendFormat":".99-{{route}}","refId":"A"},{"expr":"histogram_quantile(0.9, sum by (le,route) (cluster_job_route:loki_request_duration_seconds_bucket:sum_rate{job=~\"($namespace)/(.*-querier|.*-read|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", route=~\"api_prom_query|api_prom_labels|api_prom_label_name_values|loki_api_v1_query|loki_api_v1_query_range|loki_api_v1_label|loki_api_v1_label_name_values\", `}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\"})) * 1e3","legendFormat":".9-{{route}}","refId":"B"},{"expr":"histogram_quantile(0.5, sum by (le,route) (cluster_job_route:loki_request_duration_seconds_bucket:sum_rate{job=~\"($namespace)/(.*-querier|.*-read|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", route=~\"api_prom_query|api_prom_labels|api_prom_label_name_values|loki_api_v1_query|loki_api_v1_query_range|loki_api_v1_label|loki_api_v1_label_name_values\", `}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\"})) * 1e3","legendFormat":".5-{{route}}","refId":"C"}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"Querier Latency","tooltip":{"shared":true,"sort":0,"value_type":"individual"},"type":"timeseries","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}],"yaxis":{"align":false,"alignLevel":null}},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{}},"overrides":[]},"fill":0,"fillGradient":0,"gridPos":{"h":5,"w":6,"x":18,"y":16},"hiddenSeries":false,"id":73,"legend":{"alignAsTable":true,"avg":false,"current":false,"max":false,"min":false,"rightSide":true,"show":false,"total":false,"values":false},"lines":true,"linewidth":1,"nullPointMode":"null","options":{"dataLinks":[]},"panels":[],"percentage":false,"pointradius":2,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"stack":false,"steppedLine":false,"targets":[{"expr":"sum(rate(loki_request_duration_seconds_count{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", job=~\"($namespace)/(.*-querier|.*-read|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", status_code!~\"5[0-9]{2}\"}[$__rate_interval])) by (route)\n/\nsum(rate(loki_request_duration_seconds_count{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", job=~\"($namespace)/(.*-querier|.*-read|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"}[$__rate_interval])) by (route) > 0","interval":"`}}{{ .Values.monitoring.dashboards.defaultDashboardsInterval }}{{`","legendFormat":"{{route}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"Querier Success Rate","tooltip":{"shared":true,"sort":0,"value_type":"individual"},"type":"timeseries","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"decimals":null,"format":"percentunit","label":"","logBase":1,"max":"1","min":null,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}],"yaxis":{"align":false,"alignLevel":null}},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","description":"","fieldConfig":{"defaults":{"custom":{},"unit":"ms"},"overrides":[]},"fill":1,"fillGradient":0,"gridPos":{"h":5,"w":6,"x":12,"y":21},"hiddenSeries":false,"id":15,"legend":{"alignAsTable":true,"avg":false,"current":false,"max":false,"min":false,"rightSide":true,"show":false,"total":false,"values":false},"lines":true,"linewidth":1,"nullPointMode":"null","options":{"dataLinks":[]},"panels":[],"percentage":false,"pointradius":2,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"stack":false,"steppedLine":false,"targets":[{"expr":"histogram_quantile(0.99, sum by (le,route) (cluster_job_route:loki_request_duration_seconds_bucket:sum_rate{job=~\"($namespace)/(.*-partition-ingester.*|.*-ingester.*|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", route=~\"/logproto.Querier/Query|/logproto.Querier/Label|/logproto.Querier/Series|/logproto.Querier/QuerySample|/logproto.Querier/GetChunkIDs\", `}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\"})) * 1e3","legendFormat":".99-{{route}}","refId":"A"},{"expr":"histogram_quantile(0.9, sum by (le,route) (cluster_job_route:loki_request_duration_seconds_bucket:sum_rate{job=~\"($namespace)/(.*-partition-ingester.*|.*-ingester.*|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", route=~\"/logproto.Querier/Query|/logproto.Querier/Label|/logproto.Querier/Series|/logproto.Querier/QuerySample|/logproto.Querier/GetChunkIDs\", `}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\"})) * 1e3","legendFormat":".9-{{route}}","refId":"B"},{"expr":"histogram_quantile(0.5, sum by (le,route) (cluster_job_route:loki_request_duration_seconds_bucket:sum_rate{job=~\"($namespace)/(.*-partition-ingester.*|.*-ingester.*|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", route=~\"/logproto.Querier/Query|/logproto.Querier/Label|/logproto.Querier/Series|/logproto.Querier/QuerySample|/logproto.Querier/GetChunkIDs\", `}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\"})) * 1e3","legendFormat":".5-{{route}}","refId":"C"}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"Ingester Latency Read","tooltip":{"shared":true,"sort":0,"value_type":"individual"},"type":"timeseries","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}],"yaxis":{"align":false,"alignLevel":null}},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{}},"overrides":[]},"fill":0,"fillGradient":0,"gridPos":{"h":5,"w":6,"x":18,"y":21},"hiddenSeries":false,"id":74,"legend":{"alignAsTable":true,"avg":false,"current":false,"max":false,"min":false,"rightSide":true,"show":false,"total":false,"values":false},"lines":true,"linewidth":1,"nullPointMode":"null","options":{"dataLinks":[]},"panels":[],"percentage":false,"pointradius":2,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"stack":false,"steppedLine":false,"targets":[{"expr":"sum(rate(loki_request_duration_seconds_count{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", job=~\"($namespace)/(.*-partition-ingester.*|.*-ingester.*|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", status_code!~\"5[0-9]{2}\", route=~\"/logproto.Querier/Query|/logproto.Querier/Label|/logproto.Querier/Series|/logproto.Querier/QuerySample|/logproto.Querier/GetChunkIDs\"}[$__rate_interval])) by (route)\n/\nsum(rate(loki_request_duration_seconds_count{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", job=~\"($namespace)/(.*-partition-ingester.*|.*-ingester.*|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", route=~\"/logproto.Querier/Query|/logproto.Querier/Label|/logproto.Querier/Series|/logproto.Querier/QuerySample|/logproto.Querier/GetChunkIDs\"}[$__rate_interval])) by (route) > 0","interval":"`}}{{ .Values.monitoring.dashboards.defaultDashboardsInterval }}{{`","legendFormat":"{{route}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"Ingester Success Rate Read","tooltip":{"shared":true,"sort":0,"value_type":"individual"},"type":"timeseries","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"decimals":null,"format":"percentunit","label":"","logBase":1,"max":"1","min":null,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}],"yaxis":{"align":false,"alignLevel":null}},{"collapsed":true,"datasource":null,"gridPos":{"h":1,"w":24,"x":0,"y":26},"id":110,"panels":[{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":1,"fillGradient":0,"gridPos":{"h":8,"w":12,"x":0,"y":27},"hiddenSeries":false,"id":112,"legend":{"avg":false,"current":false,"max":false,"min":false,"show":false,"total":false,"values":false},"lines":true,"linewidth":1,"nullPointMode":"null","options":{"dataLinks":[]},"panels":[],"percentage":false,"pointradius":2,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"stack":false,"steppedLine":false,"targets":[{"expr":"topk(10,sum by (tenant, reason) (rate(loki_discarded_samples_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\",namespace=\"$namespace\"}[$__rate_interval])))","interval":"`}}{{ .Values.monitoring.dashboards.defaultDashboardsInterval }}{{`","legendFormat":"{{ tenant }} - {{ reason }}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"Discarded Lines","tooltip":{"shared":false,"sort":0,"value_type":"individual"},"type":"timeseries","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}],"yaxis":{"align":false,"alignLevel":null}},{"datasource":"$datasource","fieldConfig":{"defaults":{"color":{"mode":"thresholds"},"custom":{"align":"right","cellOptions":{"type":"auto"},"inspect":false},"decimals":2,"displayName":"","mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":80}]},"unit":"short"},"overrides":[{"matcher":{"id":"byName","options":"Time"},"properties":[{"id":"displayName","value":"Time"},{"id":"custom.align"}]},{"matcher":{"id":"byName","options":"tenant"},"properties":[{"id":"unit","value":"short"},{"id":"decimals","value":2},{"id":"custom.align"}]},{"matcher":{"id":"byName","options":"reason"},"properties":[{"id":"unit","value":"short"},{"id":"decimals","value":2},{"id":"custom.align"}]}]},"gridPos":{"h":8,"w":12,"x":12,"y":27},"id":113,"options":{"cellHeight":"sm","footer":{"countRows":false,"fields":"","reducer":["sum"],"show":false},"showHeader":true},"panels":[],"pluginVersion":"10.4.0","targets":[{"expr":"topk(10, sum by (tenant, reason) (sum_over_time(increase(loki_discarded_samples_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\",namespace=\"$namespace\"}[$__rate_interval])[$__range:$__rate_interval])))","format":"table","instant":true,"interval":"`}}{{ .Values.monitoring.dashboards.defaultDashboardsInterval }}{{`","legendFormat":"{{ tenant }} - {{ reason }}","refId":"A"}],"title":"Discarded Lines Per Interval","transformations":[{"id":"merge","options":{"reducers":[]}}],"type":"table"}],"targets":[],"title":"Limits","type":"row"},{"collapsed":true,"datasource":null,"gridPos":{"h":1,"w":24,"x":0,"y":27},"id":23,"panels":[{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":1,"fillGradient":0,"gridPos":{"h":7,"w":6,"x":0,"y":28},"hiddenSeries":false,"id":26,"legend":{"avg":false,"current":false,"max":false,"min":false,"show":false,"total":false,"values":false},"lines":false,"linewidth":1,"nullPointMode":"null","options":{"dataLinks":[]},"panels":[],"percentage":false,"pointradius":1,"points":true,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"stack":false,"steppedLine":false,"targets":[{"expr":"sum by(pod) (rate(container_cpu_usage_seconds_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\".*distributor.*\"}[$__rate_interval]))","intervalFactor":3,"legendFormat":"{{pod}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"CPU Usage","tooltip":{"shared":true,"sort":2,"value_type":"individual"},"type":"timeseries","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}],"yaxis":{"align":false,"alignLevel":null}},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fieldConfig":{"defaults":{"unit":"binBps"}},"fill":1,"fillGradient":0,"gridPos":{"h":7,"w":6,"x":6,"y":28},"hiddenSeries":false,"id":27,"legend":{"avg":false,"current":false,"hideEmpty":false,"hideZero":false,"max":false,"min":false,"show":false,"total":false,"values":false},"lines":false,"linewidth":1,"nullPointMode":"null","options":{"dataLinks":[]},"panels":[],"percentage":false,"pointradius":1,"points":true,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"stack":false,"steppedLine":false,"targets":[{"expr":"go_memstats_heap_inuse_bytes{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", container=~\".*distributor.*\"}","instant":false,"intervalFactor":3,"legendFormat":"{{pod}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"Memory Usage","tooltip":{"shared":true,"sort":2,"value_type":"individual"},"type":"timeseries","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"bytes","label":null,"logBase":1,"max":null,"min":null,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}],"yaxis":{"align":false,"alignLevel":null}},{"aliasColors":{},"bars":true,"dashLength":10,"dashes":false,"datasource":"$loki_datasource","fill":1,"fillGradient":0,"gridPos":{"h":4,"w":12,"x":12,"y":28},"hiddenSeries":false,"id":31,"legend":{"avg":false,"current":false,"max":false,"min":false,"show":false,"total":false,"values":false},"lines":false,"linewidth":1,"nullPointMode":"null","options":{"dataLinks":[]},"panels":[],"percentage":false,"pointradius":2,"points":false,"renderer":"flot","seriesOverrides":[{"alias":"{}","color":"#C4162A"}],"spaceLength":10,"stack":false,"steppedLine":false,"targets":[{"expr":"sum(rate({`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", job=~\"($namespace)/(.*-distributor|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"} | logfmt | level=\"error\"[$__auto]))","refId":"A"}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"Error Log Rate","tooltip":{"shared":true,"sort":2,"value_type":"individual"},"type":"timeseries","xaxis":{"buckets":null,"mode":"time","name":null,"show":false,"values":[]},"yaxes":[{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":false}],"yaxis":{"align":false,"alignLevel":null}},{"datasource":"$loki_datasource","gridPos":{"h":18,"w":12,"x":12,"y":32},"id":29,"options":{"showLabels":false,"showTime":false,"sortOrder":"Descending","wrapLogMessage":true},"panels":[],"targets":[{"expr":"{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", job=~\"($namespace)/(.*-distributor|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"} |= \"level=error\"","refId":"A"}],"timeFrom":null,"timeShift":null,"title":"Logs","type":"logs"},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":0,"fillGradient":0,"gridPos":{"h":7,"w":6,"x":0,"y":35},"hiddenSeries":false,"id":33,"legend":{"avg":false,"current":false,"max":false,"min":false,"show":false,"total":false,"values":false},"lines":true,"linewidth":1,"nullPointMode":"null","options":{"dataLinks":[]},"panels":[],"percentage":false,"pointradius":1,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"stack":false,"steppedLine":false,"targets":[{"expr":"sum(rate(loki_request_duration_seconds_count{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", job=~\"($namespace)/(.*-distributor|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", status_code!~\"5[0-9]{2}\"}[$__rate_interval])) by (route)\n/\nsum(rate(loki_request_duration_seconds_count{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", job=~\"($namespace)/(.*-distributor|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"}[$__rate_interval])) by (route) > 0","interval":"`}}{{ .Values.monitoring.dashboards.defaultDashboardsInterval }}{{`","intervalFactor":1,"legendFormat":"{{route}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"Success Rate","tooltip":{"shared":true,"sort":2,"value_type":"individual"},"type":"timeseries","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}],"yaxis":{"align":false,"alignLevel":null}},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fieldConfig":{"defaults":{"unit":"binBps"}},"fill":1,"fillGradient":0,"gridPos":{"h":7,"w":6,"x":6,"y":35},"hiddenSeries":false,"id":32,"legend":{"avg":false,"current":false,"max":false,"min":false,"show":false,"total":false,"values":false},"lines":true,"linewidth":1,"nullPointMode":"null","options":{"dataLinks":[]},"panels":[],"percentage":false,"pointradius":1,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"stack":false,"steppedLine":false,"targets":[{"expr":"sum(rate(loki_distributor_ingester_append_failures_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\"}[$__rate_interval])) by (pod)","intervalFactor":1,"legendFormat":"{{pod}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"Append Failures By Ingester","tooltip":{"shared":true,"sort":2,"value_type":"individual"},"type":"timeseries","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}],"yaxis":{"align":false,"alignLevel":null}},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fieldConfig":{"defaults":{"unit":"binBps"}},"fill":1,"fillGradient":0,"gridPos":{"h":7,"w":6,"x":0,"y":42},"hiddenSeries":false,"id":34,"legend":{"avg":false,"current":false,"max":false,"min":false,"show":false,"total":false,"values":false},"lines":true,"linewidth":1,"nullPointMode":"null","options":{"dataLinks":[]},"panels":[],"percentage":false,"pointradius":1,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"stack":false,"steppedLine":false,"targets":[{"expr":"sum(rate(loki_distributor_bytes_received_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\"}[$__rate_interval])) by (pod)","intervalFactor":1,"legendFormat":"{{pod}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"Bytes Received/Second","tooltip":{"shared":true,"sort":2,"value_type":"individual"},"type":"timeseries","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}],"yaxis":{"align":false,"alignLevel":null}},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fieldConfig":{"defaults":{"unit":"ops"}},"fill":1,"fillGradient":0,"gridPos":{"h":7,"w":6,"x":6,"y":42},"hiddenSeries":false,"id":35,"legend":{"avg":false,"current":false,"max":false,"min":false,"show":false,"total":false,"values":false},"lines":true,"linewidth":1,"nullPointMode":"null","options":{"dataLinks":[]},"panels":[],"percentage":false,"pointradius":1,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"stack":false,"steppedLine":false,"targets":[{"expr":"sum(rate(loki_distributor_lines_received_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\"}[$__rate_interval])) by (pod)","intervalFactor":1,"legendFormat":"{{pod}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"Lines Received/Second","tooltip":{"shared":true,"sort":2,"value_type":"individual"},"type":"timeseries","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}],"yaxis":{"align":false,"alignLevel":null}}],"targets":[],"title":"Distributor","type":"row"},{"collapsed":true,"datasource":null,"gridPos":{"h":1,"w":24,"x":0,"y":28},"id":19,"panels":[{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":1,"fillGradient":0,"gridPos":{"h":7,"w":6,"x":0,"y":29},"hiddenSeries":false,"id":36,"legend":{"avg":false,"current":false,"max":false,"min":false,"show":false,"total":false,"values":false},"lines":false,"linewidth":1,"nullPointMode":"null","options":{"dataLinks":[]},"panels":[],"percentage":false,"pointradius":1,"points":true,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"stack":false,"steppedLine":false,"targets":[{"expr":"sum by(pod) (rate(container_cpu_usage_seconds_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\".*ingester.*\"}[$__rate_interval]))","intervalFactor":3,"legendFormat":"{{pod}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"CPU Usage","tooltip":{"shared":true,"sort":2,"value_type":"individual"},"type":"timeseries","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}],"yaxis":{"align":false,"alignLevel":null}},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fieldConfig":{"defaults":{"unit":"binBps"}},"fill":1,"fillGradient":0,"gridPos":{"h":7,"w":6,"x":0,"y":36},"hiddenSeries":false,"id":37,"legend":{"avg":false,"current":false,"hideEmpty":false,"hideZero":false,"max":false,"min":false,"show":false,"total":false,"values":false},"lines":false,"linewidth":1,"nullPointMode":"null","options":{"dataLinks":[]},"panels":[],"percentage":false,"pointradius":1,"points":true,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"stack":false,"steppedLine":false,"targets":[{"expr":"go_memstats_heap_inuse_bytes{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", container=~\".*ingester.*\"}","instant":false,"intervalFactor":3,"legendFormat":"{{pod}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"Memory Usage","tooltip":{"shared":true,"sort":2,"value_type":"individual"},"type":"timeseries","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"bytes","label":null,"logBase":1,"max":null,"min":null,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}],"yaxis":{"align":false,"alignLevel":null}},{"aliasColors":{},"bars":true,"dashLength":10,"dashes":false,"datasource":"$loki_datasource","fill":1,"fillGradient":0,"gridPos":{"h":3,"w":18,"x":12,"y":29},"hiddenSeries":false,"id":38,"legend":{"avg":false,"current":false,"max":false,"min":false,"show":false,"total":false,"values":false},"lines":false,"linewidth":1,"nullPointMode":"null","options":{"dataLinks":[]},"panels":[],"percentage":false,"pointradius":2,"points":false,"renderer":"flot","seriesOverrides":[{"alias":"{}","color":"#F2495C"}],"spaceLength":10,"stack":false,"steppedLine":false,"targets":[{"expr":"sum(rate({`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", job=~\"($namespace)/(.*-partition-ingester.*|.*-ingester.*|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"} | logfmt | level=\"error\"[$__auto]))","refId":"A"}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"Error Log Rate","tooltip":{"shared":true,"sort":2,"value_type":"individual"},"type":"timeseries","xaxis":{"buckets":null,"mode":"time","name":null,"show":false,"values":[]},"yaxes":[{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":false}],"yaxis":{"align":false,"alignLevel":null}},{"datasource":"$loki_datasource","gridPos":{"h":18,"w":18,"x":12,"y":32},"id":39,"options":{"showLabels":false,"showTime":false,"sortOrder":"Descending","wrapLogMessage":true},"panels":[],"targets":[{"expr":"{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", job=~\"($namespace)/(.*-partition-ingester.*|.*-ingester.*|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"} |= \"level=error\"","refId":"A"}],"timeFrom":null,"timeShift":null,"title":"Logs","type":"logs"},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":0,"fillGradient":0,"gridPos":{"h":7,"w":6,"x":0,"y":41},"hiddenSeries":false,"id":67,"legend":{"avg":false,"current":false,"max":false,"min":false,"show":false,"total":false,"values":false},"lines":true,"linewidth":1,"nullPointMode":"null","options":{"dataLinks":[]},"panels":[],"percentage":false,"pointradius":1,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"stack":false,"steppedLine":false,"targets":[{"expr":"sum(rate(loki_request_duration_seconds_count{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", job=~\"($namespace)/(.*-partition-ingester.*|.*-ingester.*|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", status_code!~\"5[0-9]{2}\"}[$__rate_interval])) by (route)\n/\nsum(rate(loki_request_duration_seconds_count{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", job=~\"($namespace)/(.*-partition-ingester.*|.*-ingester.*|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"}[$__rate_interval])) by (route) > 0","interval":"`}}{{ .Values.monitoring.dashboards.defaultDashboardsInterval }}{{`","intervalFactor":1,"legendFormat":"{{route}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"Success Rate","tooltip":{"shared":true,"sort":2,"value_type":"individual"},"type":"timeseries","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}],"yaxis":{"align":false,"alignLevel":null}}],"targets":[],"title":"Ingester","type":"row"},{"collapsed":true,"datasource":null,"gridPos":{"h":1,"w":24,"x":0,"y":29},"id":104,"panels":[{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":1,"fillGradient":0,"gridPos":{"h":8,"w":12,"x":0,"y":30},"hiddenSeries":false,"id":106,"legend":{"avg":false,"current":false,"hideEmpty":true,"hideZero":true,"max":false,"min":false,"show":false,"total":false,"values":false},"lines":true,"linewidth":1,"nullPointMode":"null","options":{"dataLinks":[]},"panels":[],"percentage":false,"pointradius":2,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"stack":false,"steppedLine":false,"targets":[{"expr":"topk(10,sum by (tenant) (loki_ingester_memory_streams{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\",job=~\"($namespace)/(.*-partition-ingester.*|.*-ingester.*|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"}))","interval":"`}}{{ .Values.monitoring.dashboards.defaultDashboardsInterval }}{{`","legendFormat":"{{ tenant }}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"Active Streams","tooltip":{"shared":false,"sort":0,"value_type":"individual"},"type":"timeseries","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}],"yaxis":{"align":false,"alignLevel":null}},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":1,"fillGradient":0,"gridPos":{"h":8,"w":12,"x":12,"y":30},"hiddenSeries":false,"id":108,"legend":{"avg":false,"current":false,"hideEmpty":true,"hideZero":true,"max":false,"min":false,"show":false,"total":false,"values":false},"lines":true,"linewidth":1,"nullPointMode":"null","options":{"dataLinks":[]},"panels":[],"percentage":false,"pointradius":2,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"stack":false,"steppedLine":false,"targets":[{"expr":"topk(10, sum by (tenant) (rate(loki_ingester_streams_created_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\",job=~\"($namespace)/(.*-partition-ingester.*|.*-ingester.*|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"}[$__rate_interval]) > 0))","interval":"`}}{{ .Values.monitoring.dashboards.defaultDashboardsInterval }}{{`","legendFormat":"{{ tenant }}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"Streams Created/Sec","tooltip":{"shared":false,"sort":0,"value_type":"individual"},"type":"timeseries","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}],"yaxis":{"align":false,"alignLevel":null}}],"targets":[],"title":"Streams","type":"row"},{"collapsed":true,"datasource":null,"gridPos":{"h":1,"w":24,"x":0,"y":30},"id":94,"panels":[{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":1,"fillGradient":0,"gridPos":{"h":8,"w":12,"x":0,"y":31},"hiddenSeries":false,"id":102,"legend":{"avg":false,"current":false,"max":false,"min":false,"show":true,"total":false,"values":false},"lines":true,"linewidth":1,"nullPointMode":"null","options":{"dataLinks":[]},"panels":[],"percentage":false,"pointradius":2,"points":false,"renderer":"flot","seriesOverrides":[{"alias":"De-Dupe Ratio","yaxis":2}],"spaceLength":10,"stack":false,"steppedLine":false,"targets":[{"expr":"sum(rate(loki_ingester_chunks_flushed_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\",job=~\"($namespace)/(.*-partition-ingester.*|.*-ingester.*|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"}[$__rate_interval]))","interval":"`}}{{ .Values.monitoring.dashboards.defaultDashboardsInterval }}{{`","legendFormat":"Chunks","refId":"A"},{"expr":"sum(increase(loki_chunk_store_deduped_chunks_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"($namespace)/(.*-partition-ingester.*|.*-ingester.*|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"}[$__rate_interval]))/sum(increase(loki_ingester_chunks_flushed_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"($namespace)/(.*-partition-ingester.*|.*-ingester.*|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"}[$__rate_interval])) < 1","interval":"`}}{{ .Values.monitoring.dashboards.defaultDashboardsInterval }}{{`","legendFormat":"De-Dupe Ratio","refId":"B"}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"Chunks Flushed/Sec","tooltip":{"shared":true,"sort":0,"value_type":"individual"},"type":"timeseries","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}],"yaxis":{"align":false,"alignLevel":null}},{"cards":{"cardPadding":null,"cardRound":null},"color":{"cardColor":"#b4ff00","colorScale":"sqrt","colorScheme":"interpolateSpectral","exponent":0.5,"mode":"spectrum"},"dataFormat":"tsbuckets","datasource":"$datasource","gridPos":{"h":8,"w":12,"x":12,"y":31},"heatmap":{},"hideZeroBuckets":false,"highlightCards":true,"id":100,"legend":{"show":true},"panels":[],"reverseYBuckets":false,"targets":[{"expr":"sum(rate(loki_ingester_chunk_size_bytes_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\",job=~\"($namespace)/(.*-partition-ingester.*|.*-ingester.*|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"}[$__rate_interval])) by (le)","format":"heatmap","instant":false,"interval":"`}}{{ .Values.monitoring.dashboards.defaultDashboardsInterval }}{{`","legendFormat":"{{ le }}","refId":"A"}],"timeFrom":null,"timeShift":null,"title":"Chunk Size Bytes","tooltip":{"show":true,"showHistogram":false},"type":"heatmap","xAxis":{"show":true},"xBucketNumber":null,"xBucketSize":null,"yAxis":{"decimals":0,"format":"bytes","logBase":1,"max":null,"min":null,"show":true,"splitFactor":null},"yBucketBound":"auto","yBucketNumber":null,"yBucketSize":null},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":7,"fillGradient":0,"gridPos":{"h":9,"w":12,"x":0,"y":39},"hiddenSeries":false,"id":96,"legend":{"avg":false,"current":false,"max":false,"min":false,"show":true,"total":false,"values":false},"lines":true,"linewidth":1,"nullPointMode":"null","options":{"dataLinks":[]},"panels":[],"percentage":false,"pointradius":2,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"stack":true,"steppedLine":false,"targets":[{"expr":"sum by(reason) (rate(loki_ingester_chunks_flushed_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\",job=~\"($namespace)/(.*-partition-ingester.*|.*-ingester.*|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", namespace=~\"$namespace\"}[$__rate_interval])) / ignoring(reason) group_left sum(rate(loki_ingester_chunks_flushed_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\",job=~\"($namespace)/(.*-partition-ingester.*|.*-ingester.*|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", namespace=~\"$namespace\"}[$__rate_interval]))","interval":"`}}{{ .Values.monitoring.dashboards.defaultDashboardsInterval }}{{`","legendFormat":"{{ reason }}"}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"Chunk Flush Reason %","tooltip":{"shared":true,"sort":0,"value_type":"individual"},"type":"timeseries","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"percentunit","label":null,"logBase":1,"max":"1","min":"0","show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}],"yaxis":{"align":false,"alignLevel":null}},{"cards":{"cardPadding":null,"cardRound":null},"color":{"cardColor":"#b4ff00","colorScale":"sqrt","colorScheme":"interpolateSpectral","exponent":0.5,"max":null,"min":null,"mode":"spectrum"},"dataFormat":"tsbuckets","datasource":"$datasource","gridPos":{"h":9,"w":12,"x":12,"y":39},"heatmap":{},"hideZeroBuckets":true,"highlightCards":true,"id":98,"legend":{"show":true},"panels":[],"reverseYBuckets":false,"targets":[{"expr":"sum by (le) (rate(loki_ingester_chunk_utilization_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"($namespace)/(.*-partition-ingester.*|.*-ingester.*|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"}[$__rate_interval]))","format":"heatmap","instant":false,"interval":"`}}{{ .Values.monitoring.dashboards.defaultDashboardsInterval }}{{`","legendFormat":"{{ le }}","refId":"A"}],"timeFrom":null,"timeShift":null,"title":"Chunk Utilization","tooltip":{"show":true,"showHistogram":false},"type":"heatmap","xAxis":{"show":true},"xBucketNumber":null,"xBucketSize":null,"yAxis":{"decimals":0,"format":"percentunit","logBase":1,"max":null,"min":null,"show":true,"splitFactor":null},"yBucketBound":"auto","yBucketNumber":null,"yBucketSize":null}],"targets":[],"title":"Chunks","type":"row"},{"collapsed":true,"datasource":null,"gridPos":{"h":1,"w":24,"x":0,"y":31},"id":64,"panels":[{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":1,"fillGradient":0,"gridPos":{"h":7,"w":6,"x":0,"y":32},"hiddenSeries":false,"id":68,"legend":{"avg":false,"current":false,"max":false,"min":false,"show":false,"total":false,"values":false},"lines":false,"linewidth":1,"nullPointMode":"null","options":{"dataLinks":[]},"panels":[],"percentage":false,"pointradius":1,"points":true,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"stack":false,"steppedLine":false,"targets":[{"expr":"sum by(pod) (rate(container_cpu_usage_seconds_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\".*querier.*\"}[$__rate_interval]))","intervalFactor":3,"legendFormat":"{{pod}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"CPU Usage","tooltip":{"shared":true,"sort":2,"value_type":"individual"},"type":"timeseries","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}],"yaxis":{"align":false,"alignLevel":null}},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fieldConfig":{"defaults":{"unit":"binBps"}},"fill":1,"fillGradient":0,"gridPos":{"h":7,"w":6,"x":0,"y":39},"hiddenSeries":false,"id":69,"legend":{"avg":false,"current":false,"hideEmpty":false,"hideZero":false,"max":false,"min":false,"show":false,"total":false,"values":false},"lines":false,"linewidth":1,"nullPointMode":"null","options":{"dataLinks":[]},"panels":[],"percentage":false,"pointradius":1,"points":true,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"stack":false,"steppedLine":false,"targets":[{"expr":"go_memstats_heap_inuse_bytes{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", container=~\".*querier.*\"}","instant":false,"intervalFactor":3,"legendFormat":"{{pod}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"Memory Usage","tooltip":{"shared":true,"sort":2,"value_type":"individual"},"type":"timeseries","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"bytes","label":null,"logBase":1,"max":null,"min":null,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}],"yaxis":{"align":false,"alignLevel":null}},{"aliasColors":{},"bars":true,"dashLength":10,"dashes":false,"datasource":"$loki_datasource","fill":1,"fillGradient":0,"gridPos":{"h":3,"w":18,"x":12,"y":32},"hiddenSeries":false,"id":65,"legend":{"avg":false,"current":false,"max":false,"min":false,"show":false,"total":false,"values":false},"lines":false,"linewidth":1,"nullPointMode":"null","options":{"dataLinks":[]},"panels":[],"percentage":false,"pointradius":2,"points":false,"renderer":"flot","seriesOverrides":[{"alias":"{}","color":"#F2495C"}],"spaceLength":10,"stack":false,"steppedLine":false,"targets":[{"expr":"sum(rate({`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", job=~\"($namespace)/(.*-querier|.*-read|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"} | logfmt | level=\"error\"[$__auto]))","refId":"A"}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"Error Log Rate","tooltip":{"shared":true,"sort":2,"value_type":"individual"},"type":"timeseries","xaxis":{"buckets":null,"mode":"time","name":null,"show":false,"values":[]},"yaxes":[{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":false}],"yaxis":{"align":false,"alignLevel":null}},{"datasource":"$loki_datasource","gridPos":{"h":18,"w":18,"x":12,"y":35},"id":66,"options":{"showLabels":false,"showTime":false,"sortOrder":"Descending","wrapLogMessage":true},"panels":[],"targets":[{"expr":"{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", job=~\"($namespace)/(.*-querier|.*-read|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"} |= \"level=error\"","refId":"A"}],"timeFrom":null,"timeShift":null,"title":"Logs","type":"logs"},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":0,"fillGradient":0,"gridPos":{"h":7,"w":6,"x":0,"y":46},"hiddenSeries":false,"id":70,"legend":{"avg":false,"current":false,"max":false,"min":false,"show":false,"total":false,"values":false},"lines":true,"linewidth":1,"nullPointMode":"null","options":{"dataLinks":[]},"panels":[],"percentage":false,"pointradius":1,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"stack":false,"steppedLine":false,"targets":[{"expr":"sum(rate(loki_request_duration_seconds_count{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", job=~\"($namespace)/(.*-querier|.*-read|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", status_code!~\"5[0-9]{2}\"}[$__rate_interval])) by (route)\n/\nsum(rate(loki_request_duration_seconds_count{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", job=~\"($namespace)/(.*-querier|.*-read|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"}[$__rate_interval])) by (route) > 0","interval":"`}}{{ .Values.monitoring.dashboards.defaultDashboardsInterval }}{{`","intervalFactor":1,"legendFormat":"{{route}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"Success Rate","tooltip":{"shared":true,"sort":2,"value_type":"individual"},"type":"timeseries","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}],"yaxis":{"align":false,"alignLevel":null}}],"targets":[],"title":"Querier","type":"row"},{"collapsed":true,"datasource":null,"gridPos":{"h":1,"w":24,"x":0,"y":32},"id":52,"panels":[{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fieldConfig":{"defaults":{"unit":"s"}},"fill":1,"fillGradient":0,"gridPos":{"h":8,"w":24,"x":0,"y":30},"hiddenSeries":false,"id":53,"interval":"`}}{{ .Values.monitoring.dashboards.defaultDashboardsInterval }}{{`","legend":{"alignAsTable":true,"avg":false,"current":false,"max":false,"min":false,"rightSide":true,"show":true,"total":false,"values":false},"lines":true,"linewidth":1,"nullPointMode":"null","options":{"dataLinks":[]},"panels":[],"percentage":false,"pointradius":1,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"stack":false,"steppedLine":false,"targets":[{"expr":"histogram_quantile(.99, sum(rate(loki_memcache_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\"}[$__rate_interval])) by (method, name, le, container))","intervalFactor":1,"legendFormat":"{{container}}: .99-{{method}}-{{name}}","refId":"A"},{"expr":"histogram_quantile(.9, sum(rate(loki_memcache_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\"}[$__rate_interval])) by (method, name, le, container))","hide":false,"legendFormat":"{{container}}: .9-{{method}}-{{name}}","refId":"B"},{"expr":"histogram_quantile(.5, sum(rate(loki_memcache_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\"}[$__rate_interval])) by (method, name, le, container))","hide":false,"legendFormat":"{{container}}: .5-{{method}}-{{name}}","refId":"C"}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"Latency By Method","tooltip":{"shared":true,"sort":2,"value_type":"individual"},"type":"timeseries","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}],"yaxis":{"align":false,"alignLevel":null}},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":1,"fillGradient":0,"gridPos":{"h":8,"w":24,"x":0,"y":38},"hiddenSeries":false,"id":54,"interval":"`}}{{ .Values.monitoring.dashboards.defaultDashboardsInterval }}{{`","legend":{"alignAsTable":true,"avg":false,"current":false,"max":false,"min":false,"rightSide":true,"show":true,"total":false,"values":false},"lines":true,"linewidth":1,"nullPointMode":"null","options":{"dataLinks":[]},"panels":[],"percentage":false,"pointradius":1,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"stack":false,"steppedLine":false,"targets":[{"expr":"sum(rate(loki_memcache_request_duration_seconds_count{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\"}[$__rate_interval])) by (status_code, method, name, container)","intervalFactor":1,"legendFormat":"{{container}}: {{status_code}}-{{method}}-{{name}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"Status By Method","tooltip":{"shared":true,"sort":2,"value_type":"individual"},"type":"timeseries","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}],"yaxis":{"align":false,"alignLevel":null}}],"targets":[],"title":"Memcached","type":"row"},{"collapsed":true,"datasource":null,"gridPos":{"h":1,"w":24,"x":0,"y":33},"id":57,"panels":[{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fieldConfig":{"defaults":{"unit":"s"}},"fill":1,"fillGradient":0,"gridPos":{"h":8,"w":24,"x":0,"y":31},"hiddenSeries":false,"id":55,"interval":"`}}{{ .Values.monitoring.dashboards.defaultDashboardsInterval }}{{`","legend":{"alignAsTable":true,"avg":false,"current":false,"max":false,"min":false,"rightSide":true,"show":true,"total":false,"values":false},"lines":true,"linewidth":1,"nullPointMode":"null","options":{"dataLinks":[]},"panels":[],"percentage":false,"pointradius":1,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"stack":false,"steppedLine":false,"targets":[{"expr":"histogram_quantile(.99, sum(rate(loki_consul_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\"}[$__rate_interval])) by (operation, le))","intervalFactor":1,"legendFormat":".99-{{operation}}","refId":"A"},{"expr":"histogram_quantile(.9, sum(rate(loki_consul_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\"}[$__rate_interval])) by (operation, le))","hide":false,"legendFormat":".9-{{operation}}","refId":"B"},{"expr":"histogram_quantile(.5, sum(rate(loki_consul_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\"}[$__rate_interval])) by (operation, le))","hide":false,"legendFormat":".5-{{operation}}","refId":"C"}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"Latency By Operation","tooltip":{"shared":true,"sort":2,"value_type":"individual"},"type":"timeseries","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}],"yaxis":{"align":false,"alignLevel":null}},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fieldConfig":{"defaults":{"unit":"ops"}},"fill":1,"fillGradient":0,"gridPos":{"h":8,"w":24,"x":0,"y":39},"hiddenSeries":false,"id":58,"interval":"`}}{{ .Values.monitoring.dashboards.defaultDashboardsInterval }}{{`","legend":{"alignAsTable":true,"avg":false,"current":false,"max":false,"min":false,"rightSide":true,"show":true,"total":false,"values":false},"lines":true,"linewidth":1,"nullPointMode":"null","options":{"dataLinks":[]},"panels":[],"percentage":false,"pointradius":1,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"stack":false,"steppedLine":false,"targets":[{"expr":"sum(rate(loki_consul_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\"}[$__rate_interval])) by (operation, status_code, method)","intervalFactor":1,"legendFormat":"{{status_code}}-{{operation}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"Status By Operation","tooltip":{"shared":true,"sort":2,"value_type":"individual"},"type":"timeseries","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}],"yaxis":{"align":false,"alignLevel":null}}],"targets":[],"title":"Consul","type":"row"},{"collapsed":true,"datasource":null,"gridPos":{"h":1,"w":24,"x":0,"y":34},"id":43,"panels":[{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fieldConfig":{"defaults":{"unit":"s"}},"fill":1,"fillGradient":0,"gridPos":{"h":7,"w":6,"x":0,"y":9},"hiddenSeries":false,"id":41,"interval":"`}}{{ .Values.monitoring.dashboards.defaultDashboardsInterval }}{{`","legend":{"avg":false,"current":false,"max":false,"min":false,"show":false,"total":false,"values":false},"lines":true,"linewidth":1,"nullPointMode":"null","options":{"dataLinks":[]},"panels":[],"percentage":false,"pointradius":1,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"stack":false,"steppedLine":false,"targets":[{"expr":"histogram_quantile(.99, sum(rate(loki_bigtable_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", operation=\"/google.bigtable.v2.Bigtable/MutateRows\"}[$__rate_interval])) by (operation, le))","intervalFactor":1,"legendFormat":".9","refId":"A"},{"expr":"histogram_quantile(.9, sum(rate(loki_bigtable_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", operation=\"/google.bigtable.v2.Bigtable/MutateRows\"}[$__rate_interval])) by (operation, le))","refId":"B"},{"expr":"histogram_quantile(.5, sum(rate(loki_bigtable_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", operation=\"/google.bigtable.v2.Bigtable/MutateRows\"}[$__rate_interval])) by (operation, le))","refId":"C"}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"MutateRows Latency","tooltip":{"shared":true,"sort":2,"value_type":"individual"},"type":"timeseries","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}],"yaxis":{"align":false,"alignLevel":null}},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fieldConfig":{"defaults":{"unit":"s"}},"fill":1,"fillGradient":0,"gridPos":{"h":7,"w":6,"x":6,"y":9},"hiddenSeries":false,"id":46,"interval":"`}}{{ .Values.monitoring.dashboards.defaultDashboardsInterval }}{{`","legend":{"avg":false,"current":false,"max":false,"min":false,"show":false,"total":false,"values":false},"lines":true,"linewidth":1,"nullPointMode":"null","options":{"dataLinks":[]},"panels":[],"percentage":false,"pointradius":1,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"stack":false,"steppedLine":false,"targets":[{"expr":"histogram_quantile(.99, sum(rate(loki_bigtable_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", operation=\"/google.bigtable.v2.Bigtable/ReadRows\"}[$__rate_interval])) by (operation, le))","interval":"`}}{{ .Values.monitoring.dashboards.defaultDashboardsInterval }}{{`","intervalFactor":1,"legendFormat":"99%","refId":"A"},{"expr":"histogram_quantile(.9, sum(rate(loki_bigtable_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", operation=\"/google.bigtable.v2.Bigtable/ReadRows\"}[$__rate_interval])) by (operation, le))","interval":"`}}{{ .Values.monitoring.dashboards.defaultDashboardsInterval }}{{`","legendFormat":"90%","refId":"B"},{"expr":"histogram_quantile(.5, sum(rate(loki_bigtable_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", operation=\"/google.bigtable.v2.Bigtable/ReadRows\"}[$__rate_interval])) by (operation, le))","interval":"`}}{{ .Values.monitoring.dashboards.defaultDashboardsInterval }}{{`","legendFormat":"50%","refId":"C"}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"ReadRows Latency","tooltip":{"shared":true,"sort":2,"value_type":"individual"},"type":"timeseries","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}],"yaxis":{"align":false,"alignLevel":null}},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fieldConfig":{"defaults":{"unit":"s"}},"fill":1,"fillGradient":0,"gridPos":{"h":7,"w":6,"x":12,"y":9},"hiddenSeries":false,"id":44,"interval":"`}}{{ .Values.monitoring.dashboards.defaultDashboardsInterval }}{{`","legend":{"avg":false,"current":false,"max":false,"min":false,"show":false,"total":false,"values":false},"lines":true,"linewidth":1,"nullPointMode":"null","options":{"dataLinks":[]},"panels":[],"percentage":false,"pointradius":1,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"stack":false,"steppedLine":false,"targets":[{"expr":"histogram_quantile(.99, sum(rate(loki_bigtable_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", operation=\"/google.bigtable.admin.v2.BigtableTableAdmin/GetTable\"}[$__rate_interval])) by (operation, le))","interval":"`}}{{ .Values.monitoring.dashboards.defaultDashboardsInterval }}{{`","intervalFactor":1,"legendFormat":"99%","refId":"A"},{"expr":"histogram_quantile(.9, sum(rate(loki_bigtable_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", operation=\"/google.bigtable.admin.v2.BigtableTableAdmin/GetTable\"}[$__rate_interval])) by (operation, le))","interval":"`}}{{ .Values.monitoring.dashboards.defaultDashboardsInterval }}{{`","legendFormat":"90%","refId":"B"},{"expr":"histogram_quantile(.5, sum(rate(loki_bigtable_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", operation=\"/google.bigtable.admin.v2.BigtableTableAdmin/GetTable\"}[$__rate_interval])) by (operation, le))","interval":"`}}{{ .Values.monitoring.dashboards.defaultDashboardsInterval }}{{`","legendFormat":"50%","refId":"C"}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"GetTable Latency","tooltip":{"shared":true,"sort":2,"value_type":"individual"},"type":"timeseries","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}],"yaxis":{"align":false,"alignLevel":null}},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fieldConfig":{"defaults":{"unit":"s"}},"fill":1,"fillGradient":0,"gridPos":{"h":7,"w":6,"x":18,"y":9},"hiddenSeries":false,"id":45,"interval":"`}}{{ .Values.monitoring.dashboards.defaultDashboardsInterval }}{{`","legend":{"avg":false,"current":false,"max":false,"min":false,"show":false,"total":false,"values":false},"lines":true,"linewidth":1,"nullPointMode":"null","options":{"dataLinks":[]},"panels":[],"percentage":false,"pointradius":1,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"stack":false,"steppedLine":false,"targets":[{"expr":"histogram_quantile(.99, sum(rate(loki_bigtable_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", operation=\"/google.bigtable.admin.v2.BigtableTableAdmin/ListTables\"}[$__rate_interval])) by (operation, le))","intervalFactor":1,"legendFormat":".9","refId":"A"},{"expr":"histogram_quantile(.9, sum(rate(loki_bigtable_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", operation=\"/google.bigtable.admin.v2.BigtableTableAdmin/ListTables\"}[$__rate_interval])) by (operation, le))","refId":"B"},{"expr":"histogram_quantile(.5, sum(rate(loki_bigtable_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", operation=\"/google.bigtable.admin.v2.BigtableTableAdmin/ListTables\"}[$__rate_interval])) by (operation, le))","refId":"C"}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"ListTables Latency","tooltip":{"shared":true,"sort":2,"value_type":"individual"},"type":"timeseries","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}],"yaxis":{"align":false,"alignLevel":null}},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fieldConfig":{"defaults":{"unit":"ops"}},"fill":1,"fillGradient":0,"gridPos":{"h":7,"w":6,"x":0,"y":16},"hiddenSeries":false,"id":47,"interval":"`}}{{ .Values.monitoring.dashboards.defaultDashboardsInterval }}{{`","legend":{"avg":false,"current":false,"max":false,"min":false,"show":false,"total":false,"values":false},"lines":true,"linewidth":1,"nullPointMode":"null","options":{"dataLinks":[]},"panels":[],"percentage":false,"pointradius":1,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"stack":false,"steppedLine":false,"targets":[{"expr":"sum(rate(loki_bigtable_request_duration_seconds_count{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", operation=\"/google.bigtable.v2.Bigtable/MutateRows\"}[$__rate_interval])) by (status_code)","intervalFactor":1,"legendFormat":"{{status_code}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"MutateRows Status","tooltip":{"shared":true,"sort":2,"value_type":"individual"},"type":"timeseries","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}],"yaxis":{"align":false,"alignLevel":null}},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fieldConfig":{"defaults":{"unit":"ops"}},"fill":1,"fillGradient":0,"gridPos":{"h":7,"w":6,"x":6,"y":16},"hiddenSeries":false,"id":50,"interval":"`}}{{ .Values.monitoring.dashboards.defaultDashboardsInterval }}{{`","legend":{"avg":false,"current":false,"max":false,"min":false,"show":false,"total":false,"values":false},"lines":true,"linewidth":1,"nullPointMode":"null","options":{"dataLinks":[]},"panels":[],"percentage":false,"pointradius":1,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"stack":false,"steppedLine":false,"targets":[{"expr":"sum(rate(loki_bigtable_request_duration_seconds_count{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", operation=\"/google.bigtable.v2.Bigtable/ReadRows\"}[$__rate_interval])) by (status_code)","intervalFactor":1,"legendFormat":"{{status_code}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"ReadRows Status","tooltip":{"shared":true,"sort":2,"value_type":"individual"},"type":"timeseries","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}],"yaxis":{"align":false,"alignLevel":null}},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fieldConfig":{"defaults":{"unit":"ops"}},"fill":1,"fillGradient":0,"gridPos":{"h":7,"w":6,"x":12,"y":16},"hiddenSeries":false,"id":48,"interval":"`}}{{ .Values.monitoring.dashboards.defaultDashboardsInterval }}{{`","legend":{"avg":false,"current":false,"max":false,"min":false,"show":false,"total":false,"values":false},"lines":true,"linewidth":1,"nullPointMode":"null","options":{"dataLinks":[]},"panels":[],"percentage":false,"pointradius":1,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"stack":false,"steppedLine":false,"targets":[{"expr":"sum(rate(loki_bigtable_request_duration_seconds_count{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", operation=\"/google.bigtable.admin.v2.BigtableTableAdmin/GetTable\"}[$__rate_interval])) by (status_code)","intervalFactor":1,"legendFormat":"{{status_code}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"GetTable Status","tooltip":{"shared":true,"sort":2,"value_type":"individual"},"type":"timeseries","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}],"yaxis":{"align":false,"alignLevel":null}},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fieldConfig":{"defaults":{"unit":"ops"}},"fill":1,"fillGradient":0,"gridPos":{"h":7,"w":6,"x":18,"y":16},"hiddenSeries":false,"id":49,"interval":"`}}{{ .Values.monitoring.dashboards.defaultDashboardsInterval }}{{`","legend":{"avg":false,"current":false,"max":false,"min":false,"show":false,"total":false,"values":false},"lines":true,"linewidth":1,"nullPointMode":"null","options":{"dataLinks":[]},"panels":[],"percentage":false,"pointradius":1,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"stack":false,"steppedLine":false,"targets":[{"expr":"sum(rate(loki_bigtable_request_duration_seconds_count{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\", operation=\"/google.bigtable.admin.v2.BigtableTableAdmin/ListTables\"}[$__rate_interval])) by (status_code)","intervalFactor":1,"legendFormat":"{{status_code}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"ListTables Status","tooltip":{"shared":true,"sort":2,"value_type":"individual"},"type":"timeseries","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}],"yaxis":{"align":false,"alignLevel":null}}],"targets":[],"title":"Big Table","type":"row"},{"collapsed":true,"datasource":null,"gridPos":{"h":1,"w":24,"x":0,"y":35},"id":60,"panels":[{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fieldConfig":{"defaults":{"unit":"s"}},"fill":1,"fillGradient":0,"gridPos":{"h":8,"w":24,"x":0,"y":33},"hiddenSeries":false,"id":61,"interval":"`}}{{ .Values.monitoring.dashboards.defaultDashboardsInterval }}{{`","legend":{"alignAsTable":true,"avg":false,"current":false,"max":false,"min":false,"rightSide":true,"show":true,"total":false,"values":false},"lines":true,"linewidth":1,"nullPointMode":"null","options":{"dataLinks":[]},"panels":[],"percentage":false,"pointradius":1,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"stack":false,"steppedLine":false,"targets":[{"expr":"histogram_quantile(.99, sum(rate(loki_gcs_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\"}[$__rate_interval])) by (operation, le))","intervalFactor":1,"legendFormat":".99-{{operation}}","refId":"A"},{"expr":"histogram_quantile(.9, sum(rate(loki_gcs_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\"}[$__rate_interval])) by (operation, le))","hide":false,"legendFormat":".9-{{operation}}","refId":"B"},{"expr":"histogram_quantile(.5, sum(rate(loki_gcs_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\"}[$__rate_interval])) by (operation, le))","hide":false,"legendFormat":".5-{{operation}}","refId":"C"}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"Latency By Operation","tooltip":{"shared":true,"sort":2,"value_type":"individual"},"type":"timeseries","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}],"yaxis":{"align":false,"alignLevel":null}},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":1,"fillGradient":0,"gridPos":{"h":8,"w":24,"x":0,"y":41},"hiddenSeries":false,"id":62,"interval":"`}}{{ .Values.monitoring.dashboards.defaultDashboardsInterval }}{{`","legend":{"alignAsTable":true,"avg":false,"current":false,"max":false,"min":false,"rightSide":true,"show":true,"total":false,"values":false},"lines":true,"linewidth":1,"nullPointMode":"null","options":{"dataLinks":[]},"panels":[],"percentage":false,"pointradius":1,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"stack":false,"steppedLine":false,"targets":[{"expr":"sum(rate(loki_gcs_request_duration_seconds_count{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\"}[$__rate_interval])) by (status_code, operation)","intervalFactor":1,"legendFormat":"{{status_code}}-{{operation}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"Status By Method","tooltip":{"shared":true,"sort":2,"value_type":"individual"},"type":"timeseries","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}],"yaxis":{"align":false,"alignLevel":null}}],"targets":[],"title":"GCS","type":"row"},{"collapsed":true,"datasource":null,"gridPos":{"h":1,"w":24,"x":0,"y":36},"id":76,"panels":[{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":null,"fill":1,"fillGradient":0,"gridPos":{"h":6,"w":6,"x":0,"y":9},"id":82,"legend":{"avg":false,"current":false,"max":false,"min":false,"show":true,"total":false,"values":false},"lines":true,"linewidth":1,"nullPointMode":"null","options":{"dataLinks":[]},"panels":[],"percentage":false,"pointradius":2,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"stack":false,"steppedLine":false,"targets":[{"expr":"sum(rate(loki_dynamo_failures_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\"}[$__rate_interval]))","refId":"A"}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"Failure Rate","tooltip":{"shared":true,"sort":0,"value_type":"individual"},"type":"timeseries","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}],"yaxis":{"align":false,"alignLevel":null}},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":null,"fill":1,"fillGradient":0,"gridPos":{"h":6,"w":6,"x":6,"y":9},"id":83,"legend":{"avg":false,"current":false,"max":false,"min":false,"show":true,"total":false,"values":false},"lines":true,"linewidth":1,"nullPointMode":"null","options":{"dataLinks":[]},"panels":[],"percentage":false,"pointradius":2,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"stack":false,"steppedLine":false,"targets":[{"expr":"sum(rate(loki_dynamo_consumed_capacity_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\"}[$__rate_interval]))","refId":"A"}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"Consumed Capacity Rate","tooltip":{"shared":true,"sort":0,"value_type":"individual"},"type":"timeseries","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}],"yaxis":{"align":false,"alignLevel":null}},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":null,"fill":1,"fillGradient":0,"gridPos":{"h":6,"w":6,"x":12,"y":9},"id":84,"legend":{"avg":false,"current":false,"max":false,"min":false,"show":true,"total":false,"values":false},"lines":true,"linewidth":1,"nullPointMode":"null","options":{"dataLinks":[]},"panels":[],"percentage":false,"pointradius":2,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"stack":false,"steppedLine":false,"targets":[{"expr":"sum(rate(loki_dynamo_throttled_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\"}[$__rate_interval]))","refId":"A"}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"Throttled Rate","tooltip":{"shared":true,"sort":0,"value_type":"individual"},"type":"timeseries","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}],"yaxis":{"align":false,"alignLevel":null}},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":null,"fill":1,"fillGradient":0,"gridPos":{"h":6,"w":6,"x":18,"y":9},"id":85,"legend":{"avg":false,"current":false,"max":false,"min":false,"show":true,"total":false,"values":false},"lines":true,"linewidth":1,"nullPointMode":"null","options":{"dataLinks":[]},"panels":[],"percentage":false,"pointradius":2,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"stack":false,"steppedLine":false,"targets":[{"expr":"sum(rate(loki_dynamo_dropped_requests_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\"}[$__rate_interval]))","refId":"A"}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"Dropped Rate","tooltip":{"shared":true,"sort":0,"value_type":"individual"},"type":"timeseries","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}],"yaxis":{"align":false,"alignLevel":null}},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":null,"fill":1,"fillGradient":0,"gridPos":{"h":6,"w":6,"x":0,"y":15},"id":86,"legend":{"avg":false,"current":false,"max":false,"min":false,"show":true,"total":false,"values":false},"lines":true,"linewidth":1,"nullPointMode":"null","options":{"dataLinks":[]},"panels":[],"percentage":false,"pointradius":2,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"stack":false,"steppedLine":false,"targets":[{"expr":"histogram_quantile(.99, sum(rate(loki_dynamo_query_pages_count{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\"}[$__rate_interval])))","legendFormat":".99","refId":"A"},{"expr":"histogram_quantile(.9, sum(rate(loki_dynamo_query_pages_count{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\"}[$__rate_interval])))","legendFormat":".9","refId":"B"},{"expr":"histogram_quantile(.5, sum(rate(loki_dynamo_query_pages_count{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\"}[$__rate_interval])))","legendFormat":".5","refId":"C"}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"Query Pages","tooltip":{"shared":true,"sort":0,"value_type":"individual"},"type":"timeseries","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}],"yaxis":{"align":false,"alignLevel":null}},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fieldConfig":{"defaults":{"unit":"s"}},"fill":1,"fillGradient":0,"gridPos":{"h":6,"w":9,"x":6,"y":15},"id":87,"interval":"`}}{{ .Values.monitoring.dashboards.defaultDashboardsInterval }}{{`","legend":{"alignAsTable":true,"avg":false,"current":false,"max":false,"min":false,"rightSide":true,"show":true,"total":false,"values":false},"lines":true,"linewidth":1,"nullPointMode":"null","options":{"dataLinks":[]},"panels":[],"percentage":false,"pointradius":1,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"stack":false,"steppedLine":false,"targets":[{"expr":"histogram_quantile(.99, sum(rate(loki_dynamo_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\"}[$__rate_interval])) by (operation, le))","intervalFactor":1,"legendFormat":".99-{{operation}}","refId":"A"},{"expr":"histogram_quantile(.9, sum(rate(loki_dynamo_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\"}[$__rate_interval])) by (operation, le))","hide":false,"legendFormat":".9-{{operation}}","refId":"B"},{"expr":"histogram_quantile(.5, sum(rate(loki_dynamo_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\"}[$__rate_interval])) by (operation, le))","hide":false,"legendFormat":".5-{{operation}}","refId":"C"}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"Latency By Operation","tooltip":{"shared":true,"sort":2,"value_type":"individual"},"type":"timeseries","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}],"yaxis":{"align":false,"alignLevel":null}},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":1,"fillGradient":0,"gridPos":{"h":6,"w":9,"x":15,"y":15},"id":88,"interval":"`}}{{ .Values.monitoring.dashboards.defaultDashboardsInterval }}{{`","legend":{"alignAsTable":true,"avg":false,"current":false,"max":false,"min":false,"rightSide":true,"show":true,"total":false,"values":false},"lines":true,"linewidth":1,"nullPointMode":"null","options":{"dataLinks":[]},"panels":[],"percentage":false,"pointradius":1,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"stack":false,"steppedLine":false,"targets":[{"expr":"sum(rate(loki_dynamo_request_duration_seconds_count{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\"}[$__rate_interval])) by (status_code, operation)","intervalFactor":1,"legendFormat":"{{status_code}}-{{operation}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"Status By Method","tooltip":{"shared":true,"sort":2,"value_type":"individual"},"type":"timeseries","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}],"yaxis":{"align":false,"alignLevel":null}}],"targets":[],"title":"Dynamo","type":"row"},{"collapsed":true,"datasource":null,"gridPos":{"h":1,"w":24,"x":0,"y":37},"id":78,"panels":[{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fieldConfig":{"defaults":{"unit":"s"}},"fill":1,"fillGradient":0,"gridPos":{"h":8,"w":24,"x":0,"y":10},"id":79,"interval":"`}}{{ .Values.monitoring.dashboards.defaultDashboardsInterval }}{{`","legend":{"alignAsTable":true,"avg":false,"current":false,"max":false,"min":false,"rightSide":true,"show":true,"total":false,"values":false},"lines":true,"linewidth":1,"nullPointMode":"null","options":{"dataLinks":[]},"panels":[],"percentage":false,"pointradius":1,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"stack":false,"steppedLine":false,"targets":[{"expr":"histogram_quantile(.99, sum(rate(loki_s3_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\"}[$__rate_interval])) by (operation, le))","intervalFactor":1,"legendFormat":".99-{{operation}}","refId":"A"},{"expr":"histogram_quantile(.9, sum(rate(loki_s3_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\"}[$__rate_interval])) by (operation, le))","hide":false,"legendFormat":".9-{{operation}}","refId":"B"},{"expr":"histogram_quantile(.5, sum(rate(loki_s3_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\"}[$__rate_interval])) by (operation, le))","hide":false,"legendFormat":".5-{{operation}}","refId":"C"}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"Latency By Operation","tooltip":{"shared":true,"sort":2,"value_type":"individual"},"type":"timeseries","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}],"yaxis":{"align":false,"alignLevel":null}},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":1,"fillGradient":0,"gridPos":{"h":8,"w":24,"x":0,"y":18},"id":80,"interval":"`}}{{ .Values.monitoring.dashboards.defaultDashboardsInterval }}{{`","legend":{"alignAsTable":true,"avg":false,"current":false,"max":false,"min":false,"rightSide":true,"show":true,"total":false,"values":false},"lines":true,"linewidth":1,"nullPointMode":"null","options":{"dataLinks":[]},"panels":[],"percentage":false,"pointradius":1,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"stack":false,"steppedLine":false,"targets":[{"expr":"sum(rate(loki_s3_request_duration_seconds_count{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\"}[$__rate_interval])) by (status_code, operation)","intervalFactor":1,"legendFormat":"{{status_code}}-{{operation}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"Status By Method","tooltip":{"shared":true,"sort":2,"value_type":"individual"},"type":"timeseries","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}],"yaxis":{"align":false,"alignLevel":null}}],"targets":[],"title":"S3","type":"row"},{"collapsed":true,"datasource":null,"gridPos":{"h":1,"w":24,"x":0,"y":37},"id":78,"panels":[{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fieldConfig":{"defaults":{"unit":"s"}},"fill":1,"fillGradient":0,"gridPos":{"h":8,"w":24,"x":0,"y":10},"id":79,"interval":"`}}{{ .Values.monitoring.dashboards.defaultDashboardsInterval }}{{`","legend":{"alignAsTable":true,"avg":false,"current":false,"max":false,"min":false,"rightSide":true,"show":true,"total":false,"values":false},"lines":true,"linewidth":1,"nullPointMode":"null","options":{"dataLinks":[]},"panels":[],"percentage":false,"pointradius":1,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"stack":false,"steppedLine":false,"targets":[{"expr":"histogram_quantile(.99, sum(rate(loki_azure_blob_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\"}[$__rate_interval])) by (operation, le))","intervalFactor":1,"legendFormat":".99-{{operation}}","refId":"A"},{"expr":"histogram_quantile(.9, sum(rate(loki_azure_blob_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\"}[$__rate_interval])) by (operation, le))","hide":false,"legendFormat":".9-{{operation}}","refId":"B"},{"expr":"histogram_quantile(.5, sum(rate(loki_azure_blob_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\"}[$__rate_interval])) by (operation, le))","hide":false,"legendFormat":".5-{{operation}}","refId":"C"}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"Latency By Operation","tooltip":{"shared":true,"sort":2,"value_type":"individual"},"type":"timeseries","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}],"yaxis":{"align":false,"alignLevel":null}},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":1,"fillGradient":0,"gridPos":{"h":8,"w":24,"x":0,"y":18},"id":80,"interval":"`}}{{ .Values.monitoring.dashboards.defaultDashboardsInterval }}{{`","legend":{"alignAsTable":true,"avg":false,"current":false,"max":false,"min":false,"rightSide":true,"show":true,"total":false,"values":false},"lines":true,"linewidth":1,"nullPointMode":"null","options":{"dataLinks":[]},"panels":[],"percentage":false,"pointradius":1,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"stack":false,"steppedLine":false,"targets":[{"expr":"sum(rate(loki_azure_blob_request_duration_seconds_count{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\"}[$__rate_interval])) by (status_code, operation)","intervalFactor":1,"legendFormat":"{{status_code}}-{{operation}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"Status By Method","tooltip":{"shared":true,"sort":2,"value_type":"individual"},"type":"timeseries","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}],"yaxis":{"align":false,"alignLevel":null}}],"targets":[],"title":"Azure Blob","type":"row"},{"collapsed":true,"datasource":null,"gridPos":{"h":1,"w":24,"x":0,"y":37},"id":114,"panels":[{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fieldConfig":{"defaults":{"unit":"s"}},"fill":1,"fillGradient":0,"gridPos":{"h":8,"w":24,"x":0,"y":10},"id":115,"interval":"`}}{{ .Values.monitoring.dashboards.defaultDashboardsInterval }}{{`","legend":{"alignAsTable":true,"avg":false,"current":false,"max":false,"min":false,"rightSide":true,"show":true,"total":false,"values":false},"lines":true,"linewidth":1,"nullPointMode":"null","options":{"dataLinks":[]},"panels":[],"percentage":false,"pointradius":1,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"stack":false,"steppedLine":false,"targets":[{"expr":"histogram_quantile(.99, sum(rate(loki_boltdb_shipper_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\"}[$__rate_interval])) by (operation, le))","intervalFactor":1,"legendFormat":".99-{{operation}}","refId":"A"},{"expr":"histogram_quantile(.9, sum(rate(loki_boltdb_shipper_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\"}[$__rate_interval])) by (operation, le))","hide":false,"legendFormat":".9-{{operation}}","refId":"B"},{"expr":"histogram_quantile(.5, sum(rate(loki_boltdb_shipper_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\"}[$__rate_interval])) by (operation, le))","hide":false,"legendFormat":".5-{{operation}}","refId":"C"}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"Latency By Operation","tooltip":{"shared":true,"sort":2,"value_type":"individual"},"type":"timeseries","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}],"yaxis":{"align":false,"alignLevel":null}},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":1,"fillGradient":0,"gridPos":{"h":8,"w":24,"x":0,"y":18},"id":116,"interval":"`}}{{ .Values.monitoring.dashboards.defaultDashboardsInterval }}{{`","legend":{"alignAsTable":true,"avg":false,"current":false,"max":false,"min":false,"rightSide":true,"show":true,"total":false,"values":false},"lines":true,"linewidth":1,"nullPointMode":"null","options":{"dataLinks":[]},"panels":[],"percentage":false,"pointradius":1,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"stack":false,"steppedLine":false,"targets":[{"expr":"sum(rate(loki_boltdb_shipper_request_duration_seconds_count{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=\"$namespace\"}[$__rate_interval])) by (status_code, operation)","intervalFactor":1,"legendFormat":"{{status_code}}-{{operation}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"Status By Method","tooltip":{"shared":true,"sort":2,"value_type":"individual"},"type":"timeseries","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}],"yaxis":{"align":false,"alignLevel":null}}],"targets":[],"title":"BoltDB Shipper","type":"row"}],"refresh":"10s","rows":[],"schemaVersion":14,"style":"dark","tags":["loki"],"templating":{"list":[{"current":{"text":"default","value":"default"},"hide":0,"label":"Data source","name":"datasource","options":[],"query":"prometheus","refresh":1,"regex":"","type":"datasource"},{"hide":0,"label":null,"name":"loki_datasource","options":[],"query":"loki","refresh":1,"regex":"","type":"datasource"},`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`{"allValue":null,"current":{"text":"prod","value":"prod"},"datasource":"$datasource","hide":0,"includeAll":false,"label":"cluster","multi":false,"name":"cluster","options":[],"query":"label_values(loki_build_info, cluster)","refresh":1,"regex":"","sort":2,"tagValuesQuery":"","tags":[],"tagsQuery":"","type":"query","useTags":false},`}}{{ end }}{{`{"current":{"text":"prod","value":"prod"},"datasource":"$datasource","hide":0,"includeAll":false,"label":"`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`","multi":false,"name":"`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`","options":[],"query":"label_values(loki_build_info, `}}{{ $.Values.monitoring.appInstanceLabelName }}{{`)","refresh":1,"regex":"","sort":2,"tagValuesQuery":"","tags":[],"tagsQuery":"","type":"query","useTags":false},{"allValue":null,"current":{"text":"prod","value":"prod"},"datasource":"$datasource","hide":0,"includeAll":false,"label":"namespace","multi":false,"name":"namespace","options":[],"query":"label_values(loki_build_info{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\"}, namespace)","refresh":1,"regex":"","sort":2,"tagValuesQuery":"","tags":[],"tagsQuery":"","type":"query","useTags":false}]},"time":{"from":"now-1h","to":"now"},"timepicker":{"refresh_intervals":["5s","10s","30s","1m","5m","15m","30m","1h","2h","1d"],"time_options":["5m","15m","1h","6h","12h","24h","2d","7d","30d"]},"timezone": "`}}{{ .Values.monitoring.dashboards.defaultDashboardsTimezone }}{{`","title":"Loki / Operational","uid":"operational","version":0}`}} +{{- end }} +--- +{{- if and .Values.monitoring.dashboards.enabled .Values.monitoring.dashboards.grafanaOperator.enabled (dig "loki-operational" "enabled" true .Values.monitoring.dashboards) }} +apiVersion: grafana.integreatly.org/v1beta1 +kind: GrafanaDashboard +metadata: + name: {{ include "loki.resourceName" (dict "ctx" $ "component" "dashboards" "suffix" "loki-operational") }} + namespace: {{ .Values.monitoring.namespace | default (include "loki.namespace" $) }} + {{- with (mergeOverwrite dict .Values.monitoring.dashboards.annotations .Values.monitoring.dashboards.grafanaOperator.annotations) }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} + labels: + {{- include "loki.labels" $ | nindent 4 }} + {{- with (mergeOverwrite dict .Values.monitoring.dashboards.labels .Values.monitoring.dashboards.grafanaOperator.labels) }} + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + allowCrossNamespaceImport: true + resyncPeriod: {{ .Values.monitoring.dashboards.grafanaOperator.resyncPeriod | default "10m" | quote }} + {{- include "loki.grafana.operator.folder" $ | nindent 2 }} + instanceSelector: + {{- toYaml .Values.monitoring.dashboards.grafanaOperator.instanceSelector | nindent 4 }} + configMapRef: + name: {{ include "loki.resourceName" (dict "ctx" $ "component" "dashboards" "suffix" "loki-operational") }} + key: loki-operational.json +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/monitoring/dashboards/loki-reads-resources.yaml b/packs/loki-3.7.4/charts/loki/templates/monitoring/dashboards/loki-reads-resources.yaml new file mode 100644 index 00000000..f6e3eefc --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/monitoring/dashboards/loki-reads-resources.yaml @@ -0,0 +1,50 @@ +{{- /* +Generated from 'loki-reads-resources' from https://github.com/grafana/loki.git +Do not change in-place! In order to change this file first read following link: +https://github.com/grafana-community/helm-charts/tree/main/charts/loki/hack +*/ -}} +{{- if and .Values.monitoring.dashboards.enabled (dig "loki-reads-resources" "enabled" true .Values.monitoring.dashboards) }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "loki.resourceName" (dict "ctx" $ "component" "dashboards" "suffix" "loki-reads-resources") }} + namespace: {{ .Values.monitoring.namespace | default (include "loki.namespace" $) }} + labels: + {{- include "loki.labels" $ | nindent 4 }} + {{- with .Values.monitoring.dashboards.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.monitoring.dashboards.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +data: + loki-reads-resources.json: |- + {{`{"annotations":{"list":[]},"editable":`}}{{ .Values.monitoring.dashboards.defaultDashboardsEditable }}{{`,"gnetId":null,"graphTooltip":0,"hideControls":false,"links":[{"asDropdown":true,"icon":"external link","includeVars":true,"keepTime":true,"tags":["loki"],"targetBlank":false,"title":"Loki Dashboards","type":"dashboards"}],"refresh":"10s","rows":[{"collapse":false,"height":"250px","panels":[{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"short"},"overrides":[{"matcher":{"id":"byName","options":"request"},"properties":[{"id":"color","value":{"fixedColor":"#FFC000","mode":"fixed"}},{"id":"custom.fillOpacity","value":0}]},{"matcher":{"id":"byName","options":"limit"},"properties":[{"id":"color","value":{"fixedColor":"#E02F44","mode":"fixed"}},{"id":"custom.fillOpacity","value":0}]}]},"id":1,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":4,"targets":[{"expr":"sum by(pod) (rate(container_cpu_usage_seconds_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"query-frontend\"}[$__rate_interval]))","format":"time_series","legendFormat":"{{pod}}","legendLink":null},{"expr":"min(kube_pod_container_resource_requests{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"query-frontend\", resource=\"cpu\"} > 0)","format":"time_series","legendFormat":"request","legendLink":null},{"expr":"min(container_spec_cpu_quota{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"query-frontend\"} / container_spec_cpu_period{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"query-frontend\"})","format":"time_series","legendFormat":"limit","legendLink":null}],"title":"CPU","tooltip":{"sort":2},"type":"timeseries"},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"bytes"},"overrides":[{"matcher":{"id":"byName","options":"request"},"properties":[{"id":"color","value":{"fixedColor":"#FFC000","mode":"fixed"}},{"id":"custom.fillOpacity","value":0}]},{"matcher":{"id":"byName","options":"limit"},"properties":[{"id":"color","value":{"fixedColor":"#E02F44","mode":"fixed"}},{"id":"custom.fillOpacity","value":0}]}]},"id":2,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":4,"targets":[{"expr":"max by(pod) (container_memory_working_set_bytes{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"query-frontend\"})","format":"time_series","legendFormat":"{{pod}}","legendLink":null},{"expr":"min(kube_pod_container_resource_requests{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"query-frontend\", resource=\"memory\"} > 0)","format":"time_series","legendFormat":"request","legendLink":null},{"expr":"min(container_spec_memory_limit_bytes{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"query-frontend\"} > 0)","format":"time_series","legendFormat":"limit","legendLink":null}],"title":"Memory (workingset)","tooltip":{"sort":2},"type":"timeseries"},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"bytes"},"overrides":[]},"id":3,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":4,"targets":[{"expr":"sum by(pod) (go_memstats_heap_inuse_bytes{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"($namespace)/.*-query-frontend\"})","format":"time_series","legendFormat":"{{pod}}","legendLink":null}],"title":"Memory (go heap inuse)","tooltip":{"sort":2},"type":"timeseries"}],"repeat":null,"repeatIteration":null,"repeatRowId":null,"showTitle":true,"title":"Query Frontend","titleSize":"h6"},{"collapse":false,"height":"250px","panels":[{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"short"},"overrides":[{"matcher":{"id":"byName","options":"request"},"properties":[{"id":"color","value":{"fixedColor":"#FFC000","mode":"fixed"}},{"id":"custom.fillOpacity","value":0}]},{"matcher":{"id":"byName","options":"limit"},"properties":[{"id":"color","value":{"fixedColor":"#E02F44","mode":"fixed"}},{"id":"custom.fillOpacity","value":0}]}]},"id":4,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":4,"targets":[{"expr":"sum by(pod) (rate(container_cpu_usage_seconds_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"query-scheduler\"}[$__rate_interval]))","format":"time_series","legendFormat":"{{pod}}","legendLink":null},{"expr":"min(kube_pod_container_resource_requests{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"query-scheduler\", resource=\"cpu\"} > 0)","format":"time_series","legendFormat":"request","legendLink":null},{"expr":"min(container_spec_cpu_quota{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"query-scheduler\"} / container_spec_cpu_period{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"query-scheduler\"})","format":"time_series","legendFormat":"limit","legendLink":null}],"title":"CPU","tooltip":{"sort":2},"type":"timeseries"},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"bytes"},"overrides":[{"matcher":{"id":"byName","options":"request"},"properties":[{"id":"color","value":{"fixedColor":"#FFC000","mode":"fixed"}},{"id":"custom.fillOpacity","value":0}]},{"matcher":{"id":"byName","options":"limit"},"properties":[{"id":"color","value":{"fixedColor":"#E02F44","mode":"fixed"}},{"id":"custom.fillOpacity","value":0}]}]},"id":5,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":4,"targets":[{"expr":"max by(pod) (container_memory_working_set_bytes{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"query-scheduler\"})","format":"time_series","legendFormat":"{{pod}}","legendLink":null},{"expr":"min(kube_pod_container_resource_requests{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"query-scheduler\", resource=\"memory\"} > 0)","format":"time_series","legendFormat":"request","legendLink":null},{"expr":"min(container_spec_memory_limit_bytes{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"query-scheduler\"} > 0)","format":"time_series","legendFormat":"limit","legendLink":null}],"title":"Memory (workingset)","tooltip":{"sort":2},"type":"timeseries"},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"bytes"},"overrides":[]},"id":6,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":4,"targets":[{"expr":"sum by(pod) (go_memstats_heap_inuse_bytes{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"($namespace)/.*-query-scheduler\"})","format":"time_series","legendFormat":"{{pod}}","legendLink":null}],"title":"Memory (go heap inuse)","tooltip":{"sort":2},"type":"timeseries"}],"repeat":null,"repeatIteration":null,"repeatRowId":null,"showTitle":true,"title":"Query Scheduler","titleSize":"h6"},{"collapse":false,"height":"250px","panels":[{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"short"},"overrides":[{"matcher":{"id":"byName","options":"request"},"properties":[{"id":"color","value":{"fixedColor":"#FFC000","mode":"fixed"}},{"id":"custom.fillOpacity","value":0}]},{"matcher":{"id":"byName","options":"limit"},"properties":[{"id":"color","value":{"fixedColor":"#E02F44","mode":"fixed"}},{"id":"custom.fillOpacity","value":0}]}]},"id":7,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":2,"targets":[{"expr":"sum by(pod) (rate(container_cpu_usage_seconds_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"querier\"}[$__rate_interval]))","format":"time_series","legendFormat":"{{pod}}","legendLink":null},{"expr":"min(kube_pod_container_resource_requests{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"querier\", resource=\"cpu\"} > 0)","format":"time_series","legendFormat":"request","legendLink":null},{"expr":"min(container_spec_cpu_quota{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"querier\"} / container_spec_cpu_period{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"querier\"})","format":"time_series","legendFormat":"limit","legendLink":null}],"title":"CPU","tooltip":{"sort":2},"type":"timeseries"},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"bytes"},"overrides":[{"matcher":{"id":"byName","options":"request"},"properties":[{"id":"color","value":{"fixedColor":"#FFC000","mode":"fixed"}},{"id":"custom.fillOpacity","value":0}]},{"matcher":{"id":"byName","options":"limit"},"properties":[{"id":"color","value":{"fixedColor":"#E02F44","mode":"fixed"}},{"id":"custom.fillOpacity","value":0}]}]},"id":8,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":2,"targets":[{"expr":"max by(pod) (container_memory_working_set_bytes{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"querier\"})","format":"time_series","legendFormat":"{{pod}}","legendLink":null},{"expr":"min(kube_pod_container_resource_requests{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"querier\", resource=\"memory\"} > 0)","format":"time_series","legendFormat":"request","legendLink":null},{"expr":"min(container_spec_memory_limit_bytes{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"querier\"} > 0)","format":"time_series","legendFormat":"limit","legendLink":null}],"title":"Memory (workingset)","tooltip":{"sort":2},"type":"timeseries"},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"bytes"},"overrides":[]},"id":9,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":2,"targets":[{"expr":"sum by(pod) (go_memstats_heap_inuse_bytes{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"($namespace)/.*-querier\"})","format":"time_series","legendFormat":"{{pod}}","legendLink":null}],"title":"Memory (go heap inuse)","tooltip":{"sort":2},"type":"timeseries"},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":100,"lineWidth":0,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"normal"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"Bps"},"overrides":[]},"id":10,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":2,"targets":[{"expr":"sum by(instance, device) (rate(node_disk_written_bytes_total[$__rate_interval])) + ignoring(pod) group_right() (label_replace(count by(instance, pod, device) (container_fs_writes_bytes_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=\"querier\", device!~\".*sda.*\"}), \"device\", \"$1\", \"device\", \"/dev/(.*)\") * 0)\n","format":"time_series","legendFormat":"{{pod}} - {{device}}","legendLink":null}],"title":"Disk Writes","type":"timeseries"},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":100,"lineWidth":0,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"normal"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"Bps"},"overrides":[]},"id":11,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":2,"targets":[{"expr":"sum by(instance,device) (rate(node_disk_read_bytes_total[$__rate_interval])) + ignoring(pod) group_right() (label_replace(count by(instance, pod, device) (container_fs_writes_bytes_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=\"querier\", device!~\".*sda.*\"}), \"device\", \"$1\", \"device\", \"/dev/(.*)\") * 0)\n","format":"time_series","legendFormat":"{{pod}} - {{device}}","legendLink":null}],"title":"Disk Reads","type":"timeseries"},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"percentunit"},"overrides":[]},"id":12,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":2,"targets":[{"expr":"max by(persistentvolumeclaim) (kubelet_volume_stats_used_bytes{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", persistentvolumeclaim=~\".*querier.*\"} / kubelet_volume_stats_capacity_bytes{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", persistentvolumeclaim=~\".*querier.*\"})","format":"time_series","legendFormat":"{{persistentvolumeclaim}}","legendLink":null}],"title":"Disk Space Utilization","type":"timeseries"}],"repeat":null,"repeatIteration":null,"repeatRowId":null,"showTitle":true,"title":"Querier","titleSize":"h6"},{"collapse":false,"height":"250px","panels":[{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"short"},"overrides":[{"matcher":{"id":"byName","options":"request"},"properties":[{"id":"color","value":{"fixedColor":"#FFC000","mode":"fixed"}},{"id":"custom.fillOpacity","value":0}]},{"matcher":{"id":"byName","options":"limit"},"properties":[{"id":"color","value":{"fixedColor":"#E02F44","mode":"fixed"}},{"id":"custom.fillOpacity","value":0}]}]},"id":13,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":2,"targets":[{"expr":"sum by(pod) (rate(container_cpu_usage_seconds_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"loki|index-gateway\", pod=~\"(.*index-gateway.*|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"}[$__rate_interval]))","format":"time_series","legendFormat":"{{pod}}","legendLink":null},{"expr":"min(kube_pod_container_resource_requests{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"loki|index-gateway\", pod=~\"(.*index-gateway.*|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", resource=\"cpu\"} > 0)","format":"time_series","legendFormat":"request","legendLink":null},{"expr":"min(container_spec_cpu_quota{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"loki|index-gateway\", pod=~\"(.*index-gateway.*|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"} / container_spec_cpu_period{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"loki|index-gateway\", pod=~\"(.*index-gateway.*|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"})","format":"time_series","legendFormat":"limit","legendLink":null}],"title":"CPU","tooltip":{"sort":2},"type":"timeseries"},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"bytes"},"overrides":[{"matcher":{"id":"byName","options":"request"},"properties":[{"id":"color","value":{"fixedColor":"#FFC000","mode":"fixed"}},{"id":"custom.fillOpacity","value":0}]},{"matcher":{"id":"byName","options":"limit"},"properties":[{"id":"color","value":{"fixedColor":"#E02F44","mode":"fixed"}},{"id":"custom.fillOpacity","value":0}]}]},"id":14,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":2,"targets":[{"expr":"max by(pod) (container_memory_working_set_bytes{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"loki|index-gateway\", pod=~\"(.*index-gateway.*|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"})","format":"time_series","legendFormat":"{{pod}}","legendLink":null},{"expr":"min(kube_pod_container_resource_requests{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"loki|index-gateway\", pod=~\"(.*index-gateway.*|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", resource=\"memory\"} > 0)","format":"time_series","legendFormat":"request","legendLink":null},{"expr":"min(container_spec_memory_limit_bytes{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"loki|index-gateway\", pod=~\"(.*index-gateway.*|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"} > 0)","format":"time_series","legendFormat":"limit","legendLink":null}],"title":"Memory (workingset)","tooltip":{"sort":2},"type":"timeseries"},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"bytes"},"overrides":[]},"id":15,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":2,"targets":[{"expr":"sum by(pod) (go_memstats_heap_inuse_bytes{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"($namespace)/(.*index-gateway.*|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"})","format":"time_series","legendFormat":"{{pod}}","legendLink":null}],"title":"Memory (go heap inuse)","tooltip":{"sort":2},"type":"timeseries"},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":100,"lineWidth":0,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"normal"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"Bps"},"overrides":[]},"id":16,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":2,"targets":[{"expr":"sum by(instance, device) (rate(node_disk_written_bytes_total[$__rate_interval])) + ignoring(pod) group_right() (label_replace(count by(instance, pod, device) (container_fs_writes_bytes_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"loki|index-gateway\", pod=~\"(.*index-gateway.*|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", device!~\".*sda.*\"}), \"device\", \"$1\", \"device\", \"/dev/(.*)\") * 0)\n","format":"time_series","legendFormat":"{{pod}} - {{device}}","legendLink":null}],"title":"Disk Writes","type":"timeseries"},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":100,"lineWidth":0,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"normal"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"Bps"},"overrides":[]},"id":17,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":2,"targets":[{"expr":"sum by(instance, device) (rate(node_disk_read_bytes_total[$__rate_interval])) + ignoring(pod) group_right() (label_replace(count by(instance, pod, device) (container_fs_writes_bytes_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"loki|index-gateway\", pod=~\"(.*index-gateway.*|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", device!~\".*sda.*\"}), \"device\", \"$1\", \"device\", \"/dev/(.*)\") * 0)\n","format":"time_series","legendFormat":"{{pod}} - {{device}}","legendLink":null}],"title":"Disk Reads","type":"timeseries"},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"percentunit"},"overrides":[]},"id":18,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":2,"targets":[{"expr":"max by(persistentvolumeclaim) (kubelet_volume_stats_used_bytes{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", persistentvolumeclaim=~\".*(.*index-gateway.*|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`).*\"} / kubelet_volume_stats_capacity_bytes{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", persistentvolumeclaim=~\".*(.*index-gateway.*|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`).*\"})","format":"time_series","legendFormat":"{{persistentvolumeclaim}}","legendLink":null}],"title":"Disk Space Utilization","type":"timeseries"}],"repeat":null,"repeatIteration":null,"repeatRowId":null,"showTitle":true,"title":"Index Gateway","titleSize":"h6"},{"collapse":false,"height":"250px","panels":[{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"short"},"overrides":[{"matcher":{"id":"byName","options":"request"},"properties":[{"id":"color","value":{"fixedColor":"#FFC000","mode":"fixed"}},{"id":"custom.fillOpacity","value":0}]},{"matcher":{"id":"byName","options":"limit"},"properties":[{"id":"color","value":{"fixedColor":"#E02F44","mode":"fixed"}},{"id":"custom.fillOpacity","value":0}]}]},"id":19,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":2,"targets":[{"expr":"sum by(pod) (rate(container_cpu_usage_seconds_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"bloom-gateway\"}[$__rate_interval]))","format":"time_series","legendFormat":"{{pod}}","legendLink":null},{"expr":"min(kube_pod_container_resource_requests{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"bloom-gateway\", resource=\"cpu\"} > 0)","format":"time_series","legendFormat":"request","legendLink":null},{"expr":"min(container_spec_cpu_quota{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"bloom-gateway\"} / container_spec_cpu_period{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"bloom-gateway\"})","format":"time_series","legendFormat":"limit","legendLink":null}],"title":"CPU","tooltip":{"sort":2},"type":"timeseries"},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"bytes"},"overrides":[{"matcher":{"id":"byName","options":"request"},"properties":[{"id":"color","value":{"fixedColor":"#FFC000","mode":"fixed"}},{"id":"custom.fillOpacity","value":0}]},{"matcher":{"id":"byName","options":"limit"},"properties":[{"id":"color","value":{"fixedColor":"#E02F44","mode":"fixed"}},{"id":"custom.fillOpacity","value":0}]}]},"id":20,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":2,"targets":[{"expr":"max by(pod) (container_memory_working_set_bytes{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"bloom-gateway\"})","format":"time_series","legendFormat":"{{pod}}","legendLink":null},{"expr":"min(kube_pod_container_resource_requests{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"bloom-gateway\", resource=\"memory\"} > 0)","format":"time_series","legendFormat":"request","legendLink":null},{"expr":"min(container_spec_memory_limit_bytes{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"bloom-gateway\"} > 0)","format":"time_series","legendFormat":"limit","legendLink":null}],"title":"Memory (workingset)","tooltip":{"sort":2},"type":"timeseries"},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"bytes"},"overrides":[]},"id":21,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":2,"targets":[{"expr":"sum by(pod) (go_memstats_heap_inuse_bytes{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"($namespace)/.*-bloom-gateway\"})","format":"time_series","legendFormat":"{{pod}}","legendLink":null}],"title":"Memory (go heap inuse)","tooltip":{"sort":2},"type":"timeseries"},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":100,"lineWidth":0,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"normal"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"Bps"},"overrides":[]},"id":22,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":2,"targets":[{"expr":"sum by(instance, device) (rate(node_disk_written_bytes_total[$__rate_interval])) + ignoring(pod) group_right() (label_replace(count by(instance, pod, device) (container_fs_writes_bytes_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=\"bloom-gateway\", device!~\".*sda.*\"}), \"device\", \"$1\", \"device\", \"/dev/(.*)\") * 0)\n","format":"time_series","legendFormat":"{{pod}} - {{device}}","legendLink":null}],"title":"Disk Writes","type":"timeseries"},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":100,"lineWidth":0,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"normal"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"Bps"},"overrides":[]},"id":23,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":2,"targets":[{"expr":"sum by(instance, device) (rate(node_disk_read_bytes_total[$__rate_interval])) + ignoring(pod) group_right() (label_replace(count by(instance, pod, device) (container_fs_writes_bytes_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=\"bloom-gateway\", device!~\".*sda.*\"}), \"device\", \"$1\", \"device\", \"/dev/(.*)\") * 0)\n","format":"time_series","legendFormat":"{{pod}} - {{device}}","legendLink":null}],"title":"Disk Reads","type":"timeseries"},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"percentunit"},"overrides":[]},"id":24,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":2,"targets":[{"expr":"max by(persistentvolumeclaim) (kubelet_volume_stats_used_bytes{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", persistentvolumeclaim=~\".*bloom-gateway.*\"} / kubelet_volume_stats_capacity_bytes{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", persistentvolumeclaim=~\".*bloom-gateway.*\"})","format":"time_series","legendFormat":"{{persistentvolumeclaim}}","legendLink":null}],"title":"Disk Space Utilization","type":"timeseries"}],"repeat":null,"repeatIteration":null,"repeatRowId":null,"showTitle":true,"title":"Bloom Gateway","titleSize":"h6"},{"collapse":false,"height":"250px","panels":[{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"short"},"overrides":[{"matcher":{"id":"byName","options":"request"},"properties":[{"id":"color","value":{"fixedColor":"#FFC000","mode":"fixed"}},{"id":"custom.fillOpacity","value":0}]},{"matcher":{"id":"byName","options":"limit"},"properties":[{"id":"color","value":{"fixedColor":"#E02F44","mode":"fixed"}},{"id":"custom.fillOpacity","value":0}]}]},"id":25,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":4,"targets":[{"expr":"sum by(pod) (rate(container_cpu_usage_seconds_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"loki|ingester|partition-ingester\", pod=~\"(.*ingester.*|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"}[$__rate_interval]))","format":"time_series","legendFormat":"{{pod}}","legendLink":null},{"expr":"min(kube_pod_container_resource_requests{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"loki|ingester|partition-ingester\", pod=~\"(.*ingester.*|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", resource=\"cpu\"} > 0)","format":"time_series","legendFormat":"request","legendLink":null},{"expr":"min(container_spec_cpu_quota{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"loki|ingester|partition-ingester\", pod=~\"(.*ingester.*|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"} / container_spec_cpu_period{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"loki|ingester|partition-ingester\", pod=~\"(.*ingester.*|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"})","format":"time_series","legendFormat":"limit","legendLink":null}],"title":"CPU","tooltip":{"sort":2},"type":"timeseries"},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"bytes"},"overrides":[{"matcher":{"id":"byName","options":"request"},"properties":[{"id":"color","value":{"fixedColor":"#FFC000","mode":"fixed"}},{"id":"custom.fillOpacity","value":0}]},{"matcher":{"id":"byName","options":"limit"},"properties":[{"id":"color","value":{"fixedColor":"#E02F44","mode":"fixed"}},{"id":"custom.fillOpacity","value":0}]}]},"id":26,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":4,"targets":[{"expr":"max by(pod) (container_memory_working_set_bytes{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"loki|ingester|partition-ingester\", pod=~\"(.*ingester.*|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"})","format":"time_series","legendFormat":"{{pod}}","legendLink":null},{"expr":"min(kube_pod_container_resource_requests{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"loki|ingester|partition-ingester\", pod=~\"(.*ingester.*|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", resource=\"memory\"} > 0)","format":"time_series","legendFormat":"request","legendLink":null},{"expr":"min(container_spec_memory_limit_bytes{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"loki|ingester|partition-ingester\", pod=~\"(.*ingester.*|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"} > 0)","format":"time_series","legendFormat":"limit","legendLink":null}],"title":"Memory (workingset)","tooltip":{"sort":2},"type":"timeseries"},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"bytes"},"overrides":[]},"id":27,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":4,"targets":[{"expr":"sum by(pod) (go_memstats_heap_inuse_bytes{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"($namespace)/(.*ingester.*|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"})","format":"time_series","legendFormat":"{{pod}}","legendLink":null}],"title":"Memory (go heap inuse)","tooltip":{"sort":2},"type":"timeseries"}],"repeat":null,"repeatIteration":null,"repeatRowId":null,"showTitle":true,"title":"Ingester","titleSize":"h6"},{"collapse":false,"height":"250px","panels":[{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"short"},"overrides":[]},"id":28,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":3,"targets":[{"expr":"sum by(pod) (loki_prometheus_rule_group_rules{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"($namespace)/.*-ruler\"}) or sum by(pod) (cortex_prometheus_rule_group_rules{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"($namespace)/.*-ruler\"})","format":"time_series","legendFormat":"{{pod}}","legendLink":null}],"title":"Rules","type":"timeseries"},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"short"},"overrides":[{"matcher":{"id":"byName","options":"request"},"properties":[{"id":"color","value":{"fixedColor":"#FFC000","mode":"fixed"}},{"id":"custom.fillOpacity","value":0}]},{"matcher":{"id":"byName","options":"limit"},"properties":[{"id":"color","value":{"fixedColor":"#E02F44","mode":"fixed"}},{"id":"custom.fillOpacity","value":0}]}]},"id":29,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":3,"targets":[{"expr":"sum by(pod) (rate(container_cpu_usage_seconds_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"ruler\"}[$__rate_interval]))","format":"time_series","legendFormat":"{{pod}}","legendLink":null},{"expr":"min(kube_pod_container_resource_requests{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"ruler\", resource=\"cpu\"} > 0)","format":"time_series","legendFormat":"request","legendLink":null},{"expr":"min(container_spec_cpu_quota{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"ruler\"} / container_spec_cpu_period{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"ruler\"})","format":"time_series","legendFormat":"limit","legendLink":null}],"title":"CPU","tooltip":{"sort":2},"type":"timeseries"},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"bytes"},"overrides":[{"matcher":{"id":"byName","options":"request"},"properties":[{"id":"color","value":{"fixedColor":"#FFC000","mode":"fixed"}},{"id":"custom.fillOpacity","value":0}]},{"matcher":{"id":"byName","options":"limit"},"properties":[{"id":"color","value":{"fixedColor":"#E02F44","mode":"fixed"}},{"id":"custom.fillOpacity","value":0}]}]},"id":30,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":3,"targets":[{"expr":"max by(pod) (container_memory_working_set_bytes{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"ruler\"})","format":"time_series","legendFormat":"{{pod}}","legendLink":null},{"expr":"min(kube_pod_container_resource_requests{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"ruler\", resource=\"memory\"} > 0)","format":"time_series","legendFormat":"request","legendLink":null},{"expr":"min(container_spec_memory_limit_bytes{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"ruler\"} > 0)","format":"time_series","legendFormat":"limit","legendLink":null}],"title":"Memory (workingset)","tooltip":{"sort":2},"type":"timeseries"},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"bytes"},"overrides":[]},"id":31,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":3,"targets":[{"expr":"sum by(pod) (go_memstats_heap_inuse_bytes{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"($namespace)/.*-ruler\"})","format":"time_series","legendFormat":"{{pod}}","legendLink":null}],"title":"Memory (go heap inuse)","tooltip":{"sort":2},"type":"timeseries"}],"repeat":null,"repeatIteration":null,"repeatRowId":null,"showTitle":true,"title":"Ruler","titleSize":"h6"}],"schemaVersion":14,"style":"dark","tags":["loki"],"templating":{"list":[{"current":{"text":"default","value":"default"},"hide":0,"label":"Data source","name":"datasource","options":[],"query":"prometheus","refresh":1,"regex":"","type":"datasource"},`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`{"allValue":null,"current":{"text":"prod","value":"prod"},"datasource":"$datasource","hide":0,"includeAll":false,"label":"cluster","multi":false,"name":"cluster","options":[],"query":"label_values(loki_build_info, cluster)","refresh":1,"regex":"","sort":2,"tagValuesQuery":"","tags":[],"tagsQuery":"","type":"query","useTags":false},`}}{{ end }}{{`{"current":{"text":"prod","value":"prod"},"datasource":"$datasource","hide":0,"includeAll":false,"label":"`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`","multi":false,"name":"`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`","options":[],"query":"label_values(loki_build_info, `}}{{ $.Values.monitoring.appInstanceLabelName }}{{`)","refresh":1,"regex":"","sort":2,"tagValuesQuery":"","tags":[],"tagsQuery":"","type":"query","useTags":false},{"allValue":null,"current":{"text":"prod","value":"prod"},"datasource":"$datasource","hide":0,"includeAll":false,"label":"namespace","multi":false,"name":"namespace","options":[],"query":"label_values(loki_build_info{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\"}, namespace)","refresh":1,"regex":"","sort":2,"tagValuesQuery":"","tags":[],"tagsQuery":"","type":"query","useTags":false}]},"time":{"from":"now-1h","to":"now"},"timepicker":{"refresh_intervals":["5s","10s","30s","1m","5m","15m","30m","1h","2h","1d"],"time_options":["5m","15m","1h","6h","12h","24h","2d","7d","30d"]},"timezone": "`}}{{ .Values.monitoring.dashboards.defaultDashboardsTimezone }}{{`","title":"Loki / Reads Resources","uid":"reads-resources","version":0}`}} +{{- end }} +--- +{{- if and .Values.monitoring.dashboards.enabled .Values.monitoring.dashboards.grafanaOperator.enabled (dig "loki-reads-resources" "enabled" true .Values.monitoring.dashboards) }} +apiVersion: grafana.integreatly.org/v1beta1 +kind: GrafanaDashboard +metadata: + name: {{ include "loki.resourceName" (dict "ctx" $ "component" "dashboards" "suffix" "loki-reads-resources") }} + namespace: {{ .Values.monitoring.namespace | default (include "loki.namespace" $) }} + {{- with (mergeOverwrite dict .Values.monitoring.dashboards.annotations .Values.monitoring.dashboards.grafanaOperator.annotations) }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} + labels: + {{- include "loki.labels" $ | nindent 4 }} + {{- with (mergeOverwrite dict .Values.monitoring.dashboards.labels .Values.monitoring.dashboards.grafanaOperator.labels) }} + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + allowCrossNamespaceImport: true + resyncPeriod: {{ .Values.monitoring.dashboards.grafanaOperator.resyncPeriod | default "10m" | quote }} + {{- include "loki.grafana.operator.folder" $ | nindent 2 }} + instanceSelector: + {{- toYaml .Values.monitoring.dashboards.grafanaOperator.instanceSelector | nindent 4 }} + configMapRef: + name: {{ include "loki.resourceName" (dict "ctx" $ "component" "dashboards" "suffix" "loki-reads-resources") }} + key: loki-reads-resources.json +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/monitoring/dashboards/loki-reads.yaml b/packs/loki-3.7.4/charts/loki/templates/monitoring/dashboards/loki-reads.yaml new file mode 100644 index 00000000..11bf910a --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/monitoring/dashboards/loki-reads.yaml @@ -0,0 +1,50 @@ +{{- /* +Generated from 'loki-reads' from https://github.com/grafana/loki.git +Do not change in-place! In order to change this file first read following link: +https://github.com/grafana-community/helm-charts/tree/main/charts/loki/hack +*/ -}} +{{- if and .Values.monitoring.dashboards.enabled (dig "loki-reads" "enabled" true .Values.monitoring.dashboards) }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "loki.resourceName" (dict "ctx" $ "component" "dashboards" "suffix" "loki-reads") }} + namespace: {{ .Values.monitoring.namespace | default (include "loki.namespace" $) }} + labels: + {{- include "loki.labels" $ | nindent 4 }} + {{- with .Values.monitoring.dashboards.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.monitoring.dashboards.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +data: + loki-reads.json: |- + {{`{"annotations":{"list":[]},"editable":`}}{{ .Values.monitoring.dashboards.defaultDashboardsEditable }}{{`,"gnetId":null,"graphTooltip":0,"hideControls":false,"links":[{"asDropdown":true,"icon":"external link","includeVars":true,"keepTime":true,"tags":["loki"],"targetBlank":false,"title":"Loki Dashboards","type":"dashboards"}],"refresh":"10s","rows":[{"collapse":false,"height":"250px","panels":[{"aliasColors":{"1xx":"#EAB839","2xx":"#7EB26D","3xx":"#6ED0E0","4xx":"#EF843C","5xx":"#E24D42","OK":"#7EB26D","cancel":"#A9A9A9","error":"#E24D42","success":"#7EB26D"},"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":100,"lineWidth":0,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"normal"}},"min":0,"thresholds":{"mode":"absolute","steps":[]},"unit":"short"},"overrides":[{"matcher":{"id":"byName","options":"1xx"},"properties":[{"id":"color","value":{"fixedColor":"#EAB839","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"2xx"},"properties":[{"id":"color","value":{"fixedColor":"#7EB26D","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"3xx"},"properties":[{"id":"color","value":{"fixedColor":"#6ED0E0","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"4xx"},"properties":[{"id":"color","value":{"fixedColor":"#EF843C","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"5xx"},"properties":[{"id":"color","value":{"fixedColor":"#E24D42","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"OK"},"properties":[{"id":"color","value":{"fixedColor":"#7EB26D","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"cancel"},"properties":[{"id":"color","value":{"fixedColor":"#A9A9A9","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"error"},"properties":[{"id":"color","value":{"fixedColor":"#E24D42","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"success"},"properties":[{"id":"color","value":{"fixedColor":"#7EB26D","mode":"fixed"}}]}]},"fill":10,"id":1,"linewidth":0,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":4,"stack":true,"targets":[{"expr":"sum by (status) (\n label_replace(label_replace(rate(loki_request_duration_seconds_count{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\",job=~\"($namespace)/(.*-query-frontend|.*-read|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", route=~\"(api_prom_rules|api_prom_rules_namespace_groupname|api_v1_rules|loki_api_v1_delete|loki_api_v1_detected_labels|loki_api_v1_index_stats|loki_api_v1_index_volume|loki_api_v1_index_volume_range|loki_api_v1_label_name_values|loki_api_v1_label_values|loki_api_v1_labels|loki_api_v1_patterns|loki_api_v1_query|loki_api_v1_query_range|loki_api_v1_series|prometheus_api_v1_rules)\"}[$__rate_interval]),\n \"status\", \"${1}xx\", \"status_code\", \"([0-9])..\"),\n \"status\", \"${1}\", \"status_code\", \"([a-zA-Z]+)\"))\n","format":"time_series","legendFormat":"{{status}}","refId":"A"}],"title":"QPS","type":"timeseries"},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"ms"},"overrides":[]},"id":2,"links":[],"nullPointMode":"null as zero","options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":4,"targets":[{"expr":"histogram_quantile(0.99, sum by (le,route) (cluster_job_route:loki_request_duration_seconds_bucket:sum_rate{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"($namespace)/(.*-query-frontend|.*-read|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", route=~\"(api_prom_rules|api_prom_rules_namespace_groupname|api_v1_rules|loki_api_v1_delete|loki_api_v1_detected_labels|loki_api_v1_index_stats|loki_api_v1_index_volume|loki_api_v1_index_volume_range|loki_api_v1_label_name_values|loki_api_v1_label_values|loki_api_v1_labels|loki_api_v1_patterns|loki_api_v1_query|loki_api_v1_query_range|loki_api_v1_series|prometheus_api_v1_rules)\"})) * 1e3","format":"time_series","legendFormat":"{{ route }} 99th percentile","refId":"A"},{"expr":"histogram_quantile(0.50, sum by (le,route) (cluster_job_route:loki_request_duration_seconds_bucket:sum_rate{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"($namespace)/(.*-query-frontend|.*-read|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", route=~\"(api_prom_rules|api_prom_rules_namespace_groupname|api_v1_rules|loki_api_v1_delete|loki_api_v1_detected_labels|loki_api_v1_index_stats|loki_api_v1_index_volume|loki_api_v1_index_volume_range|loki_api_v1_label_name_values|loki_api_v1_label_values|loki_api_v1_labels|loki_api_v1_patterns|loki_api_v1_query|loki_api_v1_query_range|loki_api_v1_series|prometheus_api_v1_rules)\"})) * 1e3","format":"time_series","legendFormat":"{{ route }} 50th percentile","refId":"B"},{"expr":"1e3 * sum(cluster_job_route:loki_request_duration_seconds_sum:sum_rate{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"($namespace)/(.*-query-frontend|.*-read|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", route=~\"(api_prom_rules|api_prom_rules_namespace_groupname|api_v1_rules|loki_api_v1_delete|loki_api_v1_detected_labels|loki_api_v1_index_stats|loki_api_v1_index_volume|loki_api_v1_index_volume_range|loki_api_v1_label_name_values|loki_api_v1_label_values|loki_api_v1_labels|loki_api_v1_patterns|loki_api_v1_query|loki_api_v1_query_range|loki_api_v1_series|prometheus_api_v1_rules)\"}) by (route) / sum(cluster_job_route:loki_request_duration_seconds_count:sum_rate{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"($namespace)/(.*-query-frontend|.*-read|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", route=~\"(api_prom_rules|api_prom_rules_namespace_groupname|api_v1_rules|loki_api_v1_delete|loki_api_v1_detected_labels|loki_api_v1_index_stats|loki_api_v1_index_volume|loki_api_v1_index_volume_range|loki_api_v1_label_name_values|loki_api_v1_label_values|loki_api_v1_labels|loki_api_v1_patterns|loki_api_v1_query|loki_api_v1_query_range|loki_api_v1_series|prometheus_api_v1_rules)\"}) by (route) ","format":"time_series","legendFormat":"{{ route }} Average","refId":"C"}],"title":"Latency","type":"timeseries","yaxes":[{"format":"ms","label":null,"logBase":1,"max":null,"min":0,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":false}]},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"ms"},"overrides":[]},"id":3,"links":[],"nullPointMode":"null as zero","options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":4,"targets":[{"expr":"histogram_quantile(0.99, sum(rate(loki_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"($namespace)/(.*-query-frontend|.*-read|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", route=~\"(api_prom_rules|api_prom_rules_namespace_groupname|api_v1_rules|loki_api_v1_delete|loki_api_v1_detected_labels|loki_api_v1_index_stats|loki_api_v1_index_volume|loki_api_v1_index_volume_range|loki_api_v1_label_name_values|loki_api_v1_label_values|loki_api_v1_labels|loki_api_v1_patterns|loki_api_v1_query|loki_api_v1_query_range|loki_api_v1_series|prometheus_api_v1_rules)\"}[$__rate_interval])) by (le,pod)) * 1e3","format":"time_series","interval":"`}}{{ .Values.monitoring.dashboards.defaultDashboardsInterval }}{{`","intervalFactor":2,"legendFormat":"__auto","refId":"A","step":10}],"title":"Per Pod Latency (p99)","type":"timeseries"}],"repeat":null,"repeatIteration":null,"repeatRowId":null,"showTitle":true,"title":"Frontend (query-frontend)","titleSize":"h6"},{"collapse":false,"height":"250px","panels":[{"aliasColors":{"1xx":"#EAB839","2xx":"#7EB26D","3xx":"#6ED0E0","4xx":"#EF843C","5xx":"#E24D42","OK":"#7EB26D","cancel":"#A9A9A9","error":"#E24D42","success":"#7EB26D"},"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":100,"lineWidth":0,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"normal"}},"min":0,"thresholds":{"mode":"absolute","steps":[]},"unit":"short"},"overrides":[{"matcher":{"id":"byName","options":"1xx"},"properties":[{"id":"color","value":{"fixedColor":"#EAB839","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"2xx"},"properties":[{"id":"color","value":{"fixedColor":"#7EB26D","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"3xx"},"properties":[{"id":"color","value":{"fixedColor":"#6ED0E0","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"4xx"},"properties":[{"id":"color","value":{"fixedColor":"#EF843C","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"5xx"},"properties":[{"id":"color","value":{"fixedColor":"#E24D42","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"OK"},"properties":[{"id":"color","value":{"fixedColor":"#7EB26D","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"cancel"},"properties":[{"id":"color","value":{"fixedColor":"#A9A9A9","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"error"},"properties":[{"id":"color","value":{"fixedColor":"#E24D42","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"success"},"properties":[{"id":"color","value":{"fixedColor":"#7EB26D","mode":"fixed"}}]}]},"fill":10,"id":4,"linewidth":0,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":4,"stack":true,"targets":[{"expr":"sum by (status) (\n label_replace(label_replace(rate(loki_request_duration_seconds_count{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\",job=~\"($namespace)/(.*-querier|.*-read|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", route=~\"(api_prom_rules|api_prom_rules_namespace_groupname|api_v1_rules|loki_api_v1_delete|loki_api_v1_detected_labels|loki_api_v1_index_stats|loki_api_v1_index_volume|loki_api_v1_index_volume_range|loki_api_v1_label_name_values|loki_api_v1_label_values|loki_api_v1_labels|loki_api_v1_patterns|loki_api_v1_query|loki_api_v1_query_range|loki_api_v1_series|prometheus_api_v1_rules)\"}[$__rate_interval]),\n \"status\", \"${1}xx\", \"status_code\", \"([0-9])..\"),\n \"status\", \"${1}\", \"status_code\", \"([a-zA-Z]+)\"))\n","format":"time_series","legendFormat":"{{status}}","refId":"A"}],"title":"QPS","type":"timeseries"},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"ms"},"overrides":[]},"id":5,"links":[],"nullPointMode":"null as zero","options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":4,"targets":[{"expr":"histogram_quantile(0.99, sum by (le,route) (cluster_job_route:loki_request_duration_seconds_bucket:sum_rate{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"($namespace)/(.*-querier|.*-read|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", route=~\"(api_prom_rules|api_prom_rules_namespace_groupname|api_v1_rules|loki_api_v1_delete|loki_api_v1_detected_labels|loki_api_v1_index_stats|loki_api_v1_index_volume|loki_api_v1_index_volume_range|loki_api_v1_label_name_values|loki_api_v1_label_values|loki_api_v1_labels|loki_api_v1_patterns|loki_api_v1_query|loki_api_v1_query_range|loki_api_v1_series|prometheus_api_v1_rules)\"})) * 1e3","format":"time_series","legendFormat":"{{ route }} 99th percentile","refId":"A"},{"expr":"histogram_quantile(0.50, sum by (le,route) (cluster_job_route:loki_request_duration_seconds_bucket:sum_rate{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"($namespace)/(.*-querier|.*-read|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", route=~\"(api_prom_rules|api_prom_rules_namespace_groupname|api_v1_rules|loki_api_v1_delete|loki_api_v1_detected_labels|loki_api_v1_index_stats|loki_api_v1_index_volume|loki_api_v1_index_volume_range|loki_api_v1_label_name_values|loki_api_v1_label_values|loki_api_v1_labels|loki_api_v1_patterns|loki_api_v1_query|loki_api_v1_query_range|loki_api_v1_series|prometheus_api_v1_rules)\"})) * 1e3","format":"time_series","legendFormat":"{{ route }} 50th percentile","refId":"B"},{"expr":"1e3 * sum(cluster_job_route:loki_request_duration_seconds_sum:sum_rate{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"($namespace)/(.*-querier|.*-read|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", route=~\"(api_prom_rules|api_prom_rules_namespace_groupname|api_v1_rules|loki_api_v1_delete|loki_api_v1_detected_labels|loki_api_v1_index_stats|loki_api_v1_index_volume|loki_api_v1_index_volume_range|loki_api_v1_label_name_values|loki_api_v1_label_values|loki_api_v1_labels|loki_api_v1_patterns|loki_api_v1_query|loki_api_v1_query_range|loki_api_v1_series|prometheus_api_v1_rules)\"}) by (route) / sum(cluster_job_route:loki_request_duration_seconds_count:sum_rate{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"($namespace)/(.*-querier|.*-read|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", route=~\"(api_prom_rules|api_prom_rules_namespace_groupname|api_v1_rules|loki_api_v1_delete|loki_api_v1_detected_labels|loki_api_v1_index_stats|loki_api_v1_index_volume|loki_api_v1_index_volume_range|loki_api_v1_label_name_values|loki_api_v1_label_values|loki_api_v1_labels|loki_api_v1_patterns|loki_api_v1_query|loki_api_v1_query_range|loki_api_v1_series|prometheus_api_v1_rules)\"}) by (route) ","format":"time_series","legendFormat":"{{ route }} Average","refId":"C"}],"title":"Latency","type":"timeseries","yaxes":[{"format":"ms","label":null,"logBase":1,"max":null,"min":0,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":false}]},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"ms"},"overrides":[]},"id":6,"links":[],"nullPointMode":"null as zero","options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":4,"targets":[{"expr":"histogram_quantile(0.99, sum(rate(loki_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"($namespace)/(.*-querier|.*-read|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", route=~\"(api_prom_rules|api_prom_rules_namespace_groupname|api_v1_rules|loki_api_v1_delete|loki_api_v1_detected_labels|loki_api_v1_index_stats|loki_api_v1_index_volume|loki_api_v1_index_volume_range|loki_api_v1_label_name_values|loki_api_v1_label_values|loki_api_v1_labels|loki_api_v1_patterns|loki_api_v1_query|loki_api_v1_query_range|loki_api_v1_series|prometheus_api_v1_rules)\"}[$__rate_interval])) by (le,pod)) * 1e3","format":"time_series","interval":"`}}{{ .Values.monitoring.dashboards.defaultDashboardsInterval }}{{`","intervalFactor":2,"legendFormat":"__auto","refId":"A","step":10}],"title":"Per Pod Latency (p99)","type":"timeseries"}],"repeat":null,"repeatIteration":null,"repeatRowId":null,"showTitle":true,"title":"Querier","titleSize":"h6"},{"collapse":false,"height":"250px","panels":[{"aliasColors":{"1xx":"#EAB839","2xx":"#7EB26D","3xx":"#6ED0E0","4xx":"#EF843C","5xx":"#E24D42","OK":"#7EB26D","cancel":"#A9A9A9","error":"#E24D42","success":"#7EB26D"},"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":100,"lineWidth":0,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"normal"}},"min":0,"thresholds":{"mode":"absolute","steps":[]},"unit":"short"},"overrides":[{"matcher":{"id":"byName","options":"1xx"},"properties":[{"id":"color","value":{"fixedColor":"#EAB839","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"2xx"},"properties":[{"id":"color","value":{"fixedColor":"#7EB26D","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"3xx"},"properties":[{"id":"color","value":{"fixedColor":"#6ED0E0","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"4xx"},"properties":[{"id":"color","value":{"fixedColor":"#EF843C","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"5xx"},"properties":[{"id":"color","value":{"fixedColor":"#E24D42","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"OK"},"properties":[{"id":"color","value":{"fixedColor":"#7EB26D","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"cancel"},"properties":[{"id":"color","value":{"fixedColor":"#A9A9A9","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"error"},"properties":[{"id":"color","value":{"fixedColor":"#E24D42","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"success"},"properties":[{"id":"color","value":{"fixedColor":"#7EB26D","mode":"fixed"}}]}]},"fill":10,"id":7,"linewidth":0,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":4,"stack":true,"targets":[{"expr":"sum by (status) (\n label_replace(label_replace(rate(loki_request_duration_seconds_count{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\",job=~\"($namespace)/(.*-partition-ingester.*|.*-ingester.*|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", route=~\"(/base.Ruler/Rules|/indexgatewaypb.IndexGateway/GetChunkRef|/indexgatewaypb.IndexGateway/GetSeries|/indexgatewaypb.IndexGateway/GetShards|/indexgatewaypb.IndexGateway/GetStats|/indexgatewaypb.IndexGateway/GetVolume|/indexgatewaypb.IndexGateway/LabelNamesForMetricName|/indexgatewaypb.IndexGateway/LabelValuesForMetricName|/indexgatewaypb.IndexGateway/QueryIndex|/logproto.BloomGateway/FilterChunkRefs|/logproto.Pattern/Query|/logproto.Querier/GetChunkIDs|/logproto.Querier/GetDetectedLabels|/logproto.Querier/GetStats|/logproto.Querier/GetVolume|/logproto.Querier/Label|/logproto.Querier/Query|/logproto.Querier/QuerySample|/logproto.Querier/Series|/logproto.StreamData/GetStreamRates)\"}[$__rate_interval]),\n \"status\", \"${1}xx\", \"status_code\", \"([0-9])..\"),\n \"status\", \"${1}\", \"status_code\", \"([a-zA-Z]+)\"))\n","format":"time_series","legendFormat":"{{status}}","refId":"A"}],"title":"QPS","type":"timeseries"},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"ms"},"overrides":[]},"id":8,"links":[],"nullPointMode":"null as zero","options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":4,"targets":[{"expr":"histogram_quantile(0.99, sum by (le,route) (cluster_job_route:loki_request_duration_seconds_bucket:sum_rate{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"($namespace)/(.*-partition-ingester.*|.*-ingester.*|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", route=~\"(/base.Ruler/Rules|/indexgatewaypb.IndexGateway/GetChunkRef|/indexgatewaypb.IndexGateway/GetSeries|/indexgatewaypb.IndexGateway/GetShards|/indexgatewaypb.IndexGateway/GetStats|/indexgatewaypb.IndexGateway/GetVolume|/indexgatewaypb.IndexGateway/LabelNamesForMetricName|/indexgatewaypb.IndexGateway/LabelValuesForMetricName|/indexgatewaypb.IndexGateway/QueryIndex|/logproto.BloomGateway/FilterChunkRefs|/logproto.Pattern/Query|/logproto.Querier/GetChunkIDs|/logproto.Querier/GetDetectedLabels|/logproto.Querier/GetStats|/logproto.Querier/GetVolume|/logproto.Querier/Label|/logproto.Querier/Query|/logproto.Querier/QuerySample|/logproto.Querier/Series|/logproto.StreamData/GetStreamRates)\"})) * 1e3","format":"time_series","legendFormat":"{{ route }} 99th percentile","refId":"A"},{"expr":"histogram_quantile(0.50, sum by (le,route) (cluster_job_route:loki_request_duration_seconds_bucket:sum_rate{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"($namespace)/(.*-partition-ingester.*|.*-ingester.*|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", route=~\"(/base.Ruler/Rules|/indexgatewaypb.IndexGateway/GetChunkRef|/indexgatewaypb.IndexGateway/GetSeries|/indexgatewaypb.IndexGateway/GetShards|/indexgatewaypb.IndexGateway/GetStats|/indexgatewaypb.IndexGateway/GetVolume|/indexgatewaypb.IndexGateway/LabelNamesForMetricName|/indexgatewaypb.IndexGateway/LabelValuesForMetricName|/indexgatewaypb.IndexGateway/QueryIndex|/logproto.BloomGateway/FilterChunkRefs|/logproto.Pattern/Query|/logproto.Querier/GetChunkIDs|/logproto.Querier/GetDetectedLabels|/logproto.Querier/GetStats|/logproto.Querier/GetVolume|/logproto.Querier/Label|/logproto.Querier/Query|/logproto.Querier/QuerySample|/logproto.Querier/Series|/logproto.StreamData/GetStreamRates)\"})) * 1e3","format":"time_series","legendFormat":"{{ route }} 50th percentile","refId":"B"},{"expr":"1e3 * sum(cluster_job_route:loki_request_duration_seconds_sum:sum_rate{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"($namespace)/(.*-partition-ingester.*|.*-ingester.*|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", route=~\"(/base.Ruler/Rules|/indexgatewaypb.IndexGateway/GetChunkRef|/indexgatewaypb.IndexGateway/GetSeries|/indexgatewaypb.IndexGateway/GetShards|/indexgatewaypb.IndexGateway/GetStats|/indexgatewaypb.IndexGateway/GetVolume|/indexgatewaypb.IndexGateway/LabelNamesForMetricName|/indexgatewaypb.IndexGateway/LabelValuesForMetricName|/indexgatewaypb.IndexGateway/QueryIndex|/logproto.BloomGateway/FilterChunkRefs|/logproto.Pattern/Query|/logproto.Querier/GetChunkIDs|/logproto.Querier/GetDetectedLabels|/logproto.Querier/GetStats|/logproto.Querier/GetVolume|/logproto.Querier/Label|/logproto.Querier/Query|/logproto.Querier/QuerySample|/logproto.Querier/Series|/logproto.StreamData/GetStreamRates)\"}) by (route) / sum(cluster_job_route:loki_request_duration_seconds_count:sum_rate{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"($namespace)/(.*-partition-ingester.*|.*-ingester.*|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", route=~\"(/base.Ruler/Rules|/indexgatewaypb.IndexGateway/GetChunkRef|/indexgatewaypb.IndexGateway/GetSeries|/indexgatewaypb.IndexGateway/GetShards|/indexgatewaypb.IndexGateway/GetStats|/indexgatewaypb.IndexGateway/GetVolume|/indexgatewaypb.IndexGateway/LabelNamesForMetricName|/indexgatewaypb.IndexGateway/LabelValuesForMetricName|/indexgatewaypb.IndexGateway/QueryIndex|/logproto.BloomGateway/FilterChunkRefs|/logproto.Pattern/Query|/logproto.Querier/GetChunkIDs|/logproto.Querier/GetDetectedLabels|/logproto.Querier/GetStats|/logproto.Querier/GetVolume|/logproto.Querier/Label|/logproto.Querier/Query|/logproto.Querier/QuerySample|/logproto.Querier/Series|/logproto.StreamData/GetStreamRates)\"}) by (route) ","format":"time_series","legendFormat":"{{ route }} Average","refId":"C"}],"title":"Latency","type":"timeseries","yaxes":[{"format":"ms","label":null,"logBase":1,"max":null,"min":0,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":false}]},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"ms"},"overrides":[]},"id":9,"links":[],"nullPointMode":"null as zero","options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":4,"targets":[{"expr":"histogram_quantile(0.99, sum(rate(loki_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"($namespace)/(.*-partition-ingester.*|.*-ingester.*|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", route=~\"(/base.Ruler/Rules|/indexgatewaypb.IndexGateway/GetChunkRef|/indexgatewaypb.IndexGateway/GetSeries|/indexgatewaypb.IndexGateway/GetShards|/indexgatewaypb.IndexGateway/GetStats|/indexgatewaypb.IndexGateway/GetVolume|/indexgatewaypb.IndexGateway/LabelNamesForMetricName|/indexgatewaypb.IndexGateway/LabelValuesForMetricName|/indexgatewaypb.IndexGateway/QueryIndex|/logproto.BloomGateway/FilterChunkRefs|/logproto.Pattern/Query|/logproto.Querier/GetChunkIDs|/logproto.Querier/GetDetectedLabels|/logproto.Querier/GetStats|/logproto.Querier/GetVolume|/logproto.Querier/Label|/logproto.Querier/Query|/logproto.Querier/QuerySample|/logproto.Querier/Series|/logproto.StreamData/GetStreamRates)\"}[$__rate_interval])) by (le,pod)) * 1e3","format":"time_series","interval":"`}}{{ .Values.monitoring.dashboards.defaultDashboardsInterval }}{{`","intervalFactor":2,"legendFormat":"__auto","refId":"A","step":10}],"title":"Per Pod Latency (p99)","type":"timeseries"}],"repeat":null,"repeatIteration":null,"repeatRowId":null,"showTitle":true,"title":"Ingester","titleSize":"h6"},{"collapse":false,"height":"250px","panels":[{"aliasColors":{"1xx":"#EAB839","2xx":"#7EB26D","3xx":"#6ED0E0","4xx":"#EF843C","5xx":"#E24D42","OK":"#7EB26D","cancel":"#A9A9A9","error":"#E24D42","success":"#7EB26D"},"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":100,"lineWidth":0,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"normal"}},"min":0,"thresholds":{"mode":"absolute","steps":[]},"unit":"short"},"overrides":[{"matcher":{"id":"byName","options":"1xx"},"properties":[{"id":"color","value":{"fixedColor":"#EAB839","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"2xx"},"properties":[{"id":"color","value":{"fixedColor":"#7EB26D","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"3xx"},"properties":[{"id":"color","value":{"fixedColor":"#6ED0E0","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"4xx"},"properties":[{"id":"color","value":{"fixedColor":"#EF843C","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"5xx"},"properties":[{"id":"color","value":{"fixedColor":"#E24D42","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"OK"},"properties":[{"id":"color","value":{"fixedColor":"#7EB26D","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"cancel"},"properties":[{"id":"color","value":{"fixedColor":"#A9A9A9","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"error"},"properties":[{"id":"color","value":{"fixedColor":"#E24D42","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"success"},"properties":[{"id":"color","value":{"fixedColor":"#7EB26D","mode":"fixed"}}]}]},"fill":10,"id":10,"linewidth":0,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":4,"stack":true,"targets":[{"expr":"sum by (status) (\n label_replace(label_replace(rate(loki_request_duration_seconds_count{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\",job=~\"($namespace)/(.*-partition-ingester|.*-ingester|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", route=~\"(/base.Ruler/Rules|/indexgatewaypb.IndexGateway/GetChunkRef|/indexgatewaypb.IndexGateway/GetSeries|/indexgatewaypb.IndexGateway/GetShards|/indexgatewaypb.IndexGateway/GetStats|/indexgatewaypb.IndexGateway/GetVolume|/indexgatewaypb.IndexGateway/LabelNamesForMetricName|/indexgatewaypb.IndexGateway/LabelValuesForMetricName|/indexgatewaypb.IndexGateway/QueryIndex|/logproto.BloomGateway/FilterChunkRefs|/logproto.Pattern/Query|/logproto.Querier/GetChunkIDs|/logproto.Querier/GetDetectedLabels|/logproto.Querier/GetStats|/logproto.Querier/GetVolume|/logproto.Querier/Label|/logproto.Querier/Query|/logproto.Querier/QuerySample|/logproto.Querier/Series|/logproto.StreamData/GetStreamRates)\"}[$__rate_interval]),\n \"status\", \"${1}xx\", \"status_code\", \"([0-9])..\"),\n \"status\", \"${1}\", \"status_code\", \"([a-zA-Z]+)\"))\n","format":"time_series","legendFormat":"{{status}}","refId":"A"}],"title":"QPS","type":"timeseries"},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"ms"},"overrides":[]},"id":11,"links":[],"nullPointMode":"null as zero","options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":4,"targets":[{"expr":"histogram_quantile(0.99, sum by (le,route) (cluster_job_route:loki_request_duration_seconds_bucket:sum_rate{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"($namespace)/(.*-partition-ingester|.*-ingester|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", route=~\"(/base.Ruler/Rules|/indexgatewaypb.IndexGateway/GetChunkRef|/indexgatewaypb.IndexGateway/GetSeries|/indexgatewaypb.IndexGateway/GetShards|/indexgatewaypb.IndexGateway/GetStats|/indexgatewaypb.IndexGateway/GetVolume|/indexgatewaypb.IndexGateway/LabelNamesForMetricName|/indexgatewaypb.IndexGateway/LabelValuesForMetricName|/indexgatewaypb.IndexGateway/QueryIndex|/logproto.BloomGateway/FilterChunkRefs|/logproto.Pattern/Query|/logproto.Querier/GetChunkIDs|/logproto.Querier/GetDetectedLabels|/logproto.Querier/GetStats|/logproto.Querier/GetVolume|/logproto.Querier/Label|/logproto.Querier/Query|/logproto.Querier/QuerySample|/logproto.Querier/Series|/logproto.StreamData/GetStreamRates)\"})) * 1e3","format":"time_series","legendFormat":"{{ route }} 99th percentile","refId":"A"},{"expr":"histogram_quantile(0.50, sum by (le,route) (cluster_job_route:loki_request_duration_seconds_bucket:sum_rate{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"($namespace)/(.*-partition-ingester|.*-ingester|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", route=~\"(/base.Ruler/Rules|/indexgatewaypb.IndexGateway/GetChunkRef|/indexgatewaypb.IndexGateway/GetSeries|/indexgatewaypb.IndexGateway/GetShards|/indexgatewaypb.IndexGateway/GetStats|/indexgatewaypb.IndexGateway/GetVolume|/indexgatewaypb.IndexGateway/LabelNamesForMetricName|/indexgatewaypb.IndexGateway/LabelValuesForMetricName|/indexgatewaypb.IndexGateway/QueryIndex|/logproto.BloomGateway/FilterChunkRefs|/logproto.Pattern/Query|/logproto.Querier/GetChunkIDs|/logproto.Querier/GetDetectedLabels|/logproto.Querier/GetStats|/logproto.Querier/GetVolume|/logproto.Querier/Label|/logproto.Querier/Query|/logproto.Querier/QuerySample|/logproto.Querier/Series|/logproto.StreamData/GetStreamRates)\"})) * 1e3","format":"time_series","legendFormat":"{{ route }} 50th percentile","refId":"B"},{"expr":"1e3 * sum(cluster_job_route:loki_request_duration_seconds_sum:sum_rate{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"($namespace)/(.*-partition-ingester|.*-ingester|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", route=~\"(/base.Ruler/Rules|/indexgatewaypb.IndexGateway/GetChunkRef|/indexgatewaypb.IndexGateway/GetSeries|/indexgatewaypb.IndexGateway/GetShards|/indexgatewaypb.IndexGateway/GetStats|/indexgatewaypb.IndexGateway/GetVolume|/indexgatewaypb.IndexGateway/LabelNamesForMetricName|/indexgatewaypb.IndexGateway/LabelValuesForMetricName|/indexgatewaypb.IndexGateway/QueryIndex|/logproto.BloomGateway/FilterChunkRefs|/logproto.Pattern/Query|/logproto.Querier/GetChunkIDs|/logproto.Querier/GetDetectedLabels|/logproto.Querier/GetStats|/logproto.Querier/GetVolume|/logproto.Querier/Label|/logproto.Querier/Query|/logproto.Querier/QuerySample|/logproto.Querier/Series|/logproto.StreamData/GetStreamRates)\"}) by (route) / sum(cluster_job_route:loki_request_duration_seconds_count:sum_rate{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"($namespace)/(.*-partition-ingester|.*-ingester|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", route=~\"(/base.Ruler/Rules|/indexgatewaypb.IndexGateway/GetChunkRef|/indexgatewaypb.IndexGateway/GetSeries|/indexgatewaypb.IndexGateway/GetShards|/indexgatewaypb.IndexGateway/GetStats|/indexgatewaypb.IndexGateway/GetVolume|/indexgatewaypb.IndexGateway/LabelNamesForMetricName|/indexgatewaypb.IndexGateway/LabelValuesForMetricName|/indexgatewaypb.IndexGateway/QueryIndex|/logproto.BloomGateway/FilterChunkRefs|/logproto.Pattern/Query|/logproto.Querier/GetChunkIDs|/logproto.Querier/GetDetectedLabels|/logproto.Querier/GetStats|/logproto.Querier/GetVolume|/logproto.Querier/Label|/logproto.Querier/Query|/logproto.Querier/QuerySample|/logproto.Querier/Series|/logproto.StreamData/GetStreamRates)\"}) by (route) ","format":"time_series","legendFormat":"{{ route }} Average","refId":"C"}],"title":"Latency","type":"timeseries","yaxes":[{"format":"ms","label":null,"logBase":1,"max":null,"min":0,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":false}]},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"ms"},"overrides":[]},"id":12,"links":[],"nullPointMode":"null as zero","options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":4,"targets":[{"expr":"histogram_quantile(0.99, sum(rate(loki_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"($namespace)/(.*-partition-ingester|.*-ingester|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", route=~\"(/base.Ruler/Rules|/indexgatewaypb.IndexGateway/GetChunkRef|/indexgatewaypb.IndexGateway/GetSeries|/indexgatewaypb.IndexGateway/GetShards|/indexgatewaypb.IndexGateway/GetStats|/indexgatewaypb.IndexGateway/GetVolume|/indexgatewaypb.IndexGateway/LabelNamesForMetricName|/indexgatewaypb.IndexGateway/LabelValuesForMetricName|/indexgatewaypb.IndexGateway/QueryIndex|/logproto.BloomGateway/FilterChunkRefs|/logproto.Pattern/Query|/logproto.Querier/GetChunkIDs|/logproto.Querier/GetDetectedLabels|/logproto.Querier/GetStats|/logproto.Querier/GetVolume|/logproto.Querier/Label|/logproto.Querier/Query|/logproto.Querier/QuerySample|/logproto.Querier/Series|/logproto.StreamData/GetStreamRates)\"}[$__rate_interval])) by (le,pod)) * 1e3","format":"time_series","interval":"`}}{{ .Values.monitoring.dashboards.defaultDashboardsInterval }}{{`","intervalFactor":2,"legendFormat":"__auto","refId":"A","step":10}],"title":"Per Pod Latency (p99)","type":"timeseries"}],"repeat":null,"repeatIteration":null,"repeatRowId":null,"showTitle":true,"title":"Ingester - Zone Aware","titleSize":"h6"},{"collapse":false,"height":"250px","panels":[{"aliasColors":{"1xx":"#EAB839","2xx":"#7EB26D","3xx":"#6ED0E0","4xx":"#EF843C","5xx":"#E24D42","OK":"#7EB26D","cancel":"#A9A9A9","error":"#E24D42","success":"#7EB26D"},"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":100,"lineWidth":0,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"normal"}},"min":0,"thresholds":{"mode":"absolute","steps":[]},"unit":"short"},"overrides":[{"matcher":{"id":"byName","options":"1xx"},"properties":[{"id":"color","value":{"fixedColor":"#EAB839","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"2xx"},"properties":[{"id":"color","value":{"fixedColor":"#7EB26D","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"3xx"},"properties":[{"id":"color","value":{"fixedColor":"#6ED0E0","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"4xx"},"properties":[{"id":"color","value":{"fixedColor":"#EF843C","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"5xx"},"properties":[{"id":"color","value":{"fixedColor":"#E24D42","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"OK"},"properties":[{"id":"color","value":{"fixedColor":"#7EB26D","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"cancel"},"properties":[{"id":"color","value":{"fixedColor":"#A9A9A9","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"error"},"properties":[{"id":"color","value":{"fixedColor":"#E24D42","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"success"},"properties":[{"id":"color","value":{"fixedColor":"#7EB26D","mode":"fixed"}}]}]},"fill":10,"id":13,"linewidth":0,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":4,"stack":true,"targets":[{"expr":"sum by (status) (\n label_replace(label_replace(rate(loki_request_duration_seconds_count{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\",job=~\"($namespace)/(.*-index-gateway|.*-backend|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", route=~\"(/base.Ruler/Rules|/indexgatewaypb.IndexGateway/GetChunkRef|/indexgatewaypb.IndexGateway/GetSeries|/indexgatewaypb.IndexGateway/GetShards|/indexgatewaypb.IndexGateway/GetStats|/indexgatewaypb.IndexGateway/GetVolume|/indexgatewaypb.IndexGateway/LabelNamesForMetricName|/indexgatewaypb.IndexGateway/LabelValuesForMetricName|/indexgatewaypb.IndexGateway/QueryIndex|/logproto.BloomGateway/FilterChunkRefs|/logproto.Pattern/Query|/logproto.Querier/GetChunkIDs|/logproto.Querier/GetDetectedLabels|/logproto.Querier/GetStats|/logproto.Querier/GetVolume|/logproto.Querier/Label|/logproto.Querier/Query|/logproto.Querier/QuerySample|/logproto.Querier/Series|/logproto.StreamData/GetStreamRates)\"}[$__rate_interval]),\n \"status\", \"${1}xx\", \"status_code\", \"([0-9])..\"),\n \"status\", \"${1}\", \"status_code\", \"([a-zA-Z]+)\"))\n","format":"time_series","legendFormat":"{{status}}","refId":"A"}],"title":"QPS","type":"timeseries"},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"ms"},"overrides":[]},"id":14,"links":[],"nullPointMode":"null as zero","options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":4,"targets":[{"expr":"histogram_quantile(0.99, sum by (le,route) (cluster_job_route:loki_request_duration_seconds_bucket:sum_rate{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"($namespace)/(.*-index-gateway|.*-backend|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", route=~\"(/base.Ruler/Rules|/indexgatewaypb.IndexGateway/GetChunkRef|/indexgatewaypb.IndexGateway/GetSeries|/indexgatewaypb.IndexGateway/GetShards|/indexgatewaypb.IndexGateway/GetStats|/indexgatewaypb.IndexGateway/GetVolume|/indexgatewaypb.IndexGateway/LabelNamesForMetricName|/indexgatewaypb.IndexGateway/LabelValuesForMetricName|/indexgatewaypb.IndexGateway/QueryIndex|/logproto.BloomGateway/FilterChunkRefs|/logproto.Pattern/Query|/logproto.Querier/GetChunkIDs|/logproto.Querier/GetDetectedLabels|/logproto.Querier/GetStats|/logproto.Querier/GetVolume|/logproto.Querier/Label|/logproto.Querier/Query|/logproto.Querier/QuerySample|/logproto.Querier/Series|/logproto.StreamData/GetStreamRates)\"})) * 1e3","format":"time_series","legendFormat":"{{ route }} 99th percentile","refId":"A"},{"expr":"histogram_quantile(0.50, sum by (le,route) (cluster_job_route:loki_request_duration_seconds_bucket:sum_rate{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"($namespace)/(.*-index-gateway|.*-backend|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", route=~\"(/base.Ruler/Rules|/indexgatewaypb.IndexGateway/GetChunkRef|/indexgatewaypb.IndexGateway/GetSeries|/indexgatewaypb.IndexGateway/GetShards|/indexgatewaypb.IndexGateway/GetStats|/indexgatewaypb.IndexGateway/GetVolume|/indexgatewaypb.IndexGateway/LabelNamesForMetricName|/indexgatewaypb.IndexGateway/LabelValuesForMetricName|/indexgatewaypb.IndexGateway/QueryIndex|/logproto.BloomGateway/FilterChunkRefs|/logproto.Pattern/Query|/logproto.Querier/GetChunkIDs|/logproto.Querier/GetDetectedLabels|/logproto.Querier/GetStats|/logproto.Querier/GetVolume|/logproto.Querier/Label|/logproto.Querier/Query|/logproto.Querier/QuerySample|/logproto.Querier/Series|/logproto.StreamData/GetStreamRates)\"})) * 1e3","format":"time_series","legendFormat":"{{ route }} 50th percentile","refId":"B"},{"expr":"1e3 * sum(cluster_job_route:loki_request_duration_seconds_sum:sum_rate{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"($namespace)/(.*-index-gateway|.*-backend|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", route=~\"(/base.Ruler/Rules|/indexgatewaypb.IndexGateway/GetChunkRef|/indexgatewaypb.IndexGateway/GetSeries|/indexgatewaypb.IndexGateway/GetShards|/indexgatewaypb.IndexGateway/GetStats|/indexgatewaypb.IndexGateway/GetVolume|/indexgatewaypb.IndexGateway/LabelNamesForMetricName|/indexgatewaypb.IndexGateway/LabelValuesForMetricName|/indexgatewaypb.IndexGateway/QueryIndex|/logproto.BloomGateway/FilterChunkRefs|/logproto.Pattern/Query|/logproto.Querier/GetChunkIDs|/logproto.Querier/GetDetectedLabels|/logproto.Querier/GetStats|/logproto.Querier/GetVolume|/logproto.Querier/Label|/logproto.Querier/Query|/logproto.Querier/QuerySample|/logproto.Querier/Series|/logproto.StreamData/GetStreamRates)\"}) by (route) / sum(cluster_job_route:loki_request_duration_seconds_count:sum_rate{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"($namespace)/(.*-index-gateway|.*-backend|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", route=~\"(/base.Ruler/Rules|/indexgatewaypb.IndexGateway/GetChunkRef|/indexgatewaypb.IndexGateway/GetSeries|/indexgatewaypb.IndexGateway/GetShards|/indexgatewaypb.IndexGateway/GetStats|/indexgatewaypb.IndexGateway/GetVolume|/indexgatewaypb.IndexGateway/LabelNamesForMetricName|/indexgatewaypb.IndexGateway/LabelValuesForMetricName|/indexgatewaypb.IndexGateway/QueryIndex|/logproto.BloomGateway/FilterChunkRefs|/logproto.Pattern/Query|/logproto.Querier/GetChunkIDs|/logproto.Querier/GetDetectedLabels|/logproto.Querier/GetStats|/logproto.Querier/GetVolume|/logproto.Querier/Label|/logproto.Querier/Query|/logproto.Querier/QuerySample|/logproto.Querier/Series|/logproto.StreamData/GetStreamRates)\"}) by (route) ","format":"time_series","legendFormat":"{{ route }} Average","refId":"C"}],"title":"Latency","type":"timeseries","yaxes":[{"format":"ms","label":null,"logBase":1,"max":null,"min":0,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":false}]},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"ms"},"overrides":[]},"id":15,"links":[],"nullPointMode":"null as zero","options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":4,"targets":[{"expr":"histogram_quantile(0.99, sum(rate(loki_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"($namespace)/(.*-index-gateway|.*-backend|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", route=~\"(/base.Ruler/Rules|/indexgatewaypb.IndexGateway/GetChunkRef|/indexgatewaypb.IndexGateway/GetSeries|/indexgatewaypb.IndexGateway/GetShards|/indexgatewaypb.IndexGateway/GetStats|/indexgatewaypb.IndexGateway/GetVolume|/indexgatewaypb.IndexGateway/LabelNamesForMetricName|/indexgatewaypb.IndexGateway/LabelValuesForMetricName|/indexgatewaypb.IndexGateway/QueryIndex|/logproto.BloomGateway/FilterChunkRefs|/logproto.Pattern/Query|/logproto.Querier/GetChunkIDs|/logproto.Querier/GetDetectedLabels|/logproto.Querier/GetStats|/logproto.Querier/GetVolume|/logproto.Querier/Label|/logproto.Querier/Query|/logproto.Querier/QuerySample|/logproto.Querier/Series|/logproto.StreamData/GetStreamRates)\"}[$__rate_interval])) by (le,pod)) * 1e3","format":"time_series","interval":"`}}{{ .Values.monitoring.dashboards.defaultDashboardsInterval }}{{`","intervalFactor":2,"legendFormat":"__auto","refId":"A","step":10}],"title":"Per Pod Latency (p99)","type":"timeseries"}],"repeat":null,"repeatIteration":null,"repeatRowId":null,"showTitle":true,"title":"Index Gateway","titleSize":"h6"},{"collapse":false,"height":"250px","panels":[{"aliasColors":{"1xx":"#EAB839","2xx":"#7EB26D","3xx":"#6ED0E0","4xx":"#EF843C","5xx":"#E24D42","OK":"#7EB26D","cancel":"#A9A9A9","error":"#E24D42","success":"#7EB26D"},"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":100,"lineWidth":0,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"normal"}},"min":0,"thresholds":{"mode":"absolute","steps":[]},"unit":"short"},"overrides":[{"matcher":{"id":"byName","options":"1xx"},"properties":[{"id":"color","value":{"fixedColor":"#EAB839","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"2xx"},"properties":[{"id":"color","value":{"fixedColor":"#7EB26D","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"3xx"},"properties":[{"id":"color","value":{"fixedColor":"#6ED0E0","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"4xx"},"properties":[{"id":"color","value":{"fixedColor":"#EF843C","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"5xx"},"properties":[{"id":"color","value":{"fixedColor":"#E24D42","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"OK"},"properties":[{"id":"color","value":{"fixedColor":"#7EB26D","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"cancel"},"properties":[{"id":"color","value":{"fixedColor":"#A9A9A9","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"error"},"properties":[{"id":"color","value":{"fixedColor":"#E24D42","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"success"},"properties":[{"id":"color","value":{"fixedColor":"#7EB26D","mode":"fixed"}}]}]},"fill":10,"id":16,"linewidth":0,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":4,"stack":true,"targets":[{"expr":"sum by (status) (\n label_replace(label_replace(rate(loki_request_duration_seconds_count{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\",job=~\"($namespace)/(.*-bloom-gateway|.*-backend|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", route=~\"(/base.Ruler/Rules|/indexgatewaypb.IndexGateway/GetChunkRef|/indexgatewaypb.IndexGateway/GetSeries|/indexgatewaypb.IndexGateway/GetShards|/indexgatewaypb.IndexGateway/GetStats|/indexgatewaypb.IndexGateway/GetVolume|/indexgatewaypb.IndexGateway/LabelNamesForMetricName|/indexgatewaypb.IndexGateway/LabelValuesForMetricName|/indexgatewaypb.IndexGateway/QueryIndex|/logproto.BloomGateway/FilterChunkRefs|/logproto.Pattern/Query|/logproto.Querier/GetChunkIDs|/logproto.Querier/GetDetectedLabels|/logproto.Querier/GetStats|/logproto.Querier/GetVolume|/logproto.Querier/Label|/logproto.Querier/Query|/logproto.Querier/QuerySample|/logproto.Querier/Series|/logproto.StreamData/GetStreamRates)\"}[$__rate_interval]),\n \"status\", \"${1}xx\", \"status_code\", \"([0-9])..\"),\n \"status\", \"${1}\", \"status_code\", \"([a-zA-Z]+)\"))\n","format":"time_series","legendFormat":"{{status}}","refId":"A"}],"title":"QPS","type":"timeseries"},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"ms"},"overrides":[]},"id":17,"links":[],"nullPointMode":"null as zero","options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":4,"targets":[{"expr":"histogram_quantile(0.99, sum by (le,route) (cluster_job_route:loki_request_duration_seconds_bucket:sum_rate{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"($namespace)/(.*-bloom-gateway|.*-backend|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", route=~\"(/base.Ruler/Rules|/indexgatewaypb.IndexGateway/GetChunkRef|/indexgatewaypb.IndexGateway/GetSeries|/indexgatewaypb.IndexGateway/GetShards|/indexgatewaypb.IndexGateway/GetStats|/indexgatewaypb.IndexGateway/GetVolume|/indexgatewaypb.IndexGateway/LabelNamesForMetricName|/indexgatewaypb.IndexGateway/LabelValuesForMetricName|/indexgatewaypb.IndexGateway/QueryIndex|/logproto.BloomGateway/FilterChunkRefs|/logproto.Pattern/Query|/logproto.Querier/GetChunkIDs|/logproto.Querier/GetDetectedLabels|/logproto.Querier/GetStats|/logproto.Querier/GetVolume|/logproto.Querier/Label|/logproto.Querier/Query|/logproto.Querier/QuerySample|/logproto.Querier/Series|/logproto.StreamData/GetStreamRates)\"})) * 1e3","format":"time_series","legendFormat":"{{ route }} 99th percentile","refId":"A"},{"expr":"histogram_quantile(0.50, sum by (le,route) (cluster_job_route:loki_request_duration_seconds_bucket:sum_rate{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"($namespace)/(.*-bloom-gateway|.*-backend|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", route=~\"(/base.Ruler/Rules|/indexgatewaypb.IndexGateway/GetChunkRef|/indexgatewaypb.IndexGateway/GetSeries|/indexgatewaypb.IndexGateway/GetShards|/indexgatewaypb.IndexGateway/GetStats|/indexgatewaypb.IndexGateway/GetVolume|/indexgatewaypb.IndexGateway/LabelNamesForMetricName|/indexgatewaypb.IndexGateway/LabelValuesForMetricName|/indexgatewaypb.IndexGateway/QueryIndex|/logproto.BloomGateway/FilterChunkRefs|/logproto.Pattern/Query|/logproto.Querier/GetChunkIDs|/logproto.Querier/GetDetectedLabels|/logproto.Querier/GetStats|/logproto.Querier/GetVolume|/logproto.Querier/Label|/logproto.Querier/Query|/logproto.Querier/QuerySample|/logproto.Querier/Series|/logproto.StreamData/GetStreamRates)\"})) * 1e3","format":"time_series","legendFormat":"{{ route }} 50th percentile","refId":"B"},{"expr":"1e3 * sum(cluster_job_route:loki_request_duration_seconds_sum:sum_rate{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"($namespace)/(.*-bloom-gateway|.*-backend|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", route=~\"(/base.Ruler/Rules|/indexgatewaypb.IndexGateway/GetChunkRef|/indexgatewaypb.IndexGateway/GetSeries|/indexgatewaypb.IndexGateway/GetShards|/indexgatewaypb.IndexGateway/GetStats|/indexgatewaypb.IndexGateway/GetVolume|/indexgatewaypb.IndexGateway/LabelNamesForMetricName|/indexgatewaypb.IndexGateway/LabelValuesForMetricName|/indexgatewaypb.IndexGateway/QueryIndex|/logproto.BloomGateway/FilterChunkRefs|/logproto.Pattern/Query|/logproto.Querier/GetChunkIDs|/logproto.Querier/GetDetectedLabels|/logproto.Querier/GetStats|/logproto.Querier/GetVolume|/logproto.Querier/Label|/logproto.Querier/Query|/logproto.Querier/QuerySample|/logproto.Querier/Series|/logproto.StreamData/GetStreamRates)\"}) by (route) / sum(cluster_job_route:loki_request_duration_seconds_count:sum_rate{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"($namespace)/(.*-bloom-gateway|.*-backend|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", route=~\"(/base.Ruler/Rules|/indexgatewaypb.IndexGateway/GetChunkRef|/indexgatewaypb.IndexGateway/GetSeries|/indexgatewaypb.IndexGateway/GetShards|/indexgatewaypb.IndexGateway/GetStats|/indexgatewaypb.IndexGateway/GetVolume|/indexgatewaypb.IndexGateway/LabelNamesForMetricName|/indexgatewaypb.IndexGateway/LabelValuesForMetricName|/indexgatewaypb.IndexGateway/QueryIndex|/logproto.BloomGateway/FilterChunkRefs|/logproto.Pattern/Query|/logproto.Querier/GetChunkIDs|/logproto.Querier/GetDetectedLabels|/logproto.Querier/GetStats|/logproto.Querier/GetVolume|/logproto.Querier/Label|/logproto.Querier/Query|/logproto.Querier/QuerySample|/logproto.Querier/Series|/logproto.StreamData/GetStreamRates)\"}) by (route) ","format":"time_series","legendFormat":"{{ route }} Average","refId":"C"}],"title":"Latency","type":"timeseries","yaxes":[{"format":"ms","label":null,"logBase":1,"max":null,"min":0,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":false}]},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"ms"},"overrides":[]},"id":18,"links":[],"nullPointMode":"null as zero","options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":4,"targets":[{"expr":"histogram_quantile(0.99, sum(rate(loki_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"($namespace)/(.*-bloom-gateway|.*-backend|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", route=~\"(/base.Ruler/Rules|/indexgatewaypb.IndexGateway/GetChunkRef|/indexgatewaypb.IndexGateway/GetSeries|/indexgatewaypb.IndexGateway/GetShards|/indexgatewaypb.IndexGateway/GetStats|/indexgatewaypb.IndexGateway/GetVolume|/indexgatewaypb.IndexGateway/LabelNamesForMetricName|/indexgatewaypb.IndexGateway/LabelValuesForMetricName|/indexgatewaypb.IndexGateway/QueryIndex|/logproto.BloomGateway/FilterChunkRefs|/logproto.Pattern/Query|/logproto.Querier/GetChunkIDs|/logproto.Querier/GetDetectedLabels|/logproto.Querier/GetStats|/logproto.Querier/GetVolume|/logproto.Querier/Label|/logproto.Querier/Query|/logproto.Querier/QuerySample|/logproto.Querier/Series|/logproto.StreamData/GetStreamRates)\"}[$__rate_interval])) by (le,pod)) * 1e3","format":"time_series","interval":"`}}{{ .Values.monitoring.dashboards.defaultDashboardsInterval }}{{`","intervalFactor":2,"legendFormat":"__auto","refId":"A","step":10}],"title":"Per Pod Latency (p99)","type":"timeseries"}],"repeat":null,"repeatIteration":null,"repeatRowId":null,"showTitle":true,"title":"Bloom Gateway","titleSize":"h6"},{"collapse":false,"height":"250px","panels":[{"aliasColors":{"1xx":"#EAB839","2xx":"#7EB26D","3xx":"#6ED0E0","4xx":"#EF843C","5xx":"#E24D42","OK":"#7EB26D","cancel":"#A9A9A9","error":"#E24D42","success":"#7EB26D"},"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":100,"lineWidth":0,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"normal"}},"min":0,"thresholds":{"mode":"absolute","steps":[]},"unit":"short"},"overrides":[{"matcher":{"id":"byName","options":"1xx"},"properties":[{"id":"color","value":{"fixedColor":"#EAB839","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"2xx"},"properties":[{"id":"color","value":{"fixedColor":"#7EB26D","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"3xx"},"properties":[{"id":"color","value":{"fixedColor":"#6ED0E0","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"4xx"},"properties":[{"id":"color","value":{"fixedColor":"#EF843C","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"5xx"},"properties":[{"id":"color","value":{"fixedColor":"#E24D42","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"OK"},"properties":[{"id":"color","value":{"fixedColor":"#7EB26D","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"cancel"},"properties":[{"id":"color","value":{"fixedColor":"#A9A9A9","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"error"},"properties":[{"id":"color","value":{"fixedColor":"#E24D42","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"success"},"properties":[{"id":"color","value":{"fixedColor":"#7EB26D","mode":"fixed"}}]}]},"fill":10,"id":19,"linewidth":0,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":4,"stack":true,"targets":[{"expr":"sum by (status) (\n label_replace(label_replace(rate(loki_index_request_duration_seconds_count{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\",job=~\"($namespace)/(.*-querier|.*-read|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", operation!=\"index_chunk\"}[$__rate_interval]),\n \"status\", \"${1}xx\", \"status_code\", \"([0-9])..\"),\n \"status\", \"${1}\", \"status_code\", \"([a-zA-Z]+)\"))\n","format":"time_series","legendFormat":"{{status}}","refId":"A"}],"title":"QPS","type":"timeseries"},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"ms"},"overrides":[]},"id":20,"links":[],"nullPointMode":"null as zero","options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":4,"targets":[{"expr":"histogram_quantile(0.99, sum(rate(loki_index_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\",job=~\"($namespace)/(.*-querier|.*-read|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", operation!=\"index_chunk\"}[$__rate_interval])) by (le)) * 1e3","format":"time_series","legendFormat":"99th Percentile","refId":"A"},{"expr":"histogram_quantile(0.50, sum(rate(loki_index_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\",job=~\"($namespace)/(.*-querier|.*-read|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", operation!=\"index_chunk\"}[$__rate_interval])) by (le)) * 1e3","format":"time_series","legendFormat":"50th Percentile","refId":"B"},{"expr":"sum(rate(loki_index_request_duration_seconds_sum{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\",job=~\"($namespace)/(.*-querier|.*-read|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", operation!=\"index_chunk\"}[$__rate_interval])) * 1e3 / sum(rate(loki_index_request_duration_seconds_count{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\",job=~\"($namespace)/(.*-querier|.*-read|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", operation!=\"index_chunk\"}[$__rate_interval]))","format":"time_series","legendFormat":"Average","refId":"C"}],"title":"Latency","type":"timeseries","yaxes":[{"format":"ms","label":null,"logBase":1,"max":null,"min":0,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":false}]},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"ms"},"overrides":[]},"id":21,"links":[],"nullPointMode":"null as zero","options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":4,"targets":[{"expr":"histogram_quantile(0.99, sum(rate(loki_index_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\",job=~\"($namespace)/(.*-querier|.*-read|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", operation!=\"index_chunk\"}[$__rate_interval])) by (le,pod)) * 1e3","format":"time_series","interval":"`}}{{ .Values.monitoring.dashboards.defaultDashboardsInterval }}{{`","intervalFactor":2,"legendFormat":"__auto","refId":"A","step":10}],"title":"Per Pod Latency (p99)","type":"timeseries"}],"repeat":null,"repeatIteration":null,"repeatRowId":null,"showTitle":true,"title":"TSDB Index","titleSize":"h6"},{"collapse":false,"height":"250px","panels":[{"aliasColors":{"1xx":"#EAB839","2xx":"#7EB26D","3xx":"#6ED0E0","4xx":"#EF843C","5xx":"#E24D42","OK":"#7EB26D","cancel":"#A9A9A9","error":"#E24D42","success":"#7EB26D"},"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":100,"lineWidth":0,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"normal"}},"min":0,"thresholds":{"mode":"absolute","steps":[]},"unit":"short"},"overrides":[{"matcher":{"id":"byName","options":"1xx"},"properties":[{"id":"color","value":{"fixedColor":"#EAB839","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"2xx"},"properties":[{"id":"color","value":{"fixedColor":"#7EB26D","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"3xx"},"properties":[{"id":"color","value":{"fixedColor":"#6ED0E0","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"4xx"},"properties":[{"id":"color","value":{"fixedColor":"#EF843C","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"5xx"},"properties":[{"id":"color","value":{"fixedColor":"#E24D42","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"OK"},"properties":[{"id":"color","value":{"fixedColor":"#7EB26D","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"cancel"},"properties":[{"id":"color","value":{"fixedColor":"#A9A9A9","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"error"},"properties":[{"id":"color","value":{"fixedColor":"#E24D42","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"success"},"properties":[{"id":"color","value":{"fixedColor":"#7EB26D","mode":"fixed"}}]}]},"fill":10,"id":22,"linewidth":0,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":4,"stack":true,"targets":[{"expr":"sum by (status) (\n label_replace(label_replace(rate(loki_boltdb_shipper_request_duration_seconds_count{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\",job=~\"($namespace)/(.*-querier|index-gateway|.*-read|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", operation=\"Shipper.Query\"}[$__rate_interval]),\n \"status\", \"${1}xx\", \"status_code\", \"([0-9])..\"),\n \"status\", \"${1}\", \"status_code\", \"([a-zA-Z]+)\"))\n","format":"time_series","legendFormat":"{{status}}","refId":"A"}],"title":"QPS","type":"timeseries"},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"ms"},"overrides":[]},"id":23,"links":[],"nullPointMode":"null as zero","options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":4,"targets":[{"expr":"histogram_quantile(0.99, sum(rate(loki_boltdb_shipper_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\",job=~\"($namespace)/(.*-querier|index-gateway|.*-read|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", operation=\"Shipper.Query\"}[$__rate_interval])) by (le)) * 1e3","format":"time_series","legendFormat":"99th Percentile","refId":"A"},{"expr":"histogram_quantile(0.50, sum(rate(loki_boltdb_shipper_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\",job=~\"($namespace)/(.*-querier|index-gateway|.*-read|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", operation=\"Shipper.Query\"}[$__rate_interval])) by (le)) * 1e3","format":"time_series","legendFormat":"50th Percentile","refId":"B"},{"expr":"sum(rate(loki_boltdb_shipper_request_duration_seconds_sum{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\",job=~\"($namespace)/(.*-querier|index-gateway|.*-read|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", operation=\"Shipper.Query\"}[$__rate_interval])) * 1e3 / sum(rate(loki_boltdb_shipper_request_duration_seconds_count{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\",job=~\"($namespace)/(.*-querier|index-gateway|.*-read|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", operation=\"Shipper.Query\"}[$__rate_interval]))","format":"time_series","legendFormat":"Average","refId":"C"}],"title":"Latency","type":"timeseries","yaxes":[{"format":"ms","label":null,"logBase":1,"max":null,"min":0,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":false}]},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"ms"},"overrides":[]},"id":24,"links":[],"nullPointMode":"null as zero","options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":4,"targets":[{"expr":"histogram_quantile(0.99, sum(rate(loki_boltdb_shipper_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\",job=~\"($namespace)/(.*-querier|index-gateway|.*-read|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", operation=\"Shipper.Query\"}[$__rate_interval])) by (le,pod)) * 1e3","format":"time_series","interval":"`}}{{ .Values.monitoring.dashboards.defaultDashboardsInterval }}{{`","intervalFactor":2,"legendFormat":"__auto","refId":"A","step":10}],"title":"Per Pod Latency (p99)","type":"timeseries"}],"repeat":null,"repeatIteration":null,"repeatRowId":null,"showTitle":true,"title":"BoltDB Index","titleSize":"h6"}],"schemaVersion":14,"style":"dark","tags":["loki"],"templating":{"list":[{"current":{"text":"default","value":"default"},"hide":0,"label":"Data source","name":"datasource","options":[],"query":"prometheus","refresh":1,"regex":"","type":"datasource"},`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`{"allValue":null,"current":{"text":"prod","value":"prod"},"datasource":"$datasource","hide":0,"includeAll":false,"label":"cluster","multi":false,"name":"cluster","options":[],"query":"label_values(loki_build_info, cluster)","refresh":1,"regex":"","sort":2,"tagValuesQuery":"","tags":[],"tagsQuery":"","type":"query","useTags":false},`}}{{ end }}{{`{"current":{"text":"prod","value":"prod"},"datasource":"$datasource","hide":0,"includeAll":false,"label":"`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`","multi":false,"name":"`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`","options":[],"query":"label_values(loki_build_info, `}}{{ $.Values.monitoring.appInstanceLabelName }}{{`)","refresh":1,"regex":"","sort":2,"tagValuesQuery":"","tags":[],"tagsQuery":"","type":"query","useTags":false},{"allValue":null,"current":{"text":"prod","value":"prod"},"datasource":"$datasource","hide":0,"includeAll":false,"label":"namespace","multi":false,"name":"namespace","options":[],"query":"label_values(loki_build_info{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\"}, namespace)","refresh":1,"regex":"","sort":2,"tagValuesQuery":"","tags":[],"tagsQuery":"","type":"query","useTags":false}]},"time":{"from":"now-1h","to":"now"},"timepicker":{"refresh_intervals":["5s","10s","30s","1m","5m","15m","30m","1h","2h","1d"],"time_options":["5m","15m","1h","6h","12h","24h","2d","7d","30d"]},"timezone": "`}}{{ .Values.monitoring.dashboards.defaultDashboardsTimezone }}{{`","title":"Loki / Reads","uid":"reads","version":0}`}} +{{- end }} +--- +{{- if and .Values.monitoring.dashboards.enabled .Values.monitoring.dashboards.grafanaOperator.enabled (dig "loki-reads" "enabled" true .Values.monitoring.dashboards) }} +apiVersion: grafana.integreatly.org/v1beta1 +kind: GrafanaDashboard +metadata: + name: {{ include "loki.resourceName" (dict "ctx" $ "component" "dashboards" "suffix" "loki-reads") }} + namespace: {{ .Values.monitoring.namespace | default (include "loki.namespace" $) }} + {{- with (mergeOverwrite dict .Values.monitoring.dashboards.annotations .Values.monitoring.dashboards.grafanaOperator.annotations) }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} + labels: + {{- include "loki.labels" $ | nindent 4 }} + {{- with (mergeOverwrite dict .Values.monitoring.dashboards.labels .Values.monitoring.dashboards.grafanaOperator.labels) }} + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + allowCrossNamespaceImport: true + resyncPeriod: {{ .Values.monitoring.dashboards.grafanaOperator.resyncPeriod | default "10m" | quote }} + {{- include "loki.grafana.operator.folder" $ | nindent 2 }} + instanceSelector: + {{- toYaml .Values.monitoring.dashboards.grafanaOperator.instanceSelector | nindent 4 }} + configMapRef: + name: {{ include "loki.resourceName" (dict "ctx" $ "component" "dashboards" "suffix" "loki-reads") }} + key: loki-reads.json +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/monitoring/dashboards/loki-retention.yaml b/packs/loki-3.7.4/charts/loki/templates/monitoring/dashboards/loki-retention.yaml new file mode 100644 index 00000000..e402c526 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/monitoring/dashboards/loki-retention.yaml @@ -0,0 +1,50 @@ +{{- /* +Generated from 'loki-retention' from https://github.com/grafana/loki.git +Do not change in-place! In order to change this file first read following link: +https://github.com/grafana-community/helm-charts/tree/main/charts/loki/hack +*/ -}} +{{- if and .Values.monitoring.dashboards.enabled (dig "loki-retention" "enabled" true .Values.monitoring.dashboards) }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "loki.resourceName" (dict "ctx" $ "component" "dashboards" "suffix" "loki-retention") }} + namespace: {{ .Values.monitoring.namespace | default (include "loki.namespace" $) }} + labels: + {{- include "loki.labels" $ | nindent 4 }} + {{- with .Values.monitoring.dashboards.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.monitoring.dashboards.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +data: + loki-retention.json: |- + {{`{"annotations":{"list":[]},"editable":`}}{{ .Values.monitoring.dashboards.defaultDashboardsEditable }}{{`,"gnetId":null,"graphTooltip":0,"hideControls":false,"links":[{"asDropdown":true,"icon":"external link","includeVars":true,"keepTime":true,"tags":["loki"],"targetBlank":false,"title":"Loki Dashboards","type":"dashboards"}],"refresh":"10s","rows":[{"collapse":false,"height":"250px","panels":[{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"short"},"overrides":[{"matcher":{"id":"byName","options":"request"},"properties":[{"id":"color","value":{"fixedColor":"#FFC000","mode":"fixed"}},{"id":"custom.fillOpacity","value":0}]},{"matcher":{"id":"byName","options":"limit"},"properties":[{"id":"color","value":{"fixedColor":"#E02F44","mode":"fixed"}},{"id":"custom.fillOpacity","value":0}]}]},"id":1,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":4,"targets":[{"expr":"sum by(pod) (rate(container_cpu_usage_seconds_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", pod=~\"(.*compactor.*|.*-backend.*|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"}[$__rate_interval]))","format":"time_series","legendFormat":"{{pod}}","legendLink":null},{"expr":"min(kube_pod_container_resource_requests{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", pod=~\"(.*compactor.*|.*-backend.*|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", resource=\"cpu\"} > 0)","format":"time_series","legendFormat":"request","legendLink":null},{"expr":"min(container_spec_cpu_quota{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", pod=~\"(.*compactor.*|.*-backend.*|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"} / container_spec_cpu_period{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", pod=~\"(.*compactor.*|.*-backend.*|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"})","format":"time_series","legendFormat":"limit","legendLink":null}],"title":"CPU","tooltip":{"sort":2},"type":"timeseries"},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"bytes"},"overrides":[{"matcher":{"id":"byName","options":"request"},"properties":[{"id":"color","value":{"fixedColor":"#FFC000","mode":"fixed"}},{"id":"custom.fillOpacity","value":0}]},{"matcher":{"id":"byName","options":"limit"},"properties":[{"id":"color","value":{"fixedColor":"#E02F44","mode":"fixed"}},{"id":"custom.fillOpacity","value":0}]}]},"id":2,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":4,"targets":[{"expr":"max by(pod) (container_memory_working_set_bytes{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", pod=~\"(.*compactor.*|.*-backend.*|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"})","format":"time_series","legendFormat":"{{pod}}","legendLink":null},{"expr":"min(kube_pod_container_resource_requests{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", pod=~\"(.*compactor.*|.*-backend.*|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", resource=\"memory\"} > 0)","format":"time_series","legendFormat":"request","legendLink":null},{"expr":"min(container_spec_memory_limit_bytes{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", pod=~\"(.*compactor.*|.*-backend.*|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"} > 0)","format":"time_series","legendFormat":"limit","legendLink":null}],"title":"Memory (workingset)","tooltip":{"sort":2},"type":"timeseries"},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"bytes"},"overrides":[]},"id":3,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":4,"targets":[{"expr":"sum by(pod) (go_memstats_heap_inuse_bytes{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"($namespace)/(.*-compactor|.*-backend.*|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"})","format":"time_series","legendFormat":"{{pod}}","legendLink":null}],"title":"Memory (go heap inuse)","tooltip":{"sort":2},"type":"timeseries"}],"repeat":null,"repeatIteration":null,"repeatRowId":null,"showTitle":true,"title":"Resource Usage","titleSize":"h6"},{"collapse":false,"height":"250px","panels":[{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fieldConfig":{"defaults":{"color":{"fixedColor":"blue","mode":"fixed"},"custom":{},"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null}]},"unit":"dateTimeFromNow"}},"fill":1,"id":4,"legend":{"avg":false,"current":false,"max":false,"min":false,"show":true,"total":false,"values":false},"lines":true,"linewidth":1,"links":[],"nullPointMode":"null as zero","options":{"colorMode":"value","graphMode":"area","justifyMode":"auto","orientation":"auto","reduceOptions":{"calcs":["lastNotNull"],"fields":"","values":false},"text":{},"textMode":"auto"},"percentage":false,"pointradius":5,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"span":6,"stack":false,"steppedLine":false,"targets":[{"expr":"loki_boltdb_shipper_compact_tables_operation_last_successful_run_timestamp_seconds{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\"} * 1e3","format":"time_series","instant":true,"refId":"A"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Last Compact Tables Operation Success","tooltip":{"shared":true,"sort":2,"value_type":"individual"},"type":"stat","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"short","label":null,"logBase":1,"max":null,"min":0,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":false}]},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"s"},"overrides":[]},"id":5,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":6,"targets":[{"expr":"loki_boltdb_shipper_compact_tables_operation_duration_seconds{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\"}","format":"time_series","legendFormat":"duration","legendLink":null}],"title":"Compact Tables Operations Duration","type":"timeseries"}],"repeat":null,"repeatIteration":null,"repeatRowId":null,"showTitle":true,"title":"Compaction","titleSize":"h6"},{"collapse":false,"height":"250px","panels":[{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"short"},"overrides":[]},"id":6,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":6,"targets":[{"expr":"sum(loki_compactor_locked_table_successive_compaction_skips{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\"})","format":"time_series","legendFormat":"{{table_name}}","legendLink":null}],"title":"Number of times Tables were skipped during Compaction","type":"timeseries"},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"short"},"overrides":[]},"id":7,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":6,"targets":[{"expr":"sum by (status)(rate(loki_boltdb_shipper_compact_tables_operation_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\"}[$__rate_interval]))","format":"time_series","legendFormat":"{{success}}","legendLink":null}],"title":"Compact Tables Operations Per Status","type":"timeseries"}],"repeat":null,"repeatIteration":null,"repeatRowId":null,"showTitle":true,"title":"","titleSize":"h6"},{"collapse":false,"height":"250px","panels":[{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fieldConfig":{"defaults":{"color":{"fixedColor":"blue","mode":"fixed"},"custom":{},"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null}]},"unit":"dateTimeFromNow"}},"fill":1,"id":8,"legend":{"avg":false,"current":false,"max":false,"min":false,"show":true,"total":false,"values":false},"lines":true,"linewidth":1,"links":[],"nullPointMode":"null as zero","options":{"colorMode":"value","graphMode":"area","justifyMode":"auto","orientation":"auto","reduceOptions":{"calcs":["lastNotNull"],"fields":"","values":false},"text":{},"textMode":"auto"},"percentage":false,"pointradius":5,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"span":4,"stack":false,"steppedLine":false,"targets":[{"expr":"loki_compactor_apply_retention_last_successful_run_timestamp_seconds{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\"} * 1e3","format":"time_series","instant":true,"refId":"A"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Last Mark Operation Success","tooltip":{"shared":true,"sort":2,"value_type":"individual"},"type":"stat","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"short","label":null,"logBase":1,"max":null,"min":0,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":false}]},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"s"},"overrides":[]},"id":9,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":4,"targets":[{"expr":"loki_compactor_apply_retention_operation_duration_seconds{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\"}","format":"time_series","legendFormat":"duration","legendLink":null}],"title":"Mark Operations Duration","type":"timeseries"},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"short"},"overrides":[]},"id":10,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":4,"targets":[{"expr":"sum by (status)(rate(loki_compactor_apply_retention_operation_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\"}[$__rate_interval]))","format":"time_series","legendFormat":"{{success}}","legendLink":null}],"title":"Mark Operations Per Status","type":"timeseries"}],"repeat":null,"repeatIteration":null,"repeatRowId":null,"showTitle":true,"title":"Retention","titleSize":"h6"},{"collapse":false,"height":"250px","panels":[{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":100,"lineWidth":0,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"normal"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"short"},"overrides":[]},"id":11,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":4,"targets":[{"expr":"count by(action)(loki_boltdb_shipper_retention_marker_table_processed_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\"})","format":"time_series","legendFormat":"{{action}}","legendLink":null}],"title":"Processed Tables Per Action","type":"timeseries"},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":100,"lineWidth":0,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"normal"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"short"},"overrides":[]},"id":12,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":4,"targets":[{"expr":"count by(table,action)(loki_boltdb_shipper_retention_marker_table_processed_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\" , action=~\"modified|deleted\"})","format":"time_series","legendFormat":"{{table}}-{{action}}","legendLink":null}],"title":"Modified Tables","type":"timeseries"},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":100,"lineWidth":0,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"normal"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"short"},"overrides":[]},"id":13,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":4,"targets":[{"expr":"sum by (table)(rate(loki_boltdb_shipper_retention_marker_count_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\"}[$__rate_interval])) >0","format":"time_series","legendFormat":"{{table}}","legendLink":null}],"title":"Marks Creation Rate Per Table","type":"timeseries"}],"repeat":null,"repeatIteration":null,"repeatRowId":null,"showTitle":true,"title":"Per Table Marker","titleSize":"h6"},{"collapse":false,"height":"250px","panels":[{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"short"},"overrides":[]},"format":"short","id":14,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":6,"targets":[{"expr":"sum (increase(loki_boltdb_shipper_retention_marker_count_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\"}[24h]))","format":"time_series","instant":true,"refId":"A"}],"thresholds":"70,80","title":"Marked Chunks (24h)","type":"singlestat"},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"short"},"overrides":[]},"id":15,"links":[],"nullPointMode":"null as zero","options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":6,"targets":[{"expr":"histogram_quantile(0.99, sum(rate(loki_boltdb_shipper_retention_marker_table_processed_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\"}[$__rate_interval])) by (le)) * 1e3","format":"time_series","legendFormat":"99th Percentile","refId":"A"},{"expr":"histogram_quantile(0.50, sum(rate(loki_boltdb_shipper_retention_marker_table_processed_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\"}[$__rate_interval])) by (le)) * 1e3","format":"time_series","legendFormat":"50th Percentile","refId":"B"},{"expr":"sum(rate(loki_boltdb_shipper_retention_marker_table_processed_duration_seconds_sum{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\"}[$__rate_interval])) * 1e3 / sum(rate(loki_boltdb_shipper_retention_marker_table_processed_duration_seconds_count{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\"}[$__rate_interval]))","format":"time_series","legendFormat":"Average","refId":"C"}],"title":"Mark Table Latency","type":"timeseries","yaxes":[{"format":"ms","label":null,"logBase":1,"max":null,"min":0,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":false}]}],"repeat":null,"repeatIteration":null,"repeatRowId":null,"showTitle":true,"title":"","titleSize":"h6"},{"collapse":false,"height":"250px","panels":[{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"short"},"overrides":[]},"format":"short","id":16,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":6,"targets":[{"expr":"sum (increase(loki_boltdb_shipper_retention_sweeper_chunk_deleted_duration_seconds_count{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\"}[24h]))","format":"time_series","instant":true,"refId":"A"}],"thresholds":"70,80","title":"Delete Chunks (24h)","type":"singlestat"},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"short"},"overrides":[]},"id":17,"links":[],"nullPointMode":"null as zero","options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":6,"targets":[{"expr":"histogram_quantile(0.99, sum(rate(loki_boltdb_shipper_retention_sweeper_chunk_deleted_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\"}[$__rate_interval])) by (le)) * 1e3","format":"time_series","legendFormat":"99th Percentile","refId":"A"},{"expr":"histogram_quantile(0.50, sum(rate(loki_boltdb_shipper_retention_sweeper_chunk_deleted_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\"}[$__rate_interval])) by (le)) * 1e3","format":"time_series","legendFormat":"50th Percentile","refId":"B"},{"expr":"sum(rate(loki_boltdb_shipper_retention_sweeper_chunk_deleted_duration_seconds_sum{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\"}[$__rate_interval])) * 1e3 / sum(rate(loki_boltdb_shipper_retention_sweeper_chunk_deleted_duration_seconds_count{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\"}[$__rate_interval]))","format":"time_series","legendFormat":"Average","refId":"C"}],"title":"Delete Latency","type":"timeseries","yaxes":[{"format":"ms","label":null,"logBase":1,"max":null,"min":0,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":false}]}],"repeat":null,"repeatIteration":null,"repeatRowId":null,"showTitle":true,"title":"Sweeper","titleSize":"h6"},{"collapse":false,"height":"250px","panels":[{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"s"},"overrides":[]},"id":18,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":4,"targets":[{"expr":"time() - (loki_boltdb_shipper_retention_sweeper_marker_file_processing_current_time{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\"} > 0)","format":"time_series","legendFormat":"lag","legendLink":null}],"title":"Sweeper Lag","type":"timeseries"},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"short"},"overrides":[]},"id":19,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":4,"targets":[{"expr":"sum(loki_boltdb_shipper_retention_sweeper_marker_files_current{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\"})","format":"time_series","legendFormat":"count","legendLink":null}],"title":"Marks Files to Process","type":"timeseries"},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"short"},"overrides":[]},"id":20,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":4,"targets":[{"expr":"sum by (status)(rate(loki_boltdb_shipper_retention_sweeper_chunk_deleted_duration_seconds_count{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\"}[$__rate_interval]))","format":"time_series","legendFormat":"{{status}}","legendLink":null}],"title":"Delete Rate Per Status","type":"timeseries"}],"repeat":null,"repeatIteration":null,"repeatRowId":null,"showTitle":true,"title":"","titleSize":"h6"},{"collapse":false,"height":"250px","panels":[{"datasource":"$loki_datasource","id":21,"span":12,"targets":[{"expr":"{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"($namespace)/(.*-compactor|.*-backend.*|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"}","refId":"A"}],"title":"Compactor Logs","type":"logs"}],"repeat":null,"repeatIteration":null,"repeatRowId":null,"showTitle":true,"title":"Logs","titleSize":"h6"}],"schemaVersion":14,"style":"dark","tags":["loki"],"templating":{"list":[{"current":{"text":"default","value":"default"},"hide":0,"label":"Data source","name":"datasource","options":[],"query":"prometheus","refresh":1,"regex":"","type":"datasource"},`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`{"allValue":null,"current":{"text":"prod","value":"prod"},"datasource":"$datasource","hide":0,"includeAll":false,"label":"cluster","multi":false,"name":"cluster","options":[],"query":"label_values(loki_build_info, cluster)","refresh":1,"regex":"","sort":2,"tagValuesQuery":"","tags":[],"tagsQuery":"","type":"query","useTags":false},`}}{{ end }}{{`{"current":{"text":"prod","value":"prod"},"datasource":"$datasource","hide":0,"includeAll":false,"label":"`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`","multi":false,"name":"`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`","options":[],"query":"label_values(loki_build_info, `}}{{ $.Values.monitoring.appInstanceLabelName }}{{`)","refresh":1,"regex":"","sort":2,"tagValuesQuery":"","tags":[],"tagsQuery":"","type":"query","useTags":false},{"allValue":null,"current":{"text":"prod","value":"prod"},"datasource":"$datasource","hide":0,"includeAll":false,"label":"namespace","multi":false,"name":"namespace","options":[],"query":"label_values(loki_build_info{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\"}, namespace)","refresh":1,"regex":"","sort":2,"tagValuesQuery":"","tags":[],"tagsQuery":"","type":"query","useTags":false},{"hide":0,"label":null,"name":"loki_datasource","options":[],"query":"loki","refresh":1,"regex":"","type":"datasource"}]},"time":{"from":"now-1h","to":"now"},"timepicker":{"refresh_intervals":["5s","10s","30s","1m","5m","15m","30m","1h","2h","1d"],"time_options":["5m","15m","1h","6h","12h","24h","2d","7d","30d"]},"timezone": "`}}{{ .Values.monitoring.dashboards.defaultDashboardsTimezone }}{{`","title":"Loki / Retention","uid":"retention","version":0}`}} +{{- end }} +--- +{{- if and .Values.monitoring.dashboards.enabled .Values.monitoring.dashboards.grafanaOperator.enabled (dig "loki-retention" "enabled" true .Values.monitoring.dashboards) }} +apiVersion: grafana.integreatly.org/v1beta1 +kind: GrafanaDashboard +metadata: + name: {{ include "loki.resourceName" (dict "ctx" $ "component" "dashboards" "suffix" "loki-retention") }} + namespace: {{ .Values.monitoring.namespace | default (include "loki.namespace" $) }} + {{- with (mergeOverwrite dict .Values.monitoring.dashboards.annotations .Values.monitoring.dashboards.grafanaOperator.annotations) }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} + labels: + {{- include "loki.labels" $ | nindent 4 }} + {{- with (mergeOverwrite dict .Values.monitoring.dashboards.labels .Values.monitoring.dashboards.grafanaOperator.labels) }} + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + allowCrossNamespaceImport: true + resyncPeriod: {{ .Values.monitoring.dashboards.grafanaOperator.resyncPeriod | default "10m" | quote }} + {{- include "loki.grafana.operator.folder" $ | nindent 2 }} + instanceSelector: + {{- toYaml .Values.monitoring.dashboards.grafanaOperator.instanceSelector | nindent 4 }} + configMapRef: + name: {{ include "loki.resourceName" (dict "ctx" $ "component" "dashboards" "suffix" "loki-retention") }} + key: loki-retention.json +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/monitoring/dashboards/loki-thanos-object-storage.yaml b/packs/loki-3.7.4/charts/loki/templates/monitoring/dashboards/loki-thanos-object-storage.yaml new file mode 100644 index 00000000..6931424b --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/monitoring/dashboards/loki-thanos-object-storage.yaml @@ -0,0 +1,50 @@ +{{- /* +Generated from 'loki-thanos-object-storage' from https://github.com/grafana/loki.git +Do not change in-place! In order to change this file first read following link: +https://github.com/grafana-community/helm-charts/tree/main/charts/loki/hack +*/ -}} +{{- if and .Values.monitoring.dashboards.enabled (dig "loki-thanos-object-storage" "enabled" true .Values.monitoring.dashboards) }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "loki.resourceName" (dict "ctx" $ "component" "dashboards" "suffix" "loki-thanos-object-storage") }} + namespace: {{ .Values.monitoring.namespace | default (include "loki.namespace" $) }} + labels: + {{- include "loki.labels" $ | nindent 4 }} + {{- with .Values.monitoring.dashboards.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.monitoring.dashboards.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +data: + loki-thanos-object-storage.json: |- + {{`{"annotations":{"list":[]},"editable":`}}{{ .Values.monitoring.dashboards.defaultDashboardsEditable }}{{`,"gnetId":null,"graphTooltip":0,"hideControls":false,"links":[{"asDropdown":true,"icon":"external link","includeVars":true,"keepTime":true,"tags":["loki"],"targetBlank":false,"title":"Loki Dashboards","type":"dashboards"}],"refresh":"10s","rows":[{"collapse":false,"collapsed":false,"panels":[{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"reqps"},"overrides":[]},"gridPos":{},"id":1,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"targets":[{"expr":"sum by(operation) (rate(loki_objstore_bucket_operations_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\"}[$__rate_interval]))","format":"time_series","legendFormat":"{{operation}}","legendLink":null}],"title":"RPS / operation","type":"timeseries"},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"reqps"},"overrides":[]},"gridPos":{},"id":2,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"targets":[{"expr":"sum by(operation) (rate(loki_objstore_bucket_operation_failures_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\"}[$__rate_interval])) > 0","format":"time_series","legendFormat":"{{operation}}","legendLink":null}],"title":"Error rate / operation","type":"timeseries"},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"reqps"},"overrides":[]},"gridPos":{},"id":3,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"targets":[{"expr":"sum by (method, status_code) (rate(loki_objstore_bucket_transport_requests_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", status_code!~\"2..\"}[$__rate_interval])) > 0","format":"time_series","legendFormat":"{{method}} - {{status_code}}","legendLink":null}],"title":"Transport error rate / method and status code","type":"timeseries"}],"repeat":null,"repeatIteration":null,"repeatRowId":null,"showTitle":true,"title":"Operations","titleSize":"h6","type":"row"},{"collapse":false,"collapsed":false,"panels":[{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"ms"},"overrides":[]},"gridPos":{},"id":4,"links":[],"nullPointMode":"null as zero","options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"targets":[{"expr":"histogram_quantile(0.99, sum(rate(loki_objstore_bucket_operation_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\",operation=\"get\"}[$__rate_interval])) by (le)) * 1e3","format":"time_series","legendFormat":"99th Percentile","refId":"A"},{"expr":"histogram_quantile(0.50, sum(rate(loki_objstore_bucket_operation_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\",operation=\"get\"}[$__rate_interval])) by (le)) * 1e3","format":"time_series","legendFormat":"50th Percentile","refId":"B"},{"expr":"sum(rate(loki_objstore_bucket_operation_duration_seconds_sum{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\",operation=\"get\"}[$__rate_interval])) * 1e3 / sum(rate(loki_objstore_bucket_operation_duration_seconds_count{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\",operation=\"get\"}[$__rate_interval]))","format":"time_series","legendFormat":"Average","refId":"C"}],"title":"Op: Get","type":"timeseries","yaxes":[{"format":"ms","label":null,"logBase":1,"max":null,"min":0,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":false}]},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"ms"},"overrides":[]},"gridPos":{},"id":5,"links":[],"nullPointMode":"null as zero","options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"targets":[{"expr":"histogram_quantile(0.99, sum(rate(loki_objstore_bucket_operation_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\",operation=\"get_range\"}[$__rate_interval])) by (le)) * 1e3","format":"time_series","legendFormat":"99th Percentile","refId":"A"},{"expr":"histogram_quantile(0.50, sum(rate(loki_objstore_bucket_operation_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\",operation=\"get_range\"}[$__rate_interval])) by (le)) * 1e3","format":"time_series","legendFormat":"50th Percentile","refId":"B"},{"expr":"sum(rate(loki_objstore_bucket_operation_duration_seconds_sum{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\",operation=\"get_range\"}[$__rate_interval])) * 1e3 / sum(rate(loki_objstore_bucket_operation_duration_seconds_count{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\",operation=\"get_range\"}[$__rate_interval]))","format":"time_series","legendFormat":"Average","refId":"C"}],"title":"Op: GetRange","type":"timeseries","yaxes":[{"format":"ms","label":null,"logBase":1,"max":null,"min":0,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":false}]},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"ms"},"overrides":[]},"gridPos":{},"id":6,"links":[],"nullPointMode":"null as zero","options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"targets":[{"expr":"histogram_quantile(0.99, sum(rate(loki_objstore_bucket_operation_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\",operation=\"exists\"}[$__rate_interval])) by (le)) * 1e3","format":"time_series","legendFormat":"99th Percentile","refId":"A"},{"expr":"histogram_quantile(0.50, sum(rate(loki_objstore_bucket_operation_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\",operation=\"exists\"}[$__rate_interval])) by (le)) * 1e3","format":"time_series","legendFormat":"50th Percentile","refId":"B"},{"expr":"sum(rate(loki_objstore_bucket_operation_duration_seconds_sum{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\",operation=\"exists\"}[$__rate_interval])) * 1e3 / sum(rate(loki_objstore_bucket_operation_duration_seconds_count{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\",operation=\"exists\"}[$__rate_interval]))","format":"time_series","legendFormat":"Average","refId":"C"}],"title":"Op: Exists","type":"timeseries","yaxes":[{"format":"ms","label":null,"logBase":1,"max":null,"min":0,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":false}]}],"repeat":null,"repeatIteration":null,"repeatRowId":null,"showTitle":true,"title":"","titleSize":"h6","type":"row"},{"collapse":false,"collapsed":false,"panels":[{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"ms"},"overrides":[]},"gridPos":{},"id":7,"links":[],"nullPointMode":"null as zero","options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"targets":[{"expr":"histogram_quantile(0.99, sum(rate(loki_objstore_bucket_operation_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\",operation=\"attributes\"}[$__rate_interval])) by (le)) * 1e3","format":"time_series","legendFormat":"99th Percentile","refId":"A"},{"expr":"histogram_quantile(0.50, sum(rate(loki_objstore_bucket_operation_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\",operation=\"attributes\"}[$__rate_interval])) by (le)) * 1e3","format":"time_series","legendFormat":"50th Percentile","refId":"B"},{"expr":"sum(rate(loki_objstore_bucket_operation_duration_seconds_sum{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\",operation=\"attributes\"}[$__rate_interval])) * 1e3 / sum(rate(loki_objstore_bucket_operation_duration_seconds_count{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\",operation=\"attributes\"}[$__rate_interval]))","format":"time_series","legendFormat":"Average","refId":"C"}],"title":"Op: Attributes","type":"timeseries","yaxes":[{"format":"ms","label":null,"logBase":1,"max":null,"min":0,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":false}]},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"ms"},"overrides":[]},"gridPos":{},"id":8,"links":[],"nullPointMode":"null as zero","options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"targets":[{"expr":"histogram_quantile(0.99, sum(rate(loki_objstore_bucket_operation_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\",operation=\"upload\"}[$__rate_interval])) by (le)) * 1e3","format":"time_series","legendFormat":"99th Percentile","refId":"A"},{"expr":"histogram_quantile(0.50, sum(rate(loki_objstore_bucket_operation_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\",operation=\"upload\"}[$__rate_interval])) by (le)) * 1e3","format":"time_series","legendFormat":"50th Percentile","refId":"B"},{"expr":"sum(rate(loki_objstore_bucket_operation_duration_seconds_sum{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\",operation=\"upload\"}[$__rate_interval])) * 1e3 / sum(rate(loki_objstore_bucket_operation_duration_seconds_count{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\",operation=\"upload\"}[$__rate_interval]))","format":"time_series","legendFormat":"Average","refId":"C"}],"title":"Op: Upload","type":"timeseries","yaxes":[{"format":"ms","label":null,"logBase":1,"max":null,"min":0,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":false}]},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"ms"},"overrides":[]},"gridPos":{},"id":9,"links":[],"nullPointMode":"null as zero","options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"targets":[{"expr":"histogram_quantile(0.99, sum(rate(loki_objstore_bucket_operation_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\",operation=\"delete\"}[$__rate_interval])) by (le)) * 1e3","format":"time_series","legendFormat":"99th Percentile","refId":"A"},{"expr":"histogram_quantile(0.50, sum(rate(loki_objstore_bucket_operation_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\",operation=\"delete\"}[$__rate_interval])) by (le)) * 1e3","format":"time_series","legendFormat":"50th Percentile","refId":"B"},{"expr":"sum(rate(loki_objstore_bucket_operation_duration_seconds_sum{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\",operation=\"delete\"}[$__rate_interval])) * 1e3 / sum(rate(loki_objstore_bucket_operation_duration_seconds_count{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\",operation=\"delete\"}[$__rate_interval]))","format":"time_series","legendFormat":"Average","refId":"C"}],"title":"Op: Delete","type":"timeseries","yaxes":[{"format":"ms","label":null,"logBase":1,"max":null,"min":0,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":false}]}],"repeat":null,"repeatIteration":null,"repeatRowId":null,"showTitle":true,"title":"","titleSize":"h6","type":"row"}],"schemaVersion":14,"style":"dark","tags":["loki"],"templating":{"list":[{"current":{"text":"default","value":"default"},"hide":0,"label":"Data source","name":"datasource","options":[],"query":"prometheus","refresh":1,"regex":"","type":"datasource"},`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`{"allValue":null,"current":{"text":"prod","value":"prod"},"datasource":"$datasource","hide":0,"includeAll":false,"label":"cluster","multi":false,"name":"cluster","options":[],"query":"label_values(loki_build_info, cluster)","refresh":1,"regex":"","sort":2,"tagValuesQuery":"","tags":[],"tagsQuery":"","type":"query","useTags":false},`}}{{ end }}{{`{"current":{"text":"prod","value":"prod"},"datasource":"$datasource","hide":0,"includeAll":false,"label":"`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`","multi":false,"name":"`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`","options":[],"query":"label_values(loki_build_info, `}}{{ $.Values.monitoring.appInstanceLabelName }}{{`)","refresh":1,"regex":"","sort":2,"tagValuesQuery":"","tags":[],"tagsQuery":"","type":"query","useTags":false},{"allValue":null,"current":{"text":"prod","value":"prod"},"datasource":"$datasource","hide":0,"includeAll":false,"label":"namespace","multi":false,"name":"namespace","options":[],"query":"label_values(loki_build_info{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\"}, namespace)","refresh":1,"regex":"","sort":2,"tagValuesQuery":"","tags":[],"tagsQuery":"","type":"query","useTags":false}]},"time":{"from":"now-1h","to":"now"},"timepicker":{"refresh_intervals":["5s","10s","30s","1m","5m","15m","30m","1h","2h","1d"],"time_options":["5m","15m","1h","6h","12h","24h","2d","7d","30d"]},"timezone": "`}}{{ .Values.monitoring.dashboards.defaultDashboardsTimezone }}{{`","title":"Loki / Object Store Thanos","uid":"object-store","version":0}`}} +{{- end }} +--- +{{- if and .Values.monitoring.dashboards.enabled .Values.monitoring.dashboards.grafanaOperator.enabled (dig "loki-thanos-object-storage" "enabled" true .Values.monitoring.dashboards) }} +apiVersion: grafana.integreatly.org/v1beta1 +kind: GrafanaDashboard +metadata: + name: {{ include "loki.resourceName" (dict "ctx" $ "component" "dashboards" "suffix" "loki-thanos-object-storage") }} + namespace: {{ .Values.monitoring.namespace | default (include "loki.namespace" $) }} + {{- with (mergeOverwrite dict .Values.monitoring.dashboards.annotations .Values.monitoring.dashboards.grafanaOperator.annotations) }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} + labels: + {{- include "loki.labels" $ | nindent 4 }} + {{- with (mergeOverwrite dict .Values.monitoring.dashboards.labels .Values.monitoring.dashboards.grafanaOperator.labels) }} + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + allowCrossNamespaceImport: true + resyncPeriod: {{ .Values.monitoring.dashboards.grafanaOperator.resyncPeriod | default "10m" | quote }} + {{- include "loki.grafana.operator.folder" $ | nindent 2 }} + instanceSelector: + {{- toYaml .Values.monitoring.dashboards.grafanaOperator.instanceSelector | nindent 4 }} + configMapRef: + name: {{ include "loki.resourceName" (dict "ctx" $ "component" "dashboards" "suffix" "loki-thanos-object-storage") }} + key: loki-thanos-object-storage.json +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/monitoring/dashboards/loki-writes-resources.yaml b/packs/loki-3.7.4/charts/loki/templates/monitoring/dashboards/loki-writes-resources.yaml new file mode 100644 index 00000000..bcaf6094 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/monitoring/dashboards/loki-writes-resources.yaml @@ -0,0 +1,50 @@ +{{- /* +Generated from 'loki-writes-resources' from https://github.com/grafana/loki.git +Do not change in-place! In order to change this file first read following link: +https://github.com/grafana-community/helm-charts/tree/main/charts/loki/hack +*/ -}} +{{- if and .Values.monitoring.dashboards.enabled (dig "loki-writes-resources" "enabled" true .Values.monitoring.dashboards) }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "loki.resourceName" (dict "ctx" $ "component" "dashboards" "suffix" "loki-writes-resources") }} + namespace: {{ .Values.monitoring.namespace | default (include "loki.namespace" $) }} + labels: + {{- include "loki.labels" $ | nindent 4 }} + {{- with .Values.monitoring.dashboards.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.monitoring.dashboards.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +data: + loki-writes-resources.json: |- + {{`{"annotations":{"list":[]},"editable":`}}{{ .Values.monitoring.dashboards.defaultDashboardsEditable }}{{`,"gnetId":null,"graphTooltip":0,"hideControls":false,"links":[{"asDropdown":true,"icon":"external link","includeVars":true,"keepTime":true,"tags":["loki"],"targetBlank":false,"title":"Loki Dashboards","type":"dashboards"}],"refresh":"10s","rows":[{"collapse":false,"height":"250px","panels":[{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"short"},"overrides":[{"matcher":{"id":"byName","options":"request"},"properties":[{"id":"color","value":{"fixedColor":"#FFC000","mode":"fixed"}},{"id":"custom.fillOpacity","value":0}]},{"matcher":{"id":"byName","options":"limit"},"properties":[{"id":"color","value":{"fixedColor":"#E02F44","mode":"fixed"}},{"id":"custom.fillOpacity","value":0}]}]},"id":1,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":4,"targets":[{"expr":"sum by(pod) (rate(container_cpu_usage_seconds_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"distributor\"}[$__rate_interval]))","format":"time_series","legendFormat":"{{pod}}","legendLink":null},{"expr":"min(kube_pod_container_resource_requests{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"distributor\", resource=\"cpu\"} > 0)","format":"time_series","legendFormat":"request","legendLink":null},{"expr":"min(container_spec_cpu_quota{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"distributor\"} / container_spec_cpu_period{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"distributor\"})","format":"time_series","legendFormat":"limit","legendLink":null}],"title":"CPU","tooltip":{"sort":2},"type":"timeseries"},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"bytes"},"overrides":[{"matcher":{"id":"byName","options":"request"},"properties":[{"id":"color","value":{"fixedColor":"#FFC000","mode":"fixed"}},{"id":"custom.fillOpacity","value":0}]},{"matcher":{"id":"byName","options":"limit"},"properties":[{"id":"color","value":{"fixedColor":"#E02F44","mode":"fixed"}},{"id":"custom.fillOpacity","value":0}]}]},"id":2,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":4,"targets":[{"expr":"max by(pod) (container_memory_working_set_bytes{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"distributor\"})","format":"time_series","legendFormat":"{{pod}}","legendLink":null},{"expr":"min(kube_pod_container_resource_requests{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"distributor\", resource=\"memory\"} > 0)","format":"time_series","legendFormat":"request","legendLink":null},{"expr":"min(container_spec_memory_limit_bytes{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"distributor\"} > 0)","format":"time_series","legendFormat":"limit","legendLink":null}],"title":"Memory (workingset)","tooltip":{"sort":2},"type":"timeseries"},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"bytes"},"overrides":[]},"id":3,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":4,"targets":[{"expr":"sum by(pod) (go_memstats_heap_inuse_bytes{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"($namespace)/.*-distributor\"})","format":"time_series","legendFormat":"{{pod}}","legendLink":null}],"title":"Memory (go heap inuse)","tooltip":{"sort":2},"type":"timeseries"}],"repeat":null,"repeatIteration":null,"repeatRowId":null,"showTitle":true,"title":"Distributor","titleSize":"h6"},{"collapse":false,"height":"250px","panels":[{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"short"},"overrides":[]},"id":4,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":1,"targets":[{"expr":"sum by(pod) (loki_ingester_memory_streams{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"($namespace)/(.*ingester.*|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"})","format":"time_series","legendFormat":"{{pod}}","legendLink":null}],"title":"In-memory streams","tooltip":{"sort":2},"type":"timeseries"},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"short"},"overrides":[{"matcher":{"id":"byName","options":"request"},"properties":[{"id":"color","value":{"fixedColor":"#FFC000","mode":"fixed"}},{"id":"custom.fillOpacity","value":0}]},{"matcher":{"id":"byName","options":"limit"},"properties":[{"id":"color","value":{"fixedColor":"#E02F44","mode":"fixed"}},{"id":"custom.fillOpacity","value":0}]}]},"id":5,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":1,"targets":[{"expr":"sum by(pod) (rate(container_cpu_usage_seconds_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"loki|ingester|partition-ingester\", pod=~\"(.*ingester.*|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"}[$__rate_interval]))","format":"time_series","legendFormat":"{{pod}}","legendLink":null},{"expr":"min(kube_pod_container_resource_requests{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"loki|ingester|partition-ingester\", pod=~\"(.*ingester.*|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", resource=\"cpu\"} > 0)","format":"time_series","legendFormat":"request","legendLink":null},{"expr":"min(container_spec_cpu_quota{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"loki|ingester|partition-ingester\", pod=~\"(.*ingester.*|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"} / container_spec_cpu_period{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"loki|ingester|partition-ingester\", pod=~\"(.*ingester.*|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"})","format":"time_series","legendFormat":"limit","legendLink":null}],"title":"CPU","tooltip":{"sort":2},"type":"timeseries"},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"bytes"},"overrides":[{"matcher":{"id":"byName","options":"request"},"properties":[{"id":"color","value":{"fixedColor":"#FFC000","mode":"fixed"}},{"id":"custom.fillOpacity","value":0}]},{"matcher":{"id":"byName","options":"limit"},"properties":[{"id":"color","value":{"fixedColor":"#E02F44","mode":"fixed"}},{"id":"custom.fillOpacity","value":0}]}]},"id":6,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":1,"targets":[{"expr":"max by(pod) (container_memory_working_set_bytes{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"loki|ingester|partition-ingester\", pod=~\"(.*ingester.*|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"})","format":"time_series","legendFormat":"{{pod}}","legendLink":null},{"expr":"min(kube_pod_container_resource_requests{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"loki|ingester|partition-ingester\", pod=~\"(.*ingester.*|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", resource=\"memory\"} > 0)","format":"time_series","legendFormat":"request","legendLink":null},{"expr":"min(container_spec_memory_limit_bytes{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"loki|ingester|partition-ingester\", pod=~\"(.*ingester.*|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"} > 0)","format":"time_series","legendFormat":"limit","legendLink":null}],"title":"Memory (workingset)","tooltip":{"sort":2},"type":"timeseries"},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"bytes"},"overrides":[]},"id":7,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":1,"targets":[{"expr":"sum by(pod) (go_memstats_heap_inuse_bytes{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"($namespace)/(.*ingester.*|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\"})","format":"time_series","legendFormat":"{{pod}}","legendLink":null}],"title":"Memory (go heap inuse)","tooltip":{"sort":2},"type":"timeseries"},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":100,"lineWidth":0,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"normal"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"Bps"},"overrides":[]},"id":8,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":1,"targets":[{"expr":"sum by(instance, device) (rate(node_disk_written_bytes_total[$__rate_interval])) + ignoring(pod) group_right() (label_replace(count by(instance, pod, device) (container_fs_writes_bytes_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"loki|ingester|partition-ingester\", pod=~\"(.*ingester.*|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", device!~\".*sda.*\"}), \"device\", \"$1\", \"device\", \"/dev/(.*)\") * 0)\n","format":"time_series","legendFormat":"{{pod}} - {{device}}","legendLink":null}],"title":"Disk Writes","type":"timeseries"},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":100,"lineWidth":0,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"normal"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"Bps"},"overrides":[]},"id":9,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":1,"targets":[{"expr":"sum by(instance, device) (rate(node_disk_read_bytes_total[$__rate_interval])) + ignoring(pod) group_right() (label_replace(count by(instance, pod, device) (container_fs_writes_bytes_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", container=~\"loki|ingester|partition-ingester\", pod=~\"(.*ingester.*|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", device!~\".*sda.*\"}), \"device\", \"$1\", \"device\", \"/dev/(.*)\") * 0)\n","format":"time_series","legendFormat":"{{pod}} - {{device}}","legendLink":null}],"title":"Disk Reads","type":"timeseries"},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"percentunit"},"overrides":[]},"id":10,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":1,"targets":[{"expr":"max by(persistentvolumeclaim) (kubelet_volume_stats_used_bytes{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", persistentvolumeclaim=~\".*(.*ingester.*|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`).*\"} / kubelet_volume_stats_capacity_bytes{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", namespace=~\"$namespace\", persistentvolumeclaim=~\".*(.*ingester.*|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`).*\"})","format":"time_series","legendFormat":"{{persistentvolumeclaim}}","legendLink":null}],"title":"Disk Space Utilization","type":"timeseries"}],"repeat":null,"repeatIteration":null,"repeatRowId":null,"showTitle":true,"title":"Ingester","titleSize":"h6"}],"schemaVersion":14,"style":"dark","tags":["loki"],"templating":{"list":[{"current":{"text":"default","value":"default"},"hide":0,"label":"Data source","name":"datasource","options":[],"query":"prometheus","refresh":1,"regex":"","type":"datasource"},`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`{"allValue":null,"current":{"text":"prod","value":"prod"},"datasource":"$datasource","hide":0,"includeAll":false,"label":"cluster","multi":false,"name":"cluster","options":[],"query":"label_values(loki_build_info, cluster)","refresh":1,"regex":"","sort":2,"tagValuesQuery":"","tags":[],"tagsQuery":"","type":"query","useTags":false},`}}{{ end }}{{`{"current":{"text":"prod","value":"prod"},"datasource":"$datasource","hide":0,"includeAll":false,"label":"`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`","multi":false,"name":"`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`","options":[],"query":"label_values(loki_build_info, `}}{{ $.Values.monitoring.appInstanceLabelName }}{{`)","refresh":1,"regex":"","sort":2,"tagValuesQuery":"","tags":[],"tagsQuery":"","type":"query","useTags":false},{"allValue":null,"current":{"text":"prod","value":"prod"},"datasource":"$datasource","hide":0,"includeAll":false,"label":"namespace","multi":false,"name":"namespace","options":[],"query":"label_values(loki_build_info{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\"}, namespace)","refresh":1,"regex":"","sort":2,"tagValuesQuery":"","tags":[],"tagsQuery":"","type":"query","useTags":false}]},"time":{"from":"now-1h","to":"now"},"timepicker":{"refresh_intervals":["5s","10s","30s","1m","5m","15m","30m","1h","2h","1d"],"time_options":["5m","15m","1h","6h","12h","24h","2d","7d","30d"]},"timezone": "`}}{{ .Values.monitoring.dashboards.defaultDashboardsTimezone }}{{`","title":"Loki / Writes Resources","uid":"writes-resources","version":0}`}} +{{- end }} +--- +{{- if and .Values.monitoring.dashboards.enabled .Values.monitoring.dashboards.grafanaOperator.enabled (dig "loki-writes-resources" "enabled" true .Values.monitoring.dashboards) }} +apiVersion: grafana.integreatly.org/v1beta1 +kind: GrafanaDashboard +metadata: + name: {{ include "loki.resourceName" (dict "ctx" $ "component" "dashboards" "suffix" "loki-writes-resources") }} + namespace: {{ .Values.monitoring.namespace | default (include "loki.namespace" $) }} + {{- with (mergeOverwrite dict .Values.monitoring.dashboards.annotations .Values.monitoring.dashboards.grafanaOperator.annotations) }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} + labels: + {{- include "loki.labels" $ | nindent 4 }} + {{- with (mergeOverwrite dict .Values.monitoring.dashboards.labels .Values.monitoring.dashboards.grafanaOperator.labels) }} + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + allowCrossNamespaceImport: true + resyncPeriod: {{ .Values.monitoring.dashboards.grafanaOperator.resyncPeriod | default "10m" | quote }} + {{- include "loki.grafana.operator.folder" $ | nindent 2 }} + instanceSelector: + {{- toYaml .Values.monitoring.dashboards.grafanaOperator.instanceSelector | nindent 4 }} + configMapRef: + name: {{ include "loki.resourceName" (dict "ctx" $ "component" "dashboards" "suffix" "loki-writes-resources") }} + key: loki-writes-resources.json +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/monitoring/dashboards/loki-writes.yaml b/packs/loki-3.7.4/charts/loki/templates/monitoring/dashboards/loki-writes.yaml new file mode 100644 index 00000000..07bb16a7 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/monitoring/dashboards/loki-writes.yaml @@ -0,0 +1,50 @@ +{{- /* +Generated from 'loki-writes' from https://github.com/grafana/loki.git +Do not change in-place! In order to change this file first read following link: +https://github.com/grafana-community/helm-charts/tree/main/charts/loki/hack +*/ -}} +{{- if and .Values.monitoring.dashboards.enabled (dig "loki-writes" "enabled" true .Values.monitoring.dashboards) }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "loki.resourceName" (dict "ctx" $ "component" "dashboards" "suffix" "loki-writes") }} + namespace: {{ .Values.monitoring.namespace | default (include "loki.namespace" $) }} + labels: + {{- include "loki.labels" $ | nindent 4 }} + {{- with .Values.monitoring.dashboards.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.monitoring.dashboards.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +data: + loki-writes.json: |- + {{`{"annotations":{"list":[]},"editable":`}}{{ .Values.monitoring.dashboards.defaultDashboardsEditable }}{{`,"gnetId":null,"graphTooltip":0,"hideControls":false,"links":[{"asDropdown":true,"icon":"external link","includeVars":true,"keepTime":true,"tags":["loki"],"targetBlank":false,"title":"Loki Dashboards","type":"dashboards"}],"refresh":"10s","rows":[{"collapse":false,"height":"250px","panels":[{"aliasColors":{"1xx":"#EAB839","2xx":"#7EB26D","3xx":"#6ED0E0","4xx":"#EF843C","5xx":"#E24D42","OK":"#7EB26D","cancel":"#A9A9A9","error":"#E24D42","success":"#7EB26D"},"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":100,"lineWidth":0,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"normal"}},"min":0,"thresholds":{"mode":"absolute","steps":[]},"unit":"short"},"overrides":[{"matcher":{"id":"byName","options":"1xx"},"properties":[{"id":"color","value":{"fixedColor":"#EAB839","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"2xx"},"properties":[{"id":"color","value":{"fixedColor":"#7EB26D","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"3xx"},"properties":[{"id":"color","value":{"fixedColor":"#6ED0E0","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"4xx"},"properties":[{"id":"color","value":{"fixedColor":"#EF843C","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"5xx"},"properties":[{"id":"color","value":{"fixedColor":"#E24D42","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"OK"},"properties":[{"id":"color","value":{"fixedColor":"#7EB26D","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"cancel"},"properties":[{"id":"color","value":{"fixedColor":"#A9A9A9","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"error"},"properties":[{"id":"color","value":{"fixedColor":"#E24D42","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"success"},"properties":[{"id":"color","value":{"fixedColor":"#7EB26D","mode":"fixed"}}]}]},"fill":10,"id":1,"linewidth":0,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":4,"stack":true,"targets":[{"expr":"sum by (status) (\n label_replace(label_replace(rate(loki_request_duration_seconds_count{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\",job=~\"($namespace)/(.*-distributor|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", route=~\"api_prom_push|loki_api_v1_push|otlp_v1_logs|/httpgrpc.HTTP/Handle\"}[$__rate_interval]),\n \"status\", \"${1}xx\", \"status_code\", \"([0-9])..\"),\n \"status\", \"${1}\", \"status_code\", \"([a-zA-Z]+)\"))\n","format":"time_series","legendFormat":"{{status}}","refId":"A"}],"title":"QPS","type":"timeseries"},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"ms"},"overrides":[]},"id":2,"links":[],"nullPointMode":"null as zero","options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":4,"targets":[{"expr":"histogram_quantile(0.99, sum by (le) (cluster_job_route:loki_request_duration_seconds_bucket:sum_rate{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"($namespace)/(.*-distributor|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", route=~\"api_prom_push|loki_api_v1_push|otlp_v1_logs|/httpgrpc.HTTP/Handle\"})) * 1e3","format":"time_series","legendFormat":"99th percentile","refId":"A"},{"expr":"histogram_quantile(0.50, sum by (le) (cluster_job_route:loki_request_duration_seconds_bucket:sum_rate{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"($namespace)/(.*-distributor|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", route=~\"api_prom_push|loki_api_v1_push|otlp_v1_logs|/httpgrpc.HTTP/Handle\"})) * 1e3","format":"time_series","legendFormat":"50th percentile","refId":"B"},{"expr":"1e3 * sum(cluster_job_route:loki_request_duration_seconds_sum:sum_rate{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"($namespace)/(.*-distributor|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", route=~\"api_prom_push|loki_api_v1_push|otlp_v1_logs|/httpgrpc.HTTP/Handle\"}) / sum(cluster_job_route:loki_request_duration_seconds_count:sum_rate{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"($namespace)/(.*-distributor|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", route=~\"api_prom_push|loki_api_v1_push|otlp_v1_logs|/httpgrpc.HTTP/Handle\"})","format":"time_series","legendFormat":"Average","refId":"C"}],"title":"Latency","type":"timeseries","yaxes":[{"format":"ms","label":null,"logBase":1,"max":null,"min":0,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":false}]},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"ms"},"overrides":[]},"id":3,"links":[],"nullPointMode":"null as zero","options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":4,"targets":[{"expr":"histogram_quantile(0.99, sum(rate(loki_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"($namespace)/(.*-distributor|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", route=~\"api_prom_push|loki_api_v1_push|otlp_v1_logs|/httpgrpc.HTTP/Handle\"}[$__rate_interval])) by (le,pod)) * 1e3","format":"time_series","interval":"`}}{{ .Values.monitoring.dashboards.defaultDashboardsInterval }}{{`","intervalFactor":2,"legendFormat":"__auto","refId":"A","step":10}],"title":"Per Pod Latency (p99)","type":"timeseries"}],"repeat":null,"repeatIteration":null,"repeatRowId":null,"showTitle":true,"title":"Distributor","titleSize":"h6"},{"collapse":false,"height":"250px","panels":[{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"short"},"overrides":[]},"id":4,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":6,"targets":[{"expr":"sum (rate(loki_distributor_structured_metadata_bytes_received_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\",job=~\"($namespace)/(.*-distributor|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\",}[$__rate_interval])) / sum(rate(loki_distributor_bytes_received_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\",job=~\"($namespace)/(.*-distributor|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\",}[$__rate_interval]))","format":"time_series","legendFormat":"bytes","legendLink":null}],"title":"Per Total Received Bytes","type":"timeseries"},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"short"},"overrides":[]},"id":5,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":6,"stack":true,"targets":[{"expr":"sum by (tenant) (rate(loki_distributor_structured_metadata_bytes_received_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\",job=~\"($namespace)/(.*-distributor|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\",}[$__rate_interval])) / ignoring(tenant) group_left sum(rate(loki_distributor_structured_metadata_bytes_received_total{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\",job=~\"($namespace)/(.*-distributor|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\",}[$__rate_interval]))","format":"time_series","legendFormat":"{{tenant}}","legendLink":null}],"title":"Per Tenant","type":"timeseries","yaxes":[{"format":"short","label":null,"logBase":1,"max":1,"min":0,"show":true},{"format":"short","label":null,"logBase":1,"max":1,"min":null,"show":false}]}],"repeat":null,"repeatIteration":null,"repeatRowId":null,"showTitle":true,"title":"Distributor - Structured Metadata","titleSize":"h6"},{"collapse":false,"height":"250px","panels":[{"aliasColors":{"1xx":"#EAB839","2xx":"#7EB26D","3xx":"#6ED0E0","4xx":"#EF843C","5xx":"#E24D42","OK":"#7EB26D","cancel":"#A9A9A9","error":"#E24D42","success":"#7EB26D"},"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":100,"lineWidth":0,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"normal"}},"min":0,"thresholds":{"mode":"absolute","steps":[]},"unit":"short"},"overrides":[{"matcher":{"id":"byName","options":"1xx"},"properties":[{"id":"color","value":{"fixedColor":"#EAB839","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"2xx"},"properties":[{"id":"color","value":{"fixedColor":"#7EB26D","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"3xx"},"properties":[{"id":"color","value":{"fixedColor":"#6ED0E0","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"4xx"},"properties":[{"id":"color","value":{"fixedColor":"#EF843C","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"5xx"},"properties":[{"id":"color","value":{"fixedColor":"#E24D42","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"OK"},"properties":[{"id":"color","value":{"fixedColor":"#7EB26D","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"cancel"},"properties":[{"id":"color","value":{"fixedColor":"#A9A9A9","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"error"},"properties":[{"id":"color","value":{"fixedColor":"#E24D42","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"success"},"properties":[{"id":"color","value":{"fixedColor":"#7EB26D","mode":"fixed"}}]}]},"fill":10,"id":6,"linewidth":0,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":4,"stack":true,"targets":[{"expr":"sum by (status) (\n label_replace(label_replace(rate(loki_request_duration_seconds_count{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\",job=~\"($namespace)/(.*-partition-ingester|.*-ingester|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", route=\"/logproto.Pusher/Push\"}[$__rate_interval]),\n \"status\", \"${1}xx\", \"status_code\", \"([0-9])..\"),\n \"status\", \"${1}\", \"status_code\", \"([a-zA-Z]+)\"))\n","format":"time_series","legendFormat":"{{status}}","refId":"A"}],"title":"QPS","type":"timeseries"},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"ms"},"overrides":[]},"id":7,"links":[],"nullPointMode":"null as zero","options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":4,"targets":[{"expr":"histogram_quantile(0.99, sum by (le) (cluster_job_route:loki_request_duration_seconds_bucket:sum_rate{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"($namespace)/(.*-partition-ingester|.*-ingester|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", route=\"/logproto.Pusher/Push\"})) * 1e3","format":"time_series","legendFormat":"99th percentile","refId":"A"},{"expr":"histogram_quantile(0.50, sum by (le) (cluster_job_route:loki_request_duration_seconds_bucket:sum_rate{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"($namespace)/(.*-partition-ingester|.*-ingester|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", route=\"/logproto.Pusher/Push\"})) * 1e3","format":"time_series","legendFormat":"50th percentile","refId":"B"},{"expr":"1e3 * sum(cluster_job_route:loki_request_duration_seconds_sum:sum_rate{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"($namespace)/(.*-partition-ingester|.*-ingester|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", route=\"/logproto.Pusher/Push\"}) / sum(cluster_job_route:loki_request_duration_seconds_count:sum_rate{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"($namespace)/(.*-partition-ingester|.*-ingester|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", route=\"/logproto.Pusher/Push\"})","format":"time_series","legendFormat":"Average","refId":"C"}],"title":"Latency","type":"timeseries","yaxes":[{"format":"ms","label":null,"logBase":1,"max":null,"min":0,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":false}]},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"ms"},"overrides":[]},"id":8,"links":[],"nullPointMode":"null as zero","options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":4,"targets":[{"expr":"histogram_quantile(0.99, sum(rate(loki_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"($namespace)/(.*-partition-ingester|.*-ingester|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", route=\"/logproto.Pusher/Push\"}[$__rate_interval])) by (le,pod)) * 1e3","format":"time_series","interval":"`}}{{ .Values.monitoring.dashboards.defaultDashboardsInterval }}{{`","intervalFactor":2,"legendFormat":"__auto","refId":"A","step":10}],"title":"Per Pod Latency (p99)","type":"timeseries"}],"repeat":null,"repeatIteration":null,"repeatRowId":null,"showTitle":true,"title":"Ingester - Zone Aware","titleSize":"h6"},{"collapse":false,"height":"250px","panels":[{"aliasColors":{"1xx":"#EAB839","2xx":"#7EB26D","3xx":"#6ED0E0","4xx":"#EF843C","5xx":"#E24D42","OK":"#7EB26D","cancel":"#A9A9A9","error":"#E24D42","success":"#7EB26D"},"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":100,"lineWidth":0,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"normal"}},"min":0,"thresholds":{"mode":"absolute","steps":[]},"unit":"short"},"overrides":[{"matcher":{"id":"byName","options":"1xx"},"properties":[{"id":"color","value":{"fixedColor":"#EAB839","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"2xx"},"properties":[{"id":"color","value":{"fixedColor":"#7EB26D","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"3xx"},"properties":[{"id":"color","value":{"fixedColor":"#6ED0E0","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"4xx"},"properties":[{"id":"color","value":{"fixedColor":"#EF843C","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"5xx"},"properties":[{"id":"color","value":{"fixedColor":"#E24D42","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"OK"},"properties":[{"id":"color","value":{"fixedColor":"#7EB26D","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"cancel"},"properties":[{"id":"color","value":{"fixedColor":"#A9A9A9","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"error"},"properties":[{"id":"color","value":{"fixedColor":"#E24D42","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"success"},"properties":[{"id":"color","value":{"fixedColor":"#7EB26D","mode":"fixed"}}]}]},"fill":10,"id":9,"linewidth":0,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":4,"stack":true,"targets":[{"expr":"sum by (status) (\n label_replace(label_replace(rate(loki_request_duration_seconds_count{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\",job=~\"($namespace)/(.*-partition-ingester.*|.*-ingester.*|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", route=\"/logproto.Pusher/Push\"}[$__rate_interval]),\n \"status\", \"${1}xx\", \"status_code\", \"([0-9])..\"),\n \"status\", \"${1}\", \"status_code\", \"([a-zA-Z]+)\"))\n","format":"time_series","legendFormat":"{{status}}","refId":"A"}],"title":"QPS","type":"timeseries"},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"ms"},"overrides":[]},"id":10,"links":[],"nullPointMode":"null as zero","options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":4,"targets":[{"expr":"histogram_quantile(0.99, sum by (le) (cluster_job_route:loki_request_duration_seconds_bucket:sum_rate{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"($namespace)/(.*-partition-ingester.*|.*-ingester.*|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", route=\"/logproto.Pusher/Push\"})) * 1e3","format":"time_series","legendFormat":"99th percentile","refId":"A"},{"expr":"histogram_quantile(0.50, sum by (le) (cluster_job_route:loki_request_duration_seconds_bucket:sum_rate{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"($namespace)/(.*-partition-ingester.*|.*-ingester.*|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", route=\"/logproto.Pusher/Push\"})) * 1e3","format":"time_series","legendFormat":"50th percentile","refId":"B"},{"expr":"1e3 * sum(cluster_job_route:loki_request_duration_seconds_sum:sum_rate{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"($namespace)/(.*-partition-ingester.*|.*-ingester.*|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", route=\"/logproto.Pusher/Push\"}) / sum(cluster_job_route:loki_request_duration_seconds_count:sum_rate{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"($namespace)/(.*-partition-ingester.*|.*-ingester.*|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", route=\"/logproto.Pusher/Push\"})","format":"time_series","legendFormat":"Average","refId":"C"}],"title":"Latency","type":"timeseries","yaxes":[{"format":"ms","label":null,"logBase":1,"max":null,"min":0,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":false}]},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"ms"},"overrides":[]},"id":11,"links":[],"nullPointMode":"null as zero","options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":4,"targets":[{"expr":"histogram_quantile(0.99, sum(rate(loki_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\", job=~\"($namespace)/(.*-partition-ingester.*|.*-ingester.*|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", route=\"/logproto.Pusher/Push\"}[$__rate_interval])) by (le,pod)) * 1e3","format":"time_series","interval":"`}}{{ .Values.monitoring.dashboards.defaultDashboardsInterval }}{{`","intervalFactor":2,"legendFormat":"__auto","refId":"A","step":10}],"title":"Per Pod Latency (p99)","type":"timeseries"}],"repeat":null,"repeatIteration":null,"repeatRowId":null,"showTitle":true,"title":"Ingester","titleSize":"h6"},{"collapse":false,"height":"250px","panels":[{"aliasColors":{"1xx":"#EAB839","2xx":"#7EB26D","3xx":"#6ED0E0","4xx":"#EF843C","5xx":"#E24D42","OK":"#7EB26D","cancel":"#A9A9A9","error":"#E24D42","success":"#7EB26D"},"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":100,"lineWidth":0,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"normal"}},"min":0,"thresholds":{"mode":"absolute","steps":[]},"unit":"short"},"overrides":[{"matcher":{"id":"byName","options":"1xx"},"properties":[{"id":"color","value":{"fixedColor":"#EAB839","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"2xx"},"properties":[{"id":"color","value":{"fixedColor":"#7EB26D","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"3xx"},"properties":[{"id":"color","value":{"fixedColor":"#6ED0E0","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"4xx"},"properties":[{"id":"color","value":{"fixedColor":"#EF843C","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"5xx"},"properties":[{"id":"color","value":{"fixedColor":"#E24D42","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"OK"},"properties":[{"id":"color","value":{"fixedColor":"#7EB26D","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"cancel"},"properties":[{"id":"color","value":{"fixedColor":"#A9A9A9","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"error"},"properties":[{"id":"color","value":{"fixedColor":"#E24D42","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"success"},"properties":[{"id":"color","value":{"fixedColor":"#7EB26D","mode":"fixed"}}]}]},"fill":10,"id":12,"linewidth":0,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":4,"stack":true,"targets":[{"expr":"sum by (status) (\n label_replace(label_replace(rate(loki_index_request_duration_seconds_count{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\",job=~\"($namespace)/(.*-partition-ingester.*|.*-ingester.*|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", operation=\"index_chunk\"}[$__rate_interval]),\n \"status\", \"${1}xx\", \"status_code\", \"([0-9])..\"),\n \"status\", \"${1}\", \"status_code\", \"([a-zA-Z]+)\"))\n","format":"time_series","legendFormat":"{{status}}","refId":"A"}],"title":"QPS","type":"timeseries"},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"ms"},"overrides":[]},"id":13,"links":[],"nullPointMode":"null as zero","options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":4,"targets":[{"expr":"histogram_quantile(0.99, sum(rate(loki_index_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\",job=~\"($namespace)/(.*-partition-ingester.*|.*-ingester.*|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", operation=\"index_chunk\"}[$__rate_interval])) by (le)) * 1e3","format":"time_series","legendFormat":"99th Percentile","refId":"A"},{"expr":"histogram_quantile(0.50, sum(rate(loki_index_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\",job=~\"($namespace)/(.*-partition-ingester.*|.*-ingester.*|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", operation=\"index_chunk\"}[$__rate_interval])) by (le)) * 1e3","format":"time_series","legendFormat":"50th Percentile","refId":"B"},{"expr":"sum(rate(loki_index_request_duration_seconds_sum{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\",job=~\"($namespace)/(.*-partition-ingester.*|.*-ingester.*|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", operation=\"index_chunk\"}[$__rate_interval])) * 1e3 / sum(rate(loki_index_request_duration_seconds_count{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\",job=~\"($namespace)/(.*-partition-ingester.*|.*-ingester.*|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", operation=\"index_chunk\"}[$__rate_interval]))","format":"time_series","legendFormat":"Average","refId":"C"}],"title":"Latency","type":"timeseries","yaxes":[{"format":"ms","label":null,"logBase":1,"max":null,"min":0,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":false}]},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"ms"},"overrides":[]},"id":14,"links":[],"nullPointMode":"null as zero","options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":4,"targets":[{"expr":"histogram_quantile(0.99, sum(rate(loki_index_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\",job=~\"($namespace)/(.*-partition-ingester.*|.*-ingester.*|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", operation=\"index_chunk\"}[$__rate_interval])) by (le,pod)) * 1e3","format":"time_series","interval":"`}}{{ .Values.monitoring.dashboards.defaultDashboardsInterval }}{{`","intervalFactor":2,"legendFormat":"__auto","refId":"A","step":10}],"title":"Per Pod Latency (p99)","type":"timeseries"}],"repeat":null,"repeatIteration":null,"repeatRowId":null,"showTitle":true,"title":"Index","titleSize":"h6"},{"collapse":false,"height":"250px","panels":[{"aliasColors":{"1xx":"#EAB839","2xx":"#7EB26D","3xx":"#6ED0E0","4xx":"#EF843C","5xx":"#E24D42","OK":"#7EB26D","cancel":"#A9A9A9","error":"#E24D42","success":"#7EB26D"},"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":100,"lineWidth":0,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"normal"}},"min":0,"thresholds":{"mode":"absolute","steps":[]},"unit":"short"},"overrides":[{"matcher":{"id":"byName","options":"1xx"},"properties":[{"id":"color","value":{"fixedColor":"#EAB839","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"2xx"},"properties":[{"id":"color","value":{"fixedColor":"#7EB26D","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"3xx"},"properties":[{"id":"color","value":{"fixedColor":"#6ED0E0","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"4xx"},"properties":[{"id":"color","value":{"fixedColor":"#EF843C","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"5xx"},"properties":[{"id":"color","value":{"fixedColor":"#E24D42","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"OK"},"properties":[{"id":"color","value":{"fixedColor":"#7EB26D","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"cancel"},"properties":[{"id":"color","value":{"fixedColor":"#A9A9A9","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"error"},"properties":[{"id":"color","value":{"fixedColor":"#E24D42","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"success"},"properties":[{"id":"color","value":{"fixedColor":"#7EB26D","mode":"fixed"}}]}]},"fill":10,"id":15,"linewidth":0,"links":[],"options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":4,"stack":true,"targets":[{"expr":"sum by (status) (\n label_replace(label_replace(rate(loki_boltdb_shipper_request_duration_seconds_count{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\",job=~\"($namespace)/(.*-partition-ingester.*|.*-ingester.*|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", operation=\"WRITE\"}[$__rate_interval]),\n \"status\", \"${1}xx\", \"status_code\", \"([0-9])..\"),\n \"status\", \"${1}\", \"status_code\", \"([a-zA-Z]+)\"))\n","format":"time_series","legendFormat":"{{status}}","refId":"A"}],"title":"QPS","type":"timeseries"},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"ms"},"overrides":[]},"id":16,"links":[],"nullPointMode":"null as zero","options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":4,"targets":[{"expr":"histogram_quantile(0.99, sum(rate(loki_boltdb_shipper_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\",job=~\"($namespace)/(.*-partition-ingester.*|.*-ingester.*|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", operation=\"WRITE\"}[$__rate_interval])) by (le)) * 1e3","format":"time_series","legendFormat":"99th Percentile","refId":"A"},{"expr":"histogram_quantile(0.50, sum(rate(loki_boltdb_shipper_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\",job=~\"($namespace)/(.*-partition-ingester.*|.*-ingester.*|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", operation=\"WRITE\"}[$__rate_interval])) by (le)) * 1e3","format":"time_series","legendFormat":"50th Percentile","refId":"B"},{"expr":"sum(rate(loki_boltdb_shipper_request_duration_seconds_sum{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\",job=~\"($namespace)/(.*-partition-ingester.*|.*-ingester.*|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", operation=\"WRITE\"}[$__rate_interval])) * 1e3 / sum(rate(loki_boltdb_shipper_request_duration_seconds_count{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\",job=~\"($namespace)/(.*-partition-ingester.*|.*-ingester.*|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", operation=\"WRITE\"}[$__rate_interval]))","format":"time_series","legendFormat":"Average","refId":"C"}],"title":"Latency","type":"timeseries","yaxes":[{"format":"ms","label":null,"logBase":1,"max":null,"min":0,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":false}]},{"datasource":"$datasource","fieldConfig":{"defaults":{"custom":{"drawStyle":"line","fillOpacity":10,"lineWidth":1,"pointSize":5,"showPoints":"never","spanNulls":false,"stacking":{"group":"A","mode":"none"}},"thresholds":{"mode":"absolute","steps":[]},"unit":"ms"},"overrides":[]},"id":17,"links":[],"nullPointMode":"null as zero","options":{"legend":{"showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"span":4,"targets":[{"expr":"histogram_quantile(0.99, sum(rate(loki_boltdb_shipper_request_duration_seconds_bucket{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\",job=~\"($namespace)/(.*-partition-ingester.*|.*-ingester.*|.*-write|`}}{{ include "loki.resourceName" (dict "ctx" $) }}{{`)\", operation=\"WRITE\"}[$__rate_interval])) by (le,pod)) * 1e3","format":"time_series","interval":"`}}{{ .Values.monitoring.dashboards.defaultDashboardsInterval }}{{`","intervalFactor":2,"legendFormat":"__auto","refId":"A","step":10}],"title":"Per Pod Latency (p99)","type":"timeseries"}],"repeat":null,"repeatIteration":null,"repeatRowId":null,"showTitle":true,"title":"BoltDB Index","titleSize":"h6"}],"schemaVersion":14,"style":"dark","tags":["loki"],"templating":{"list":[{"current":{"text":"default","value":"default"},"hide":0,"label":"Data source","name":"datasource","options":[],"query":"prometheus","refresh":1,"regex":"","type":"datasource"},`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`{"allValue":null,"current":{"text":"prod","value":"prod"},"datasource":"$datasource","hide":0,"includeAll":false,"label":"cluster","multi":false,"name":"cluster","options":[],"query":"label_values(loki_build_info, cluster)","refresh":1,"regex":"","sort":2,"tagValuesQuery":"","tags":[],"tagsQuery":"","type":"query","useTags":false},`}}{{ end }}{{`{"current":{"text":"prod","value":"prod"},"datasource":"$datasource","hide":0,"includeAll":false,"label":"`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`","multi":false,"name":"`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`","options":[],"query":"label_values(loki_build_info, `}}{{ $.Values.monitoring.appInstanceLabelName }}{{`)","refresh":1,"regex":"","sort":2,"tagValuesQuery":"","tags":[],"tagsQuery":"","type":"query","useTags":false},{"allValue":null,"current":{"text":"prod","value":"prod"},"datasource":"$datasource","hide":0,"includeAll":false,"label":"namespace","multi":false,"name":"namespace","options":[],"query":"label_values(loki_build_info{`}}{{ if .Values.monitoring.multiCluster.enabled }}{{`cluster=~\"$cluster\", `}}{{ end }}{{ $.Values.monitoring.appInstanceLabelName }}{{`=~\"$`}}{{ $.Values.monitoring.appInstanceLabelName }}{{`\"}, namespace)","refresh":1,"regex":"","sort":2,"tagValuesQuery":"","tags":[],"tagsQuery":"","type":"query","useTags":false}]},"time":{"from":"now-1h","to":"now"},"timepicker":{"refresh_intervals":["5s","10s","30s","1m","5m","15m","30m","1h","2h","1d"],"time_options":["5m","15m","1h","6h","12h","24h","2d","7d","30d"]},"timezone": "`}}{{ .Values.monitoring.dashboards.defaultDashboardsTimezone }}{{`","title":"Loki / Writes","uid":"writes","version":0}`}} +{{- end }} +--- +{{- if and .Values.monitoring.dashboards.enabled .Values.monitoring.dashboards.grafanaOperator.enabled (dig "loki-writes" "enabled" true .Values.monitoring.dashboards) }} +apiVersion: grafana.integreatly.org/v1beta1 +kind: GrafanaDashboard +metadata: + name: {{ include "loki.resourceName" (dict "ctx" $ "component" "dashboards" "suffix" "loki-writes") }} + namespace: {{ .Values.monitoring.namespace | default (include "loki.namespace" $) }} + {{- with (mergeOverwrite dict .Values.monitoring.dashboards.annotations .Values.monitoring.dashboards.grafanaOperator.annotations) }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} + labels: + {{- include "loki.labels" $ | nindent 4 }} + {{- with (mergeOverwrite dict .Values.monitoring.dashboards.labels .Values.monitoring.dashboards.grafanaOperator.labels) }} + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + allowCrossNamespaceImport: true + resyncPeriod: {{ .Values.monitoring.dashboards.grafanaOperator.resyncPeriod | default "10m" | quote }} + {{- include "loki.grafana.operator.folder" $ | nindent 2 }} + instanceSelector: + {{- toYaml .Values.monitoring.dashboards.grafanaOperator.instanceSelector | nindent 4 }} + configMapRef: + name: {{ include "loki.resourceName" (dict "ctx" $ "component" "dashboards" "suffix" "loki-writes") }} + key: loki-writes.json +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/monitoring/rules/loki_rules.yaml b/packs/loki-3.7.4/charts/loki/templates/monitoring/rules/loki_rules.yaml new file mode 100644 index 00000000..43c1236c --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/monitoring/rules/loki_rules.yaml @@ -0,0 +1,205 @@ +{{- /* +Generated from 'loki-rules' group from https://github.com/grafana/loki.git +Do not change in-place! In order to change this file first read following link: +https://github.com/grafana-community/helm-charts/tree/main/charts/loki/hack +*/ -}} +{{- if and .Values.monitoring.rules.enabled }} +apiVersion: monitoring.coreos.com/v1 +kind: PrometheusRule +metadata: + name: {{ include "loki.resourceName" (dict "ctx" $ "component" "loki-rules") }} + namespace: {{ .Values.monitoring.namespace | default (include "loki.namespace" $) }} + labels: + {{- include "loki.labels" $ | nindent 4 }} + {{- with .Values.monitoring.rules.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.monitoring.rules.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + groups: + - name: loki_rules + rules: + - expr: histogram_quantile(0.99, sum(rate(loki_request_duration_seconds_bucket[1m])) by ({{ range $.Values.monitoring.rules.additionalAggregationLabels }}{{ . }},{{ end }}le, {{ if and $.Values.monitoring.multiCluster.enabled $.Values.monitoring.multiCluster.clusterName }}cluster, {{ end }}{{ $.Values.monitoring.appInstanceLabelName }}, job)) + record: cluster_job:loki_request_duration_seconds:99quantile + labels: + {{- if and .Values.monitoring.multiCluster.enabled .Values.monitoring.multiCluster.clusterName }} + cluster: "{{ tpl .Values.monitoring.multiCluster.clusterName $ }}" + {{- end }} + {{ $.Values.monitoring.appInstanceLabelName }}: "{{ tpl $.Values.monitoring.appInstanceLabelValue $ }}" + {{- with .Values.monitoring.rules.additionalRuleLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + - expr: histogram_quantile(0.50, sum(rate(loki_request_duration_seconds_bucket[1m])) by ({{ range $.Values.monitoring.rules.additionalAggregationLabels }}{{ . }},{{ end }}le, {{ if and $.Values.monitoring.multiCluster.enabled $.Values.monitoring.multiCluster.clusterName }}cluster, {{ end }}{{ $.Values.monitoring.appInstanceLabelName }}, job)) + record: cluster_job:loki_request_duration_seconds:50quantile + labels: + {{- if and .Values.monitoring.multiCluster.enabled .Values.monitoring.multiCluster.clusterName }} + cluster: "{{ tpl .Values.monitoring.multiCluster.clusterName $ }}" + {{- end }} + {{ $.Values.monitoring.appInstanceLabelName }}: "{{ tpl $.Values.monitoring.appInstanceLabelValue $ }}" + {{- with .Values.monitoring.rules.additionalRuleLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + - expr: sum(rate(loki_request_duration_seconds_sum[1m])) by ({{ range $.Values.monitoring.rules.additionalAggregationLabels }}{{ . }},{{ end }}{{ if and $.Values.monitoring.multiCluster.enabled $.Values.monitoring.multiCluster.clusterName }}cluster, {{ end }}{{ $.Values.monitoring.appInstanceLabelName }}, job) / sum(rate(loki_request_duration_seconds_count[1m])) by ({{ range $.Values.monitoring.rules.additionalAggregationLabels }}{{ . }},{{ end }}{{ if and $.Values.monitoring.multiCluster.enabled $.Values.monitoring.multiCluster.clusterName }}cluster, {{ end }}{{ $.Values.monitoring.appInstanceLabelName }}, job) + record: cluster_job:loki_request_duration_seconds:avg + labels: + {{- if and .Values.monitoring.multiCluster.enabled .Values.monitoring.multiCluster.clusterName }} + cluster: "{{ tpl .Values.monitoring.multiCluster.clusterName $ }}" + {{- end }} + {{ $.Values.monitoring.appInstanceLabelName }}: "{{ tpl $.Values.monitoring.appInstanceLabelValue $ }}" + {{- with .Values.monitoring.rules.additionalRuleLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + - expr: sum(rate(loki_request_duration_seconds_bucket[1m])) by ({{ range $.Values.monitoring.rules.additionalAggregationLabels }}{{ . }},{{ end }}le, {{ if and $.Values.monitoring.multiCluster.enabled $.Values.monitoring.multiCluster.clusterName }}cluster, {{ end }}{{ $.Values.monitoring.appInstanceLabelName }}, job) + record: cluster_job:loki_request_duration_seconds_bucket:sum_rate + labels: + {{- if and .Values.monitoring.multiCluster.enabled .Values.monitoring.multiCluster.clusterName }} + cluster: "{{ tpl .Values.monitoring.multiCluster.clusterName $ }}" + {{- end }} + {{ $.Values.monitoring.appInstanceLabelName }}: "{{ tpl $.Values.monitoring.appInstanceLabelValue $ }}" + {{- with .Values.monitoring.rules.additionalRuleLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + - expr: sum(rate(loki_request_duration_seconds_sum[1m])) by ({{ range $.Values.monitoring.rules.additionalAggregationLabels }}{{ . }},{{ end }}{{ if and $.Values.monitoring.multiCluster.enabled $.Values.monitoring.multiCluster.clusterName }}cluster, {{ end }}{{ $.Values.monitoring.appInstanceLabelName }}, job) + record: cluster_job:loki_request_duration_seconds_sum:sum_rate + labels: + {{- if and .Values.monitoring.multiCluster.enabled .Values.monitoring.multiCluster.clusterName }} + cluster: "{{ tpl .Values.monitoring.multiCluster.clusterName $ }}" + {{- end }} + {{ $.Values.monitoring.appInstanceLabelName }}: "{{ tpl $.Values.monitoring.appInstanceLabelValue $ }}" + {{- with .Values.monitoring.rules.additionalRuleLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + - expr: sum(rate(loki_request_duration_seconds_count[1m])) by ({{ range $.Values.monitoring.rules.additionalAggregationLabels }}{{ . }},{{ end }}{{ if and $.Values.monitoring.multiCluster.enabled $.Values.monitoring.multiCluster.clusterName }}cluster, {{ end }}{{ $.Values.monitoring.appInstanceLabelName }}, job) + record: cluster_job:loki_request_duration_seconds_count:sum_rate + labels: + {{- if and .Values.monitoring.multiCluster.enabled .Values.monitoring.multiCluster.clusterName }} + cluster: "{{ tpl .Values.monitoring.multiCluster.clusterName $ }}" + {{- end }} + {{ $.Values.monitoring.appInstanceLabelName }}: "{{ tpl $.Values.monitoring.appInstanceLabelValue $ }}" + {{- with .Values.monitoring.rules.additionalRuleLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + - expr: histogram_quantile(0.99, sum(rate(loki_request_duration_seconds_bucket[1m])) by ({{ range $.Values.monitoring.rules.additionalAggregationLabels }}{{ . }},{{ end }}le, {{ if and $.Values.monitoring.multiCluster.enabled $.Values.monitoring.multiCluster.clusterName }}cluster, {{ end }}{{ $.Values.monitoring.appInstanceLabelName }}, job, route)) + record: cluster_job_route:loki_request_duration_seconds:99quantile + labels: + {{- if and .Values.monitoring.multiCluster.enabled .Values.monitoring.multiCluster.clusterName }} + cluster: "{{ tpl .Values.monitoring.multiCluster.clusterName $ }}" + {{- end }} + {{ $.Values.monitoring.appInstanceLabelName }}: "{{ tpl $.Values.monitoring.appInstanceLabelValue $ }}" + {{- with .Values.monitoring.rules.additionalRuleLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + - expr: histogram_quantile(0.50, sum(rate(loki_request_duration_seconds_bucket[1m])) by ({{ range $.Values.monitoring.rules.additionalAggregationLabels }}{{ . }},{{ end }}le, {{ if and $.Values.monitoring.multiCluster.enabled $.Values.monitoring.multiCluster.clusterName }}cluster, {{ end }}{{ $.Values.monitoring.appInstanceLabelName }}, job, route)) + record: cluster_job_route:loki_request_duration_seconds:50quantile + labels: + {{- if and .Values.monitoring.multiCluster.enabled .Values.monitoring.multiCluster.clusterName }} + cluster: "{{ tpl .Values.monitoring.multiCluster.clusterName $ }}" + {{- end }} + {{ $.Values.monitoring.appInstanceLabelName }}: "{{ tpl $.Values.monitoring.appInstanceLabelValue $ }}" + {{- with .Values.monitoring.rules.additionalRuleLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + - expr: sum(rate(loki_request_duration_seconds_sum[1m])) by ({{ range $.Values.monitoring.rules.additionalAggregationLabels }}{{ . }},{{ end }}{{ if and $.Values.monitoring.multiCluster.enabled $.Values.monitoring.multiCluster.clusterName }}cluster, {{ end }}{{ $.Values.monitoring.appInstanceLabelName }}, job, route) / sum(rate(loki_request_duration_seconds_count[1m])) by ({{ range $.Values.monitoring.rules.additionalAggregationLabels }}{{ . }},{{ end }}{{ if and $.Values.monitoring.multiCluster.enabled $.Values.monitoring.multiCluster.clusterName }}cluster, {{ end }}{{ $.Values.monitoring.appInstanceLabelName }}, job, route) + record: cluster_job_route:loki_request_duration_seconds:avg + labels: + {{- if and .Values.monitoring.multiCluster.enabled .Values.monitoring.multiCluster.clusterName }} + cluster: "{{ tpl .Values.monitoring.multiCluster.clusterName $ }}" + {{- end }} + {{ $.Values.monitoring.appInstanceLabelName }}: "{{ tpl $.Values.monitoring.appInstanceLabelValue $ }}" + {{- with .Values.monitoring.rules.additionalRuleLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + - expr: sum(rate(loki_request_duration_seconds_bucket[1m])) by ({{ range $.Values.monitoring.rules.additionalAggregationLabels }}{{ . }},{{ end }}le, {{ if and $.Values.monitoring.multiCluster.enabled $.Values.monitoring.multiCluster.clusterName }}cluster, {{ end }}{{ $.Values.monitoring.appInstanceLabelName }}, job, route) + record: cluster_job_route:loki_request_duration_seconds_bucket:sum_rate + labels: + {{- if and .Values.monitoring.multiCluster.enabled .Values.monitoring.multiCluster.clusterName }} + cluster: "{{ tpl .Values.monitoring.multiCluster.clusterName $ }}" + {{- end }} + {{ $.Values.monitoring.appInstanceLabelName }}: "{{ tpl $.Values.monitoring.appInstanceLabelValue $ }}" + {{- with .Values.monitoring.rules.additionalRuleLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + - expr: sum(rate(loki_request_duration_seconds_sum[1m])) by ({{ range $.Values.monitoring.rules.additionalAggregationLabels }}{{ . }},{{ end }}{{ if and $.Values.monitoring.multiCluster.enabled $.Values.monitoring.multiCluster.clusterName }}cluster, {{ end }}{{ $.Values.monitoring.appInstanceLabelName }}, job, route) + record: cluster_job_route:loki_request_duration_seconds_sum:sum_rate + labels: + {{- if and .Values.monitoring.multiCluster.enabled .Values.monitoring.multiCluster.clusterName }} + cluster: "{{ tpl .Values.monitoring.multiCluster.clusterName $ }}" + {{- end }} + {{ $.Values.monitoring.appInstanceLabelName }}: "{{ tpl $.Values.monitoring.appInstanceLabelValue $ }}" + {{- with .Values.monitoring.rules.additionalRuleLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + - expr: sum(rate(loki_request_duration_seconds_count[1m])) by ({{ range $.Values.monitoring.rules.additionalAggregationLabels }}{{ . }},{{ end }}{{ if and $.Values.monitoring.multiCluster.enabled $.Values.monitoring.multiCluster.clusterName }}cluster, {{ end }}{{ $.Values.monitoring.appInstanceLabelName }}, job, route) + record: cluster_job_route:loki_request_duration_seconds_count:sum_rate + labels: + {{- if and .Values.monitoring.multiCluster.enabled .Values.monitoring.multiCluster.clusterName }} + cluster: "{{ tpl .Values.monitoring.multiCluster.clusterName $ }}" + {{- end }} + {{ $.Values.monitoring.appInstanceLabelName }}: "{{ tpl $.Values.monitoring.appInstanceLabelValue $ }}" + {{- with .Values.monitoring.rules.additionalRuleLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + - expr: histogram_quantile(0.99, sum(rate(loki_request_duration_seconds_bucket[1m])) by ({{ range $.Values.monitoring.rules.additionalAggregationLabels }}{{ . }},{{ end }}le, {{ if and $.Values.monitoring.multiCluster.enabled $.Values.monitoring.multiCluster.clusterName }}cluster, {{ end }}{{ $.Values.monitoring.appInstanceLabelName }}, namespace, job, route)) + record: cluster_namespace_job_route:loki_request_duration_seconds:99quantile + labels: + {{- if and .Values.monitoring.multiCluster.enabled .Values.monitoring.multiCluster.clusterName }} + cluster: "{{ tpl .Values.monitoring.multiCluster.clusterName $ }}" + {{- end }} + {{ $.Values.monitoring.appInstanceLabelName }}: "{{ tpl $.Values.monitoring.appInstanceLabelValue $ }}" + {{- with .Values.monitoring.rules.additionalRuleLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + - expr: histogram_quantile(0.50, sum(rate(loki_request_duration_seconds_bucket[1m])) by ({{ range $.Values.monitoring.rules.additionalAggregationLabels }}{{ . }},{{ end }}le, {{ if and $.Values.monitoring.multiCluster.enabled $.Values.monitoring.multiCluster.clusterName }}cluster, {{ end }}{{ $.Values.monitoring.appInstanceLabelName }}, namespace, job, route)) + record: cluster_namespace_job_route:loki_request_duration_seconds:50quantile + labels: + {{- if and .Values.monitoring.multiCluster.enabled .Values.monitoring.multiCluster.clusterName }} + cluster: "{{ tpl .Values.monitoring.multiCluster.clusterName $ }}" + {{- end }} + {{ $.Values.monitoring.appInstanceLabelName }}: "{{ tpl $.Values.monitoring.appInstanceLabelValue $ }}" + {{- with .Values.monitoring.rules.additionalRuleLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + - expr: sum(rate(loki_request_duration_seconds_sum[1m])) by ({{ range $.Values.monitoring.rules.additionalAggregationLabels }}{{ . }},{{ end }}{{ if and $.Values.monitoring.multiCluster.enabled $.Values.monitoring.multiCluster.clusterName }}cluster, {{ end }}{{ $.Values.monitoring.appInstanceLabelName }}, namespace, job, route) / sum(rate(loki_request_duration_seconds_count[1m])) by ({{ range $.Values.monitoring.rules.additionalAggregationLabels }}{{ . }},{{ end }}{{ if and $.Values.monitoring.multiCluster.enabled $.Values.monitoring.multiCluster.clusterName }}cluster, {{ end }}{{ $.Values.monitoring.appInstanceLabelName }}, namespace, job, route) + record: cluster_namespace_job_route:loki_request_duration_seconds:avg + labels: + {{- if and .Values.monitoring.multiCluster.enabled .Values.monitoring.multiCluster.clusterName }} + cluster: "{{ tpl .Values.monitoring.multiCluster.clusterName $ }}" + {{- end }} + {{ $.Values.monitoring.appInstanceLabelName }}: "{{ tpl $.Values.monitoring.appInstanceLabelValue $ }}" + {{- with .Values.monitoring.rules.additionalRuleLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + - expr: sum(rate(loki_request_duration_seconds_bucket[1m])) by ({{ range $.Values.monitoring.rules.additionalAggregationLabels }}{{ . }},{{ end }}le, {{ if and $.Values.monitoring.multiCluster.enabled $.Values.monitoring.multiCluster.clusterName }}cluster, {{ end }}{{ $.Values.monitoring.appInstanceLabelName }}, namespace, job, route) + record: cluster_namespace_job_route:loki_request_duration_seconds_bucket:sum_rate + labels: + {{- if and .Values.monitoring.multiCluster.enabled .Values.monitoring.multiCluster.clusterName }} + cluster: "{{ tpl .Values.monitoring.multiCluster.clusterName $ }}" + {{- end }} + {{ $.Values.monitoring.appInstanceLabelName }}: "{{ tpl $.Values.monitoring.appInstanceLabelValue $ }}" + {{- with .Values.monitoring.rules.additionalRuleLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + - expr: sum(rate(loki_request_duration_seconds_sum[1m])) by ({{ range $.Values.monitoring.rules.additionalAggregationLabels }}{{ . }},{{ end }}{{ if and $.Values.monitoring.multiCluster.enabled $.Values.monitoring.multiCluster.clusterName }}cluster, {{ end }}{{ $.Values.monitoring.appInstanceLabelName }}, namespace, job, route) + record: cluster_namespace_job_route:loki_request_duration_seconds_sum:sum_rate + labels: + {{- if and .Values.monitoring.multiCluster.enabled .Values.monitoring.multiCluster.clusterName }} + cluster: "{{ tpl .Values.monitoring.multiCluster.clusterName $ }}" + {{- end }} + {{ $.Values.monitoring.appInstanceLabelName }}: "{{ tpl $.Values.monitoring.appInstanceLabelValue $ }}" + {{- with .Values.monitoring.rules.additionalRuleLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + - expr: sum(rate(loki_request_duration_seconds_count[1m])) by ({{ range $.Values.monitoring.rules.additionalAggregationLabels }}{{ . }},{{ end }}{{ if and $.Values.monitoring.multiCluster.enabled $.Values.monitoring.multiCluster.clusterName }}cluster, {{ end }}{{ $.Values.monitoring.appInstanceLabelName }}, namespace, job, route) + record: cluster_namespace_job_route:loki_request_duration_seconds_count:sum_rate + labels: + {{- if and .Values.monitoring.multiCluster.enabled .Values.monitoring.multiCluster.clusterName }} + cluster: "{{ tpl .Values.monitoring.multiCluster.clusterName $ }}" + {{- end }} + {{ $.Values.monitoring.appInstanceLabelName }}: "{{ tpl $.Values.monitoring.appInstanceLabelValue $ }}" + {{- with .Values.monitoring.rules.additionalRuleLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} +{{- end }} \ No newline at end of file diff --git a/packs/loki-3.7.4/charts/loki/templates/monitoring/servicemonitor.yaml b/packs/loki-3.7.4/charts/loki/templates/monitoring/servicemonitor.yaml new file mode 100644 index 00000000..f27a5f0d --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/monitoring/servicemonitor.yaml @@ -0,0 +1,70 @@ +{{- with .Values.monitoring.serviceMonitor }} +{{- if .enabled }} +--- +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: {{ include "loki.fullname" $ }} + namespace: {{ include "loki.namespace" $ }} + {{- with .annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} + labels: + {{- include "loki.labels" $ | nindent 4 }} + {{- with .labels }} + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- with .namespaceSelector }} + namespaceSelector: + {{- toYaml . | nindent 4 }} + {{- end }} + selector: + matchLabels: + {{- include "loki.selectorLabels" $ | nindent 6 }} + matchExpressions: + - key: prometheus.io/service-monitor + operator: NotIn + values: + - "false" + endpoints: + - port: http-metrics + path: /metrics + {{- with .interval }} + interval: {{ . }} + {{- end }} + {{- with .scrapeTimeout }} + scrapeTimeout: {{ . }} + {{- end }} + relabelings: + {{- with .jobPrefix }} + - sourceLabels: [job] + action: "replace" + replacement: {{ print (tpl . $) "$1" | quote }} + targetLabel: "job" + {{- end }} + - action: "replace" + replacement: {{ tpl $.Values.monitoring.appInstanceLabelValue $ | quote }} + targetLabel: {{ $.Values.monitoring.appInstanceLabelName | quote }} + {{- if and $.Values.monitoring.multiCluster.enabled $.Values.monitoring.multiCluster.clusterName }} + - action: "replace" + replacement: "{{ tpl $.Values.monitoring.multiCluster.clusterName $ }}" + targetLabel: cluster + {{- end }} + {{- with .relabelings }} + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .metricRelabelings }} + metricRelabelings: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .scheme }} + scheme: {{ . }} + {{- end }} + {{- with .tlsConfig }} + tlsConfig: + {{- toYaml . | nindent 8 }} + {{- end }} +{{- end }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/monolithic/hpa.yaml b/packs/loki-3.7.4/charts/loki/templates/monolithic/hpa.yaml new file mode 100644 index 00000000..787b2720 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/monolithic/hpa.yaml @@ -0,0 +1,5 @@ +{{- $isMonolithic := eq (include "loki.deployment.isMonolithic" .) "true" -}} +{{- $usingObjectStorage := eq (include "loki.isUsingObjectStorage" .) "true" }} +{{- if and $isMonolithic $usingObjectStorage }} +{{- include "loki.hpa" (dict "target" "single-binary" "component" .Values.singleBinary "ctx" .) }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/monolithic/pdb.yaml b/packs/loki-3.7.4/charts/loki/templates/monolithic/pdb.yaml new file mode 100644 index 00000000..21f9ddef --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/monolithic/pdb.yaml @@ -0,0 +1,26 @@ +{{- $isMonolithic := eq (include "loki.deployment.isMonolithic" .) "true" -}} +{{- if $isMonolithic -}} +{{- /* +In older Loki helm chart version, the monolithic PDB was configured through +.Values.podDisruptionBudget (now deprecated). To avoid breaking change, deep-merge both dicts with +.Values.singleBinary.podDisruptionBudget taking precedence over .Values.podDisruptionBudget. + +The helper expects the PDB config to be located at .podDisruptionBudget so that's where we merge to. + +The base of enabled: true ensures old-format values (which lacked the enabled key) still render a PDB. +*/ -}} +{{- include "loki.pdb" (dict + "target" "single-binary" + "component" (mergeOverwrite + (dict) + .Values.singleBinary + (dict "podDisruptionBudget" (mergeOverwrite + (dict "enabled" true) + .Values.podDisruptionBudget + .Values.singleBinary.podDisruptionBudget + )) + ) + "ctx" . + "name" (include "loki.fullname" .) +) }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/monolithic/service.yaml b/packs/loki-3.7.4/charts/loki/templates/monolithic/service.yaml new file mode 100644 index 00000000..f7676b6b --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/monolithic/service.yaml @@ -0,0 +1,4 @@ +{{- $isMonolithic := eq (include "loki.deployment.isMonolithic" .) "true" -}} +{{- if $isMonolithic }} +{{- include "loki.service" (dict "target" "single-binary" "component" .Values.singleBinary "ctx" . "name" (include "loki.fullname" .) "headlessName" (include "loki.resourceName" (dict "ctx" . "suffix" "headless"))) }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/monolithic/so.yaml b/packs/loki-3.7.4/charts/loki/templates/monolithic/so.yaml new file mode 100644 index 00000000..6159daa2 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/monolithic/so.yaml @@ -0,0 +1,5 @@ +{{- $isMonolithic := eq (include "loki.deployment.isMonolithic" .) "true" -}} +{{- $usingObjectStorage := eq (include "loki.isUsingObjectStorage" .) "true" }} +{{- if and $isMonolithic $usingObjectStorage }} +{{- include "loki.keda" (dict "target" "single-binary" "component" .Values.singleBinary "ctx" .) }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/monolithic/workload.yaml b/packs/loki-3.7.4/charts/loki/templates/monolithic/workload.yaml new file mode 100644 index 00000000..c4e2263e --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/monolithic/workload.yaml @@ -0,0 +1,8 @@ +{{- $isMonolithic := eq (include "loki.deployment.isMonolithic" .) "true" -}} +{{- if $isMonolithic }} +{{ $component := .Values.singleBinary }} +{{- if .Values.singleBinary.persistence.enabled }} +{{ $component = set .Values.singleBinary "podAnnotations" (mergeOverwrite (dict "storage/size" .Values.singleBinary.persistence.size) .Values.singleBinary.podAnnotations) }} +{{- end }} +{{- include "loki.component" (dict "ctx" . "component" $component "target" "single-binary" "name" (include "loki.resourceName" (dict "ctx" .)) "headlessName" (include "loki.resourceName" (dict "ctx" . "suffix" "headless"))) }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/networkpolicy.yaml b/packs/loki-3.7.4/charts/loki/templates/networkpolicy.yaml new file mode 100644 index 00000000..59d48888 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/networkpolicy.yaml @@ -0,0 +1,210 @@ +{{- if .Values.networkPolicy.enabled }} +--- +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + name: {{ include "loki.resourceName" (dict "ctx" . "suffix" "namespace-only") }} + namespace: {{ include "loki.namespace" . }} + labels: + {{- include "loki.labels" . | nindent 4 }} +spec: + policyTypes: + - Ingress + - Egress + podSelector: + matchLabels: + {{- include "loki.selectorLabels" . | nindent 6 }} + egress: + - to: + - podSelector: {} + ingress: + - from: + - podSelector: {} +--- +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + name: {{ include "loki.resourceName" (dict "ctx" . "suffix" "egress-dns") }} + namespace: {{ include "loki.namespace" . }} + labels: + {{- include "loki.labels" . | nindent 4 }} +spec: + policyTypes: + - Egress + podSelector: + matchLabels: + {{- include "loki.selectorLabels" . | nindent 6 }} + egress: + - ports: + - port: 53 + protocol: UDP + - port: 53 + protocol: TCP + to: + - namespaceSelector: {} +--- +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + name: {{ include "loki.resourceName" (dict "ctx" . "suffix" "ingress") }} + namespace: {{ include "loki.namespace" . }} + labels: + {{- include "loki.labels" . | nindent 4 }} +spec: + policyTypes: + - Ingress + podSelector: + matchExpressions: + - key: app.kubernetes.io/component + operator: In + values: + {{- if .Values.gateway.enabled }} + - gateway + {{- else }} + - read + - write + - single-binary + {{- end }} + matchLabels: + {{- include "loki.selectorLabels" . | nindent 6 }} + ingress: + - ports: + {{- if .Values.gateway.enabled }} + - port: http + {{- else }} + - port: http-metrics + {{- end }} + protocol: TCP + {{- if .Values.networkPolicy.ingress.namespaceSelector }} + from: + - namespaceSelector: + {{- toYaml .Values.networkPolicy.ingress.namespaceSelector | nindent 12 }} + {{- if .Values.networkPolicy.ingress.podSelector }} + podSelector: + {{- toYaml .Values.networkPolicy.ingress.podSelector | nindent 12 }} + {{- end }} + {{- end }} +--- +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + name: {{ include "loki.resourceName" (dict "ctx" . "suffix" "ingress-metrics") }} + namespace: {{ include "loki.namespace" . }} + labels: + {{- include "loki.labels" . | nindent 4 }} +spec: + policyTypes: + - Ingress + podSelector: + matchLabels: + {{- include "loki.selectorLabels" . | nindent 6 }} + ingress: + - ports: + - port: http-metrics + protocol: TCP + {{- if or .Values.networkPolicy.metrics.cidrs .Values.networkPolicy.metrics.namespaceSelector }} + from: + {{- range $cidr := .Values.networkPolicy.metrics.cidrs }} + - ipBlock: + cidr: {{ $cidr }} + {{- end }} + {{- if .Values.networkPolicy.metrics.namespaceSelector }} + - namespaceSelector: + {{- toYaml .Values.networkPolicy.metrics.namespaceSelector | nindent 12 }} + {{- if .Values.networkPolicy.metrics.podSelector }} + podSelector: + {{- toYaml .Values.networkPolicy.metrics.podSelector | nindent 12 }} + {{- end }} + {{- end }} + {{- end }} + +--- +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + name: {{ include "loki.resourceName" (dict "ctx" . "suffix" "egress-alertmanager") }} + namespace: {{ include "loki.namespace" $ }} + labels: + {{- include "loki.labels" . | nindent 4 }} +spec: + policyTypes: + - Egress + podSelector: + matchLabels: + {{- include "loki.selectorLabels" . | nindent 6 }} + app.kubernetes.io/component: backend + egress: + - ports: + - port: {{ .Values.networkPolicy.alertmanager.port }} + protocol: TCP + {{- if .Values.networkPolicy.alertmanager.namespaceSelector }} + to: + - namespaceSelector: + {{- toYaml .Values.networkPolicy.alertmanager.namespaceSelector | nindent 12 }} + {{- if .Values.networkPolicy.alertmanager.podSelector }} + podSelector: + {{- toYaml .Values.networkPolicy.alertmanager.podSelector | nindent 12 }} + {{- end }} + {{- end }} + +{{- if .Values.networkPolicy.externalStorage.ports }} +--- +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + name: {{ include "loki.resourceName" (dict "ctx" . "suffix" "egress-external-storage") }} + namespace: {{ include "loki.namespace" $ }} + labels: + {{- include "loki.labels" . | nindent 4 }} +spec: + policyTypes: + - Egress + podSelector: + matchLabels: + {{- include "loki.selectorLabels" . | nindent 6 }} + egress: + - ports: + {{- range $port := .Values.networkPolicy.externalStorage.ports }} + - port: {{ $port }} + protocol: TCP + {{- end }} + {{- if .Values.networkPolicy.externalStorage.cidrs }} + to: + {{- range $cidr := .Values.networkPolicy.externalStorage.cidrs }} + - ipBlock: + cidr: {{ $cidr }} + {{- end }} + {{- end }} +{{- end }} + +{{- end }} + +{{- if .Values.networkPolicy.discovery.port }} +--- +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + name: {{ include "loki.resourceName" (dict "ctx" . "suffix" "egress-discovery") }} + namespace: {{ include "loki.namespace" $ }} + labels: + {{- include "loki.labels" . | nindent 4 }} +spec: + policyTypes: + - Egress + podSelector: + matchLabels: + {{- include "loki.selectorLabels" . | nindent 6 }} + egress: + - ports: + - port: {{ .Values.networkPolicy.discovery.port }} + protocol: TCP + {{- if .Values.networkPolicy.discovery.namespaceSelector }} + to: + - namespaceSelector: + {{- toYaml .Values.networkPolicy.discovery.namespaceSelector | nindent 12 }} + {{- if .Values.networkPolicy.discovery.podSelector }} + podSelector: + {{- toYaml .Values.networkPolicy.discovery.podSelector | nindent 12 }} + {{- end }} + {{- end }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/overrides-exporter/pdb.yaml b/packs/loki-3.7.4/charts/loki/templates/overrides-exporter/pdb.yaml new file mode 100644 index 00000000..2154a800 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/overrides-exporter/pdb.yaml @@ -0,0 +1,4 @@ +{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} +{{- if and $isDistributed .Values.overridesExporter.enabled }} +{{- include "loki.pdb" (dict "target" "overrides-exporter" "component" .Values.overridesExporter "ctx" .) }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/overrides-exporter/service.yaml b/packs/loki-3.7.4/charts/loki/templates/overrides-exporter/service.yaml new file mode 100644 index 00000000..91c6e225 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/overrides-exporter/service.yaml @@ -0,0 +1,4 @@ +{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} +{{- if and $isDistributed .Values.overridesExporter.enabled }} +{{- include "loki.service" (dict "target" "overrides-exporter" "component" .Values.overridesExporter "ctx" .) }} +{{- end -}} diff --git a/packs/loki-3.7.4/charts/loki/templates/overrides-exporter/serviceaccount.yaml b/packs/loki-3.7.4/charts/loki/templates/overrides-exporter/serviceaccount.yaml new file mode 100644 index 00000000..e7359ed0 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/overrides-exporter/serviceaccount.yaml @@ -0,0 +1,4 @@ +{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} +{{- if and $isDistributed .Values.overridesExporter.enabled }} +{{- include "loki.serviceAccount" (dict "target" "overrides-exporter" "component" .Values.overridesExporter "ctx" .) }} +{{- end -}} diff --git a/packs/loki-3.7.4/charts/loki/templates/overrides-exporter/workload.yaml b/packs/loki-3.7.4/charts/loki/templates/overrides-exporter/workload.yaml new file mode 100644 index 00000000..ffa79d44 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/overrides-exporter/workload.yaml @@ -0,0 +1,4 @@ +{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} +{{- if $isDistributed }} +{{- include "loki.component" (dict "ctx" . "component" .Values.overridesExporter "target" "overrides-exporter") }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/pattern-ingester/pdb.yaml b/packs/loki-3.7.4/charts/loki/templates/pattern-ingester/pdb.yaml new file mode 100644 index 00000000..446f291e --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/pattern-ingester/pdb.yaml @@ -0,0 +1,4 @@ +{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} +{{- if $isDistributed }} +{{- include "loki.pdb" (dict "target" "pattern-ingester" "component" .Values.patternIngester "ctx" .) }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/pattern-ingester/serviceaccount.yaml b/packs/loki-3.7.4/charts/loki/templates/pattern-ingester/serviceaccount.yaml new file mode 100644 index 00000000..a36bb3c9 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/pattern-ingester/serviceaccount.yaml @@ -0,0 +1,4 @@ +{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} +{{- if $isDistributed }} +{{- include "loki.serviceAccount" (dict "target" "pattern-ingester" "component" .Values.patternIngester "ctx" .) }} +{{- end -}} diff --git a/packs/loki-3.7.4/charts/loki/templates/pattern-ingester/workload.yaml b/packs/loki-3.7.4/charts/loki/templates/pattern-ingester/workload.yaml new file mode 100644 index 00000000..8d4e0b69 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/pattern-ingester/workload.yaml @@ -0,0 +1,4 @@ +{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} +{{- if $isDistributed }} +{{- include "loki.component" (dict "ctx" . "component" .Values.patternIngester "target" "pattern-ingester") }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/querier/hpa.yaml b/packs/loki-3.7.4/charts/loki/templates/querier/hpa.yaml new file mode 100644 index 00000000..16b5d942 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/querier/hpa.yaml @@ -0,0 +1,4 @@ +{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} +{{- if $isDistributed }} +{{- include "loki.hpa" (dict "target" "querier" "component" .Values.querier "ctx" . "kind" "Deployment") }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/querier/pdb.yaml b/packs/loki-3.7.4/charts/loki/templates/querier/pdb.yaml new file mode 100644 index 00000000..bc23110d --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/querier/pdb.yaml @@ -0,0 +1,4 @@ +{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} +{{- if $isDistributed }} +{{- include "loki.pdb" (dict "target" "querier" "component" .Values.querier "ctx" .) }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/querier/service.yaml b/packs/loki-3.7.4/charts/loki/templates/querier/service.yaml new file mode 100644 index 00000000..9b9a0ecb --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/querier/service.yaml @@ -0,0 +1,4 @@ +{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} +{{- if $isDistributed -}} +{{- include "loki.service" (dict "target" "querier" "component" .Values.querier "ctx" .) }} +{{- end -}} diff --git a/packs/loki-3.7.4/charts/loki/templates/querier/serviceaccount.yaml b/packs/loki-3.7.4/charts/loki/templates/querier/serviceaccount.yaml new file mode 100644 index 00000000..3ae707a4 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/querier/serviceaccount.yaml @@ -0,0 +1,4 @@ +{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} +{{- if $isDistributed -}} +{{- include "loki.serviceAccount" (dict "target" "querier" "component" .Values.querier "ctx" .) }} +{{- end -}} diff --git a/packs/loki-3.7.4/charts/loki/templates/querier/so.yaml b/packs/loki-3.7.4/charts/loki/templates/querier/so.yaml new file mode 100644 index 00000000..ac907bd6 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/querier/so.yaml @@ -0,0 +1,4 @@ +{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} +{{- if $isDistributed }} +{{- include "loki.keda" (dict "target" "querier" "component" .Values.querier "ctx" . "kind" "Deployment") }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/querier/workload.yaml b/packs/loki-3.7.4/charts/loki/templates/querier/workload.yaml new file mode 100644 index 00000000..d52dbb0a --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/querier/workload.yaml @@ -0,0 +1,13 @@ +{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} +{{- if $isDistributed }} +{{ $args := list }} +{{- if .Values.ingester.zoneAwareReplication.enabled }} + {{- if and (.Values.ingester.zoneAwareReplication.migration.enabled) (not .Values.ingester.zoneAwareReplication.migration.readPath) }} +{{ $args = list "-distributor.zone-awareness-enabled=false" }} + {{- else }} +{{ $args = list "-distributor.zone-awareness-enabled=true" }} + {{- end }} +{{- end }} +--- +{{- include "loki.component" (dict "ctx" . "component" .Values.querier "target" "querier" "args" $args) }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/query-frontend/hpa.yaml b/packs/loki-3.7.4/charts/loki/templates/query-frontend/hpa.yaml new file mode 100644 index 00000000..ba12c619 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/query-frontend/hpa.yaml @@ -0,0 +1,4 @@ +{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} +{{- if $isDistributed }} +{{- include "loki.hpa" (dict "target" "query-frontend" "component" .Values.queryFrontend "ctx" . "kind" "Deployment") }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/query-frontend/pdb.yaml b/packs/loki-3.7.4/charts/loki/templates/query-frontend/pdb.yaml new file mode 100644 index 00000000..23c118f1 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/query-frontend/pdb.yaml @@ -0,0 +1,4 @@ +{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} +{{- if $isDistributed }} +{{- include "loki.pdb" (dict "target" "query-frontend" "component" .Values.queryFrontend "ctx" .) }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/query-frontend/service.yaml b/packs/loki-3.7.4/charts/loki/templates/query-frontend/service.yaml new file mode 100644 index 00000000..215337ec --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/query-frontend/service.yaml @@ -0,0 +1,4 @@ +{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} +{{- if $isDistributed -}} +{{- include "loki.service" (dict "target" "query-frontend" "component" .Values.queryFrontend "ctx" .) }} +{{- end -}} diff --git a/packs/loki-3.7.4/charts/loki/templates/query-frontend/serviceaccount.yaml b/packs/loki-3.7.4/charts/loki/templates/query-frontend/serviceaccount.yaml new file mode 100644 index 00000000..bff4e7e2 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/query-frontend/serviceaccount.yaml @@ -0,0 +1,4 @@ +{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} +{{- if $isDistributed -}} +{{- include "loki.serviceAccount" (dict "target" "query-frontend" "component" .Values.queryFrontend "ctx" .) }} +{{- end -}} diff --git a/packs/loki-3.7.4/charts/loki/templates/query-frontend/so.yaml b/packs/loki-3.7.4/charts/loki/templates/query-frontend/so.yaml new file mode 100644 index 00000000..e09c3821 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/query-frontend/so.yaml @@ -0,0 +1,4 @@ +{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} +{{- if $isDistributed }} +{{- include "loki.keda" (dict "target" "query-frontend" "component" .Values.queryFrontend "ctx" . "kind" "Deployment") }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/query-frontend/workload.yaml b/packs/loki-3.7.4/charts/loki/templates/query-frontend/workload.yaml new file mode 100644 index 00000000..52a0748a --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/query-frontend/workload.yaml @@ -0,0 +1,4 @@ +{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} +{{- if $isDistributed -}} +{{- include "loki.component" (dict "ctx" . "component" .Values.queryFrontend "target" "query-frontend") }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/query-scheduler/pdb.yaml b/packs/loki-3.7.4/charts/loki/templates/query-scheduler/pdb.yaml new file mode 100644 index 00000000..6a7a85ee --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/query-scheduler/pdb.yaml @@ -0,0 +1,4 @@ +{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} +{{- if $isDistributed }} +{{- include "loki.pdb" (dict "target" "query-scheduler" "component" .Values.queryScheduler "ctx" .) }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/query-scheduler/service.yaml b/packs/loki-3.7.4/charts/loki/templates/query-scheduler/service.yaml new file mode 100644 index 00000000..a659f4a2 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/query-scheduler/service.yaml @@ -0,0 +1,4 @@ +{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} +{{- if $isDistributed }} +{{- include "loki.service" (dict "target" "query-scheduler" "component" .Values.queryScheduler "ctx" .) }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/query-scheduler/serviceaccount.yaml b/packs/loki-3.7.4/charts/loki/templates/query-scheduler/serviceaccount.yaml new file mode 100644 index 00000000..02657e9d --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/query-scheduler/serviceaccount.yaml @@ -0,0 +1,4 @@ +{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} +{{- if $isDistributed -}} +{{- include "loki.serviceAccount" (dict "target" "query-scheduler" "component" .Values.queryScheduler "ctx" .) }} +{{- end -}} diff --git a/packs/loki-3.7.4/charts/loki/templates/query-scheduler/workload.yaml b/packs/loki-3.7.4/charts/loki/templates/query-scheduler/workload.yaml new file mode 100644 index 00000000..83b0effc --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/query-scheduler/workload.yaml @@ -0,0 +1,4 @@ +{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} +{{- if $isDistributed }} +{{- include "loki.component" (dict "ctx" . "component" .Values.queryScheduler "target" "query-scheduler") }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/read/hpa.yaml b/packs/loki-3.7.4/charts/loki/templates/read/hpa.yaml new file mode 100644 index 00000000..46b93db9 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/read/hpa.yaml @@ -0,0 +1,4 @@ +{{- $isSimpleScalable := eq (include "loki.deployment.isScalable" .) "true" -}} +{{- if $isSimpleScalable }} +{{- include "loki.hpa" (dict "target" "read" "component" .Values.read "ctx" . "kind" "Deployment") }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/read/pdb.yaml b/packs/loki-3.7.4/charts/loki/templates/read/pdb.yaml new file mode 100644 index 00000000..f94ce63e --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/read/pdb.yaml @@ -0,0 +1,4 @@ +{{- $isSimpleScalable := eq (include "loki.deployment.isScalable" .) "true" -}} +{{- if $isSimpleScalable }} +{{- include "loki.pdb" (dict "target" "read" "component" .Values.read "ctx" .) }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/read/service.yaml b/packs/loki-3.7.4/charts/loki/templates/read/service.yaml new file mode 100644 index 00000000..fd76cf99 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/read/service.yaml @@ -0,0 +1,4 @@ +{{- $isSimpleScalable := eq (include "loki.deployment.isScalable" .) "true" -}} +{{- if $isSimpleScalable }} +{{- include "loki.service" (dict "target" "read" "component" .Values.read "ctx" .) }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/read/serviceaccount.yaml b/packs/loki-3.7.4/charts/loki/templates/read/serviceaccount.yaml new file mode 100644 index 00000000..522e8799 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/read/serviceaccount.yaml @@ -0,0 +1,4 @@ +{{- $isSimpleScalable := eq (include "loki.deployment.isScalable" .) "true" -}} +{{- if $isSimpleScalable }} +{{- include "loki.serviceAccount" (dict "target" "read" "component" .Values.read "ctx" .) }} +{{- end -}} diff --git a/packs/loki-3.7.4/charts/loki/templates/read/so.yaml b/packs/loki-3.7.4/charts/loki/templates/read/so.yaml new file mode 100644 index 00000000..4426f6c7 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/read/so.yaml @@ -0,0 +1,4 @@ +{{- $isSimpleScalable := eq (include "loki.deployment.isScalable" .) "true" -}} +{{- if $isSimpleScalable }} +{{- include "loki.keda" (dict "target" "read" "component" .Values.read "ctx" . "kind" "Deployment") }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/read/workload.yaml b/packs/loki-3.7.4/charts/loki/templates/read/workload.yaml new file mode 100644 index 00000000..ce20573d --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/read/workload.yaml @@ -0,0 +1,4 @@ +{{- $isSimpleScalable := eq (include "loki.deployment.isScalable" .) "true" -}} +{{- if $isSimpleScalable }} +{{- include "loki.component" (dict "ctx" . "component" .Values.read "target" "read") }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/results-cache/pdb.yaml b/packs/loki-3.7.4/charts/loki/templates/results-cache/pdb.yaml new file mode 100644 index 00000000..8d94f21a --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/results-cache/pdb.yaml @@ -0,0 +1,3 @@ +{{- if .Values.memcached.enabled }} +{{- include "loki.memcached.pdb" (dict "ctx" $ "memcacheConfig" .Values.resultsCache "valuesSection" "resultsCache" "component" "results-cache") }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/results-cache/service.yaml b/packs/loki-3.7.4/charts/loki/templates/results-cache/service.yaml new file mode 100644 index 00000000..68b94a1e --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/results-cache/service.yaml @@ -0,0 +1 @@ +{{- include "loki.memcached.service" (dict "ctx" $ "memcacheConfig" .Values.resultsCache "valuesSection" "resultsCache" "component" "results-cache" ) }} diff --git a/packs/loki-3.7.4/charts/loki/templates/results-cache/statefulset.yaml b/packs/loki-3.7.4/charts/loki/templates/results-cache/statefulset.yaml new file mode 100644 index 00000000..6880c03e --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/results-cache/statefulset.yaml @@ -0,0 +1 @@ +{{- include "loki.memcached.statefulSet" (dict "ctx" $ "memcacheConfig" .Values.resultsCache "valuesSection" "resultsCache" "component" "results-cache" ) }} diff --git a/packs/loki-3.7.4/charts/loki/templates/role.yaml b/packs/loki-3.7.4/charts/loki/templates/role.yaml new file mode 100644 index 00000000..5972202d --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/role.yaml @@ -0,0 +1,25 @@ +{{- if or .Values.rbac.sccEnabled (and .Values.rbac.namespaced .Values.sidecar.rules.enabled) }} +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: {{ include "loki.name" . }} + namespace: {{ include "loki.namespace" . }} + labels: + {{- include "loki.labels" . | nindent 4 }} +rules: + {{- if .Values.rbac.sccEnabled }} + - apiGroups: + - security.openshift.io + resources: + - securitycontextconstraints + verbs: + - use + resourceNames: + - {{ include "loki.name" . }} + {{- end }} + {{- if and .Values.rbac.namespaced .Values.sidecar.rules.enabled }} + - apiGroups: [""] # "" indicates the core API group + resources: ["configmaps", "secrets"] + verbs: ["get", "watch", "list"] + {{- end }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/rolebinding.yaml b/packs/loki-3.7.4/charts/loki/templates/rolebinding.yaml new file mode 100644 index 00000000..631a2623 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/rolebinding.yaml @@ -0,0 +1,17 @@ +{{- if or .Values.rbac.sccEnabled (and .Values.rbac.namespaced .Values.sidecar.rules.enabled) }} +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: {{ include "loki.name" . }} + namespace: {{ include "loki.namespace" . }} + labels: + {{- include "loki.labels" . | nindent 4 }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: {{ include "loki.name" . }} +subjects: + - kind: ServiceAccount + name: {{ include "loki.serviceAccountName" (dict "ctx" . "component" .Values "target" "") }} + namespace: {{ include "loki.namespace" $ }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/route.yaml b/packs/loki-3.7.4/charts/loki/templates/route.yaml new file mode 100644 index 00000000..16a2a8f2 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/route.yaml @@ -0,0 +1,9 @@ +{{- range $name, $route := .Values.route -}} +{{- if $route.enabled -}} +{{- $routeName := ternary (include "loki.fullname" $) (printf "%s-%s" (include "loki.fullname" $) $name) (eq $name "main") -}} +{{- $kind := $route.kind | default "HTTPRoute" -}} +{{- $port := $route.backendPort | default (ternary $.Values.loki.server.grpc_listen_port $.Values.loki.server.http_listen_port (eq $kind "GRPCRoute")) -}} +{{- $rules := include "loki.route.rules" (dict "ctx" $ "paths" $route.paths "port" $port) -}} +{{- include "loki.route" (dict "ctx" $ "route" $route "name" $routeName "rules" $rules) }} +{{- end -}} +{{- end -}} diff --git a/packs/loki-3.7.4/charts/loki/templates/ruler/configmap.yaml b/packs/loki-3.7.4/charts/loki/templates/ruler/configmap.yaml new file mode 100644 index 00000000..36f8aae1 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/ruler/configmap.yaml @@ -0,0 +1,16 @@ +{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} +{{- if $isDistributed }} +{{- range $dir, $files := .Values.ruler.directories }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "loki.resourceName" (dict "ctx" $ "component" "ruler" "suffix" (include "loki.rulerRulesDirName" $dir)) }} + namespace: {{ include "loki.namespace" $ }} + labels: + {{- include "loki.labels" $ | nindent 4 }} + app.kubernetes.io/component: ruler +data: + {{- toYaml $files | nindent 2 }} +{{- end }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/ruler/pdb.yaml b/packs/loki-3.7.4/charts/loki/templates/ruler/pdb.yaml new file mode 100644 index 00000000..e61b9bdb --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/ruler/pdb.yaml @@ -0,0 +1,4 @@ +{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} +{{- if $isDistributed }} +{{- include "loki.pdb" (dict "target" "ruler" "component" .Values.ruler "ctx" .) }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/ruler/service.yaml b/packs/loki-3.7.4/charts/loki/templates/ruler/service.yaml new file mode 100644 index 00000000..cda7a407 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/ruler/service.yaml @@ -0,0 +1,4 @@ +{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} +{{- if and $isDistributed .Values.ruler.enabled }} +{{- include "loki.service" (dict "target" "ruler" "component" .Values.ruler "ctx" .) }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/ruler/serviceaccount.yaml b/packs/loki-3.7.4/charts/loki/templates/ruler/serviceaccount.yaml new file mode 100644 index 00000000..ed203f60 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/ruler/serviceaccount.yaml @@ -0,0 +1,4 @@ +{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} +{{- if and $isDistributed .Values.ruler.enabled }} +{{- include "loki.serviceAccount" (dict "target" "ruler" "component" .Values.ruler "ctx" .) }} +{{- end -}} diff --git a/packs/loki-3.7.4/charts/loki/templates/ruler/workload.yaml b/packs/loki-3.7.4/charts/loki/templates/ruler/workload.yaml new file mode 100644 index 00000000..8b283af2 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/ruler/workload.yaml @@ -0,0 +1,4 @@ +{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} +{{- if $isDistributed }} +{{- include "loki.component" (dict "ctx" . "component" .Values.ruler "target" "ruler") }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/runtime-configmap.yaml b/packs/loki-3.7.4/charts/loki/templates/runtime-configmap.yaml new file mode 100644 index 00000000..7a2d8acd --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/runtime-configmap.yaml @@ -0,0 +1,10 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "loki.name" . }}-runtime + namespace: {{ include "loki.namespace" . }} + labels: + {{- include "loki.labels" . | nindent 4 }} +data: + runtime-config.yaml: | + {{- tpl (toYaml .Values.loki.runtimeConfig) . | nindent 4 }} diff --git a/packs/loki-3.7.4/charts/loki/templates/securitycontextconstraints.yaml b/packs/loki-3.7.4/charts/loki/templates/securitycontextconstraints.yaml new file mode 100644 index 00000000..12876ffc --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/securitycontextconstraints.yaml @@ -0,0 +1,42 @@ +{{- if .Values.rbac.sccEnabled }} +apiVersion: security.openshift.io/v1 +kind: SecurityContextConstraints +metadata: + name: {{ include "loki.name" . }} + labels: + {{- include "loki.labels" . | nindent 4 }} +allowHostDirVolumePlugin: {{ .Values.rbac.sccAllowHostDirVolumePlugin }} +allowHostIPC: false +allowHostNetwork: false +allowHostPID: false +allowHostPorts: false +allowPrivilegeEscalation: true +allowPrivilegedContainer: false +allowedCapabilities: [] +defaultAddCapabilities: null +fsGroup: + type: RunAsAny +groups: [] +priority: null +readOnlyRootFilesystem: false +requiredDropCapabilities: + - ALL +runAsUser: + type: RunAsAny +seLinuxContext: + type: MustRunAs +seccompProfiles: + - '*' +supplementalGroups: + type: RunAsAny +volumes: + - configMap + - downwardAPI + - emptyDir + {{- if .Values.rbac.sccAllowHostDirVolumePlugin }} + - hostPath + {{- end }} + - persistentVolumeClaim + - projected + - secret +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/service-memberlist.yaml b/packs/loki-3.7.4/charts/loki/templates/service-memberlist.yaml new file mode 100644 index 00000000..b677f001 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/service-memberlist.yaml @@ -0,0 +1,29 @@ +--- +apiVersion: v1 +kind: Service +metadata: + name: {{ include "loki.memberlist" . }} + namespace: {{ include "loki.namespace" . }} + labels: + {{- include "loki.labels" . | nindent 4 }} + annotations: + {{- with .Values.loki.serviceAnnotations }} + {{- toYaml . | nindent 4}} + {{- end }} + {{- with .Values.memberlist.service.annotations }} + {{- toYaml . | nindent 4}} + {{- end }} +spec: + type: ClusterIP + clusterIP: None + ports: + - name: tcp + port: 7946 + targetPort: http-memberlist + protocol: TCP + {{- with .Values.memberlist.service.publishNotReadyAddresses }} + publishNotReadyAddresses: {{ . }} + {{- end }} + selector: + {{- include "loki.selectorLabels" . | nindent 4 }} + app.kubernetes.io/part-of: memberlist diff --git a/packs/loki-3.7.4/charts/loki/templates/serviceaccount.yaml b/packs/loki-3.7.4/charts/loki/templates/serviceaccount.yaml new file mode 100644 index 00000000..cedbe8b4 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/serviceaccount.yaml @@ -0,0 +1 @@ +{{- include "loki.serviceAccount" (dict "target" "" "component" .Values "ctx" .) }} diff --git a/packs/loki-3.7.4/charts/loki/templates/table-manager/_helpers.tpl b/packs/loki-3.7.4/charts/loki/templates/table-manager/_helpers.tpl new file mode 100644 index 00000000..ff258321 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/table-manager/_helpers.tpl @@ -0,0 +1,32 @@ +{{/* +table-manager fullname +*/}} +{{- define "loki.tableManagerFullname" -}} +{{ include "loki.fullname" . }}-table-manager +{{- end }} + +{{/* +table-manager common labels +*/}} +{{- define "loki.tableManagerLabels" -}} +{{ include "loki.labels" . }} +app.kubernetes.io/component: table-manager +{{- end }} + +{{/* +table-manager selector labels +*/}} +{{- define "loki.tableManagerSelectorLabels" -}} +{{ include "loki.selectorLabels" . }} +app.kubernetes.io/component: table-manager +{{- end }} + +{{/* +table-manager priority class name +*/}} +{{- define "loki.tableManagerPriorityClassName" -}} +{{- $pcn := coalesce .Values.global.priorityClassName .Values.tableManager.priorityClassName -}} +{{- if $pcn }} +priorityClassName: {{ $pcn }} +{{- end }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/table-manager/deployment.yaml b/packs/loki-3.7.4/charts/loki/templates/table-manager/deployment.yaml new file mode 100644 index 00000000..56502690 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/table-manager/deployment.yaml @@ -0,0 +1,24 @@ +{{- if .Values.tableManager.enabled }} +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "loki.tableManagerFullname" . }} + namespace: {{ include "loki.namespace" . }} + labels: + {{- include "loki.tableManagerLabels" . | nindent 4 }} + annotations: + {{- with .Values.loki.annotations }} + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.tableManager.annotations }} + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + replicas: 1 + revisionHistoryLimit: {{ .Values.loki.revisionHistoryLimit }} + selector: + matchLabels: + {{- include "loki.tableManagerSelectorLabels" . | nindent 6 }} + template: + {{- include "loki.podTemplate" (dict "target" "table-manager" "component" .Values.tableManager "ctx" .) | nindent 4 }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/table-manager/service.yaml b/packs/loki-3.7.4/charts/loki/templates/table-manager/service.yaml new file mode 100644 index 00000000..2d1cec5f --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/table-manager/service.yaml @@ -0,0 +1,3 @@ +{{- if .Values.tableManager.enabled }} +{{- include "loki.service" (dict "target" "table-manager" "component" .Values.tableManager "ctx" .) }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/table-manager/serviceaccount.yaml b/packs/loki-3.7.4/charts/loki/templates/table-manager/serviceaccount.yaml new file mode 100644 index 00000000..6b3417b5 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/table-manager/serviceaccount.yaml @@ -0,0 +1,3 @@ +{{- if .Values.tableManager.enabled }} +{{- include "loki.serviceAccount" (dict "target" "table-manager" "component" .Values.tableManager "ctx" .) }} +{{- end -}} diff --git a/packs/loki-3.7.4/charts/loki/templates/table-manager/servicemonitor.yaml b/packs/loki-3.7.4/charts/loki/templates/table-manager/servicemonitor.yaml new file mode 100644 index 00000000..9eef0035 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/table-manager/servicemonitor.yaml @@ -0,0 +1,59 @@ +{{- if .Values.tableManager.enabled }} +{{- with .Values.serviceMonitor }} +{{- if .enabled }} +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: {{ include "loki.tableManagerFullname" $ }} + {{- if .namespace }} + namespace: {{ .namespace }} + {{- else }} + namespace: {{ include "loki.namespace" $ }} + {{- end }} + {{- with .annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} + labels: + {{- include "loki.tableManagerLabels" $ | nindent 4 }} + {{- with .labels }} + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- with .namespaceSelector }} + namespaceSelector: + {{- toYaml . | nindent 4 }} + {{- end }} + selector: + matchLabels: + {{- include "loki.tableManagerSelectorLabels" $ | nindent 6 }} + endpoints: + - port: http-metrics + {{- with .interval }} + interval: {{ . }} + {{- end }} + {{- with .scrapeTimeout }} + scrapeTimeout: {{ . }} + {{- end }} + {{- with .relabelings }} + relabelings: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .metricRelabelings }} + metricRelabelings: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .scheme }} + scheme: {{ . }} + {{- end }} + {{- with .tlsConfig }} + tlsConfig: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .targetLabels }} + targetLabels: + {{- toYaml . | nindent 4 }} + {{- end }} +{{- end }} +{{- end }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/validate.yaml b/packs/loki-3.7.4/charts/loki/templates/validate.yaml new file mode 100644 index 00000000..3fd57e14 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/validate.yaml @@ -0,0 +1,60 @@ +{{- if .Values.config }} +{{- fail "Top level 'config' is not allowed. Most common configuration sections are exposed under the `loki` section. If you need to override the whole config, provide the configuration as a string that can contain template expressions under `loki.config`. Alternatively, you can provide the configuration as an external secret." }} +{{- end }} + +{{- if and (not .Values.lokiCanary.enabled) .Values.test.enabled }} +{{- fail "Helm test requires the Loki Canary to be enabled"}} +{{- end }} + +{{- if and .Values.minio.enabled (not .Values.ignoreMinioDeprecation) }} +{{- fail "The Loki chart builtin MinIO dependency is deprecated and will be removed 2026-10-31. Configure an external object storage backend instead. To proceed temporarily, set ignoreMinioDeprecation=true."}} +{{- end }} + +{{- $monolithicReplicas := int .Values.singleBinary.replicas }} +{{- $isUsingFilesystem := eq (include "loki.isUsingObjectStorage" .) "false" }} +{{- $atLeastOneScalableReplica := or (gt (int .Values.backend.replicas) 0) (gt (int .Values.read.replicas) 0) (gt (int .Values.write.replicas) 0) }} +{{- $atLeastOneDistributedReplica := or (gt (int .Values.ingester.replicas) 0) (gt (int .Values.distributor.replicas) 0) (gt (int .Values.querier.replicas) 0) (gt (int .Values.queryFrontend.replicas) 0) (gt (int .Values.queryScheduler.replicas) 0) (gt (int .Values.indexGateway.replicas) 0) (gt (int .Values.compactor.replicas) 0) (gt (int .Values.ruler.replicas) 0) }} + +{{- if and $isUsingFilesystem (gt $monolithicReplicas 1) }} +{{- fail "Cannot run more than 1 Monolithic replica without an object storage backend."}} +{{- end }} + +{{- if and $isUsingFilesystem (and (eq $monolithicReplicas 0) (or $atLeastOneScalableReplica $atLeastOneDistributedReplica)) }} +{{- fail "Cannot run scalable targets (backend, read, write) or distributed targets without an object storage backend."}} +{{- end }} + +{{- if and $atLeastOneScalableReplica $atLeastOneDistributedReplica (ne .Values.deploymentMode "SimpleScalable<->Distributed") }} +{{- fail "You have more than zero replicas configured for scalable targets (backend, read, write) and distributed targets. If this was intentional change the deploymentMode to the transitional 'SimpleScalable<->Distributed' mode" }} +{{- end }} + +{{- if and (gt $monolithicReplicas 0) $atLeastOneDistributedReplica }} +{{- fail "You have more than zero replicas configured for both the monolithic and distributed targets, there is no transition mode between these targets please change one or the other to zero or transition to the SimpleScalable mode first."}} +{{- end }} + +{{- if and (gt $monolithicReplicas 0) $atLeastOneScalableReplica (ne .Values.deploymentMode "Monolithic<->SimpleScalable") (ne .Values.deploymentMode "SingleBinary<->SimpleScalable") }} +{{- fail "You have more than zero replicas configured for both the monolithic and simple scalable targets. If this was intentional change the deploymentMode to the transitional 'Monolithic<->SimpleScalable' mode"}} +{{- end }} + +{{- include "loki.validateAutoscaling" (dict "component" .Values.querier "name" "querier") }} +{{- include "loki.validateAutoscaling" (dict "component" .Values.distributor "name" "distributor") }} +{{- include "loki.validateAutoscaling" (dict "component" .Values.ingester "name" "ingester") }} +{{- include "loki.validateAutoscaling" (dict "component" .Values.queryFrontend "name" "query-frontend") }} +{{- include "loki.validateAutoscaling" (dict "component" .Values.bloomBuilder "name" "bloom-builder") }} +{{- include "loki.validateAutoscaling" (dict "component" .Values.bloomGateway "name" "bloom-gateway") }} +{{- include "loki.validateAutoscaling" (dict "component" .Values.bloomPlanner "name" "bloom-planner") }} +{{- include "loki.validateAutoscaling" (dict "component" .Values.patternIngester "name" "pattern-ingester") }} +{{- include "loki.validateAutoscaling" (dict "component" .Values.overridesExporter "name" "overrides-exporter") }} +{{- include "loki.validateAutoscaling" (dict "component" .Values.gateway "name" "gateway") }} +{{- include "loki.validateAutoscaling" (dict "component" .Values.read "name" "read") }} +{{- include "loki.validateAutoscaling" (dict "component" .Values.write "name" "write") }} +{{- include "loki.validateAutoscaling" (dict "component" .Values.backend "name" "backend") }} +{{- include "loki.validateAutoscaling" (dict "component" .Values.singleBinary "name" "single-binary") }} + +{{- if and (or (not (empty .Values.loki.schemaConfig)) (not (empty .Values.loki.structuredConfig.schema_config))) .Values.loki.useTestSchema }} +{{- fail "loki.useTestSchema must be false if loki.schemaConfig or loki.structuredConfig.schema_config are defined."}} +{{- end }} + + +{{- if and (empty .Values.loki.schemaConfig) (empty .Values.loki.structuredConfig.schema_config) (not .Values.loki.useTestSchema) }} +{{- fail "You must provide a schema_config for Loki, one is not provided as this will be individual for every Loki cluster. See https://grafana.com/docs/loki/latest/operations/storage/schema/ for schema information. For quick testing (with no persistence) add `--set loki.useTestSchema=true`"}} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/write/_helpers.tpl b/packs/loki-3.7.4/charts/loki/templates/write/_helpers.tpl new file mode 100644 index 00000000..8f526bcf --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/write/_helpers.tpl @@ -0,0 +1,32 @@ +{{/* +write fullname +*/}} +{{- define "loki.writeFullname" -}} +{{ include "loki.name" . }}-write +{{- end }} + +{{/* +write common labels +*/}} +{{- define "loki.writeLabels" -}} +{{ include "loki.labels" . }} +app.kubernetes.io/component: write +{{- end }} + +{{/* +write selector labels +*/}} +{{- define "loki.writeSelectorLabels" -}} +{{ include "loki.selectorLabels" . }} +app.kubernetes.io/component: write +{{- end }} + +{{/* +write priority class name +*/}} +{{- define "loki.writePriorityClassName" -}} +{{- $pcn := coalesce .Values.global.priorityClassName .Values.write.priorityClassName -}} +{{- if $pcn }} +priorityClassName: {{ $pcn }} +{{- end }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/write/hpa.yaml b/packs/loki-3.7.4/charts/loki/templates/write/hpa.yaml new file mode 100644 index 00000000..6951ff00 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/write/hpa.yaml @@ -0,0 +1,4 @@ +{{- $isSimpleScalable := eq (include "loki.deployment.isScalable" .) "true" -}} +{{- if $isSimpleScalable }} +{{- include "loki.hpa" (dict "target" "write" "component" .Values.write "ctx" .) }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/write/pdb.yaml b/packs/loki-3.7.4/charts/loki/templates/write/pdb.yaml new file mode 100644 index 00000000..909b3e9d --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/write/pdb.yaml @@ -0,0 +1,4 @@ +{{- $isSimpleScalable := eq (include "loki.deployment.isScalable" .) "true" -}} +{{- if $isSimpleScalable }} +{{- include "loki.pdb" (dict "target" "write" "component" .Values.write "ctx" .) }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/write/service.yaml b/packs/loki-3.7.4/charts/loki/templates/write/service.yaml new file mode 100644 index 00000000..ff085062 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/write/service.yaml @@ -0,0 +1,4 @@ +{{- $isSimpleScalable := eq (include "loki.deployment.isScalable" .) "true" -}} +{{- if $isSimpleScalable }} +{{- include "loki.service" (dict "target" "write" "component" .Values.write "ctx" .) }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/write/serviceaccount.yaml b/packs/loki-3.7.4/charts/loki/templates/write/serviceaccount.yaml new file mode 100644 index 00000000..9570f332 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/write/serviceaccount.yaml @@ -0,0 +1,4 @@ +{{- $isSimpleScalable := eq (include "loki.deployment.isScalable" .) "true" -}} +{{- if $isSimpleScalable }} +{{- include "loki.serviceAccount" (dict "target" "write" "component" .Values.write "ctx" .) }} +{{- end -}} diff --git a/packs/loki-3.7.4/charts/loki/templates/write/so.yaml b/packs/loki-3.7.4/charts/loki/templates/write/so.yaml new file mode 100644 index 00000000..159c7f7f --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/write/so.yaml @@ -0,0 +1,4 @@ +{{- $isSimpleScalable := eq (include "loki.deployment.isScalable" .) "true" -}} +{{- if $isSimpleScalable }} +{{- include "loki.keda" (dict "target" "write" "component" .Values.write "ctx" .) }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/templates/write/workload.yaml b/packs/loki-3.7.4/charts/loki/templates/write/workload.yaml new file mode 100644 index 00000000..9ec54539 --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/templates/write/workload.yaml @@ -0,0 +1,4 @@ +{{- $isSimpleScalable := eq (include "loki.deployment.isScalable" .) "true" -}} +{{- if $isSimpleScalable }} +{{- include "loki.component" (dict "ctx" . "component" .Values.write "target" "write") }} +{{- end }} diff --git a/packs/loki-3.7.4/charts/loki/values.schema.json b/packs/loki-3.7.4/charts/loki/values.schema.json new file mode 100644 index 00000000..2453860a --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/values.schema.json @@ -0,0 +1,11893 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://github.com/grafana-community/helm-charts", + "type": "object", + "properties": { + "backend": { + "description": "Configuration for the backend pod(s)", + "type": "object", + "properties": { + "affinity": { + "description": "Affinity for backend pods. The value will be passed through tpl.", + "type": [ + "object", + "null" + ], + "additionalProperties": true + }, + "annotations": { + "description": "Annotations for backend StatefulSet", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "automountServiceAccountToken": { + "description": "Set this toggle to false to opt out of automounting API credentials for the service account", + "type": "boolean" + }, + "autoscaling": { + "type": "object", + "properties": { + "behavior": { + "description": "Behavior policies while scaling.", + "type": "object", + "additionalProperties": true + }, + "enabled": { + "description": "Enable autoscaling for the backend.", + "type": "boolean" + }, + "maxReplicas": { + "description": "Maximum autoscaling replicas for the backend.", + "type": "integer" + }, + "minReplicas": { + "description": "Minimum autoscaling replicas for the backend.", + "type": "integer" + }, + "targetCPUUtilizationPercentage": { + "description": "Target CPU utilization percentage for the backend.", + "type": [ + "integer", + "null" + ] + }, + "targetMemoryUtilizationPercentage": { + "description": "Target memory utilization percentage for the backend.", + "type": [ + "integer", + "null" + ] + } + } + }, + "dnsConfig": { + "description": "DNS config for backend pods", + "type": "object", + "additionalProperties": true + }, + "enabled": { + "description": "Enable the component. Requires `loki.deploymentMode` to be set to `SimpleScalable`.", + "type": "boolean" + }, + "extraArgs": { + "description": "Additional CLI args for the backend", + "type": "array" + }, + "extraContainers": { + "description": "Containers to add to the backend pods", + "type": [ + "string", + "array", + "null" + ] + }, + "extraEnv": { + "description": "Environment variables to add to the backend pods", + "type": "array" + }, + "extraEnvFrom": { + "description": "Environment variables from secrets or configmaps to add to the backend pods", + "type": "array" + }, + "extraVolumeMounts": { + "description": "Volume mounts to add to the backend pods", + "type": "array" + }, + "extraVolumes": { + "description": "Volumes to add to the backend pods", + "type": "array" + }, + "fullnameOverride": { + "description": "Override for the backend fullname. By default, this is generated using the fullname template with \"-backend\"", + "type": "string" + }, + "hostUsers": { + "description": "Use the host's user namespace in the backend pods.", + "type": [ + "boolean", + "null" + ] + }, + "image": { + "type": "object", + "properties": { + "registry": { + "description": "The Docker registry for the backend image. Overrides `loki.image.registry`", + "type": [ + "string", + "null" + ] + }, + "repository": { + "description": "Docker image repository for the backend image. Overrides `loki.image.repository`", + "type": [ + "string", + "null" + ] + }, + "tag": { + "description": "Docker image tag for the backend image. Overrides `loki.image.tag`", + "type": [ + "string", + "null" + ] + } + } + }, + "initContainers": { + "description": "Init containers to add to the backend pods", + "type": [ + "string", + "array", + "null" + ] + }, + "kedaAutoscaling": { + "type": "object", + "properties": { + "behavior": { + "description": "Behavior configuration for KEDA ScaledObject (horizontalPodAutoscalerConfig.behavior). Ref: https://keda.sh/docs/latest/reference/scaledobject-spec/#advanced", + "type": "object", + "additionalProperties": true + }, + "cooldownPeriod": { + "description": "Period to wait after the last trigger reported active before scaling the resource back to 0 (seconds). Defaults to defaults.kedaAutoscaling.cooldownPeriod if not set.", + "type": [ + "integer", + "null" + ] + }, + "enabled": { + "description": "Enable KEDA autoscaling for the backend. Mutually exclusive with autoscaling.enabled", + "type": "boolean" + }, + "fallback": { + "description": "Fallback configuration for KEDA ScaledObject. Applied when the trigger metric cannot be retrieved. Ref: https://keda.sh/docs/latest/reference/scaledobject-spec/#fallback", + "type": "object", + "additionalProperties": true + }, + "maxReplicas": { + "description": "Maximum replicas for KEDA autoscaling", + "type": "integer" + }, + "minReplicas": { + "description": "Minimum replicas for KEDA autoscaling", + "type": "integer" + }, + "pollingInterval": { + "description": "Interval (seconds) to poll each trigger. Defaults to defaults.kedaAutoscaling.pollingInterval if not set.", + "type": [ + "integer", + "null" + ] + }, + "triggers": { + "description": "KEDA triggers for the backend. Ref: https://keda.sh/docs/latest/scalers/", + "type": "array" + } + } + }, + "kind": { + "description": "Kind of backend workload. StatefulSet and Deployment are supported.", + "type": "string" + }, + "labels": { + "description": "Additional labels for backend StatefulSet", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "maxUnavailable": { + "description": "Pod Disruption Budget maxUnavailable", + "deprecated": true, + "type": [ + "string", + "integer", + "null" + ] + }, + "nodeSelector": { + "description": "Node selector for backend pods", + "type": "object", + "additionalProperties": true + }, + "persistence": { + "type": "object", + "properties": { + "accessModes": { + "description": "Set access modes on the PersistentVolumeClaim", + "type": "array", + "items": { + "type": "string" + } + }, + "annotations": { + "description": "Annotations for volume claim", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "dataVolumeParameters": { + "description": "Parameters used for the `data` volume when volumeClaimEnabled if false", + "type": "object", + "additionalProperties": true + }, + "enableStatefulSetAutoDeletePVC": { + "description": "Enable StatefulSetAutoDeletePVC feature", + "type": "boolean" + }, + "enabled": { + "description": "Enable volume claims in pod spec", + "type": "boolean" + }, + "labels": { + "description": "Labels for volume claim", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "selector": { + "description": "Selector for persistent disk", + "type": [ + "object", + "null" + ] + }, + "size": { + "description": "Size of persistent disk", + "type": "string" + }, + "storageClass": { + "description": "Storage class to be used. If defined, storageClassName: \u003cstorageClass\u003e. If set to \"-\", storageClassName: \"\", which disables dynamic provisioning. If empty or set to null, no storageClassName spec is set, choosing the default provisioner (gp2 on AWS, standard on GKE, AWS, and OpenStack).", + "type": [ + "string", + "null" + ] + }, + "volumeAttributesClassName": { + "description": "Volume attributes class name to be used. If empty or set to null, no volumeAttributesClassName spec is set. Requires Kubernetes 1.31", + "type": [ + "string", + "null" + ] + }, + "volumeClaimsEnabled": { + "description": "Enable volume claims in pod spec. Deprecated in favor of `persistence.enabled`.", + "type": "boolean" + }, + "whenDeleted": { + "description": "What to do with the volumes when the StatefulSet is deleted.", + "type": "string" + }, + "whenScaled": { + "description": "What to do with the volume when the StatefulSet is scaled down.", + "type": "string" + } + } + }, + "podAnnotations": { + "description": "Annotations for backend pods", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "podDisruptionBudget": { + "type": "object", + "properties": { + "annotations": { + "description": "Annotations for Pod Disruption Budget", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "enabled": { + "description": "Enable Pod Disruption Budget", + "type": "boolean" + }, + "labels": { + "description": "Labels for Pod Disruption Budget", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "maxUnavailable": { + "description": "Pod Disruption Budget maxUnavailable", + "type": [ + "string", + "integer", + "null" + ] + }, + "minAvailable": { + "description": "Pod Disruption Budget minAvailable", + "type": [ + "string", + "integer", + "null" + ] + }, + "unhealthyPodEvictionPolicy": { + "description": "Pod Disruption Budget unhealthyPodEvictionPolicy", + "type": [ + "string", + "null" + ] + } + } + }, + "podLabels": { + "description": "Additional labels for each `backend` pod", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "podManagementPolicy": { + "description": "The default is to deploy all pods in parallel.", + "type": "string" + }, + "priorityClassName": { + "description": "The name of the PriorityClass for backend pods", + "type": [ + "string", + "null" + ] + }, + "replicas": { + "description": "Number of replicas for the backend. Set to null to omit spec.replicas from the workload, allowing an external controller (e.g. HPA, KEDA, rollout-operator) to manage replica counts without Helm resetting them.", + "type": [ + "integer", + "null" + ] + }, + "resizePolicy": { + "description": "Container resize policy for the backend Example: resizePolicy: - resourceName: cpu restartPolicy: NotRequired - resourceName: memory restartPolicy: RestartContainer", + "type": "array" + }, + "resources": { + "description": "Resource requests and limits for the backend", + "type": "object", + "additionalProperties": true + }, + "selectorLabels": { + "description": "Additional selector labels for each `backend` pod", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "service": { + "type": "object", + "properties": { + "annotations": { + "description": "Annotations for backend Service", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "appProtocol": { + "description": "Adds the appProtocol field to the backend service. This allows backend to work with istio protocol selection.", + "type": "object", + "properties": { + "grpc": { + "description": "Set the optional grpc service protocol. Ex: \"grpc\", \"http2\" or \"https\"", + "type": "string" + } + } + }, + "ipFamilies": { + "description": "ipFamilies for backend Service Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services", + "type": "array" + }, + "ipFamilyPolicy": { + "description": "ipFamilyPolicy for backend Service Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services", + "type": "string" + }, + "labels": { + "description": "Additional labels for backend Service", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "sessionAffinity": { + "description": "Session affinity for backend Service", + "type": "string" + }, + "sessionAffinityConfig": { + "description": "Session affinity config for backend Service", + "type": "object", + "additionalProperties": true + }, + "trafficDistribution": { + "description": "trafficDistribution for backend Service", + "type": "string" + }, + "type": { + "description": "Service type for backend Service", + "type": "string" + } + } + }, + "serviceAccount": { + "type": "object", + "properties": { + "annotations": { + "description": "Annotations for the service account", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "automountServiceAccountToken": { + "description": "Set this toggle to false to opt out of automounting API credentials for the service account", + "type": "boolean" + }, + "create": { + "description": "Specifies whether a ServiceAccount should be created", + "type": "boolean" + }, + "imagePullSecrets": { + "description": "Image pull secrets for the service account", + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + } + } + } + }, + "labels": { + "description": "Labels for the service account", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "name": { + "description": "The name of the ServiceAccount to use. If not set and create is true, a name is generated using the fullname template", + "type": [ + "string", + "null" + ] + } + } + }, + "sidecar": { + "description": "Whether to enable the rules sidecar", + "type": "boolean" + }, + "statefulSetRecreateJob": { + "description": "EXPERIMENTAL: Enable creating a Job to recreate the backend StatefulSet when the compactor configuration is changed. # Only applicable if `compactor.kind` is StatefulSet. Useful for PVC size changes, which require recreating the StatefulSet.", + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + } + } + }, + "strategy": { + "description": "UpdateStrategy or Strategy for the backend.", + "type": "object", + "additionalProperties": true + }, + "terminationGracePeriodSeconds": { + "description": "Grace period to allow the backend to shutdown before it is killed. Especially for the ingester, this must be increased. It must be long enough so backends can be gracefully shutdown flushing/transferring all data and to successfully leave the member ring on shutdown.", + "type": "integer" + }, + "tolerations": { + "type": "array" + }, + "topologySpreadConstraints": { + "description": "Topology Spread Constraints for backend pods The value will be passed through tpl.", + "type": "array", + "items": { + "type": "object" + } + } + } + }, + "bloomBuilder": { + "description": "Configuration for the bloom-builder", + "type": "object", + "properties": { + "affinity": { + "description": "Affinity for bloom-builder pods. The value will be passed through tpl.", + "type": [ + "object", + "null" + ], + "additionalProperties": true + }, + "annotations": { + "description": "Annotations for bloom-builder", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "appProtocol": { + "description": "Adds the appProtocol field to the queryFrontend service. This allows bloomBuilder to work with istio protocol selection.", + "deprecated": true, + "type": "object", + "properties": { + "grpc": { + "description": "Set the optional grpc service protocol. Ex: \"grpc\", \"http2\" or \"https\"", + "type": "string" + } + }, + "additionalProperties": true + }, + "autoscaling": { + "type": "object", + "properties": { + "behavior": { + "description": "HPA behavior configuration, passed directly as a K8s HPA behavior object.", + "type": "object", + "additionalProperties": true + }, + "customMetrics": { + "description": "Allows one to define custom metrics using the HPA/v2 schema (for example, Pods, Object or External metrics)", + "type": "array" + }, + "enabled": { + "description": "Enable autoscaling for the bloom-builder", + "type": "boolean" + }, + "maxReplicas": { + "description": "Maximum autoscaling replicas for the bloom-builder", + "type": "integer" + }, + "minReplicas": { + "description": "Minimum autoscaling replicas for the bloom-builder", + "type": "integer" + }, + "targetCPUUtilizationPercentage": { + "description": "Target CPU utilisation percentage for the bloom-builder", + "type": [ + "integer", + "null" + ] + }, + "targetMemoryUtilizationPercentage": { + "description": "Target memory utilisation percentage for the bloom-builder", + "type": [ + "integer", + "null" + ] + } + } + }, + "command": { + "description": "Command to execute instead of defined in Docker image", + "type": [ + "string", + "null" + ] + }, + "dnsConfig": { + "description": "DNSConfig for bloom-builder pods", + "type": "object", + "additionalProperties": true + }, + "enabled": { + "description": "Enable the component. Requires `loki.deploymentMode` to be set to `Distributed`.", + "type": "boolean" + }, + "extraArgs": { + "description": "Additional CLI args for the bloom-builder", + "type": "array" + }, + "extraContainers": { + "description": "Containers to add to the bloom-builder pods", + "type": [ + "string", + "array", + "null" + ] + }, + "extraEnv": { + "description": "Environment variables to add to the bloom-builder pods", + "type": "array" + }, + "extraEnvFrom": { + "description": "Environment variables from secrets or configmaps to add to the bloom-builder pods", + "type": "array" + }, + "extraVolumeMounts": { + "description": "Volume mounts to add to the bloom-builder pods", + "type": "array" + }, + "extraVolumes": { + "description": "Volumes to add to the bloom-builder pods", + "type": "array" + }, + "hostAliases": { + "description": "hostAliases to add", + "type": "array" + }, + "hostUsers": { + "description": "Use the host's user namespace in the boom-builder", + "type": [ + "boolean", + "null" + ] + }, + "image": { + "type": "object", + "properties": { + "registry": { + "description": "The Docker registry for the bloom-builder image. Overrides `loki.image.registry`", + "type": [ + "string", + "null" + ] + }, + "repository": { + "description": "Docker image repository for the bloom-builder image. Overrides `loki.image.repository`", + "type": [ + "string", + "null" + ] + }, + "tag": { + "description": "Docker image tag for the bloom-builder image. Overrides `loki.image.tag`", + "type": [ + "string", + "null" + ] + } + } + }, + "initContainers": { + "description": "Init containers to add to the bloom-builder pods", + "type": [ + "string", + "array", + "null" + ] + }, + "kedaAutoscaling": { + "type": "object", + "properties": { + "behavior": { + "description": "Behavior configuration for KEDA ScaledObject (horizontalPodAutoscalerConfig.behavior). Ref: https://keda.sh/docs/latest/reference/scaledobject-spec/#advanced", + "type": "object", + "additionalProperties": true + }, + "cooldownPeriod": { + "description": "Period to wait after the last trigger reported active before scaling the resource back to 0 (seconds). Defaults to defaults.kedaAutoscaling.cooldownPeriod if not set.", + "type": [ + "integer", + "null" + ] + }, + "enabled": { + "description": "Enable KEDA autoscaling for the bloom-builder. Mutually exclusive with autoscaling.enabled", + "type": "boolean" + }, + "fallback": { + "description": "Fallback configuration for KEDA ScaledObject. Applied when the trigger metric cannot be retrieved. Ref: https://keda.sh/docs/latest/reference/scaledobject-spec/#fallback", + "type": "object", + "additionalProperties": true + }, + "maxReplicas": { + "description": "Maximum replicas for KEDA autoscaling", + "type": "integer" + }, + "minReplicas": { + "description": "Minimum replicas for KEDA autoscaling", + "type": "integer" + }, + "pollingInterval": { + "description": "Interval (seconds) to poll each trigger. Defaults to defaults.kedaAutoscaling.pollingInterval if not set.", + "type": [ + "integer", + "null" + ] + }, + "triggers": { + "description": "KEDA triggers for the bloom-builder. Ref: https://keda.sh/docs/latest/scalers/", + "type": "array" + } + } + }, + "kind": { + "description": "Kind of compactor deployment. StatefulSet and Deployment are supported.", + "type": "string" + }, + "labels": { + "description": "Labels for bloom-builder", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "maxUnavailable": { + "description": "Pod Disruption Budget maxUnavailable", + "deprecated": true, + "type": [ + "string", + "integer", + "null" + ] + }, + "nodeSelector": { + "description": "Node selector for bloom-builder pods", + "type": "object", + "additionalProperties": true + }, + "persistence": { + "type": "object", + "properties": { + "accessModes": { + "description": "Set access modes on the generated volumeClaimTemplate.", + "type": "array", + "items": { + "type": "string" + } + }, + "annotations": { + "description": "Annotations for the generated volumeClaimTemplate.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "enabled": { + "description": "Enable generic ephemeral volume-backed storage for the bloom-builder `data` volume.", + "type": "boolean" + }, + "labels": { + "description": "Labels for the generated volumeClaimTemplate.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "selector": { + "description": "Selector for the generated volumeClaimTemplate.", + "type": [ + "object", + "null" + ] + }, + "size": { + "description": "Size of the generated volumeClaimTemplate.", + "type": "string" + }, + "storageClass": { + "description": "Storage class to be used for the generated volumeClaimTemplate. If defined, storageClassName: \u003cstorageClass\u003e. If set to \"-\", storageClassName: \"\", which disables dynamic provisioning. If empty or set to null, no storageClassName spec is set, choosing the default provisioner.", + "type": [ + "string", + "null" + ] + }, + "type": { + "description": "Storage type for the bloom-builder. pvc and ephemeral are supported.", + "type": "string" + }, + "volumeAttributesClassName": { + "description": "Volume attributes class name to be used for the generated volumeClaimTemplate. If empty or set to null, no volumeAttributesClassName spec is set. Requires Kubernetes 1.31", + "type": [ + "string", + "null" + ] + } + } + }, + "podAnnotations": { + "description": "Annotations for bloom-builder pods", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "podDisruptionBudget": { + "type": "object", + "properties": { + "annotations": { + "description": "Annotations for Pod Disruption Budget", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "enabled": { + "description": "Enable Pod Disruption Budget", + "type": "boolean" + }, + "labels": { + "description": "Labels for Pod Disruption Budget", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "maxUnavailable": { + "description": "Pod Disruption Budget maxUnavailable", + "type": [ + "string", + "integer", + "null" + ] + }, + "minAvailable": { + "description": "Pod Disruption Budget minAvailable", + "type": [ + "string", + "integer", + "null" + ] + }, + "unhealthyPodEvictionPolicy": { + "description": "Pod Disruption Budget unhealthyPodEvictionPolicy", + "type": [ + "string", + "null" + ] + } + } + }, + "podLabels": { + "description": "Labels for bloom-builder pods", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "priorityClassName": { + "description": "The name of the PriorityClass for bloom-builder pods", + "type": [ + "string", + "null" + ] + }, + "replicas": { + "description": "Number of replicas for the bloom-builder. Set to null to omit spec.replicas from the workload, allowing an external controller (e.g. HPA, KEDA, rollout-operator) to manage replica counts without Helm resetting them.", + "type": [ + "integer", + "null" + ] + }, + "resizePolicy": { + "description": "Container resize policy for the bloom-builder Example: resizePolicy: - resourceName: cpu restartPolicy: NotRequired - resourceName: memory restartPolicy: RestartContainer", + "type": "array" + }, + "resources": { + "description": "Resource requests and limits for the bloom-builder", + "type": "object", + "additionalProperties": true + }, + "service": { + "type": "object", + "properties": { + "annotations": { + "description": "Annotations for bloom-builder Service", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "appProtocol": { + "description": "Adds the appProtocol field to the bloom-builder service. This allows bloom-builder to work with istio protocol selection.", + "type": "object", + "properties": { + "grpc": { + "description": "Set the optional grpc service protocol. Ex: \"grpc\", \"http2\" or \"https\"", + "type": "string" + } + } + }, + "ipFamilies": { + "description": "ipFamilies for bloom-builder Service Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services", + "type": "array" + }, + "ipFamilyPolicy": { + "description": "ipFamilyPolicy for bloom-builder Service Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services", + "type": "string" + }, + "labels": { + "description": "Additional labels for bloom-builder Service", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "sessionAffinity": { + "description": "Session affinity for bloom-builder Service", + "type": "string" + }, + "sessionAffinityConfig": { + "description": "Session affinity config for bloom-builder Service", + "type": "object", + "additionalProperties": true + }, + "trafficDistribution": { + "description": "trafficDistribution for bloom-builder Service", + "type": "string" + }, + "type": { + "description": "Service Type for bloom-builder Service", + "type": "string" + } + } + }, + "serviceAccount": { + "type": "object", + "properties": { + "annotations": { + "description": "Annotations for the service account", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "automountServiceAccountToken": { + "description": "Set this toggle to false to opt out of automounting API credentials for the service account", + "type": "boolean" + }, + "create": { + "description": "Specifies whether a ServiceAccount should be created", + "type": "boolean" + }, + "imagePullSecrets": { + "description": "Image pull secrets for the service account", + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + } + } + } + }, + "labels": { + "description": "Labels for the service account", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "name": { + "description": "The name of the ServiceAccount to use. If not set and create is true, a name is generated using the fullname template", + "type": [ + "string", + "null" + ] + } + } + }, + "serviceAnnotations": { + "description": "Annotations for bloom-builder service", + "deprecated": true, + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "serviceLabels": { + "description": "Labels for bloom-builder service", + "deprecated": true, + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "statefulSetRecreateJob": { + "description": "Enable creating a Job to recreate the compactor StatefulSet when the compactor configuration is changed. # Only applicable if `compactor.kind` is StatefulSet. Useful for PVC size changes, which require recreating the StatefulSet.", + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + } + } + }, + "strategy": { + "description": "Update strategy for bloom-builder deployment", + "type": "object", + "additionalProperties": true + }, + "terminationGracePeriodSeconds": { + "description": "Grace period to allow the bloom-builder to shutdown before it is killed", + "type": "integer" + }, + "tolerations": { + "description": "Tolerations for bloom-builder pods", + "type": "array" + } + } + }, + "bloomGateway": { + "description": "Configuration for the bloom-gateway", + "type": "object", + "properties": { + "affinity": { + "description": "Affinity for bloom-gateway pods. The value will be passed through tpl.", + "type": [ + "object", + "null" + ], + "additionalProperties": true + }, + "annotations": { + "description": "Annotations for bloom-builder", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "appProtocol": { + "description": "Set the optional grpc service protocol. Ex: \"grpc\", \"http2\" or \"https\"", + "deprecated": true, + "type": "object", + "properties": { + "grpc": { + "type": "string" + } + }, + "additionalProperties": true + }, + "command": { + "description": "Command to execute instead of defined in Docker image", + "type": [ + "string", + "null" + ] + }, + "dnsConfig": { + "description": "DNSConfig for bloom-gateway pods", + "type": "object", + "additionalProperties": true + }, + "enabled": { + "description": "Enable the component. Requires `loki.deploymentMode` to be set to `Distributed`.", + "type": "boolean" + }, + "extraArgs": { + "description": "Additional CLI args for the bloom-gateway", + "type": "array" + }, + "extraContainers": { + "description": "Containers to add to the bloom-gateway pods", + "type": [ + "string", + "array", + "null" + ] + }, + "extraEnv": { + "description": "Environment variables to add to the bloom-gateway pods", + "type": "array" + }, + "extraEnvFrom": { + "description": "Environment variables from secrets or configmaps to add to the bloom-gateway pods", + "type": "array" + }, + "extraVolumeMounts": { + "description": "Volume mounts to add to the bloom-gateway pods", + "type": "array" + }, + "extraVolumes": { + "description": "Volumes to add to the bloom-gateway pods", + "type": "array" + }, + "hostAliases": { + "description": "hostAliases to add", + "type": "array" + }, + "hostUsers": { + "description": "Use the host's user namespace in the bloom-gateway", + "type": [ + "boolean", + "null" + ] + }, + "image": { + "type": "object", + "properties": { + "registry": { + "description": "The Docker registry for the bloom-gateway image. Overrides `loki.image.registry`", + "type": [ + "string", + "null" + ] + }, + "repository": { + "description": "Docker image repository for the bloom-gateway image. Overrides `loki.image.repository`", + "type": [ + "string", + "null" + ] + }, + "tag": { + "description": "Docker image tag for the bloom-gateway image. Overrides `loki.image.tag`", + "type": [ + "string", + "null" + ] + } + } + }, + "initContainers": { + "description": "Init containers to add to the bloom-gateway pods", + "type": [ + "string", + "array", + "null" + ] + }, + "kind": { + "description": "Kind of compactor deployment. StatefulSet and Deployment are supported.", + "type": "string" + }, + "labels": { + "description": "Labels for bloom-builder", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "livenessProbe": { + "description": "liveness probe settings for bloom-gateway pods. If empty use `loki.livenessProbe`", + "type": "object", + "additionalProperties": true + }, + "nodeSelector": { + "description": "Node selector for bloom-gateway pods", + "type": "object", + "additionalProperties": true + }, + "persistence": { + "type": "object", + "properties": { + "annotations": { + "description": "Annotations for bloom-gateway PVCs", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "claims": { + "description": "List of the bloom-gateway PVCs", + "type": "array", + "items": { + "type": "object", + "properties": { + "accessModes": { + "description": "Set access modes on the PersistentVolumeClaim", + "type": "array", + "items": { + "type": "string" + } + }, + "name": { + "type": "string" + }, + "size": { + "description": "Size of persistent disk", + "type": "string" + }, + "storageClass": { + "description": "Storage class to be used. If defined, storageClassName: \u003cstorageClass\u003e. If set to \"-\", storageClassName: \"\", which disables dynamic provisioning. If empty or set to null, no storageClassName spec is set, choosing the default provisioner (gp2 on AWS, standard on GKE, AWS, and OpenStack).", + "type": [ + "string", + "null" + ] + }, + "volumeAttributesClassName": { + "description": "Volume attributes class name to be used. If empty or set to null, no volumeAttributesClassName spec is set. Requires Kubernetes 1.31", + "type": [ + "string", + "null" + ] + } + } + } + }, + "enableStatefulSetAutoDeletePVC": { + "description": "Enable StatefulSetAutoDeletePVC feature", + "type": "boolean" + }, + "enabled": { + "description": "Enable creating PVCs for the bloom-gateway", + "type": "boolean" + }, + "labels": { + "description": "Labels for bloom gateway PVCs", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "whenDeleted": { + "type": "string" + }, + "whenScaled": { + "type": "string" + } + } + }, + "podAnnotations": { + "description": "Annotations for bloom-gateway pods", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "podDisruptionBudget": { + "type": "object", + "properties": { + "annotations": { + "description": "Annotations for Pod Disruption Budget", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "enabled": { + "description": "Enable Pod Disruption Budget", + "type": "boolean" + }, + "labels": { + "description": "Labels for Pod Disruption Budget", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "maxUnavailable": { + "description": "Pod Disruption Budget maxUnavailable", + "type": [ + "string", + "integer", + "null" + ] + }, + "minAvailable": { + "description": "Pod Disruption Budget minAvailable", + "type": [ + "string", + "integer", + "null" + ] + }, + "unhealthyPodEvictionPolicy": { + "description": "Pod Disruption Budget unhealthyPodEvictionPolicy", + "type": [ + "string", + "null" + ] + } + } + }, + "podLabels": { + "description": "Labels for bloom-gateway pods", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "podManagementPolicy": { + "description": "The default is to deploy all pods in parallel.", + "type": "string" + }, + "priorityClassName": { + "description": "The name of the PriorityClass for bloom-gateway pods", + "type": [ + "string", + "null" + ] + }, + "readinessProbe": { + "description": "readiness probe settings for bloom-gateway pods. If empty, use `loki.readinessProbe`", + "type": "object", + "additionalProperties": true + }, + "replicas": { + "description": "Number of replicas for the bloom-gateway", + "type": "integer" + }, + "resizePolicy": { + "description": "Container resize policy for the bloom-gateway Example: resizePolicy: - resourceName: cpu restartPolicy: NotRequired - resourceName: memory restartPolicy: RestartContainer", + "type": "array" + }, + "resources": { + "description": "Resource requests and limits for the bloom-gateway", + "type": "object", + "additionalProperties": true + }, + "service": { + "type": "object", + "properties": { + "annotations": { + "description": "Annotations for bloom-gateway Service", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "appProtocol": { + "description": "Adds the appProtocol field to the bloom-gateway service. This allows bloom-gateway to work with istio protocol selection.", + "type": "object", + "properties": { + "grpc": { + "description": "Set the optional grpc service protocol. Ex: \"grpc\", \"http2\" or \"https\"", + "type": "string" + } + } + }, + "ipFamilies": { + "description": "ipFamilies for bloom-gateway Service Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services", + "type": "array" + }, + "ipFamilyPolicy": { + "description": "ipFamilyPolicy for bloom-gateway Service Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services", + "type": "string" + }, + "labels": { + "description": "Additional labels for bloom-gateway Service", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "sessionAffinity": { + "description": "Session affinity for bloom-gateway Service", + "type": "string" + }, + "sessionAffinityConfig": { + "description": "Session affinity config for bloom-gateway Service", + "type": "object", + "additionalProperties": true + }, + "trafficDistribution": { + "description": "trafficDistribution for bloom-gateway Service", + "type": "string" + }, + "type": { + "description": "Service Type for bloom-gateway Service", + "type": "string" + } + } + }, + "serviceAccount": { + "type": "object", + "properties": { + "annotations": { + "description": "Annotations for the service account", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "automountServiceAccountToken": { + "description": "Set this toggle to false to opt out of automounting API credentials for the service account", + "type": "boolean" + }, + "create": { + "description": "Specifies whether a ServiceAccount should be created", + "type": "boolean" + }, + "imagePullSecrets": { + "description": "Image pull secrets for the service account", + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + } + } + } + }, + "labels": { + "description": "Labels for the service account", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "name": { + "description": "The name of the ServiceAccount to use. If not set and create is true, a name is generated using the fullname template", + "type": [ + "string", + "null" + ] + } + } + }, + "serviceAnnotations": { + "description": "Annotations for bloom-gateway service", + "deprecated": true, + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "serviceLabels": { + "description": "Labels for bloom-gateway service", + "deprecated": true, + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "startupProbe": { + "description": "startup probe settings for bloom-gateway pods. If empty, use `loki.startupProbe`", + "type": "object", + "additionalProperties": true + }, + "statefulSetRecreateJob": { + "description": "Enable creating a Job to recreate the StatefulSet when the StatefulSet configuration is changed. # Only applicable if `compactor.kind` is StatefulSet. Useful for PVC size changes, which require recreating the StatefulSet.", + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + } + } + }, + "strategy": { + "description": "UpdateStrategy or Strategy for the pattern ingester.", + "type": "object", + "additionalProperties": true + }, + "terminationGracePeriodSeconds": { + "description": "Grace period to allow the bloom-gateway to shutdown before it is killed", + "type": "integer" + }, + "tolerations": { + "description": "Tolerations for bloom-gateway pods", + "type": "array" + } + } + }, + "bloomPlanner": { + "description": "Configuration for the bloom-planner", + "type": "object", + "properties": { + "affinity": { + "description": "Affinity for bloom-planner pods. The value will be passed through tpl.", + "type": [ + "object", + "null" + ], + "additionalProperties": true + }, + "annotations": { + "description": "Annotations for bloom-builder", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "appProtocol": { + "description": "Set the optional grpc service protocol. Ex: \"grpc\", \"http2\" or \"https\"", + "deprecated": true, + "type": "object", + "properties": { + "grpc": { + "type": "string" + } + }, + "additionalProperties": true + }, + "command": { + "description": "Command to execute instead of defined in Docker image", + "type": [ + "string", + "null" + ] + }, + "dnsConfig": { + "description": "DNSConfig for bloom-planner pods", + "type": "object", + "additionalProperties": true + }, + "enabled": { + "description": "Enable the component. Requires `loki.deploymentMode` to be set to `Distributed`.", + "type": "boolean" + }, + "extraArgs": { + "description": "Additional CLI args for the bloom-planner", + "type": "array" + }, + "extraContainers": { + "description": "Containers to add to the bloom-planner pods", + "type": [ + "string", + "array", + "null" + ] + }, + "extraEnv": { + "description": "Environment variables to add to the bloom-planner pods", + "type": "array" + }, + "extraEnvFrom": { + "description": "Environment variables from secrets or configmaps to add to the bloom-planner pods", + "type": "array" + }, + "extraVolumeMounts": { + "description": "Volume mounts to add to the bloom-planner pods", + "type": "array" + }, + "extraVolumes": { + "description": "Volumes to add to the bloom-planner pods", + "type": "array" + }, + "hostAliases": { + "description": "hostAliases to add", + "type": "array" + }, + "hostUsers": { + "description": "Use the host's user namespace in the bloom-planner", + "type": [ + "boolean", + "null" + ] + }, + "image": { + "type": "object", + "properties": { + "registry": { + "description": "The Docker registry for the bloom-planner image. Overrides `loki.image.registry`", + "type": [ + "string", + "null" + ] + }, + "repository": { + "description": "Docker image repository for the bloom-planner image. Overrides `loki.image.repository`", + "type": [ + "string", + "null" + ] + }, + "tag": { + "description": "Docker image tag for the bloom-planner image. Overrides `loki.image.tag`", + "type": [ + "string", + "null" + ] + } + } + }, + "initContainers": { + "description": "Init containers to add to the bloom-planner pods", + "type": [ + "string", + "array", + "null" + ] + }, + "kind": { + "description": "Kind of compactor deployment. StatefulSet and Deployment are supported.", + "type": "string" + }, + "labels": { + "description": "Labels for bloom-builder", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "livenessProbe": { + "description": "liveness probe settings for bloom-planner pods. If empty use `loki.livenessProbe`", + "type": "object", + "additionalProperties": true + }, + "nodeSelector": { + "description": "Node selector for bloom-planner pods", + "type": "object", + "additionalProperties": true + }, + "persistence": { + "type": "object", + "properties": { + "claims": { + "description": "List of the bloom-planner PVCs", + "type": "array", + "items": { + "type": "object", + "properties": { + "accessModes": { + "description": "Set access modes on the PersistentVolumeClaim", + "type": "array", + "items": { + "type": "string" + } + }, + "annotations": { + "description": "Annotations for bloom-planner PVCs", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "labels": { + "description": "Labels for bloom planner PVCs", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "name": { + "type": "string" + }, + "size": { + "description": "Size of persistent disk", + "type": "string" + }, + "storageClass": { + "description": "Storage class to be used. If defined, storageClassName: \u003cstorageClass\u003e. If set to \"-\", storageClassName: \"\", which disables dynamic provisioning. If empty or set to null, no storageClassName spec is set, choosing the default provisioner (gp2 on AWS, standard on GKE, AWS, and OpenStack).", + "type": [ + "string", + "null" + ] + }, + "volumeAttributesClassName": { + "description": "Volume attributes class name to be used. If empty or set to null, no volumeAttributesClassName spec is set. Requires Kubernetes 1.31", + "type": [ + "string", + "null" + ] + } + } + } + }, + "enableStatefulSetAutoDeletePVC": { + "description": "Enable StatefulSetAutoDeletePVC feature", + "type": "boolean" + }, + "enabled": { + "description": "Enable creating PVCs for the bloom-planner", + "type": "boolean" + }, + "whenDeleted": { + "type": "string" + }, + "whenScaled": { + "type": "string" + } + } + }, + "podAnnotations": { + "description": "Annotations for bloom-planner pods", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "podDisruptionBudget": { + "type": "object", + "properties": { + "annotations": { + "description": "Annotations for Pod Disruption Budget", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "enabled": { + "description": "Enable Pod Disruption Budget", + "type": "boolean" + }, + "labels": { + "description": "Labels for Pod Disruption Budget", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "maxUnavailable": { + "description": "Pod Disruption Budget maxUnavailable", + "type": [ + "string", + "integer", + "null" + ] + }, + "minAvailable": { + "description": "Pod Disruption Budget minAvailable", + "type": [ + "string", + "integer", + "null" + ] + }, + "unhealthyPodEvictionPolicy": { + "description": "Pod Disruption Budget unhealthyPodEvictionPolicy", + "type": [ + "string", + "null" + ] + } + } + }, + "podLabels": { + "description": "Labels for bloom-planner pods", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "podManagementPolicy": { + "description": "The default is to deploy all pods in parallel.", + "type": "string" + }, + "priorityClassName": { + "description": "The name of the PriorityClass for bloom-planner pods", + "type": [ + "string", + "null" + ] + }, + "readinessProbe": { + "description": "readiness probe settings for bloom-planner pods. If empty, use `loki.readinessProbe`", + "type": "object", + "additionalProperties": true + }, + "replicas": { + "description": "Number of replicas for the bloom-planner", + "type": "integer" + }, + "resizePolicy": { + "description": "Container resize policy for the bloom-planner Example: resizePolicy: - resourceName: cpu restartPolicy: NotRequired - resourceName: memory restartPolicy: RestartContainer", + "type": "array" + }, + "resources": { + "description": "Resource requests and limits for the bloom-planner", + "type": "object", + "additionalProperties": true + }, + "service": { + "type": "object", + "properties": { + "annotations": { + "description": "Annotations for bloom-planner Service", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "appProtocol": { + "description": "Adds the appProtocol field to the bloom-planner service. This allows bloom-planner to work with istio protocol selection.", + "type": "object", + "properties": { + "grpc": { + "description": "Set the optional grpc service protocol. Ex: \"grpc\", \"http2\" or \"https\"", + "type": "string" + } + } + }, + "ipFamilies": { + "description": "ipFamilies for bloom-planner Service Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services", + "type": "array" + }, + "ipFamilyPolicy": { + "description": "ipFamilyPolicy for bloom-planner Service Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services", + "type": "string" + }, + "labels": { + "description": "Additional labels for bloom-planner Service", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "sessionAffinity": { + "description": "Session affinity for bloom-planner Service", + "type": "string" + }, + "sessionAffinityConfig": { + "description": "Session affinity config for bloom-planner Service", + "type": "object", + "additionalProperties": true + }, + "trafficDistribution": { + "description": "trafficDistribution for bloom-planner Service", + "type": "string" + }, + "type": { + "description": "Service Type for bloom-planner Service", + "type": "string" + } + } + }, + "serviceAccount": { + "type": "object", + "properties": { + "annotations": { + "description": "Annotations for the service account", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "automountServiceAccountToken": { + "description": "Set this toggle to false to opt out of automounting API credentials for the service account", + "type": "boolean" + }, + "create": { + "description": "Specifies whether a ServiceAccount should be created", + "type": "boolean" + }, + "imagePullSecrets": { + "description": "Image pull secrets for the service account", + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + } + } + } + }, + "labels": { + "description": "Labels for the service account", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "name": { + "description": "The name of the ServiceAccount to use. If not set and create is true, a name is generated using the fullname template", + "type": [ + "string", + "null" + ] + } + } + }, + "serviceAnnotations": { + "description": "Annotations for bloom-planner service", + "deprecated": true, + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "serviceLabels": { + "description": "Labels for bloom-planner service", + "deprecated": true, + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "startupProbe": { + "description": "startup probe settings for bloom-planner pods. If empty use `loki.startupProbe`", + "type": "object", + "additionalProperties": true + }, + "statefulSetRecreateJob": { + "description": "Enable creating a Job to recreate the StatefulSet when the StatefulSet configuration is changed. # Only applicable if `compactor.kind` is StatefulSet. Useful for PVC size changes, which require recreating the StatefulSet.", + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + } + } + }, + "strategy": { + "description": "UpdateStrategy or Strategy for the pattern ingester.", + "type": "object", + "additionalProperties": true + }, + "terminationGracePeriodSeconds": { + "description": "Grace period to allow the bloom-planner to shutdown before it is killed", + "type": "integer" + }, + "tolerations": { + "description": "Tolerations for bloom-planner pods", + "type": "array" + } + } + }, + "chunksCache": { + "type": "object", + "properties": { + "addresses": { + "description": "Comma separated addresses list in DNS Service Discovery format", + "type": "string" + }, + "affinity": { + "description": "Affinity for chunks-cache pods", + "type": [ + "object", + "null" + ], + "additionalProperties": true + }, + "allocatedCPU": { + "description": "Amount of cpu allocated to chunks-cache for object storage (in integer or millicores).", + "type": "string" + }, + "allocatedMemory": { + "description": "Amount of memory allocated to chunks-cache for object storage (in MB).", + "type": "integer" + }, + "annotations": { + "description": "Annotations for the chunks-cache pods", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "batchSize": { + "description": "Batchsize for sending and receiving chunks from chunks cache", + "type": "integer" + }, + "connectionLimit": { + "description": "Maximum number of connections allowed", + "type": "integer" + }, + "defaultValidity": { + "description": "Specify how long cached chunks should be stored in the chunks-cache before being expired", + "type": "string" + }, + "dnsConfig": { + "description": "DNSConfig for chunks-cache", + "type": "object", + "additionalProperties": true + }, + "enabled": { + "description": "Specifies whether memcached based chunks-cache should be enabled", + "type": "boolean" + }, + "extraArgs": { + "description": "Additional CLI args for chunks-cache", + "type": "object" + }, + "extraContainers": { + "description": "Additional containers to be added to the chunks-cache pod.", + "type": [ + "array", + "null" + ] + }, + "extraExtendedOptions": { + "description": "Add extended options for chunks-cache memcached container. The format is the same as for the memcached -o/--extend flag. Example: extraExtendedOptions: 'tls,no_hashexpand'", + "type": "string" + }, + "extraVolumeMounts": { + "description": "Additional volume mounts to be added to the chunks-cache pod (applies to both memcached and exporter containers). Example: extraVolumeMounts: - name: extra-volume mountPath: /etc/extra-volume readOnly: true", + "type": "array" + }, + "extraVolumes": { + "description": "Additional volumes to be added to the chunks-cache pod (applies to both memcached and exporter containers). Example: extraVolumes: - name: extra-volume secret: secretName: extra-volume-secret", + "type": "array" + }, + "hostUsers": { + "description": "Use the host's user namespace in chunks-cache pods", + "type": [ + "boolean", + "null" + ] + }, + "initContainers": { + "description": "Extra init containers for chunks-cache pods", + "type": "array" + }, + "l2": { + "description": "l2 memcache configuration", + "type": "object", + "properties": { + "addresses": { + "description": "Comma separated addresses list in DNS Service Discovery format", + "type": "string" + }, + "affinity": { + "description": "Affinity for chunks-cache-l2 pods", + "type": "object", + "additionalProperties": true + }, + "allocatedCPU": { + "description": "Amount of cpu allocated to chunks-cache-l2 for object storage (in integer or millicores).", + "type": "string" + }, + "allocatedMemory": { + "description": "Amount of memory allocated to chunks-cache-l2 for object storage (in MB).", + "type": "integer" + }, + "annotations": { + "description": "Annotations for the chunks-cache-l2 pods", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "batchSize": { + "description": "Batchsize for sending and receiving chunks from chunks cache", + "type": "integer" + }, + "connectionLimit": { + "description": "Maximum number of connections allowed", + "type": "integer" + }, + "defaultValidity": { + "description": "Specify how long cached chunks should be stored in the chunks-cache-l2 before being expired", + "type": "string" + }, + "dnsConfig": { + "description": "DNSConfig for chunks-cache-l2", + "type": "object", + "additionalProperties": true + }, + "enabled": { + "description": "Specifies whether memcached based chunks-cache-l2 should be enabled", + "type": "boolean" + }, + "extraArgs": { + "description": "Additional CLI args for chunks-cache-l2", + "type": "object" + }, + "extraContainers": { + "description": "Additional containers to be added to the chunks-cache-l2 pod.", + "type": [ + "array", + "null" + ] + }, + "extraExtendedOptions": { + "description": "Add extended options for chunks-cache-l2 memcached container. The format is the same as for the memcached -o/--extend flag. Example: extraExtendedOptions: 'tls,no_hashexpand'", + "type": "string" + }, + "extraVolumeMounts": { + "description": "Additional volume mounts to be added to the chunks-cache-l2 pod (applies to both memcached and exporter containers). Example: extraVolumeMounts: - name: extra-volume mountPath: /etc/extra-volume readOnly: true", + "type": "array" + }, + "extraVolumes": { + "description": "Additional volumes to be added to the chunks-cache-l2 pod (applies to both memcached and exporter containers). Example: extraVolumes: - name: extra-volume secret: secretName: extra-volume-secret", + "type": "array" + }, + "hostUsers": { + "description": "Use the host's user namespace in chunks-cache-l2 pods", + "type": [ + "boolean", + "null" + ] + }, + "initContainers": { + "description": "Extra init containers for chunks-cache-l2 pods", + "type": "array" + }, + "l2ChunkCacheHandoff": { + "description": "The age of chunks should be transferred from l1 cache to l2 4 days", + "type": "string" + }, + "maxItemMemory": { + "description": "Maximum item memory for chunks-cache-l2 (in MB).", + "type": "integer" + }, + "maxUnavailable": { + "description": "Pod Disruption Budget maxUnavailable", + "deprecated": true, + "type": [ + "string", + "integer", + "null" + ] + }, + "nodeSelector": { + "description": "Node selector for chunks-cach-l2 pods", + "type": "object", + "additionalProperties": true + }, + "parallelism": { + "description": "Parallel threads for sending and receiving chunks from chunks cache", + "type": "integer" + }, + "persistence": { + "description": "Persistence settings for the chunks-cache-l2", + "type": "object", + "properties": { + "enabled": { + "description": "Enable creating PVCs for the chunks-cache-l2", + "type": "boolean" + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "mountPath": { + "description": "Volume mount path", + "type": "string" + }, + "storageClass": { + "description": "Storage class to be used. If defined, storageClassName: \u003cstorageClass\u003e. If set to \"-\", storageClassName: \"\", which disables dynamic provisioning. If empty or set to null, no storageClassName spec is set, choosing the default provisioner (gp2 on AWS, standard on GKE, AWS, and OpenStack).", + "type": [ + "string", + "null" + ] + }, + "storageSize": { + "description": "Size of persistent disk, must be in G or Gi", + "type": "string" + }, + "volumeAttributesClassName": { + "description": "Volume attributes class name to be used. If empty or set to null, no volumeAttributesClassName spec is set. Requires Kubernetes 1.31", + "type": [ + "string", + "null" + ] + } + } + }, + "podAnnotations": { + "description": "Annotations for chunks-cache-l2 pods", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "podDisruptionBudget": { + "type": "object", + "properties": { + "annotations": { + "description": "Annotations for Pod Disruption Budget", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "enabled": { + "description": "Enable Pod Disruption Budget", + "type": "boolean" + }, + "labels": { + "description": "Labels for Pod Disruption Budget", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "podLabels": { + "description": "Labels for chunks-cache-l2 pods", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "podManagementPolicy": { + "description": "Management policy for chunks-cache-l2 pods", + "type": "string" + }, + "port": { + "description": "Port of the chunks-cache-l2 service", + "type": "integer" + }, + "priorityClassName": { + "description": "The name of the PriorityClass for chunks-cache-l2 pods", + "type": [ + "string", + "null" + ] + }, + "replicas": { + "description": "Total number of chunks-cache-l2 replicas", + "type": "integer" + }, + "resizePolicy": { + "description": "Container resize policy for the chunks-cache-l2 Example: resizePolicy: - resourceName: cpu restartPolicy: NotRequired - resourceName: memory restartPolicy: RestartContainer", + "type": "array" + }, + "resources": { + "description": "Resource requests and limits for the chunks-cache-l2 By default a safe memory limit will be requested based on allocatedMemory value (floor (* 1.2 allocatedMemory)).", + "type": "object", + "additionalProperties": true + }, + "service": { + "description": "Service annotations and labels", + "type": "object", + "properties": { + "annotations": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "statefulStrategy": { + "description": "Stateful chunks-cache strategy", + "type": "object", + "additionalProperties": true + }, + "suffix": { + "description": "Append to the name of the resources to make names different for l1 and l2", + "type": "string" + }, + "terminationGracePeriodSeconds": { + "description": "Grace period to allow the chunks-cache-l2 to shutdown before it is killed", + "type": "integer" + }, + "timeout": { + "description": "Memcached operation timeout", + "type": "string" + }, + "tolerations": { + "description": "Tolerations for chunks-cache-l2 pods", + "type": "array" + }, + "topologySpreadConstraints": { + "description": "topologySpreadConstraints allows to customize the default topologySpreadConstraints. This can be either a single dict as shown below or a slice of topologySpreadConstraints. labelSelector is taken from the constraint itself (if it exists) or is generated by the chart using the same selectors as for services.", + "type": "array", + "items": { + "type": "object" + } + }, + "writebackBuffer": { + "description": "Max number of objects to use for cache write back", + "type": "integer" + }, + "writebackParallelism": { + "description": "Number of parallel threads for cache write back", + "type": "integer" + }, + "writebackSizeLimit": { + "description": "Max memory to use for cache write back", + "type": "string" + } + } + }, + "maxItemMemory": { + "description": "Maximum item memory for chunks-cache (in MB).", + "type": "integer" + }, + "maxUnavailable": { + "description": "Pod Disruption Budget maxUnavailable", + "deprecated": true, + "type": [ + "string", + "integer", + "null" + ] + }, + "nodeSelector": { + "description": "Node selector for chunks-cache pods", + "type": "object", + "additionalProperties": true + }, + "parallelism": { + "description": "Parallel threads for sending and receiving chunks from chunks cache", + "type": "integer" + }, + "persistence": { + "description": "Persistence settings for the chunks-cache", + "type": "object", + "properties": { + "enabled": { + "description": "Enable creating PVCs for the chunks-cache", + "type": "boolean" + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "mountPath": { + "description": "Volume mount path", + "type": "string" + }, + "storageClass": { + "description": "Storage class to be used. If defined, storageClassName: \u003cstorageClass\u003e. If set to \"-\", storageClassName: \"\", which disables dynamic provisioning. If empty or set to null, no storageClassName spec is set, choosing the default provisioner (gp2 on AWS, standard on GKE, AWS, and OpenStack).", + "type": [ + "string", + "null" + ] + }, + "storageSize": { + "description": "Size of persistent disk, must be in G or Gi", + "type": "string" + }, + "volumeAttributesClassName": { + "description": "Volume attributes class name to be used. If empty or set to null, no volumeAttributesClassName spec is set. Requires Kubernetes 1.31", + "type": [ + "string", + "null" + ] + } + } + }, + "podAnnotations": { + "description": "Annotations for chunks-cache pods", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "podDisruptionBudget": { + "type": "object", + "properties": { + "annotations": { + "description": "Annotations for Pod Disruption Budget", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "enabled": { + "description": "Enable Pod Disruption Budget", + "type": "boolean" + }, + "labels": { + "description": "Labels for Pod Disruption Budget", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "maxUnavailable": { + "description": "Pod Disruption Budget maxUnavailable", + "type": [ + "string", + "integer", + "null" + ] + }, + "minAvailable": { + "description": "Pod Disruption Budget minAvailable", + "type": [ + "string", + "integer", + "null" + ] + }, + "unhealthyPodEvictionPolicy": { + "description": "Pod Disruption Budget unhealthyPodEvictionPolicy", + "type": [ + "string", + "null" + ] + } + } + }, + "podLabels": { + "description": "Labels for chunks-cache pods", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "podManagementPolicy": { + "description": "Management policy for chunks-cache pods", + "type": "string" + }, + "port": { + "description": "Port of the chunks-cache service", + "type": "integer" + }, + "priorityClassName": { + "description": "The name of the PriorityClass for chunks-cache pods", + "type": [ + "string", + "null" + ] + }, + "replicas": { + "description": "Total number of chunks-cache replicas", + "type": "integer" + }, + "resizePolicy": { + "description": "Container resize policy for the chunks-cache Example: resizePolicy: - resourceName: cpu restartPolicy: NotRequired - resourceName: memory restartPolicy: RestartContainer", + "type": "array" + }, + "resources": { + "description": "Resource requests and limits for the chunks-cache By default a safe memory limit will be requested based on allocatedMemory value (floor (* 1.2 allocatedMemory)).", + "type": "object", + "additionalProperties": true + }, + "service": { + "description": "Service annotations and labels", + "type": "object", + "properties": { + "annotations": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "statefulStrategy": { + "description": "Stateful chunks-cache strategy", + "type": "object", + "additionalProperties": true + }, + "suffix": { + "description": "Append to the name of the resources to make names different for l1 and l2", + "type": "string" + }, + "terminationGracePeriodSeconds": { + "description": "Grace period to allow the chunks-cache to shutdown before it is killed", + "type": "integer" + }, + "timeout": { + "description": "Memcached operation timeout", + "type": "string" + }, + "tolerations": { + "description": "Tolerations for chunks-cache pods", + "type": "array" + }, + "topologySpreadConstraints": { + "description": "topologySpreadConstraints allows to customize the default topologySpreadConstraints. This can be either a single dict as shown below or a slice of topologySpreadConstraints. labelSelector is taken from the constraint itself (if it exists) or is generated by the chart using the same selectors as for services.", + "type": "array", + "items": { + "type": "object" + } + }, + "writebackBuffer": { + "description": "Max number of objects to use for cache write back", + "type": "integer" + }, + "writebackParallelism": { + "description": "Number of parallel threads for cache write back", + "type": "integer" + }, + "writebackSizeLimit": { + "description": "Max memory to use for cache write back", + "type": "string" + } + } + }, + "commonLabels": { + "description": "Labels to be added to resources", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "compactor": { + "description": "Configuration for the compactor", + "type": "object", + "properties": { + "affinity": { + "description": "Affinity for compactor pods. The value will be passed through tpl.", + "type": [ + "object", + "null" + ], + "additionalProperties": true + }, + "annotations": { + "description": "Annotations for compactor", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "appProtocol": { + "description": "Set the optional grpc service protocol. Ex: \"grpc\", \"http2\" or \"https\"", + "deprecated": true, + "type": "object", + "properties": { + "grpc": { + "type": "string" + } + }, + "additionalProperties": true + }, + "command": { + "description": "Command to execute instead of defined in Docker image", + "type": [ + "string", + "null" + ] + }, + "dnsConfig": { + "description": "DNSConfig for compactor pods", + "type": "object", + "additionalProperties": true + }, + "enabled": { + "description": "Enable the component. Requires `loki.deploymentMode` to be set to `Distributed`.", + "type": "boolean" + }, + "extraArgs": { + "description": "Additional CLI args for the compactor", + "type": "array" + }, + "extraContainers": { + "description": "Containers to add to the compactor pods", + "type": [ + "string", + "array", + "null" + ] + }, + "extraEnv": { + "description": "Environment variables to add to the compactor pods", + "type": "array" + }, + "extraEnvFrom": { + "description": "Environment variables from secrets or configmaps to add to the compactor pods", + "type": "array" + }, + "extraVolumeMounts": { + "description": "Volume mounts to add to the compactor pods", + "type": "array" + }, + "extraVolumes": { + "description": "Volumes to add to the compactor pods", + "type": "array" + }, + "hostAliases": { + "description": "hostAliases to add", + "type": "array" + }, + "hostUsers": { + "description": "Use the host's user namespace in the compactor", + "type": [ + "boolean", + "null" + ] + }, + "image": { + "type": "object", + "properties": { + "registry": { + "description": "The Docker registry for the compactor image. Overrides `loki.image.registry`", + "type": [ + "string", + "null" + ] + }, + "repository": { + "description": "Docker image repository for the compactor image. Overrides `loki.image.repository`", + "type": [ + "string", + "null" + ] + }, + "tag": { + "description": "Docker image tag for the compactor image. Overrides `loki.image.tag`", + "type": [ + "string", + "null" + ] + } + } + }, + "initContainers": { + "description": "Init containers to add to the compactor pods", + "type": [ + "string", + "array", + "null" + ] + }, + "kind": { + "description": "Kind of compactor deployment. StatefulSet and Deployment are supported.", + "type": "string" + }, + "labels": { + "description": "Labels for compactor", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "livenessProbe": { + "description": "liveness probe settings for compactor pods. If empty use `loki.livenessProbe`", + "type": "object", + "additionalProperties": true + }, + "nodeSelector": { + "description": "Node selector for compactor pods", + "type": "object", + "additionalProperties": true + }, + "persistence": { + "type": "object", + "properties": { + "accessModes": { + "description": "Set access modes on the PersistentVolumeClaim", + "type": "array", + "items": { + "type": "string" + } + }, + "annotations": { + "description": "Annotations for the generated volumeClaimTemplate.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "claims": { + "description": "List of the compactor PVCs. Deprecated in favor of `compactor.persistence.dataVolumeParameters` and `compactor.persistence.size`.", + "type": "array", + "items": { + "type": "object", + "properties": { + "accessModes": { + "description": "Set access modes on the PersistentVolumeClaim", + "type": "array", + "items": { + "type": "string" + } + }, + "annotations": { + "description": "Annotations for compactor PVCs", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "labels": { + "description": "Labels for compactor PVCs", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "name": { + "type": "string" + }, + "size": { + "type": "string" + }, + "storageClass": { + "description": "Storage class to be used. If defined, storageClassName: \u003cstorageClass\u003e. If set to \"-\", storageClassName: \"\", which disables dynamic provisioning. If empty or set to null, no storageClassName spec is set, choosing the default provisioner (gp2 on AWS, standard on GKE, AWS, and OpenStack).", + "type": [ + "string", + "null" + ] + }, + "volumeAttributesClassName": { + "description": "Volume attributes class name to be used. If empty or set to null, no volumeAttributesClassName spec is set. Requires Kubernetes 1.31", + "type": [ + "string", + "null" + ] + } + } + } + }, + "dataVolumeParameters": { + "description": "Parameters used for the `data` volume when volumeClaimEnabled if false", + "type": "object", + "additionalProperties": true + }, + "enableStatefulSetAutoDeletePVC": { + "description": "Enable StatefulSetAutoDeletePVC feature", + "type": "boolean" + }, + "enabled": { + "description": "Enable creating PVCs for the compactor", + "type": "boolean" + }, + "labels": { + "description": "Labels for the generated volumeClaimTemplate.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "selector": { + "description": "Selector for the generated volumeClaimTemplate.", + "type": [ + "object", + "null" + ] + }, + "size": { + "description": "Size of persistent disk", + "type": "string" + }, + "storageClass": { + "description": "Storage class to be used. If defined, storageClassName: \u003cstorageClass\u003e. If set to \"-\", storageClassName: \"\", which disables dynamic provisioning. If empty or set to null, no storageClassName spec is set, choosing the default provisioner (gp2 on AWS, standard on GKE, AWS, and OpenStack).", + "type": [ + "string", + "null" + ] + }, + "type": { + "description": "Storage type for the compactor. pvc and ephemeral are supported.", + "type": "string" + }, + "volumeAttributesClassName": { + "description": "Size of persistent disk If empty or set to null, no volumeAttributesClassName spec is set. Requires Kubernetes 1.31", + "type": [ + "string", + "null" + ] + }, + "whenDeleted": { + "type": "string" + }, + "whenScaled": { + "type": "string" + } + } + }, + "podAnnotations": { + "description": "Annotations for compactor pods", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "podLabels": { + "description": "Labels for compactor pods", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "podManagementPolicy": { + "description": "PodManagementPolicy for the compactor StatefulSet. Only applicable if `compactor.kind` is StatefulSet. # OrderedReady and Parallel are supported.", + "type": "string" + }, + "priorityClassName": { + "description": "The name of the PriorityClass for compactor pods", + "type": [ + "string", + "null" + ] + }, + "readinessProbe": { + "description": "readiness probe settings for compactor pods. If empty, use `loki.readinessProbe`", + "type": "object", + "additionalProperties": true + }, + "replicas": { + "description": "Number of replicas for the compactor. Set to null to omit spec.replicas from the workload, allowing an external controller (e.g. HPA, KEDA, rollout-operator) to manage replica counts without Helm resetting them.", + "type": [ + "integer", + "null" + ] + }, + "resizePolicy": { + "description": "Container resize policy for the compactor Example: resizePolicy: - resourceName: cpu restartPolicy: NotRequired - resourceName: memory restartPolicy: RestartContainer", + "type": "array" + }, + "resources": { + "description": "Resource requests and limits for the compactor", + "type": "object", + "additionalProperties": true + }, + "service": { + "type": "object", + "properties": { + "annotations": { + "description": "Annotations for compactor Service", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "appProtocol": { + "description": "Adds the appProtocol field to the compactor service. This allows compactor to work with istio protocol selection.", + "type": "object", + "properties": { + "grpc": { + "description": "Set the optional grpc service protocol. Ex: \"grpc\", \"http2\" or \"https\"", + "type": "string" + } + } + }, + "ipFamilies": { + "description": "ipFamilies for compactor Service Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services", + "type": "array" + }, + "ipFamilyPolicy": { + "description": "ipFamilyPolicy for compactor Service Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services", + "type": "string" + }, + "labels": { + "description": "Additional labels for compactor Service", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "sessionAffinity": { + "description": "Session affinity for compactor Service", + "type": "string" + }, + "sessionAffinityConfig": { + "description": "Session affinity config for compactor Service", + "type": "object", + "additionalProperties": true + }, + "trafficDistribution": { + "description": "trafficDistribution for compactor Service", + "type": "string" + }, + "type": { + "description": "Service Type for compactor Service", + "type": "string" + } + } + }, + "serviceAccount": { + "type": "object", + "properties": { + "annotations": { + "description": "Annotations for the compactor service account", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "automountServiceAccountToken": { + "description": "Set this toggle to false to opt out of automounting API credentials for the service account", + "type": "boolean" + }, + "create": { + "type": "boolean" + }, + "imagePullSecrets": { + "description": "Image pull secrets for the compactor service account", + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + } + } + } + }, + "name": { + "description": "The name of the ServiceAccount to use for the compactor. If not set and create is true, a name is generated by appending \"-compactor\" to the common ServiceAccount.", + "type": [ + "string", + "null" + ] + } + } + }, + "serviceAnnotations": { + "description": "Annotations for compactor service", + "deprecated": true, + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "serviceLabels": { + "description": "Labels for compactor service", + "deprecated": true, + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "serviceType": { + "description": "Service type for compactor service", + "deprecated": true, + "type": "string" + }, + "startupProbe": { + "description": "liveness probe settings for ingester pods. If empty use `loki.livenessProbe`", + "type": "object", + "additionalProperties": true + }, + "statefulSetRecreateJob": { + "description": "EXPERIMENTAL: Enable creating a Job to recreate the compactor StatefulSet when the compactor configuration is changed. # Only applicable if `compactor.kind` is StatefulSet. Useful for PVC size changes, which require recreating the StatefulSet.", + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + } + } + }, + "strategy": { + "description": "UpdateStrategy or Strategy for the compactor.", + "type": "object", + "additionalProperties": true + }, + "terminationGracePeriodSeconds": { + "description": "Grace period to allow the compactor to shutdown before it is killed", + "type": "integer" + }, + "tolerations": { + "description": "Tolerations for compactor pods", + "type": "array" + } + } + }, + "defaults": { + "type": "object", + "properties": { + "annotations": { + "description": "Annotations for loki Deployments/StatefulSets", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "automountServiceAccountToken": { + "description": "Set this toggle to false to opt out of automounting API credentials for the service account", + "type": "boolean" + }, + "command": { + "description": "Command to execute instead of defined in Docker image", + "type": [ + "string", + "null" + ] + }, + "containerSecurityContext": { + "description": "The SecurityContext for Loki containers for loki pods", + "type": "object", + "additionalProperties": true + }, + "dnsConfig": { + "description": "DNSConfig for loki pods", + "type": "object", + "additionalProperties": true + }, + "enableServiceLinks": { + "description": "Should enableServiceLinks be enabled. Default to enable", + "type": "boolean" + }, + "extraArgs": { + "description": "Common additional CLI arguments for loki pods", + "type": "array" + }, + "extraEnv": { + "description": "Common environment variables to add to all pods directly managed by this chart.", + "type": "array" + }, + "extraEnvFrom": { + "description": "Common source of environment injections to add to all pods directly managed by this chart. For example to inject values from a Secret, use: extraEnvFrom: - secretRef: name: mysecret", + "type": "array" + }, + "extraVolumeMounts": { + "description": "Common mount points to add to all pods directly managed by this chart.", + "type": "array" + }, + "extraVolumes": { + "description": "Common volumes to add to all pods directly managed by this chart.", + "type": "array" + }, + "goSettings": { + "type": "object", + "properties": { + "goMemLimitFactor": { + "description": "Fraction of the container memory limit used to compute GOMEMLIMIT (e.g. 0.85 = 85%). Set to 0 to disable automatic GOMEMLIMIT injection.", + "type": "number" + }, + "gogc": { + "description": "Value to set for GOGC alongside GOMEMLIMIT. Lowering below the default of 100 reduces heap growth between GC cycles, working in tandem with GOMEMLIMIT to smooth memory usage. Set to 0 to disable automatic GOGC injection.", + "type": "integer" + } + } + }, + "hostAliases": { + "description": "hostAliases for loki pods", + "type": "array" + }, + "hostUsers": { + "description": "Use the host's user namespace for loki pods", + "type": [ + "boolean", + "null" + ] + }, + "kedaAutoscaling": { + "description": "KEDA autoscaling shared configuration for all components that support KEDA", + "type": "object", + "properties": { + "authentication": { + "description": "KEDA trigger authentication settings. Ref: https://keda.sh/docs/latest/concepts/authentication/", + "type": "object", + "properties": { + "authModes": { + "description": "Authentication modes for the trigger (e.g. \"bearer\", \"basic\")", + "type": "string" + }, + "enabled": { + "description": "Enable TriggerAuthentication for KEDA triggers", + "type": "boolean" + }, + "secretTargetRef": { + "description": "Secret key references for TriggerAuthentication", + "type": "array" + } + } + }, + "cooldownPeriod": { + "description": "Period (seconds) to wait after the last trigger reported active before scaling back to 0. Overridable per component.", + "type": "integer" + }, + "customHeaders": { + "description": "Custom HTTP headers to include in Prometheus requests. Useful for multi-tenant setups (e.g. \"X-Scope-OrgID=tenant1\")", + "type": "string" + }, + "ignoreNullValues": { + "description": "Whether to ignore null values from Prometheus queries", + "type": "boolean" + }, + "pollingInterval": { + "description": "Interval (seconds) to poll each trigger. Overridable per component.", + "type": "integer" + }, + "prometheusAddress": { + "description": "Prometheus server address for KEDA triggers", + "type": "string" + }, + "unsafeSsl": { + "description": "Whether to skip SSL verification when connecting to Prometheus", + "type": "boolean" + } + } + }, + "labels": { + "description": "Additional labels for loki Deployments/StatefulSets", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "livenessProbe": { + "description": "Configures the liveness probe for loki pods", + "type": "object", + "additionalProperties": true + }, + "nodeSelector": { + "description": "Node selector for loki pods", + "type": "object", + "additionalProperties": true + }, + "podAnnotations": { + "description": "Annotations for loki pods", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "podLabels": { + "description": "Additional labels for loki pod", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "podSecurityContext": { + "description": "The SecurityContext for loki pods", + "type": "object", + "additionalProperties": true + }, + "priorityClassName": { + "description": "The name of the PriorityClass for loki pods", + "type": [ + "string", + "null" + ] + }, + "readinessProbe": { + "description": "Configures the readiness probe for loki pods", + "type": "object", + "additionalProperties": true + }, + "service": { + "type": "object", + "properties": { + "annotations": { + "description": "Common annotations for all services", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "ipFamilies": { + "description": "ipFamilies for all services Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services", + "type": "array" + }, + "ipFamilyPolicy": { + "description": "ipFamilyPolicy for all services Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services", + "type": "string" + }, + "labels": { + "description": "Common labels for all services", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "trafficDistribution": { + "description": "trafficDistribution for services Ref: https://kubernetes.io/docs/concepts/services-networking/service/#traffic-distribution", + "type": "string" + } + } + }, + "startupProbe": { + "description": "Configures the startup probe for loki pods", + "type": "object", + "additionalProperties": true + }, + "statefulSetRecreateJob": { + "type": "object", + "properties": { + "image": { + "type": "object", + "properties": { + "registry": { + "type": "string" + }, + "repository": { + "type": "string" + }, + "tag": { + "description": "Overrides the image tag. Defaults to .Capabilities.KubeVersion.Version", + "type": "string" + } + } + }, + "patchPVC": { + "description": "Enable the PVC resize job for statefulsets. This job will be triggered when the storage size is increased and will recreate the statefulset to allow resizing of PVCs, which is not natively supported by Kubernetes.", + "type": "boolean" + } + } + }, + "terminationGracePeriodSeconds": { + "description": "Grace period to allow the gateway to shutdown before it is killed", + "type": "integer" + }, + "tolerations": { + "description": "Tolerations for loki pods", + "type": "array" + } + } + }, + "deploymentMode": { + "description": "Deployment mode lets you specify how to deploy Loki. There are 3 options: - Monolithic (deprecated: SingleBinary): Loki is deployed as a single binary, useful for small installs typically without HA, up to a few tens of GB/day. - SimpleScalable (deprecated, removed in Loki 4): Loki is deployed as 3 targets: read, write, and backend. Useful for medium installs easier to manage than distributed, up to a about 1TB/day. - Distributed: Loki is deployed as individual microservices. The most complicated but most capable, useful for large installs, typically over 1TB/day. There are also 2 additional modes used for migrating between deployment modes: - Monolithic\u003c-\u003eSimpleScalable (deprecated: SingleBinary\u003c-\u003eSimpleScalable): Migrate from SingleBinary to SimpleScalable (or vice versa) - SimpleScalable\u003c-\u003eDistributed: Migrate from SimpleScalable to Distributed (or vice versa) Note: SimpleScalable and Distributed REQUIRE the use of object storage. Ref: https://grafana.com/docs/loki/latest/get-started/deployment-modes/", + "type": "string" + }, + "distributor": { + "description": "Configuration for the distributor", + "type": "object", + "properties": { + "affinity": { + "description": "Affinity for distributor pods. The value will be passed through tpl.", + "type": [ + "object", + "null" + ], + "additionalProperties": true + }, + "annotations": { + "description": "Annotations for distributor", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "appProtocol": { + "description": "Adds the appProtocol field to the distributor service. This allows distributor to work with istio protocol selection.", + "deprecated": true, + "type": "object", + "properties": { + "grpc": { + "description": "Set the optional grpc service protocol. Ex: \"grpc\", \"http2\" or \"https\"", + "deprecated": true, + "type": "string" + } + }, + "additionalProperties": true + }, + "autoscaling": { + "type": "object", + "properties": { + "behavior": { + "description": "HPA behavior configuration, passed directly as a K8s HPA behavior object.", + "type": "object", + "additionalProperties": true + }, + "customMetrics": { + "description": "Allows one to define custom metrics using the HPA/v2 schema (for example, Pods, Object or External metrics)", + "type": "array" + }, + "enabled": { + "description": "Enable autoscaling for the distributor", + "type": "boolean" + }, + "maxReplicas": { + "description": "Maximum autoscaling replicas for the distributor", + "type": "integer" + }, + "minReplicas": { + "description": "Minimum autoscaling replicas for the distributor", + "type": "integer" + }, + "targetCPUUtilizationPercentage": { + "description": "Target CPU utilisation percentage for the distributor", + "type": [ + "integer", + "null" + ] + }, + "targetMemoryUtilizationPercentage": { + "description": "Target memory utilisation percentage for the distributor", + "type": [ + "integer", + "null" + ] + } + } + }, + "command": { + "description": "Command to execute instead of defined in Docker image", + "type": [ + "string", + "null" + ] + }, + "dnsConfig": { + "description": "DNSConfig for distributor pods", + "type": "object", + "additionalProperties": true + }, + "enabled": { + "description": "Enable the component. Requires `loki.deploymentMode` to be set to `Distributed`.", + "type": "boolean" + }, + "extraArgs": { + "description": "Additional CLI args for the distributor", + "type": "array" + }, + "extraContainers": { + "description": "Containers to add to the distributor pods", + "type": [ + "string", + "array", + "null" + ] + }, + "extraEnv": { + "description": "Environment variables to add to the distributor pods", + "type": "array" + }, + "extraEnvFrom": { + "description": "Environment variables from secrets or configmaps to add to the distributor pods", + "type": "array" + }, + "extraVolumeMounts": { + "description": "Volume mounts to add to the distributor pods", + "type": "array" + }, + "extraVolumes": { + "description": "Volumes to add to the distributor pods", + "type": "array" + }, + "hostAliases": { + "description": "hostAliases to add", + "type": "array" + }, + "hostUsers": { + "description": "Use the host's user namespace in the distributor", + "type": [ + "boolean", + "null" + ] + }, + "image": { + "type": "object", + "properties": { + "registry": { + "description": "The Docker registry for the distributor image. Overrides `loki.image.registry`", + "type": [ + "string", + "null" + ] + }, + "repository": { + "description": "Docker image repository for the distributor image. Overrides `loki.image.repository`", + "type": [ + "string", + "null" + ] + }, + "tag": { + "description": "Docker image tag for the distributor image. Overrides `loki.image.tag`", + "type": [ + "string", + "null" + ] + } + } + }, + "initContainers": { + "description": "Init containers to add to the distributor pods", + "type": [ + "string", + "array", + "null" + ] + }, + "kedaAutoscaling": { + "type": "object", + "properties": { + "behavior": { + "description": "Behavior configuration for KEDA ScaledObject (horizontalPodAutoscalerConfig.behavior). Ref: https://keda.sh/docs/latest/reference/scaledobject-spec/#advanced", + "type": "object", + "additionalProperties": true + }, + "cooldownPeriod": { + "description": "Period to wait after the last trigger reported active before scaling the resource back to 0 (seconds). Defaults to defaults.kedaAutoscaling.cooldownPeriod if not set.", + "type": [ + "integer", + "null" + ] + }, + "enabled": { + "description": "Enable KEDA autoscaling for the distributor. Mutually exclusive with autoscaling.enabled", + "type": "boolean" + }, + "fallback": { + "description": "Fallback configuration for KEDA ScaledObject. Applied when the trigger metric cannot be retrieved. Ref: https://keda.sh/docs/latest/reference/scaledobject-spec/#fallback", + "type": "object", + "additionalProperties": true + }, + "maxReplicas": { + "description": "Maximum replicas for KEDA autoscaling", + "type": "integer" + }, + "minReplicas": { + "description": "Minimum replicas for KEDA autoscaling", + "type": "integer" + }, + "pollingInterval": { + "description": "Interval (seconds) to poll each trigger. Defaults to defaults.kedaAutoscaling.pollingInterval if not set.", + "type": [ + "integer", + "null" + ] + }, + "triggers": { + "description": "KEDA triggers for the distributor. Ref: https://keda.sh/docs/latest/scalers/", + "type": "array" + } + } + }, + "kind": { + "description": "Kind of compactor deployment. StatefulSet and Deployment are supported.", + "type": "string" + }, + "labels": { + "description": "Labels for distributor", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "maxSurge": { + "description": "Max Surge for distributor pods", + "type": [ + "string", + "integer" + ] + }, + "maxUnavailable": { + "description": "Pod Disruption Budget maxUnavailable", + "deprecated": true, + "type": [ + "string", + "integer", + "null" + ] + }, + "nodeSelector": { + "description": "Node selector for distributor pods", + "type": "object", + "additionalProperties": true + }, + "podAnnotations": { + "description": "Annotations for distributor pods", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "podDisruptionBudget": { + "type": "object", + "properties": { + "annotations": { + "description": "Annotations for Pod Disruption Budget", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "enabled": { + "description": "Enable Pod Disruption Budget", + "type": "boolean" + }, + "labels": { + "description": "Labels for Pod Disruption Budget", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "maxUnavailable": { + "description": "Pod Disruption Budget maxUnavailable", + "type": [ + "string", + "integer", + "null" + ] + }, + "minAvailable": { + "description": "Pod Disruption Budget minAvailable", + "type": [ + "string", + "integer", + "null" + ] + }, + "unhealthyPodEvictionPolicy": { + "description": "Pod Disruption Budget unhealthyPodEvictionPolicy", + "type": [ + "string", + "null" + ] + } + } + }, + "podLabels": { + "description": "Labels for distributor pods", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "priorityClassName": { + "description": "The name of the PriorityClass for distributor pods", + "type": [ + "string", + "null" + ] + }, + "replicas": { + "description": "Number of replicas for the distributor. Set to null to omit spec.replicas from the workload, allowing an external controller (e.g. HPA, KEDA, rollout-operator) to manage replica counts without Helm resetting them.", + "type": [ + "integer", + "null" + ] + }, + "resizePolicy": { + "description": "Container resize policy for the distributor Example: resizePolicy: - resourceName: cpu restartPolicy: NotRequired - resourceName: memory restartPolicy: RestartContainer", + "type": "array" + }, + "resources": { + "description": "Resource requests and limits for the distributor", + "type": "object", + "additionalProperties": true + }, + "service": { + "type": "object", + "properties": { + "annotations": { + "description": "Annotations for distributor Service", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "appProtocol": { + "description": "Adds the appProtocol field to the distributor service. This allows distributor to work with istio protocol selection.", + "type": "object", + "properties": { + "grpc": { + "description": "Set the optional grpc service protocol. Ex: \"grpc\", \"http2\" or \"https\"", + "type": "string" + } + } + }, + "ipFamilies": { + "description": "ipFamilies for distributor Service Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services", + "type": "array" + }, + "ipFamilyPolicy": { + "description": "ipFamilyPolicy for distributor Service Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services", + "type": "string" + }, + "labels": { + "description": "Additional labels for distributor Service", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "sessionAffinity": { + "description": "Session affinity for distributor Service", + "type": "string" + }, + "sessionAffinityConfig": { + "description": "Session affinity config for distributor Service", + "type": "object", + "additionalProperties": true + }, + "trafficDistribution": { + "description": "trafficDistribution for distributor Service", + "type": "string" + }, + "type": { + "description": "Service Type for distributor Service", + "type": "string" + } + } + }, + "serviceAccount": { + "type": "object", + "properties": { + "annotations": { + "description": "Annotations for the service account", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "automountServiceAccountToken": { + "description": "Set this toggle to false to opt out of automounting API credentials for the service account", + "type": "boolean" + }, + "create": { + "description": "Specifies whether a ServiceAccount should be created", + "type": "boolean" + }, + "imagePullSecrets": { + "description": "Image pull secrets for the service account", + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + } + } + } + }, + "labels": { + "description": "Labels for the service account", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "name": { + "description": "The name of the ServiceAccount to use. If not set and create is true, a name is generated using the fullname template", + "type": [ + "string", + "null" + ] + } + } + }, + "serviceAnnotations": { + "description": "Annotations for distributor service", + "deprecated": true, + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "serviceLabels": { + "description": "Labels for distributor service", + "deprecated": true, + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "serviceType": { + "description": "Service type for distributor service", + "deprecated": true, + "type": "string" + }, + "shutdownDelay": { + "description": "On SIGTERM, report 503 on /ready and wait this long before shutdown so the LB drains the pod before connections are cut. \"0s\" (default) disables. When enabling, keep terminationGracePeriodSeconds above shutdownDelay + server.graceful_shutdown_timeout.", + "type": [ + "string", + "null" + ] + }, + "strategy": { + "description": "UpdateStrategy or Strategy for the distributor.", + "type": "object", + "additionalProperties": true + }, + "terminationGracePeriodSeconds": { + "description": "Grace period to allow the distributor to shutdown before it is killed", + "type": "integer" + }, + "tolerations": { + "type": "array" + }, + "topologySpreadConstraints": { + "description": "Topology Spread Constraints for distributor pods The value will be passed through tpl.", + "type": "array", + "items": { + "type": "object" + } + }, + "trafficDistribution": { + "description": "trafficDistribution for distributor service", + "type": "string" + } + } + }, + "extraObjects": { + "type": [ + "array", + "object", + "string", + "null" + ] + }, + "fullnameOverride": { + "description": "Overrides the chart's computed fullname", + "type": "string" + }, + "gateway": { + "type": "object", + "properties": { + "affinity": { + "description": "Affinity for gateway pods. The value will be passed through tpl.", + "type": [ + "object", + "null" + ], + "additionalProperties": true + }, + "annotations": { + "description": "Annotations for gateway deployment", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "automountServiceAccountToken": { + "description": "Set this toggle to false to opt out of automounting API credentials for the service account", + "type": "boolean" + }, + "autoscaling": { + "type": "object", + "properties": { + "behavior": { + "description": "See `kubectl explain deployment.spec.strategy` for more", + "type": "object", + "additionalProperties": true + }, + "enabled": { + "description": "Enable autoscaling for the gateway", + "type": "boolean" + }, + "maxReplicas": { + "description": "Maximum autoscaling replicas for the gateway", + "type": "integer" + }, + "minReplicas": { + "description": "Minimum autoscaling replicas for the gateway", + "type": "integer" + }, + "targetCPUUtilizationPercentage": { + "description": "Target CPU utilisation percentage for the gateway", + "type": [ + "integer", + "null" + ] + }, + "targetMemoryUtilizationPercentage": { + "description": "Target memory utilisation percentage for the gateway", + "type": [ + "integer", + "null" + ] + } + } + }, + "basicAuth": { + "type": "object", + "properties": { + "enabled": { + "description": "Enables basic authentication for the gateway", + "type": "boolean" + }, + "existingSecret": { + "description": "Existing basic auth secret to use. Must contain '.htpasswd'", + "type": [ + "string", + "null" + ] + }, + "htpasswd": { + "description": "Uses the specified users from the `loki.tenants` list to create the htpasswd file. if `loki.tenants` is not set, the `gateway.basicAuth.username` and `gateway.basicAuth.password` are used. The value is templated using `tpl`. Override this to use a custom htpasswd, e.g. in case the default causes high CPU load.", + "type": "string" + }, + "password": { + "description": "The basic auth password for the gateway", + "type": [ + "string", + "null" + ] + }, + "username": { + "description": "The basic auth username for the gateway", + "type": [ + "string", + "null" + ] + } + } + }, + "containerPort": { + "description": "Default container port", + "type": "integer" + }, + "containerSecurityContext": { + "description": "The SecurityContext for gateway containers", + "type": "object", + "additionalProperties": true + }, + "deploymentStrategy": { + "type": "object", + "properties": { + "type": { + "type": "string" + } + } + }, + "dnsConfig": { + "description": "DNS config for gateway pods", + "type": "object", + "additionalProperties": true + }, + "enabled": { + "description": "Specifies whether the gateway should be enabled", + "type": "boolean" + }, + "extraArgs": { + "description": "Additional CLI args for the gateway", + "type": "array" + }, + "extraContainers": { + "description": "Containers to add to the gateway pods", + "type": [ + "array", + "null" + ] + }, + "extraEnv": { + "description": "Environment variables to add to the gateway pods", + "type": "array" + }, + "extraEnvFrom": { + "description": "Environment variables from secrets or configmaps to add to the gateway pods", + "type": "array" + }, + "extraVolumeMounts": { + "description": "Volume mounts to add to the gateway pods", + "type": "array" + }, + "extraVolumes": { + "description": "Volumes to add to the gateway pods", + "type": "array" + }, + "hostUsers": { + "description": "Use the host's user namespace in the gateway", + "type": [ + "boolean", + "null" + ] + }, + "image": { + "type": "object", + "properties": { + "digest": { + "description": "Overrides the gateway image tag with an image digest", + "type": [ + "string", + "null" + ] + }, + "pullPolicy": { + "description": "The gateway image pull policy", + "type": "string" + }, + "registry": { + "description": "The Docker registry for the gateway image", + "type": "string" + }, + "repository": { + "description": "The gateway image repository", + "type": "string" + }, + "tag": { + "description": "The gateway image tag", + "type": "string" + } + } + }, + "ingress": { + "type": "object", + "properties": { + "annotations": { + "description": "Annotations for the gateway ingress", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "enabled": { + "description": "Specifies whether an ingress for the gateway should be created", + "type": "boolean" + }, + "hosts": { + "description": "Hosts configuration for the gateway ingress, passed through the `tpl` function to allow templating", + "type": "array", + "items": { + "type": "object", + "properties": { + "host": { + "type": "string" + }, + "paths": { + "type": "array", + "items": { + "type": "object", + "properties": { + "path": { + "type": "string" + } + } + } + } + } + } + }, + "ingressClassName": { + "description": "Ingress Class Name. MAY be required for Kubernetes versions \u003e= 1.18", + "type": "string" + }, + "labels": { + "description": "Labels for the gateway ingress", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "tls": { + "description": "TLS configuration for the gateway ingress. Hosts passed through the `tpl` function to allow templating", + "type": "array", + "items": { + "type": "object", + "properties": { + "hosts": { + "type": "array", + "items": { + "type": "string" + } + }, + "secretName": { + "type": "string" + } + } + } + } + } + }, + "kedaAutoscaling": { + "type": "object", + "properties": { + "behavior": { + "description": "Behavior configuration for KEDA ScaledObject (horizontalPodAutoscalerConfig.behavior). Ref: https://keda.sh/docs/latest/reference/scaledobject-spec/#advanced", + "type": "object", + "additionalProperties": true + }, + "cooldownPeriod": { + "description": "Period to wait after the last trigger reported active before scaling the resource back to 0 (seconds). Defaults to defaults.kedaAutoscaling.cooldownPeriod if not set.", + "type": [ + "integer", + "null" + ] + }, + "enabled": { + "description": "Enable KEDA autoscaling for the gateway. Mutually exclusive with autoscaling.enabled", + "type": "boolean" + }, + "fallback": { + "description": "Fallback configuration for KEDA ScaledObject. Applied when the trigger metric cannot be retrieved. Ref: https://keda.sh/docs/latest/reference/scaledobject-spec/#fallback", + "type": "object", + "additionalProperties": true + }, + "maxReplicas": { + "description": "Maximum replicas for KEDA autoscaling", + "type": "integer" + }, + "minReplicas": { + "description": "Minimum replicas for KEDA autoscaling", + "type": "integer" + }, + "pollingInterval": { + "description": "Interval (seconds) to poll each trigger. Defaults to defaults.kedaAutoscaling.pollingInterval if not set.", + "type": [ + "integer", + "null" + ] + }, + "triggers": { + "description": "KEDA triggers for the gateway. Ref: https://keda.sh/docs/latest/scalers/", + "type": "array" + } + } + }, + "lifecycle": { + "description": "Lifecycle for the gateway container", + "type": "object" + }, + "livenessProbe": { + "description": "liveness probe for the nginx container in the gateway pods.", + "type": "object", + "additionalProperties": true + }, + "metrics": { + "type": "object", + "properties": { + "containerSecurityContext": { + "description": "The SecurityContext for memcached exporter containers", + "type": "object", + "additionalProperties": true + }, + "enabled": { + "description": "Whether gateway metrics should be exported", + "type": "boolean" + }, + "extraArgs": { + "description": "Extra args to add to the exporter container.", + "type": "array" + }, + "image": { + "type": "object", + "properties": { + "pullPolicy": { + "type": "string" + }, + "registry": { + "type": "string" + }, + "repository": { + "type": "string" + }, + "tag": { + "type": "string" + } + } + }, + "livenessProbe": { + "description": "Liveness probe for memcached exporter", + "type": "object", + "additionalProperties": true + }, + "readinessProbe": { + "description": "Readiness probe for memcached exporter", + "type": "object", + "additionalProperties": true + }, + "resizePolicy": { + "description": "Container resize policy for the gateway metrics exporter Example: resizePolicy: - resourceName: cpu restartPolicy: NotRequired - resourceName: memory restartPolicy: RestartContainer", + "type": "array" + }, + "resources": { + "type": "object", + "properties": { + "limits": { + "type": "object" + }, + "requests": { + "type": "object" + } + }, + "additionalProperties": true + }, + "service": { + "type": "object", + "properties": { + "annotations": { + "description": "Annotations for the gateway metrics exporter service. Use this instead of gateway.service.annotations to avoid propagating annotations (e.g. external-dns) to the exporter ClusterIP service.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "labels": { + "description": "Labels for the gateway metrics exporter service.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "startupProbe": { + "description": "Startup probe for memcached exporter", + "type": "object", + "additionalProperties": true + } + } + }, + "nginxConfig": { + "type": "object", + "properties": { + "clientMaxBodySize": { + "description": "Allows customizing the `client_max_body_size` directive", + "type": "string" + }, + "customBackendUrl": { + "description": "Override Backend URL", + "type": [ + "string", + "null" + ] + }, + "customReadUrl": { + "description": "Override Read URL", + "type": [ + "string", + "null" + ] + }, + "customWriteUrl": { + "description": "Override Write URL", + "type": [ + "string", + "null" + ] + }, + "enableIPv6": { + "description": "Enable listener for IPv6, disable on IPv4-only systems", + "type": "boolean" + }, + "file": { + "description": "Config file contents for Nginx. Passed through the `tpl` function to allow templating", + "type": "string" + }, + "httpSnippet": { + "description": "Allows appending custom configuration to the http block, passed through the `tpl` function to allow templating", + "type": "string" + }, + "locationSnippet": { + "description": "Allows appending custom configuration inside every location block, useful for authentication or setting headers that are not inherited from the server block, passed through the `tpl` function to allow templating.", + "type": "string" + }, + "logFormat": { + "description": "NGINX log format", + "type": "string" + }, + "resolver": { + "description": "Allows overriding the DNS resolver address nginx will use.", + "type": "string" + }, + "schema": { + "description": "Which schema to be used when building URLs. Can be 'http' or 'https'.", + "type": "string" + }, + "serverSnippet": { + "description": "Allows appending custom configuration to the server block", + "type": "string" + }, + "ssl": { + "description": "Whether ssl should be appended to the listen directive of the server block or not.", + "type": "boolean" + } + } + }, + "nodeSelector": { + "description": "Node selector for gateway pods", + "type": "object", + "additionalProperties": true + }, + "podAnnotations": { + "description": "Annotations for gateway pods", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "podDisruptionBudget": { + "type": "object", + "properties": { + "annotations": { + "description": "Annotations for Pod Disruption Budget", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "enabled": { + "description": "Enable Pod Disruption Budget", + "type": "boolean" + }, + "labels": { + "description": "Labels for Pod Disruption Budget", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "maxUnavailable": { + "description": "Pod Disruption Budget maxUnavailable", + "type": [ + "string", + "integer", + "null" + ] + }, + "minAvailable": { + "description": "Pod Disruption Budget minAvailable", + "type": [ + "string", + "integer", + "null" + ] + }, + "unhealthyPodEvictionPolicy": { + "description": "Pod Disruption Budget unhealthyPodEvictionPolicy", + "type": [ + "string", + "null" + ] + } + } + }, + "podLabels": { + "description": "Additional labels for gateway pods", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "podSecurityContext": { + "description": "The SecurityContext for gateway containers", + "type": "object", + "additionalProperties": true + }, + "priorityClassName": { + "description": "The name of the PriorityClass for gateway pods", + "type": [ + "string", + "null" + ] + }, + "readinessProbe": { + "type": "object", + "additionalProperties": true + }, + "replicas": { + "description": "Number of replicas for the gateway", + "type": "integer" + }, + "resizePolicy": { + "description": "Container resize policy for the gateway Example: resizePolicy: - resourceName: cpu restartPolicy: NotRequired - resourceName: memory restartPolicy: RestartContainer", + "type": "array" + }, + "resources": { + "description": "Resource requests and limits for the gateway", + "type": "object", + "additionalProperties": true + }, + "route": { + "description": "Gateway API routes configuration. Mutually exclusive with gateway.ingress. Use either ingress or route, but not both at once. Each entry in the map creates a separate HTTPRoute resource. The key \"main\" produces a route named after the gateway fullname; any other key appends the key as a suffix. This allows defining multiple routes, e.g. one HTTPRoute and one GRPCRoute.", + "type": "object", + "properties": { + "main": { + "type": "object", + "properties": { + "additionalRules": { + "description": "Additional rules to prepend before the default catch-all rule. Each entry is rendered into spec.rules as written (templating is supported), so any HTTPRoute/GRPCRoute rule shape is accepted — including filter-only rules with no backendRefs (e.g. RequestRedirect, URLRewrite). Useful for advanced routing logic (e.g. header-based routing, auth policies, redirects). Note: the chart-generated rule that points at the gateway service is always rendered for this route — additionalRules are prepended, not a replacement. Example HTTP-to-HTTPS redirect: additionalRules: - filters: - type: RequestRedirect requestRedirect: scheme: https statusCode: 301 matches: - path: { type: PathPrefix, value: / }", + "type": "array" + }, + "annotations": { + "description": "Additional annotations for the route", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "apiVersion": { + "description": "Set the route apiVersion, e.g. gateway.networking.k8s.io/v1 or gateway.networking.k8s.io/v1beta1. If not set, the latest available version will be auto-detected.", + "type": "string" + }, + "enabled": { + "description": "Specifies whether this Gateway API route should be created", + "type": "boolean" + }, + "filters": { + "description": "Filters for the default rule", + "type": "array" + }, + "hostnames": { + "description": "Hostnames for the route", + "type": "array" + }, + "kind": { + "description": "Set the route kind. Valid options are GRPCRoute, HTTPRoute, TCPRoute, TLSRoute, UDPRoute", + "type": "string" + }, + "labels": { + "description": "Additional labels for the route", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "matches": { + "description": "Matches for the default rule. Defaults to match all paths.", + "type": "array", + "items": { + "type": "object", + "properties": { + "path": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "value": { + "type": "string" + } + } + } + } + } + }, + "parentRefs": { + "description": "Parent gateway references to attach the route to", + "type": "array" + }, + "timeouts": { + "description": "Timeouts for the default rule", + "type": "object" + } + } + } + } + }, + "service": { + "type": "object", + "properties": { + "annotations": { + "description": "Annotations for the gateway service", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "clusterIP": { + "description": "ClusterIP of the gateway service", + "type": [ + "string", + "null" + ] + }, + "ipFamilies": { + "description": "ipFamilies for gateway Service Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services", + "type": "array" + }, + "ipFamilyPolicy": { + "description": "ipFamilyPolicy for gateway Service Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services", + "type": "string" + }, + "labels": { + "description": "Labels for gateway service", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "loadBalancerIP": { + "description": "Load balancer IPO address if service type is LoadBalancer", + "type": [ + "string", + "null" + ] + }, + "nodePort": { + "description": "Node port if service type is NodePort", + "type": [ + "integer", + "null" + ] + }, + "port": { + "description": "Port of the gateway service", + "type": "integer" + }, + "sessionAffinity": { + "description": "Session affinity for gateway Service", + "type": "string" + }, + "sessionAffinityConfig": { + "description": "Session affinity config for gateway Service", + "type": "object", + "additionalProperties": true + }, + "trafficDistribution": { + "description": "trafficDistribution for gateway Service", + "type": "string" + }, + "type": { + "description": "Type of the gateway service", + "type": "string" + } + } + }, + "serviceAccount": { + "type": "object", + "properties": { + "annotations": { + "description": "Annotations for the service account", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "automountServiceAccountToken": { + "description": "Set this toggle to false to opt out of automounting API credentials for the service account", + "type": "boolean" + }, + "create": { + "description": "Specifies whether a ServiceAccount should be created", + "type": "boolean" + }, + "imagePullSecrets": { + "description": "Image pull secrets for the service account", + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + } + } + } + }, + "labels": { + "description": "Labels for the service account", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "name": { + "description": "The name of the ServiceAccount to use. If not set and create is true, a name is generated using the fullname template", + "type": [ + "string", + "null" + ] + } + } + }, + "startupProbe": { + "description": "startup probe for the nginx container in the gateway pods.", + "type": "object", + "additionalProperties": true + }, + "terminationGracePeriodSeconds": { + "description": "Grace period to allow the gateway to shutdown before it is killed", + "type": "integer" + }, + "tolerations": { + "type": "array" + }, + "topologySpreadConstraints": { + "description": "Topology Spread Constraints for gateway pods The value will be passed through tpl.", + "type": "array", + "items": { + "type": "object" + } + }, + "verboseLogging": { + "description": "Enable logging of 2xx and 3xx HTTP requests", + "type": "boolean" + } + } + }, + "global": { + "type": "object", + "properties": { + "clusterDomain": { + "description": "configures cluster domain (\"cluster.local\" by default)", + "type": "string" + }, + "dnsNamespace": { + "description": "configures DNS service namespace", + "type": "string" + }, + "dnsService": { + "description": "configures DNS service name", + "type": "string" + }, + "extraArgs": { + "description": "Common additional CLI arguments for all jobs (that is, -log.level debug, -config.expand-env=true or -log-config-reverse-order) (deprecated, use defaults.extraArgs) scope: backend, bloom-builder, bloom-gateway, bloom-planner, compactor, distributor, index-gateway, ingester, overrides-exporter, pattern-ingester, querier, query-frontend, query-scheduler, read, ruler, write.", + "type": "array" + }, + "extraEnv": { + "description": "Common environment variables to add to all pods directly managed by this chart. (deprecated, use defaults.extraEnv) scope: backend, bloom-builder, bloom-gateway, bloom-planner, compactor, distributor, index-gateway, ingester, overrides-exporter, pattern-ingester, querier, query-frontend, query-scheduler, read, ruler, write.", + "type": "array" + }, + "extraEnvFrom": { + "description": "Common source of environment injections to add to all pods directly managed by this chart. (deprecated, use defaults.extraEnvFrom) scope: backend, bloom-builder, bloom-gateway, bloom-planner, compactor, distributor, index-gateway, ingester, overrides-exporter, pattern-ingester, querier, query-frontend, query-scheduler, read, ruler, write. For example to inject values from a Secret, use: extraEnvFrom: - secretRef: name: mysecret", + "type": "array" + }, + "extraVolumeMounts": { + "description": "Common mount points to add to all pods directly managed by this chart. (deprecated, use defaults.extraVolumeMounts) scope: backend, bloom-builder, bloom-gateway, bloom-planner, compactor, distributor, index-gateway, ingester, overrides-exporter, pattern-ingester, querier, query-frontend, query-scheduler, read, ruler, write.", + "type": "array" + }, + "extraVolumes": { + "description": "Common volumes to add to all pods directly managed by this chart. (deprecated, use defaults.extraVolumes) scope: backend, bloom-builder, bloom-gateway, bloom-planner, compactor, distributor, index-gateway, ingester, overrides-exporter, pattern-ingester, querier, query-frontend, query-scheduler, read, ruler, write.", + "type": "array" + }, + "image": { + "type": "object", + "properties": { + "registry": { + "description": "Overrides the Docker registry globally for all images (deprecated, use global.imageRegistry). This has lower precedence than global.imageRegistry, but higher precedence than component-level image.registry values.", + "type": [ + "string", + "null" + ] + } + } + }, + "imageRegistry": { + "description": "Overrides the Docker registry globally for all images (standard format). This has the highest precedence and overrides every component-level image.registry value.", + "type": [ + "string", + "null" + ] + }, + "priorityClassName": { + "description": "Overrides the priorityClassName for all pods", + "type": [ + "string", + "null" + ] + } + } + }, + "ignoreMinioDeprecation": { + "description": "Ignore MinIO deprecation validation when `minio.enabled=true`. This is a temporary compatibility escape hatch.", + "type": "boolean" + }, + "imagePullSecrets": { + "description": "Image pull secrets for Docker images", + "type": "array" + }, + "indexGateway": { + "description": "Configuration for the index-gateway", + "type": "object", + "properties": { + "affinity": { + "description": "Affinity for index-gateway pods. The value will be passed through tpl.", + "type": [ + "object", + "null" + ], + "additionalProperties": true + }, + "annotations": { + "description": "Annotations for index-gateway", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "appProtocol": { + "description": "Set the optional grpc service protocol. Ex: \"grpc\", \"http2\" or \"https\"", + "deprecated": true, + "type": "object", + "properties": { + "grpc": { + "type": "string" + } + }, + "additionalProperties": true + }, + "dnsConfig": { + "description": "DNSConfig for index-gateway pods", + "type": "object", + "additionalProperties": true + }, + "enabled": { + "description": "Enable the component. Requires `loki.deploymentMode` to be set to `Distributed`.", + "type": "boolean" + }, + "extraArgs": { + "description": "Additional CLI args for the index-gateway", + "type": "array" + }, + "extraContainers": { + "description": "Containers to add to the index-gateway pods", + "type": [ + "string", + "array", + "null" + ] + }, + "extraEnv": { + "description": "Environment variables to add to the index-gateway pods", + "type": "array" + }, + "extraEnvFrom": { + "description": "Environment variables from secrets or configmaps to add to the index-gateway pods", + "type": "array" + }, + "extraVolumeMounts": { + "description": "Volume mounts to add to the index-gateway pods", + "type": "array" + }, + "extraVolumes": { + "description": "Volumes to add to the index-gateway pods", + "type": "array" + }, + "hostAliases": { + "description": "hostAliases to add", + "type": "array" + }, + "hostUsers": { + "description": "Use the host's user namespace in the index-gateway", + "type": [ + "boolean", + "null" + ] + }, + "image": { + "type": "object", + "properties": { + "registry": { + "description": "The Docker registry for the index-gateway image. Overrides `loki.image.registry`", + "type": [ + "string", + "null" + ] + }, + "repository": { + "description": "Docker image repository for the index-gateway image. Overrides `loki.image.repository`", + "type": [ + "string", + "null" + ] + }, + "tag": { + "description": "Docker image tag for the index-gateway image. Overrides `loki.image.tag`", + "type": [ + "string", + "null" + ] + } + } + }, + "initContainers": { + "description": "Init containers to add to the index-gateway pods", + "type": [ + "string", + "array", + "null" + ] + }, + "joinMemberlist": { + "description": "Whether the index gateway should join the memberlist hashring", + "type": "boolean" + }, + "kind": { + "description": "Kind of index-gateway deployment. StatefulSet and Deployment are supported.", + "type": "string" + }, + "labels": { + "description": "Labels for index-gateway", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "lifecycle": { + "description": "Lifecycle for the index-gateway container", + "type": "object" + }, + "maxUnavailable": { + "description": "Pod Disruption Budget maxUnavailable", + "deprecated": true, + "type": [ + "string", + "integer", + "null" + ] + }, + "nodeSelector": { + "description": "Node selector for index-gateway pods", + "type": "object", + "additionalProperties": true + }, + "persistence": { + "type": "object", + "properties": { + "accessModes": { + "description": "Set access modes on the PersistentVolumeClaim", + "type": "array", + "items": { + "type": "string" + } + }, + "annotations": { + "description": "Annotations for index gateway PVCs", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "dataVolumeParameters": { + "description": "Parameters used for the `data` volume when volumeClaimEnabled if false", + "type": "object", + "additionalProperties": true + }, + "enableStatefulSetAutoDeletePVC": { + "description": "Enable StatefulSetAutoDeletePVC feature", + "type": "boolean" + }, + "enabled": { + "description": "Enable creating PVCs which is required when using boltdb-shipper", + "type": "boolean" + }, + "labels": { + "description": "Labels for index gateway PVCs", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "size": { + "description": "Size of persistent disk", + "type": "string" + }, + "storageClass": { + "description": "Storage class to be used. If defined, storageClassName: \u003cstorageClass\u003e. If set to \"-\", storageClassName: \"\", which disables dynamic provisioning. If empty or set to null, no storageClassName spec is set, choosing the default provisioner (gp2 on AWS, standard on GKE, AWS, and OpenStack).", + "type": [ + "string", + "null" + ] + }, + "volumeAttributesClassName": { + "description": "Volume attributes class name to be used. If empty or set to null, no volumeAttributesClassName spec is set. Requires Kubernetes 1.31", + "type": [ + "string", + "null" + ] + }, + "whenDeleted": { + "type": "string" + }, + "whenScaled": { + "type": "string" + } + } + }, + "podAnnotations": { + "description": "Annotations for index-gateway pods", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "podDisruptionBudget": { + "type": "object", + "properties": { + "annotations": { + "description": "Annotations for Pod Disruption Budget", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "enabled": { + "description": "Enable Pod Disruption Budget", + "type": "boolean" + }, + "labels": { + "description": "Labels for Pod Disruption Budget", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "maxUnavailable": { + "description": "Pod Disruption Budget maxUnavailable", + "type": [ + "string", + "integer", + "null" + ] + }, + "minAvailable": { + "description": "Pod Disruption Budget minAvailable", + "type": [ + "string", + "integer", + "null" + ] + }, + "unhealthyPodEvictionPolicy": { + "description": "Pod Disruption Budget unhealthyPodEvictionPolicy", + "type": [ + "string", + "null" + ] + } + } + }, + "podLabels": { + "description": "Labels for index-gateway pods", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "priorityClassName": { + "description": "The name of the PriorityClass for index-gateway pods", + "type": [ + "string", + "null" + ] + }, + "replicas": { + "description": "Number of replicas for the index-gateway. Set to null to omit spec.replicas from the workload, allowing an external controller (e.g. HPA, KEDA, rollout-operator) to manage replica counts without Helm resetting them.", + "type": [ + "integer", + "null" + ] + }, + "resizePolicy": { + "description": "Container resize policy for the index-gateway Example: resizePolicy: - resourceName: cpu restartPolicy: NotRequired - resourceName: memory restartPolicy: RestartContainer", + "type": "array" + }, + "resources": { + "description": "Resource requests and limits for the index-gateway", + "type": "object", + "additionalProperties": true + }, + "service": { + "type": "object", + "properties": { + "annotations": { + "description": "Annotations for index-gateway Service", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "appProtocol": { + "description": "Adds the appProtocol field to the index-gateway service. This allows index-gateway to work with istio protocol selection.", + "type": "object", + "properties": { + "grpc": { + "description": "Set the optional grpc service protocol. Ex: \"grpc\", \"http2\" or \"https\"", + "type": "string" + } + } + }, + "ipFamilies": { + "description": "ipFamilies for index-gateway Service Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services", + "type": "array" + }, + "ipFamilyPolicy": { + "description": "ipFamilyPolicy for index-gateway Service Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services", + "type": "string" + }, + "labels": { + "description": "Additional labels for index-gateway Service", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "sessionAffinity": { + "description": "Session affinity for index-gateway Service", + "type": "string" + }, + "sessionAffinityConfig": { + "description": "Session affinity config for index-gateway Service", + "type": "object", + "additionalProperties": true + }, + "trafficDistribution": { + "description": "trafficDistribution for index-gateway Service", + "type": "string" + }, + "type": { + "description": "Service Type for index-gateway Service", + "type": "string" + } + } + }, + "serviceAccount": { + "type": "object", + "properties": { + "annotations": { + "description": "Annotations for the service account", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "automountServiceAccountToken": { + "description": "Set this toggle to false to opt out of automounting API credentials for the service account", + "type": "boolean" + }, + "create": { + "description": "Specifies whether a ServiceAccount should be created", + "type": "boolean" + }, + "imagePullSecrets": { + "description": "Image pull secrets for the service account", + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + } + } + } + }, + "labels": { + "description": "Labels for the service account", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "name": { + "description": "The name of the ServiceAccount to use. If not set and create is true, a name is generated using the fullname template", + "type": [ + "string", + "null" + ] + } + } + }, + "serviceAnnotations": { + "description": "Annotations for index-gateway service", + "deprecated": true, + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "serviceLabels": { + "description": "Labels for index-gateway service", + "deprecated": true, + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "serviceType": { + "description": "Service type for index-gateway service", + "deprecated": true, + "type": "string" + }, + "statefulSetRecreateJob": { + "description": "EXPERIMENTAL: Enable creating a Job to recreate the compactor StatefulSet when the compactor configuration is changed. # Only applicable if `compactor.kind` is StatefulSet. Useful for PVC size changes, which require recreating the StatefulSet.", + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + } + } + }, + "strategy": { + "description": "UpdateStrategy for the index-gateway workload.", + "type": "object", + "additionalProperties": true + }, + "terminationGracePeriodSeconds": { + "description": "Grace period to allow the index-gateway to shutdown before it is killed.", + "type": "integer" + }, + "tolerations": { + "type": "array" + }, + "topologySpreadConstraints": { + "description": "Topology Spread Constraints for index-gateway pods The value will be passed through tpl.", + "type": "array", + "items": { + "type": "object" + } + }, + "trafficDistribution": { + "description": "trafficDistribution for index-gateway service", + "type": "string" + } + } + }, + "ingester": { + "description": "Configuration for the ingester", + "type": "object", + "properties": { + "addIngesterNamePrefix": { + "type": "boolean" + }, + "affinity": { + "description": "Affinity for ingester pods. Ignored if zoneAwareReplication is enabled. The value will be passed through tpl.", + "type": [ + "object", + "null" + ], + "additionalProperties": true + }, + "annotations": { + "description": "Annotations for ingester", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "appProtocol": { + "description": "Adds the appProtocol field to the ingester service. This allows ingester to work with istio protocol selection.", + "deprecated": true, + "type": "object", + "properties": { + "grpc": { + "description": "Set the optional grpc service protocol. Ex: \"grpc\", \"http2\" or \"https\"", + "deprecated": true, + "type": "string" + } + }, + "additionalProperties": true + }, + "autoscaling": { + "type": "object", + "properties": { + "behavior": { + "description": "HPA behavior configuration, passed directly as a K8s HPA behavior object.", + "type": "object", + "additionalProperties": true + }, + "customMetrics": { + "description": "Allows one to define custom metrics using the HPA/v2 schema (for example, Pods, Object or External metrics)", + "type": "array" + }, + "enabled": { + "description": "Enable autoscaling for the ingester", + "type": "boolean" + }, + "maxReplicas": { + "description": "Maximum autoscaling replicas for the ingester", + "type": "integer" + }, + "minReplicas": { + "description": "Minimum autoscaling replicas for the ingester", + "type": "integer" + }, + "targetCPUUtilizationPercentage": { + "description": "Target CPU utilisation percentage for the ingester", + "type": [ + "integer", + "null" + ] + }, + "targetMemoryUtilizationPercentage": { + "description": "Target memory utilisation percentage for the ingester", + "type": [ + "integer", + "null" + ] + } + } + }, + "command": { + "description": "Command to execute instead of defined in Docker image", + "type": [ + "string", + "null" + ] + }, + "dnsConfig": { + "description": "DNSConfig for ingester pods", + "type": "object", + "additionalProperties": true + }, + "enabled": { + "description": "Enable the component. Requires `loki.deploymentMode` to be set to `Distributed`.", + "type": "boolean" + }, + "extraArgs": { + "description": "Additional CLI args for the ingester", + "type": "array" + }, + "extraContainers": { + "description": "Containers to add to the ingester pods", + "type": [ + "string", + "array", + "null" + ] + }, + "extraEnv": { + "description": "Environment variables to add to the ingester pods", + "type": "array" + }, + "extraEnvFrom": { + "description": "Environment variables from secrets or configmaps to add to the ingester pods", + "type": "array" + }, + "extraVolumeMounts": { + "description": "Volume mounts to add to the ingester pods", + "type": "array" + }, + "extraVolumes": { + "description": "Volumes to add to the ingester pods", + "type": "array" + }, + "hostAliases": { + "description": "hostAliases to add", + "type": "array" + }, + "hostUsers": { + "description": "Use the host's user namespace in the ingester", + "type": [ + "boolean", + "null" + ] + }, + "image": { + "type": "object", + "properties": { + "registry": { + "description": "The Docker registry for the ingester image. Overrides `loki.image.registry`", + "type": [ + "string", + "null" + ] + }, + "repository": { + "description": "Docker image repository for the ingester image. Overrides `loki.image.repository`", + "type": [ + "string", + "null" + ] + }, + "tag": { + "description": "Docker image tag for the ingester image. Overrides `loki.image.tag`", + "type": [ + "string", + "null" + ] + } + } + }, + "initContainers": { + "description": "Init containers to add to the ingester pods", + "type": [ + "string", + "array", + "null" + ] + }, + "kedaAutoscaling": { + "type": "object", + "properties": { + "behavior": { + "description": "Behavior configuration for KEDA ScaledObject (horizontalPodAutoscalerConfig.behavior). Ref: https://keda.sh/docs/latest/reference/scaledobject-spec/#advanced", + "type": "object", + "additionalProperties": true + }, + "cooldownPeriod": { + "description": "Period to wait after the last trigger reported active before scaling the resource back to 0 (seconds). Defaults to defaults.kedaAutoscaling.cooldownPeriod if not set.", + "type": [ + "integer", + "null" + ] + }, + "enabled": { + "description": "Enable KEDA autoscaling for the ingester. Mutually exclusive with autoscaling.enabled", + "type": "boolean" + }, + "fallback": { + "description": "Fallback configuration for KEDA ScaledObject. Applied when the trigger metric cannot be retrieved. Ref: https://keda.sh/docs/latest/reference/scaledobject-spec/#fallback", + "type": "object", + "additionalProperties": true + }, + "maxReplicas": { + "description": "Maximum replicas for KEDA autoscaling", + "type": "integer" + }, + "minReplicas": { + "description": "Minimum replicas for KEDA autoscaling", + "type": "integer" + }, + "pollingInterval": { + "description": "Interval (seconds) to poll each trigger. Defaults to defaults.kedaAutoscaling.pollingInterval if not set.", + "type": [ + "integer", + "null" + ] + }, + "triggers": { + "description": "KEDA triggers for the ingester. Ref: https://keda.sh/docs/latest/scalers/", + "type": "array" + } + } + }, + "kind": { + "description": "Kind of compactor deployment. StatefulSet and Deployment are supported.", + "type": "string" + }, + "labels": { + "description": "Labels for ingester", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "lifecycle": { + "description": "Lifecycle for the ingester container", + "type": "object" + }, + "livenessProbe": { + "description": "liveness probe settings for ingester pods. If empty use `loki.livenessProbe`", + "type": "object", + "additionalProperties": true + }, + "maxUnavailable": { + "description": "Pod Disruption Budget maxUnavailable", + "deprecated": true, + "type": [ + "string", + "integer", + "null" + ] + }, + "nodeSelector": { + "description": "Node selector for ingester pods", + "type": "object", + "additionalProperties": true + }, + "persistence": { + "type": "object", + "properties": { + "claims": { + "description": "List of the ingester PVCs", + "type": "array", + "items": { + "type": "object", + "properties": { + "accessModes": { + "description": "Set access modes on the PersistentVolumeClaim", + "type": "array", + "items": { + "type": "string" + } + }, + "name": { + "type": "string" + }, + "size": { + "type": "string" + }, + "storageClass": { + "description": "Storage class to be used. If defined, storageClassName: \u003cstorageClass\u003e. If set to \"-\", storageClassName: \"\", which disables dynamic provisioning. If empty or set to null, no storageClassName spec is set, choosing the default provisioner (gp2 on AWS, standard on GKE, AWS, and OpenStack).", + "type": [ + "string", + "null" + ] + }, + "volumeAttributesClassName": { + "description": "Volume attributes class name to be used. If empty or set to null, no volumeAttributesClassName spec is set. Requires Kubernetes 1.31", + "type": [ + "string", + "null" + ] + } + } + } + }, + "enableStatefulSetAutoDeletePVC": { + "description": "Enable StatefulSetAutoDeletePVC feature", + "type": "boolean" + }, + "enabled": { + "description": "Enable creating PVCs which is required when using boltdb-shipper", + "type": "boolean" + }, + "inMemory": { + "description": "Use emptyDir with ramdisk for storage. **Please note that all data in ingester will be lost on pod restart**", + "type": "boolean" + }, + "whenDeleted": { + "type": "string" + }, + "whenScaled": { + "type": "string" + } + } + }, + "podAnnotations": { + "description": "Annotations for ingester pods", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "podDisruptionBudget": { + "type": "object", + "properties": { + "annotations": { + "description": "Annotations for Pod Disruption Budget", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "enabled": { + "description": "Enable Pod Disruption Budget", + "type": "boolean" + }, + "labels": { + "description": "Labels for Pod Disruption Budget", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "maxUnavailable": { + "description": "Pod Disruption Budget maxUnavailable", + "type": [ + "string", + "integer", + "null" + ] + }, + "minAvailable": { + "description": "Pod Disruption Budget minAvailable", + "type": [ + "string", + "integer", + "null" + ] + }, + "unhealthyPodEvictionPolicy": { + "description": "Pod Disruption Budget unhealthyPodEvictionPolicy", + "type": [ + "string", + "null" + ] + } + } + }, + "podLabels": { + "description": "Labels for ingester pods", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "podManagementPolicy": { + "description": "PodManagementPolicy for the ingester StatefulSet. Only applicable if `compactor.kind` is StatefulSet. # OrderedReady and Parallel are supported.", + "type": "string" + }, + "priorityClassName": { + "description": "The name of the PriorityClass for ingester pods", + "type": [ + "string", + "null" + ] + }, + "readinessProbe": { + "description": "readiness probe settings for ingester pods. If empty, use `loki.readinessProbe`", + "type": "object", + "additionalProperties": true + }, + "replicas": { + "description": "Number of replicas for the ingester, when zoneAwareReplication.enabled is true, the total number of replicas will match this value with each zone having 1/3rd of the total replicas. Set to null to omit spec.replicas from the StatefulSet, allowing an external controller (e.g. HPA, KEDA, rollout-operator) to manage replica counts without Helm resetting them.", + "type": [ + "integer", + "null" + ] + }, + "resizePolicy": { + "description": "Container resize policy for the ingester Example: resizePolicy: - resourceName: cpu restartPolicy: NotRequired - resourceName: memory restartPolicy: RestartContainer", + "type": "array" + }, + "resources": { + "description": "Resource requests and limits for the ingester", + "type": "object", + "additionalProperties": true + }, + "rolloutGroupPrefix": { + "type": [ + "string", + "null" + ] + }, + "service": { + "type": "object", + "properties": { + "annotations": { + "description": "Annotations for ingester Service", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "appProtocol": { + "description": "Adds the appProtocol field to the ingester service. This allows ingester to work with istio protocol selection.", + "type": "object", + "properties": { + "grpc": { + "description": "Set the optional grpc service protocol. Ex: \"grpc\", \"http2\" or \"https\"", + "type": "string" + } + } + }, + "ipFamilies": { + "description": "ipFamilies for ingester Service Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services", + "type": "array" + }, + "ipFamilyPolicy": { + "description": "ipFamilyPolicy for ingester Service Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services", + "type": "string" + }, + "labels": { + "description": "Additional labels for ingester Service", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "sessionAffinity": { + "description": "Session affinity for ingester Service", + "type": "string" + }, + "sessionAffinityConfig": { + "description": "Session affinity config for ingester Service", + "type": "object", + "additionalProperties": true + }, + "trafficDistribution": { + "description": "trafficDistribution for ingester Service", + "type": "string" + }, + "type": { + "description": "Service Type for ingester Service", + "type": "string" + } + } + }, + "serviceAccount": { + "type": "object", + "properties": { + "annotations": { + "description": "Annotations for the service account", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "automountServiceAccountToken": { + "description": "Set this toggle to false to opt out of automounting API credentials for the service account", + "type": "boolean" + }, + "create": { + "description": "Specifies whether a ServiceAccount should be created", + "type": "boolean" + }, + "imagePullSecrets": { + "description": "Image pull secrets for the service account", + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + } + } + } + }, + "labels": { + "description": "Labels for the service account", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "name": { + "description": "The name of the ServiceAccount to use. If not set and create is true, a name is generated using the fullname template", + "type": [ + "string", + "null" + ] + } + } + }, + "serviceAnnotations": { + "description": "Annotations for ingester service", + "deprecated": true, + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "serviceLabels": { + "description": "Labels for ingester service", + "deprecated": true, + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "serviceType": { + "description": "Service type for ingester service", + "deprecated": true, + "type": "string" + }, + "startupProbe": { + "description": "startup probe settings for ingester pods. If empty use `loki.startupProbe`", + "type": "object", + "additionalProperties": true + }, + "statefulSetRecreateJob": { + "description": "EXPERIMENTAL: Enable creating a Job to recreate the ingester StatefulSet # Only applicable if `ingester.kind` is StatefulSet. Useful for PVC size changes, which require recreating the StatefulSet.", + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + } + } + }, + "strategy": { + "description": "UpdateStrategy or Strategy for the ingester.", + "type": "object", + "additionalProperties": true + }, + "terminationGracePeriodSeconds": { + "description": "Grace period to allow the ingester to shutdown before it is killed. Especially for the ingestor, this must be increased. It must be long enough so ingesters can be gracefully shutdown flushing/transferring all data and to successfully leave the member ring on shutdown.", + "type": "integer" + }, + "tolerations": { + "description": "Tolerations for ingester pods", + "type": "array" + }, + "topologySpreadConstraints": { + "description": "topologySpread for ingester pods. The value will be passed through tpl.", + "type": "array", + "items": { + "type": "object", + "properties": { + "labelSelector": { + "type": "object", + "properties": { + "matchLabels": { + "type": "object", + "properties": { + "app.kubernetes.io/component": { + "type": "string" + }, + "app.kubernetes.io/instance": { + "type": "string" + }, + "app.kubernetes.io/name": { + "type": "string" + } + } + } + } + }, + "maxSkew": { + "type": "integer" + }, + "topologyKey": { + "type": "string" + }, + "whenUnsatisfiable": { + "type": "string" + } + } + } + }, + "trafficDistribution": { + "description": "trafficDistribution for ingester service", + "type": "string" + }, + "updateStrategy": { + "description": "UpdateStrategy for the ingester StatefulSets.", + "type": "object", + "additionalProperties": true + }, + "zoneAwareReplication": { + "description": "Enabling zone awareness on ingesters will create 3 statefulests where all writes will send a replica to each zone. This is primarily intended to accelerate rollout operations by allowing for multiple ingesters within a single zone to be shutdown and restart simultaneously (the remaining 2 zones will be guaranteed to have at least one copy of the data). Note: This can be used to run Loki over multiple cloud provider availability zones however this is not currently recommended as Loki is not optimized for this and cross zone network traffic costs can become extremely high extremely quickly. Even with zone awareness enabled, it is recommended to run Loki in a single availability zone.", + "type": "object", + "properties": { + "enabled": { + "description": "Enable zone awareness.", + "type": "boolean" + }, + "maxUnavailablePct": { + "description": "The percent of replicas in each zone that will be restarted at once. In a value of 0-100", + "type": "integer" + }, + "migration": { + "description": "The migration block allows migrating non zone aware ingesters to zone aware ingesters.", + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "excludeDefaultZone": { + "type": "boolean" + }, + "readPath": { + "type": "boolean" + }, + "writePath": { + "type": "boolean" + } + } + }, + "zoneA": { + "description": "zoneA configuration", + "type": "object", + "properties": { + "annotations": { + "description": "Specific annotations to add to zone A statefulset", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "extraAffinity": { + "description": "optionally define extra affinity rules, by default different zones are not allowed to schedule on the same host The value will be passed through tpl.", + "type": "object" + }, + "nodeSelector": { + "description": "optionally define a node selector for this zone", + "type": [ + "object", + "null" + ], + "additionalProperties": true + }, + "persistence": { + "description": "Persistence overrides applied only to the zone A StatefulSet.", + "type": "object", + "properties": { + "storageClass": { + "description": "Storage class to use for every PVC in zone A. Overrides the `storageClass` of each entry in `ingester.persistence.claims` for this zone only. Use this when you have one StorageClass per availability zone (for example a topology-pinned EBS/PD StorageClass). If null, the claim-level `storageClass` is used as before, preserving existing behavior. If set to \"-\", `storageClassName: \"\"` is rendered, which disables dynamic provisioning.", + "type": [ + "string", + "null" + ] + } + } + }, + "podAnnotations": { + "description": "Specific annotations to add to zone A pods", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "zoneB": { + "type": "object", + "properties": { + "annotations": { + "description": "Specific annotations to add to zone B statefulset", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "extraAffinity": { + "description": "optionally define extra affinity rules, by default different zones are not allowed to schedule on the same host The value will be passed through tpl.", + "type": "object" + }, + "nodeSelector": { + "description": "optionally define a node selector for this zone", + "type": [ + "object", + "null" + ], + "additionalProperties": true + }, + "persistence": { + "description": "Persistence overrides applied only to the zone B StatefulSet.", + "type": "object", + "properties": { + "storageClass": { + "description": "Storage class to use for every PVC in zone B. See `ingester.zoneAwareReplication.zoneA.persistence.storageClass` for details. If null, the claim-level `storageClass` is used as before.", + "type": [ + "string", + "null" + ] + } + } + }, + "podAnnotations": { + "description": "Specific annotations to add to zone B pods", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "zoneC": { + "type": "object", + "properties": { + "annotations": { + "description": "Specific annotations to add to zone C statefulset", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "extraAffinity": { + "description": "optionally define extra affinity rules, by default different zones are not allowed to schedule on the same host The value will be passed through tpl.", + "type": "object" + }, + "nodeSelector": { + "description": "optionally define a node selector for this zone", + "type": [ + "object", + "null" + ], + "additionalProperties": true + }, + "persistence": { + "description": "Persistence overrides applied only to the zone C StatefulSet.", + "type": "object", + "properties": { + "storageClass": { + "description": "Storage class to use for every PVC in zone C. See `ingester.zoneAwareReplication.zoneA.persistence.storageClass` for details. If null, the claim-level `storageClass` is used as before.", + "type": [ + "string", + "null" + ] + } + } + }, + "podAnnotations": { + "description": "Specific annotations to add to zone C pods", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + } + } + }, + "ingress": { + "description": "Ingress configuration Use either this ingress or the gateway, but not both at once. If you enable this, make sure to disable the gateway. You'll need to supply authn configuration for your ingress controller.", + "type": "object", + "properties": { + "annotations": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "enabled": { + "type": "boolean" + }, + "hosts": { + "description": "Hosts configuration for the ingress, passed through the `tpl` function to allow templating", + "type": "array", + "items": { + "type": "string" + } + }, + "ingressClassName": { + "type": "string" + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "paths": { + "type": "object", + "properties": { + "compactor": { + "description": "Paths that are exposed by Loki Compactor. If deployment mode is Distributed, the requests are forwarded to the service. If deployment mode is SimpleScalable, the requests are forwarded to k8s service. If deployment mode is SingleBinary, the requests are forwarded to the central/single k8s service`", + "type": "array", + "items": { + "type": "string" + } + }, + "distributor": { + "description": "Paths that are exposed by Loki Distributor. If deployment mode is Distributed, the requests are forwarded to the service:. If deployment mode is SimpleScalable, the requests are forwarded to write k8s service:. If deployment mode is SingleBinary, the requests are forwarded to the central/single k8s service:", + "type": "array", + "items": { + "type": "string" + } + }, + "queryFrontend": { + "description": "Paths that are exposed by Loki Query Frontend. If deployment mode is Distributed, the requests are forwarded to the service. If deployment mode is SimpleScalable, the requests are forwarded to write k8s service`. If deployment mode is SingleBinary, the requests are forwarded to the central/single k8s service`", + "type": "array", + "items": { + "type": "string" + } + }, + "ruler": { + "description": "Paths that are exposed by Loki Ruler. If deployment mode is Distributed, the requests are forwarded to the service. If deployment mode is SimpleScalable, the requests are forwarded to k8s service. If deployment mode is SingleBinary, the requests are forwarded to the central/single k8s service", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "tls": { + "description": "TLS configuration for the ingress. Hosts passed through the `tpl` function to allow templating", + "type": "array" + } + } + }, + "kubeVersionOverride": { + "description": "Overrides the version used to determine compatibility of resources with the target Kubernetes cluster. This is useful when using `helm template`, because then helm will use the client version of kubectl as the Kubernetes version, which may or may not match your cluster's server version. Example: 'v1.24.4'. Set to null to use the version that helm devises.", + "type": "string" + }, + "loki": { + "description": "Configuration for running Loki", + "type": "object", + "properties": { + "analytics": { + "description": "Optional analytics configuration", + "type": "object", + "additionalProperties": true + }, + "annotations": { + "description": "Common annotations for all deployments/StatefulSets", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "auth_enabled": { + "type": "boolean" + }, + "block_builder": { + "description": "Optional block builder configuration", + "type": "object", + "additionalProperties": true + }, + "bloom_build": { + "type": "object", + "additionalProperties": true + }, + "bloom_gateway": { + "type": "object", + "additionalProperties": true + }, + "commonConfig": { + "description": "Check https://grafana.com/docs/loki/latest/configuration/#common_config for more info on how to provide a common configuration", + "type": "object", + "additionalProperties": true + }, + "compactor": { + "description": "Optional compactor configuration", + "type": "object", + "additionalProperties": true + }, + "compactor_grpc_client": { + "description": "Optional compactor grpc client configuration", + "type": "object", + "additionalProperties": true + }, + "config": { + "description": "Config file contents for Loki", + "type": "string" + }, + "configObjectName": { + "description": "The name of the object which Loki will mount as a volume containing the config. If the configStorageType is Secret, this will be the name of the Secret, if it is ConfigMap, this will be the name of the ConfigMap. The value will be passed through tpl.", + "type": "string" + }, + "configStorageType": { + "description": "Defines what kind of object stores the configuration, a ConfigMap or a Secret. In order to move sensitive information (such as credentials) from the ConfigMap/Secret to a more secure location (e.g. vault), it is possible to use [environment variables in the configuration](https://grafana.com/docs/loki/latest/configuration/#use-environment-variables-in-the-configuration). Such environment variables can be then stored in a separate Secret and injected via the global.extraEnvFrom value. For details about environment injection from a Secret please see [Secrets](https://kubernetes.io/docs/concepts/configuration/secret/#use-case-as-container-environment-variables).", + "type": "string" + }, + "containerSecurityContext": { + "description": "The SecurityContext for Loki containers", + "type": "object", + "additionalProperties": true + }, + "distributor": { + "description": "Optional distributor configuration", + "type": "object", + "additionalProperties": true + }, + "dnsConfig": { + "description": "DNS config for Loki pods", + "type": "object", + "additionalProperties": true + }, + "enableServiceLinks": { + "description": "Should enableServiceLinks be enabled. Default to enable", + "type": "boolean" + }, + "extraMemberlistConfig": { + "description": "Extra memberlist configuration", + "type": "object", + "additionalProperties": true + }, + "frontend": { + "type": "object", + "additionalProperties": true + }, + "frontend_worker": { + "type": "object", + "additionalProperties": true + }, + "generatedConfigObjectName": { + "description": "The name of the Secret or ConfigMap that will be created by this chart. If empty, no configmap or secret will be created. The value will be passed through tpl.", + "type": "string" + }, + "image": { + "type": "object", + "properties": { + "digest": { + "description": "Overrides the image tag with an image digest", + "type": [ + "string", + "null" + ] + }, + "pullPolicy": { + "description": "Docker image pull policy", + "type": "string" + }, + "registry": { + "description": "The Docker registry", + "type": "string" + }, + "repository": { + "description": "Docker image repository", + "type": "string" + }, + "tag": { + "description": "Overrides the image tag whose default is the chart's appVersion", + "type": [ + "string", + "null" + ] + } + } + }, + "index_gateway": { + "description": "Optional index gateway configuration", + "type": "object", + "additionalProperties": true + }, + "ingester": { + "description": "Optional ingester configuration", + "type": "object", + "additionalProperties": true + }, + "ingester_client": { + "description": "Optional ingester client configuration", + "type": "object", + "additionalProperties": true + }, + "limits_config": { + "description": "Limits config", + "type": "object", + "additionalProperties": true + }, + "livenessProbe": { + "type": "object", + "additionalProperties": true + }, + "memberlistConfig": { + "description": "memberlist configuration (overrides embedded default)", + "type": "object", + "additionalProperties": true + }, + "operational_config": { + "description": "Optional operational configuration", + "type": "object", + "additionalProperties": true + }, + "pattern_ingester": { + "description": "Optional pattern ingester configuration", + "type": "object", + "additionalProperties": true + }, + "podAnnotations": { + "description": "Common annotations for all pods", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "podLabels": { + "description": "Common labels for all pods", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "podSecurityContext": { + "description": "The SecurityContext for Loki pods", + "type": "object", + "additionalProperties": true + }, + "querier": { + "description": "Optional querier configuration", + "type": "object", + "additionalProperties": true + }, + "query_range": { + "description": "Optional querier configuration", + "type": "object", + "additionalProperties": true + }, + "query_scheduler": { + "description": "Additional query scheduler config", + "type": "object", + "additionalProperties": true + }, + "readinessProbe": { + "type": "object", + "additionalProperties": true + }, + "revisionHistoryLimit": { + "description": "The number of old ReplicaSets to retain to allow rollback", + "type": "integer" + }, + "rulerConfig": { + "description": "Check https://grafana.com/docs/loki/latest/configuration/#ruler for more info on configuring ruler", + "type": "object", + "additionalProperties": true + }, + "runtimeConfig": { + "description": "Provides a reloadable runtime configuration file for some specific configuration", + "type": "object" + }, + "schemaConfig": { + "description": "Check https://grafana.com/docs/loki/latest/configuration/#schema_config for more info on how to configure schemas", + "type": "object" + }, + "server": { + "description": "Check https://grafana.com/docs/loki/latest/configuration/#server for more info on the server configuration.", + "type": "object", + "additionalProperties": true + }, + "service": { + "type": "object", + "properties": { + "ipFamilies": { + "description": "ipFamilies for all services Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services", + "type": "array" + }, + "ipFamilyPolicy": { + "description": "ipFamilyPolicy for all services Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services", + "type": "string" + }, + "trafficDistribution": { + "description": "trafficDistribution for services Ref: https://kubernetes.io/docs/concepts/services-networking/service/#traffic-distribution", + "type": "string" + } + } + }, + "serviceAnnotations": { + "description": "Common annotations for all services", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "serviceLabels": { + "description": "Common labels for all services", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "startupProbe": { + "type": "object", + "additionalProperties": true + }, + "storage": { + "description": "Storage config. Providing this will automatically populate all necessary storage configs in the templated config.", + "type": "object", + "additionalProperties": true + }, + "storage_config": { + "description": "Additional storage config", + "type": "object", + "additionalProperties": true + }, + "structuredConfig": { + "description": "Structured loki configuration, takes precedence over `loki.config`, `loki.schemaConfig`, `loki.storageConfig`", + "type": "object", + "additionalProperties": true + }, + "tenants": { + "description": "Tenants list to be created on nginx htpasswd file, with name and password or passwordHash keys\u003cbr\u003e\u003cbr\u003e Example: \u003cpre\u003e tenants:\u003cbr\u003e - name: \"test-user-1\"\u003cbr\u003e password: \"test-password-1\"\u003cbr\u003e - name: \"test-user-2\"\u003cbr\u003e passwordHash: \"$2y$10$7O40CaY1yz7fu9O24k2/u.ct/wELYHRBsn25v/7AyuQ8E8hrLqpva\" # generated using `htpasswd -nbBC10 test-user-2 test-password-2` \u003c/pre\u003e", + "type": "array" + }, + "testSchemaConfig": { + "type": "object", + "additionalProperties": true + }, + "tracing": { + "description": "Enable tracing", + "type": "object", + "additionalProperties": true + }, + "ui": { + "description": "Optional Loki UI: Provides access to a operators UI for Loki distributed. When enabled UI will be available at /ui/ of loki-gateway", + "type": "object", + "additionalProperties": true + }, + "useTestSchema": { + "description": "a real Loki install requires a proper schemaConfig defined above this, however for testing or playing around you can enable useTestSchema", + "type": "boolean" + } + } + }, + "lokiCanary": { + "type": "object", + "properties": { + "affinity": { + "description": "Affinity for canary pods", + "type": [ + "object", + "null" + ], + "additionalProperties": true + }, + "annotations": { + "description": "Additional annotations for the `loki-canary` Daemonset", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "automountServiceAccountToken": { + "description": "Set this toggle to false to opt out of automounting API credentials for the service account", + "type": "boolean" + }, + "containerSecurityContext": { + "description": "The SecurityContext for loki-canary containers", + "type": "object", + "additionalProperties": true + }, + "dnsConfig": { + "description": "DNS config for canary pods", + "type": "object", + "additionalProperties": true + }, + "enabled": { + "type": "boolean" + }, + "extraArgs": { + "description": "Additional CLI arguments for the 'loki-canary' command", + "type": "array" + }, + "extraEnv": { + "description": "Environment variables to add to the canary pods", + "type": "array" + }, + "extraEnvFrom": { + "description": "Environment variables from secrets or configmaps to add to the canary pods", + "type": "array" + }, + "extraVolumeMounts": { + "description": "Volume mounts to add to the canary pods", + "type": "array" + }, + "extraVolumes": { + "description": "Volumes to add to the canary pods", + "type": "array" + }, + "hostUsers": { + "description": "Use the host's user namespace in loki-canary pods", + "type": [ + "boolean", + "null" + ] + }, + "image": { + "description": "Image to use for loki canary", + "type": "object", + "properties": { + "digest": { + "description": "Overrides the image tag with an image digest", + "type": [ + "string", + "null" + ] + }, + "pullPolicy": { + "description": "Docker image pull policy", + "type": "string" + }, + "registry": { + "description": "The Docker registry", + "type": "string" + }, + "repository": { + "description": "Docker image repository", + "type": "string" + }, + "tag": { + "description": "Overrides the image tag whose default is the chart's appVersion", + "type": [ + "string", + "null" + ] + } + } + }, + "kind": { + "description": "The type of the loki canary k8s rollout. This can be a DaemonSet or Deployment.", + "type": "string" + }, + "labelname": { + "description": "The name of the label to look for at loki when doing the checks.", + "type": "string" + }, + "labels": { + "description": "Additional labels for the `loki-canary` Daemonset", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "livenessProbe": { + "description": "Liveness probe", + "type": "object", + "additionalProperties": true + }, + "lokiurl": { + "description": "If set overwrites the default value set by loki.host helper function. Use this if gateway not enabled.", + "type": [ + "string", + "null" + ] + }, + "nodeSelector": { + "description": "Node selector for canary pods", + "type": "object", + "additionalProperties": true + }, + "podAnnotations": { + "description": "Additional annotations for each `loki-canary` pod", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "podDisruptionBudget": { + "type": "object", + "properties": { + "annotations": { + "description": "Annotations for Pod Disruption Budget", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "enabled": { + "description": "Enable Pod Disruption Budget", + "type": "boolean" + }, + "labels": { + "description": "Labels for Pod Disruption Budget", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "maxUnavailable": { + "description": "Pod Disruption Budget maxUnavailable", + "type": [ + "string", + "integer", + "null" + ] + }, + "minAvailable": { + "description": "Pod Disruption Budget minAvailable", + "type": [ + "string", + "integer", + "null" + ] + }, + "unhealthyPodEvictionPolicy": { + "description": "Pod Disruption Budget unhealthyPodEvictionPolicy", + "type": [ + "string", + "null" + ] + } + } + }, + "podLabels": { + "description": "Additional labels for each `loki-canary` pod", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "podSecurityContext": { + "description": "The SecurityContext for loki-canary pods", + "type": "object", + "additionalProperties": true + }, + "priorityClassName": { + "description": "The name of the PriorityClass for loki-canary pods", + "type": [ + "string", + "null" + ] + }, + "push": { + "description": "If true, the canary will send directly to Loki via the address configured for verification --", + "type": "boolean" + }, + "readinessProbe": { + "description": "Readiness probe", + "type": "object", + "additionalProperties": true + }, + "replicas": { + "description": "Replicas for `loki-canary` when using a Deployment", + "type": "integer" + }, + "resizePolicy": { + "description": "Container resize policy for the canary Example: resizePolicy: - resourceName: cpu restartPolicy: NotRequired - resourceName: memory restartPolicy: RestartContainer", + "type": "array" + }, + "resources": { + "description": "Resource requests and limits for the canary", + "type": "object", + "additionalProperties": true + }, + "revisionHistoryLimit": { + "description": "The number of old ReplicaSets to retain to allow rollback", + "type": "integer" + }, + "service": { + "type": "object", + "properties": { + "annotations": { + "description": "Annotations for loki-canary Service", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "labels": { + "description": "Additional labels for loki-canary Service", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "serviceAccount": { + "type": "object", + "properties": { + "annotations": { + "description": "Annotations for the service account", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "automountServiceAccountToken": { + "description": "Set this toggle to false to opt out of automounting API credentials for the service account", + "type": "boolean" + }, + "create": { + "description": "Specifies whether a ServiceAccount should be created", + "type": "boolean" + }, + "imagePullSecrets": { + "description": "Image pull secrets for the service account", + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + } + } + } + }, + "labels": { + "description": "Labels for the service account", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "name": { + "description": "The name of the ServiceAccount to use. If not set and create is true, a name is generated using the fullname template", + "type": [ + "string", + "null" + ] + } + } + }, + "startupProbe": { + "description": "Startup probe", + "type": "object", + "additionalProperties": true + }, + "tenant": { + "description": "Tenant to use for loki-canary", + "type": "object", + "properties": { + "name": { + "description": "Name of the tenant for loki-canary", + "type": "string" + }, + "password": { + "description": "Password of the gateway for Basic auth for loki-canary", + "type": [ + "string", + "null" + ] + } + } + }, + "tolerations": { + "description": "Tolerations for canary pods", + "type": "array" + }, + "updateStrategy": { + "description": "Update strategy for the `loki-canary` Daemonset pods", + "type": "object", + "additionalProperties": true + } + } + }, + "memberlist": { + "type": "object", + "properties": { + "service": { + "type": "object", + "properties": { + "annotations": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "publishNotReadyAddresses": { + "type": "boolean" + } + } + } + } + }, + "memcached": { + "type": "object", + "properties": { + "containerSecurityContext": { + "description": "The SecurityContext for memcached containers", + "type": "object", + "additionalProperties": true + }, + "enabled": { + "description": "Enable the built in memcached server provided by the chart", + "type": "boolean" + }, + "image": { + "type": "object", + "properties": { + "pullPolicy": { + "description": "Memcached Docker image pull policy", + "type": "string" + }, + "repository": { + "description": "Memcached Docker image repository", + "type": "string" + }, + "tag": { + "description": "Memcached Docker image tag", + "type": "string" + } + } + }, + "livenessProbe": { + "description": "Liveness probe for memcached pods", + "type": "object", + "additionalProperties": true + }, + "podSecurityContext": { + "description": "The SecurityContext override for memcached pods", + "type": "object", + "additionalProperties": true + }, + "priorityClassName": { + "description": "The name of the PriorityClass for memcached pods", + "type": [ + "string", + "null" + ] + }, + "readinessProbe": { + "description": "Readiness probe for memcached pods (probe port defaults to container port)", + "type": "object", + "additionalProperties": true + }, + "serviceAccount": { + "type": "object", + "properties": { + "annotations": { + "description": "Annotations for the service account", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "automountServiceAccountToken": { + "description": "Set this toggle to false to opt out of automounting API credentials for the service account", + "type": "boolean" + }, + "create": { + "description": "Specifies whether a ServiceAccount should be created", + "type": "boolean" + }, + "imagePullSecrets": { + "description": "Image pull secrets for the service account", + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + } + } + } + }, + "labels": { + "description": "Labels for the service account", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "name": { + "description": "The name of the ServiceAccount to use. If not set and create is true, a name is generated using the fullname template", + "type": [ + "string", + "null" + ] + } + } + }, + "startupProbe": { + "description": "Startup probe for memcached pods", + "type": "object", + "additionalProperties": true + } + } + }, + "memcachedExporter": { + "type": "object", + "properties": { + "containerSecurityContext": { + "description": "The SecurityContext for memcached exporter containers", + "type": "object", + "additionalProperties": true + }, + "enabled": { + "description": "Whether memcached metrics should be exported", + "type": "boolean" + }, + "extraArgs": { + "description": "Extra args to add to the exporter container. Example: extraArgs: memcached.tls.enable: true memcached.tls.cert-file: /certs/cert.crt memcached.tls.key-file: /certs/cert.key memcached.tls.ca-file: /certs/ca.crt memcached.tls.insecure-skip-verify: false memcached.tls.server-name: memcached", + "type": "object" + }, + "image": { + "type": "object", + "properties": { + "pullPolicy": { + "type": "string" + }, + "repository": { + "type": "string" + }, + "tag": { + "type": "string" + } + } + }, + "livenessProbe": { + "description": "Liveness probe for memcached exporter", + "type": "object", + "additionalProperties": true + }, + "readinessProbe": { + "description": "Readiness probe for memcached exporter", + "type": "object", + "additionalProperties": true + }, + "resizePolicy": { + "description": "Container resize policy for the memcached exporter Example: resizePolicy: - resourceName: cpu restartPolicy: NotRequired - resourceName: memory restartPolicy: RestartContainer", + "type": "array" + }, + "resources": { + "type": "object", + "properties": { + "limits": { + "type": "object" + }, + "requests": { + "type": "object" + } + }, + "additionalProperties": true + }, + "startupProbe": { + "description": "Startup probe for memcached exporter", + "type": "object", + "additionalProperties": true + } + } + }, + "migrate": { + "description": "Options that may be necessary when performing a migration from another helm chart", + "type": "object", + "properties": { + "fromDistributed": { + "description": "When migrating from a distributed chart like loki-distributed or enterprise-logs", + "type": "object", + "properties": { + "enabled": { + "description": "Set to true if migrating from a distributed helm chart", + "type": "boolean" + }, + "memberlistService": { + "description": "If migrating from a distributed service, provide the distributed deployment's memberlist service DNS so the new deployment can join its ring.", + "type": "string" + } + } + } + } + }, + "minio": { + "description": "Configuration for the minio subchart (deprecated)", + "type": "object", + "additionalProperties": true + }, + "monitoring": { + "description": "Monitoring section determines which monitoring features to enable", + "type": "object", + "properties": { + "additionalPrometheusRules": { + "description": "Additional PrometheusRule objects to create alongside the chart-managed ones. Each key becomes the resource name suffix; the value must contain a 'groups' key with standard Prometheus rule groups. Can contain both recording rules and alerts. e.g.: additionalPrometheusRules: my-alerts: groups: - name: my-loki-alerts rules: - alert: MyLokiAlert expr: 'up{job=\"loki\"} == 0'", + "type": "object" + }, + "alerts": { + "description": "Alert rules for monitoring Loki", + "type": "object", + "properties": { + "additionalAggregationLabels": { + "description": "Extra label dimensions added to all by() aggregation clauses in alert expressions", + "type": "array" + }, + "additionalRuleAnnotations": { + "description": "Additional annotations applied to all individual alert rules", + "type": "object" + }, + "additionalRuleLabels": { + "description": "Additional labels applied to all individual alert rules", + "type": "object" + }, + "annotations": { + "description": "Additional annotations for the alerts PrometheusRule resource", + "type": "object" + }, + "disabled": { + "description": "Selectively disable individual alerts by name. e.g.: disabled: { LokiRequestErrors: true }", + "type": "object" + }, + "enabled": { + "description": "If enabled, create a PrometheusRule resource with Loki alert rules", + "type": "boolean" + }, + "keepFiringFor": { + "description": "Global keepFiringFor applied to all alert rules", + "type": "string" + }, + "labels": { + "description": "Additional labels for the alerts PrometheusRule resource", + "type": "object" + }, + "overrides": { + "description": "Override for/severity on individual alerts. e.g.: overrides: { LokiRequestErrors: { for: 5m, severity: warning } }", + "type": "object" + } + } + }, + "appInstanceLabelName": { + "description": "Label name for the app_instance label injected into scraped metrics and recording rules.", + "type": "string" + }, + "appInstanceLabelValue": { + "description": "Value for the app_instance label injected into scraped metrics and recording rules. Supports Helm templating.", + "type": "string" + }, + "dashboards": { + "type": "object", + "properties": { + "annotations": { + "description": "Additional annotations for the dashboards ConfigMap resources", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "defaultDashboardsEditable": { + "description": "Editable flag for the default dashboards", + "type": "boolean" + }, + "defaultDashboardsInterval": { + "description": "Default interval for Grafana dashboards", + "type": "string" + }, + "defaultDashboardsTimezone": { + "description": "Timezone for the default dashboards", + "type": "string" + }, + "enabled": { + "description": "If enabled, create configmap resources with dashboards for monitoring Loki", + "type": "boolean" + }, + "grafanaOperator": { + "type": "object", + "properties": { + "annotations": { + "description": "Additional annotations for the GrafanaOperator resources", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "enabled": { + "description": "If enabled, GrafanaOperator resources for Grafana Operator are created to deploy the dashboards.", + "type": "boolean" + }, + "folder": { + "description": "Which folder contains all dashboards in Grafana # This folder will be created on the Root level # Only one of 'folder', 'folderUID' or 'folderRef' can be set #", + "type": [ + "string", + "null" + ] + }, + "folderRef": { + "description": "Which GrafanaFolder reference contains all dashboards in Grafana # This allows you to use subfolder hierarchy. # Only one of 'folder', 'folderUID' or 'folderRef' can be set #", + "type": [ + "string", + "null" + ] + }, + "folderUID": { + "description": "Which UID of the target folder contains all dashboards in Grafana # This allows you to use subfolder hierarchy # Only one of 'folder', 'folderUID' or 'folderRef' can be set #", + "type": [ + "string", + "null" + ] + }, + "instanceSelector": { + "allOf": [ + { + "description": "instanceSelector for the GrafanaDashboard resources # The grafana-operator matches this against the labels on your Grafana CR # An empty selector (the default) matches every Grafana instance", + "type": "object" + }, + { + "$ref": "#/$defs/_definitions.json/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector" + } + ] + }, + "labels": { + "description": "Additional labels for the GrafanaOperator resources", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "resyncPeriod": { + "description": "How frequently the operator should resync resources (in duration format)", + "type": "string" + } + } + }, + "labels": { + "description": "Labels for the dashboards ConfigMap resources", + "type": "object", + "properties": { + "grafana_dashboard": { + "type": "string" + } + }, + "additionalProperties": { + "type": "string" + } + } + } + }, + "multiCluster": { + "type": "object", + "properties": { + "clusterName": { + "description": "Value for the 'cluster' label. Supports Helm templating. When empty, recording rules and alerts are not modified — only dashboards show the cluster variable. e.g. clusterName: '{{ .Values.global.clusterName }}'", + "type": "string" + }, + "enabled": { + "description": "When enabled, shows the cluster variable in dashboards. If clusterName is also set, the chart adds 'cluster' labels to scraped metrics, recording rules, and alerts, and includes 'cluster' in recording rule aggregations. If clusterName is left empty, only dashboard changes are applied — use this when an external tool (e.g. Grafana Alloy) manages cluster label injection and PromQL rewriting.", + "type": "boolean" + } + } + }, + "namespace": { + "description": "Alternative namespace to deploy all monitoring resources (ServiceMonitor, PrometheusRule, ConfigMap dashboards) in. Defaults to the release namespace.", + "type": [ + "string", + "null" + ] + }, + "rules": { + "description": "Recording rules for monitoring Loki, required for some dashboards", + "type": "object", + "properties": { + "additionalAggregationLabels": { + "description": "Extra label dimensions added to all by() aggregation clauses in recording rules", + "type": "array" + }, + "additionalRuleAnnotations": { + "description": "Additional annotations applied to all individual recording rules", + "type": "object" + }, + "additionalRuleLabels": { + "description": "Additional labels applied to all individual recording rules", + "type": "object" + }, + "annotations": { + "description": "Additional annotations for the PrometheusRule resource", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "enabled": { + "description": "If enabled, create a PrometheusRule resource with Loki recording rules", + "type": "boolean" + }, + "labels": { + "description": "Additional labels for the PrometheusRule resource", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "serviceMonitor": { + "description": "ServiceMonitor configuration", + "type": "object", + "properties": { + "annotations": { + "description": "ServiceMonitor annotations", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "enabled": { + "description": "If enabled, ServiceMonitor resources for Prometheus Operator are created", + "type": "boolean" + }, + "interval": { + "description": "ServiceMonitor scrape interval Default is 15s because included recording rules use a 1m rate, and scrape interval needs to be at least 1/4 rate interval.", + "type": "string" + }, + "jobPrefix": { + "description": "ServiceMonitor job label prefix will be used to generate the job label for the scraped metrics.", + "type": "string" + }, + "labels": { + "description": "Additional ServiceMonitor labels", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "metricRelabelings": { + "description": "ServiceMonitor metric relabel configs to apply to samples before ingestion https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#endpoint", + "type": "array" + }, + "namespaceSelector": { + "description": "Namespace selector for ServiceMonitor resources", + "type": "object" + }, + "relabelings": { + "description": "ServiceMonitor relabel configs to apply to samples before scraping https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#relabelconfig", + "type": "array" + }, + "scheme": { + "description": "ServiceMonitor will use http by default, but you can pick https as well", + "type": "string" + }, + "scrapeTimeout": { + "description": "ServiceMonitor scrape timeout in Go duration format (e.g. 15s)", + "type": [ + "string", + "null" + ] + }, + "tlsConfig": { + "description": "ServiceMonitor will use these tlsConfig settings to make the health check requests", + "type": [ + "object", + "null" + ] + } + } + } + } + }, + "nameOverride": { + "description": "Overrides the chart's name", + "type": "string" + }, + "namespaceOverride": { + "description": "Overrides the chart's namespace", + "type": "string" + }, + "networkPolicy": { + "type": "object", + "properties": { + "alertmanager": { + "type": "object", + "properties": { + "namespaceSelector": { + "description": "Specifies the namespace the Alertmanager is running in", + "type": "object" + }, + "podSelector": { + "description": "Specifies the Alertmanager Pods. As this is cross-namespace communication, you also need the namespaceSelector.", + "type": "object" + }, + "port": { + "description": "Specify the Alertmanager port used for alerting", + "type": [ + "string", + "integer" + ] + } + } + }, + "discovery": { + "type": "object", + "properties": { + "namespaceSelector": { + "description": "Specifies the namespace the discovery Pods are running in", + "type": "object" + }, + "podSelector": { + "description": "Specifies the Pods labels used for discovery. As this is cross-namespace communication, you also need the namespaceSelector.", + "type": "object" + }, + "port": { + "description": "Specify the port used for discovery", + "type": [ + "string", + "integer", + "null" + ] + } + } + }, + "enabled": { + "description": "Specifies whether Network Policies should be created", + "type": "boolean" + }, + "externalStorage": { + "type": "object", + "properties": { + "cidrs": { + "description": "Specifies specific network CIDRs you want to limit access to", + "type": "array" + }, + "ports": { + "description": "Specify the port used for external storage, e.g. AWS S3", + "type": "array" + } + } + }, + "ingress": { + "type": "object", + "properties": { + "namespaceSelector": { + "description": "Specifies the namespaces which are allowed to access the http port", + "type": "object" + }, + "podSelector": { + "description": "Specifies the Pods which are allowed to access the http port. As this is cross-namespace communication, you also need the namespaceSelector.", + "type": "object" + } + } + }, + "metrics": { + "type": "object", + "properties": { + "cidrs": { + "description": "Specifies specific network CIDRs which are allowed to access the metrics port. In case you use namespaceSelector, you also have to specify your kubelet networks here. The metrics ports are also used for probes.", + "type": "array" + }, + "namespaceSelector": { + "description": "Specifies the namespaces which are allowed to access the metrics port", + "type": "object" + }, + "podSelector": { + "description": "Specifies the Pods which are allowed to access the metrics port. As this is cross-namespace communication, you also need the namespaceSelector.", + "type": "object" + } + } + } + } + }, + "overridesExporter": { + "description": "Configuration for the overrides-exporter", + "type": "object", + "properties": { + "affinity": { + "description": "Affinity for overrides-exporter pods. The value will be passed through tpl.", + "type": [ + "object", + "null" + ], + "additionalProperties": true + }, + "annotations": { + "description": "Annotations for overrides-exporter", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "appProtocol": { + "description": "Set the optional grpc service protocol. Ex: \"grpc\", \"http2\" or \"https\"", + "deprecated": true, + "type": "object", + "properties": { + "grpc": { + "type": "string" + } + }, + "additionalProperties": true + }, + "command": { + "description": "Command to execute instead of defined in Docker image", + "type": [ + "string", + "null" + ] + }, + "dnsConfig": { + "description": "DNSConfig for overrides-exporter", + "type": "object", + "additionalProperties": true + }, + "enabled": { + "description": "The overrides-exporter component is optional and can be disabled if desired.", + "type": "boolean" + }, + "extraArgs": { + "description": "Additional CLI args for the overrides-exporter", + "type": "array" + }, + "extraContainers": { + "description": "Containers to add to the overrides-exporter pods", + "type": [ + "string", + "array", + "null" + ] + }, + "extraEnv": { + "description": "Environment variables to add to the overrides-exporter pods", + "type": "array" + }, + "extraEnvFrom": { + "description": "Environment variables from secrets or configmaps to add to the overrides-exporter pods", + "type": "array" + }, + "extraVolumeMounts": { + "description": "Volume mounts to add to the overrides-exporter pods", + "type": "array" + }, + "extraVolumes": { + "description": "Volumes to add to the overrides-exporter pods", + "type": "array" + }, + "hostAliases": { + "description": "hostAliases to add", + "type": "array" + }, + "hostUsers": { + "description": "Use the host's user namespace in the overrides-exporter", + "type": [ + "boolean", + "null" + ] + }, + "image": { + "type": "object", + "properties": { + "registry": { + "description": "The Docker registry for the overrides-exporter image. Overrides `loki.image.registry`", + "type": [ + "string", + "null" + ] + }, + "repository": { + "description": "Docker image repository for the overrides-exporter image. Overrides `loki.image.repository`", + "type": [ + "string", + "null" + ] + }, + "tag": { + "description": "Docker image tag for the overrides-exporter image. Overrides `loki.image.tag`", + "type": [ + "string", + "null" + ] + } + } + }, + "initContainers": { + "description": "Init containers to add to the overrides-exporter pods", + "type": [ + "string", + "array", + "null" + ] + }, + "kind": { + "description": "Kind of backend workload. StatefulSet and Deployment are supported.", + "type": "string" + }, + "labels": { + "description": "Labels for overrides-exporter", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "maxUnavailable": { + "description": "Pod Disruption Budget maxUnavailable", + "deprecated": true, + "type": [ + "string", + "integer", + "null" + ] + }, + "nodeSelector": { + "description": "Node selector for overrides-exporter pods", + "type": "object", + "additionalProperties": true + }, + "podAnnotations": { + "description": "Annotations for overrides-exporter pods", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "podDisruptionBudget": { + "type": "object", + "properties": { + "annotations": { + "description": "Annotations for Pod Disruption Budget", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "enabled": { + "description": "Enable Pod Disruption Budget", + "type": "boolean" + }, + "labels": { + "description": "Labels for Pod Disruption Budget", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "maxUnavailable": { + "description": "Pod Disruption Budget maxUnavailable", + "type": [ + "string", + "integer", + "null" + ] + }, + "minAvailable": { + "description": "Pod Disruption Budget minAvailable", + "type": [ + "string", + "integer", + "null" + ] + }, + "unhealthyPodEvictionPolicy": { + "description": "Pod Disruption Budget unhealthyPodEvictionPolicy", + "type": [ + "string", + "null" + ] + } + } + }, + "podLabels": { + "description": "Labels for overrides-exporter pods", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "priorityClassName": { + "description": "The name of the PriorityClass for overrides-exporter pods", + "type": [ + "string", + "null" + ] + }, + "replicas": { + "description": "Number of replicas for the overrides-exporter. Set to null to omit spec.replicas from the workload, allowing an external controller (e.g. HPA, KEDA, rollout-operator) to manage replica counts without Helm resetting them.", + "type": [ + "integer", + "null" + ] + }, + "resizePolicy": { + "description": "Container resize policy for the overrides-exporter Example: resizePolicy: - resourceName: cpu restartPolicy: NotRequired - resourceName: memory restartPolicy: RestartContainer", + "type": "array" + }, + "resources": { + "description": "Resource requests and limits for the overrides-exporter", + "type": "object", + "additionalProperties": true + }, + "service": { + "type": "object", + "properties": { + "annotations": { + "description": "Annotations for overrides-exporter Service", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "appProtocol": { + "description": "Adds the appProtocol field to the overrides-exporter service. This allows overrides-exporter to work with istio protocol selection.", + "type": "object", + "properties": { + "grpc": { + "description": "Set the optional grpc service protocol. Ex: \"grpc\", \"http2\" or \"https\"", + "type": "string" + } + } + }, + "ipFamilies": { + "description": "ipFamilies for overrides-exporter Service Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services", + "type": "array" + }, + "ipFamilyPolicy": { + "description": "ipFamilyPolicy for overrides-exporter Service Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services", + "type": "string" + }, + "labels": { + "description": "Additional labels for overrides-exporter Service", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "sessionAffinity": { + "description": "Session affinity for overrides-exporter Service", + "type": "string" + }, + "sessionAffinityConfig": { + "description": "Session affinity config for overrides-exporter Service", + "type": "object", + "additionalProperties": true + }, + "trafficDistribution": { + "description": "trafficDistribution for overrides-exporter Service", + "type": "string" + }, + "type": { + "description": "Service Type for overrides-exporter Service", + "type": "string" + } + } + }, + "serviceAccount": { + "type": "object", + "properties": { + "annotations": { + "description": "Annotations for the service account", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "automountServiceAccountToken": { + "description": "Set this toggle to false to opt out of automounting API credentials for the service account", + "type": "boolean" + }, + "create": { + "description": "Specifies whether a ServiceAccount should be created", + "type": "boolean" + }, + "imagePullSecrets": { + "description": "Image pull secrets for the service account", + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + } + } + } + }, + "labels": { + "description": "Labels for the service account", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "name": { + "description": "The name of the ServiceAccount to use. If not set and create is true, a name is generated using the fullname template", + "type": [ + "string", + "null" + ] + } + } + }, + "serviceAnnotations": { + "description": "Annotations for overrides-exporter service", + "deprecated": true, + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "serviceLabels": { + "description": "Labels for overrides-exporter service", + "deprecated": true, + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "terminationGracePeriodSeconds": { + "description": "Grace period to allow the overrides-exporter to shutdown before it is killed", + "type": "integer" + }, + "tolerations": { + "type": "array" + }, + "topologySpreadConstraints": { + "description": "Topology Spread Constraints for overrides-exporter pods The value will be passed through tpl.", + "type": "array", + "items": { + "type": "object" + } + } + } + }, + "patternIngester": { + "description": "Configuration for the pattern ingester", + "type": "object", + "properties": { + "affinity": { + "description": "Affinity for pattern ingester pods. The value will be passed through tpl.", + "type": [ + "object", + "null" + ], + "additionalProperties": true + }, + "annotations": { + "description": "Annotations for pattern ingester", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "appProtocol": { + "description": "Set the optional grpc service protocol. Ex: \"grpc\", \"http2\" or \"https\"", + "type": "object", + "properties": { + "grpc": { + "type": "string" + } + } + }, + "command": { + "description": "Command to execute instead of defined in Docker image", + "type": [ + "string", + "null" + ] + }, + "dnsConfig": { + "description": "DNSConfig for pattern ingester pods", + "type": "object", + "additionalProperties": true + }, + "enabled": { + "description": "Enable the component. Requires `loki.deploymentMode` to be set to `Distributed`.", + "type": "boolean" + }, + "extraArgs": { + "description": "Additional CLI args for the pattern ingester", + "type": "array" + }, + "extraContainers": { + "description": "Containers to add to the pattern ingester pods", + "type": [ + "string", + "array", + "null" + ] + }, + "extraEnv": { + "description": "Environment variables to add to the pattern ingester pods", + "type": "array" + }, + "extraEnvFrom": { + "description": "Environment variables from secrets or configmaps to add to the pattern ingester pods", + "type": "array" + }, + "extraVolumeMounts": { + "description": "Volume mounts to add to the pattern ingester pods", + "type": "array" + }, + "extraVolumes": { + "description": "Volumes to add to the pattern ingester pods", + "type": "array" + }, + "hostAliases": { + "description": "hostAliases to add", + "type": "array" + }, + "hostUsers": { + "description": "Use the host's user namespace in the pattern ingester", + "type": [ + "boolean", + "null" + ] + }, + "image": { + "type": "object", + "properties": { + "registry": { + "description": "The Docker registry for the pattern ingester image. Overrides `loki.image.registry`", + "type": [ + "string", + "null" + ] + }, + "repository": { + "description": "Docker image repository for the pattern ingester image. Overrides `loki.image.repository`", + "type": [ + "string", + "null" + ] + }, + "tag": { + "description": "Docker image tag for the pattern ingester image. Overrides `loki.image.tag`", + "type": [ + "string", + "null" + ] + } + } + }, + "initContainers": { + "description": "Init containers to add to the pattern ingester pods", + "type": [ + "string", + "array", + "null" + ] + }, + "kind": { + "description": "Kind of compactor deployment. StatefulSet and Deployment are supported.", + "type": "string" + }, + "labels": { + "description": "Labels for pattern ingester", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "livenessProbe": { + "description": "liveness probe settings for pattern ingester pods. If empty use `loki.livenessProbe`", + "type": "object", + "additionalProperties": true + }, + "maxUnavailable": { + "description": "Pod Disruption Budget maxUnavailable", + "deprecated": true, + "type": [ + "string", + "integer", + "null" + ] + }, + "nodeSelector": { + "description": "Node selector for pattern ingester pods", + "type": "object", + "additionalProperties": true + }, + "persistence": { + "type": "object", + "properties": { + "claims": { + "description": "List of the pattern ingester PVCs", + "type": "array", + "items": { + "type": "object", + "properties": { + "accessModes": { + "description": "Set access modes on the PersistentVolumeClaim", + "type": "array", + "items": { + "type": "string" + } + }, + "annotations": { + "description": "Annotations for pattern ingester PVCs", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "labels": { + "description": "Labels for pattern ingester PVCs", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "name": { + "type": "string" + }, + "size": { + "type": "string" + }, + "storageClass": { + "description": "Storage class to be used. If defined, storageClassName: \u003cstorageClass\u003e. If set to \"-\", storageClassName: \"\", which disables dynamic provisioning. If empty or set to null, no storageClassName spec is set, choosing the default provisioner (gp2 on AWS, standard on GKE, AWS, and OpenStack).", + "type": [ + "string", + "null" + ] + }, + "volumeAttributesClassName": { + "description": "Volume attributes class name to be used. If empty or set to null, no volumeAttributesClassName spec is set. Requires Kubernetes 1.31", + "type": [ + "string", + "null" + ] + } + } + } + }, + "enableStatefulSetAutoDeletePVC": { + "description": "Enable StatefulSetAutoDeletePVC feature", + "type": "boolean" + }, + "enabled": { + "description": "Enable creating PVCs for the pattern ingester", + "type": "boolean" + }, + "size": { + "description": "Size of persistent disk", + "type": "string" + }, + "storageClass": { + "description": "Storage class to be used. If defined, storageClassName: \u003cstorageClass\u003e. If set to \"-\", storageClassName: \"\", which disables dynamic provisioning. If empty or set to null, no storageClassName spec is set, choosing the default provisioner (gp2 on AWS, standard on GKE, AWS, and OpenStack).", + "type": [ + "string", + "null" + ] + }, + "whenDeleted": { + "type": "string" + }, + "whenScaled": { + "type": "string" + } + } + }, + "podAnnotations": { + "description": "Annotations for pattern ingester pods", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "podDisruptionBudget": { + "type": "object", + "properties": { + "annotations": { + "description": "Annotations for Pod Disruption Budget", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "enabled": { + "description": "Enable Pod Disruption Budget", + "type": "boolean" + }, + "labels": { + "description": "Labels for Pod Disruption Budget", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "maxUnavailable": { + "description": "Pod Disruption Budget maxUnavailable", + "type": [ + "string", + "integer", + "null" + ] + }, + "minAvailable": { + "description": "Pod Disruption Budget minAvailable", + "type": [ + "string", + "integer", + "null" + ] + }, + "unhealthyPodEvictionPolicy": { + "description": "Pod Disruption Budget unhealthyPodEvictionPolicy", + "type": [ + "string", + "null" + ] + } + } + }, + "podLabels": { + "description": "Labels for pattern ingester pods", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "priorityClassName": { + "description": "The name of the PriorityClass for pattern ingester pods", + "type": [ + "string", + "null" + ] + }, + "readinessProbe": { + "description": "readiness probe settings for pattern ingester pods. If empty, use `loki.readinessProbe`", + "type": "object", + "additionalProperties": true + }, + "replicas": { + "description": "Number of replicas for the pattern ingester. Set to null to omit spec.replicas from the workload, allowing an external controller (e.g. HPA, KEDA, rollout-operator) to manage replica counts without Helm resetting them.", + "type": [ + "integer", + "null" + ] + }, + "resizePolicy": { + "description": "Container resize policy for the pattern ingester Example: resizePolicy: - resourceName: cpu restartPolicy: NotRequired - resourceName: memory restartPolicy: RestartContainer", + "type": "array" + }, + "resources": { + "description": "Resource requests and limits for the pattern ingester", + "type": "object", + "additionalProperties": true + }, + "serviceAccount": { + "type": "object", + "properties": { + "annotations": { + "description": "Annotations for the service account", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "automountServiceAccountToken": { + "description": "Set this toggle to false to opt out of automounting API credentials for the service account", + "type": "boolean" + }, + "create": { + "description": "Specifies whether a ServiceAccount should be created", + "type": "boolean" + }, + "imagePullSecrets": { + "description": "Image pull secrets for the service account", + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + } + } + } + }, + "labels": { + "description": "Labels for the service account", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "name": { + "description": "The name of the ServiceAccount to use. If not set and create is true, a name is generated using the fullname template", + "type": [ + "string", + "null" + ] + } + } + }, + "startupProbe": { + "description": "startup probe settings for pattern ingester pods. If empty use `loki.startupProbe`", + "type": "object", + "additionalProperties": true + }, + "statefulSetRecreateJob": { + "description": "EXPERIMENTAL: Enable creating a Job to recreate the compactor StatefulSet when the compactor configuration is changed. # Only applicable if `compactor.kind` is StatefulSet. Useful for PVC size changes, which require recreating the StatefulSet.", + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + } + } + }, + "strategy": { + "description": "UpdateStrategy or Strategy for the pattern ingester.", + "type": "object", + "additionalProperties": true + }, + "terminationGracePeriodSeconds": { + "description": "Grace period to allow the pattern ingester to shutdown before it is killed", + "type": "integer" + }, + "tolerations": { + "type": "array" + }, + "topologySpreadConstraints": { + "description": "Topology Spread Constraints for pattern ingester pods The value will be passed through tpl.", + "type": "array", + "items": { + "type": "object" + } + } + } + }, + "podDisruptionBudget": { + "description": "Pod Disruption Budget for single binary deployment. Deprecated in favor of `singleBinary.podDisruptionBudget`", + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + } + } + }, + "querier": { + "description": "Configuration for the querier", + "type": "object", + "properties": { + "affinity": { + "description": "Affinity for querier pods. The value will be passed through tpl.", + "type": [ + "object", + "null" + ], + "additionalProperties": true + }, + "annotations": { + "description": "Annotations for querier", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "appProtocol": { + "description": "Adds the appProtocol field to the querier service. This allows querier to work with istio protocol selection.", + "deprecated": true, + "type": "object", + "properties": { + "grpc": { + "description": "Set the optional grpc service protocol. Ex: \"grpc\", \"http2\" or \"https\"", + "deprecated": true, + "type": "string" + } + }, + "additionalProperties": true + }, + "autoscaling": { + "type": "object", + "properties": { + "behavior": { + "description": "HPA behavior configuration, passed directly as a K8s HPA behavior object.", + "type": "object", + "additionalProperties": true + }, + "customMetrics": { + "description": "Allows one to define custom metrics using the HPA/v2 schema (for example, Pods, Object or External metrics)", + "type": "array" + }, + "enabled": { + "description": "Enable autoscaling for the querier, this is only used if `indexGateway.enabled: true`", + "type": "boolean" + }, + "maxReplicas": { + "description": "Maximum autoscaling replicas for the querier", + "type": "integer" + }, + "minReplicas": { + "description": "Minimum autoscaling replicas for the querier", + "type": "integer" + }, + "targetCPUUtilizationPercentage": { + "description": "Target CPU utilisation percentage for the querier", + "type": [ + "integer", + "null" + ] + }, + "targetMemoryUtilizationPercentage": { + "description": "Target memory utilisation percentage for the querier", + "type": [ + "integer", + "null" + ] + } + } + }, + "command": { + "description": "Command to execute instead of defined in Docker image", + "type": [ + "string", + "null" + ] + }, + "dnsConfig": { + "description": "DNSConfig for querier pods", + "type": "object", + "additionalProperties": true + }, + "enabled": { + "description": "Enable the component. Requires `loki.deploymentMode` to be set to `Distributed`.", + "type": "boolean" + }, + "extraArgs": { + "description": "Additional CLI args for the querier", + "type": "array" + }, + "extraContainers": { + "description": "Containers to add to the querier pods", + "type": [ + "string", + "array", + "null" + ] + }, + "extraEnv": { + "description": "Environment variables to add to the querier pods", + "type": "array" + }, + "extraEnvFrom": { + "description": "Environment variables from secrets or configmaps to add to the querier pods", + "type": "array" + }, + "extraVolumeMounts": { + "description": "Volume mounts to add to the querier pods", + "type": "array" + }, + "extraVolumes": { + "description": "Volumes to add to the querier pods", + "type": "array" + }, + "hostAliases": { + "description": "hostAliases to add", + "type": "array" + }, + "hostUsers": { + "description": "Use the host's user namespace in the querier", + "type": [ + "boolean", + "null" + ] + }, + "image": { + "type": "object", + "properties": { + "registry": { + "description": "The Docker registry for the querier image. Overrides `loki.image.registry`", + "type": [ + "string", + "null" + ] + }, + "repository": { + "description": "Docker image repository for the querier image. Overrides `loki.image.repository`", + "type": [ + "string", + "null" + ] + }, + "tag": { + "description": "Docker image tag for the querier image. Overrides `loki.image.tag`", + "type": [ + "string", + "null" + ] + } + } + }, + "initContainers": { + "description": "Init containers to add to the querier pods", + "type": [ + "string", + "array", + "null" + ] + }, + "kedaAutoscaling": { + "type": "object", + "properties": { + "behavior": { + "description": "Behavior configuration for KEDA ScaledObject (horizontalPodAutoscalerConfig.behavior). Ref: https://keda.sh/docs/latest/reference/scaledobject-spec/#advanced", + "type": "object", + "additionalProperties": true + }, + "cooldownPeriod": { + "description": "Period to wait after the last trigger reported active before scaling the resource back to 0 (seconds). Defaults to defaults.kedaAutoscaling.cooldownPeriod if not set.", + "type": [ + "integer", + "null" + ] + }, + "enabled": { + "description": "Enable KEDA autoscaling for the querier. Mutually exclusive with autoscaling.enabled", + "type": "boolean" + }, + "fallback": { + "description": "Fallback configuration for KEDA ScaledObject. Applied when the trigger metric cannot be retrieved. Ref: https://keda.sh/docs/latest/reference/scaledobject-spec/#fallback", + "type": "object", + "additionalProperties": true + }, + "maxReplicas": { + "description": "Maximum replicas for KEDA autoscaling", + "type": "integer" + }, + "minReplicas": { + "description": "Minimum replicas for KEDA autoscaling", + "type": "integer" + }, + "pollingInterval": { + "description": "Interval (seconds) to poll each trigger. Defaults to defaults.kedaAutoscaling.pollingInterval if not set.", + "type": [ + "integer", + "null" + ] + }, + "triggers": { + "description": "KEDA triggers for the querier. Defaults to a Prometheus trigger using inflight requests.", + "type": "array", + "items": { + "type": "object", + "properties": { + "metadata": { + "type": "object", + "properties": { + "authModes": { + "type": "string" + }, + "customHeaders": { + "type": "string" + }, + "ignoreNullValues": { + "type": "string" + }, + "query": { + "type": "string" + }, + "serverAddress": { + "type": "string" + }, + "threshold": { + "type": "string" + }, + "unsafeSsl": { + "type": "string" + } + } + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + } + } + } + } + }, + "kind": { + "description": "Kind of compactor deployment. StatefulSet and Deployment are supported.", + "type": "string" + }, + "labels": { + "description": "Labels for querier", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "maxSurge": { + "description": "Max Surge for querier pods", + "type": [ + "string", + "integer" + ] + }, + "maxUnavailable": { + "description": "Pod Disruption Budget maxUnavailable", + "deprecated": true, + "type": [ + "string", + "integer", + "null" + ] + }, + "nodeSelector": { + "description": "Node selector for querier pods", + "type": "object", + "additionalProperties": true + }, + "podAnnotations": { + "description": "Annotations for querier pods", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "podDisruptionBudget": { + "type": "object", + "properties": { + "annotations": { + "description": "Annotations for Pod Disruption Budget", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "enabled": { + "description": "Enable Pod Disruption Budget", + "type": "boolean" + }, + "labels": { + "description": "Labels for Pod Disruption Budget", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "maxUnavailable": { + "description": "Pod Disruption Budget maxUnavailable", + "type": [ + "string", + "integer", + "null" + ] + }, + "minAvailable": { + "description": "Pod Disruption Budget minAvailable", + "type": [ + "string", + "integer", + "null" + ] + }, + "unhealthyPodEvictionPolicy": { + "description": "Pod Disruption Budget unhealthyPodEvictionPolicy", + "type": [ + "string", + "null" + ] + } + } + }, + "podLabels": { + "description": "Labels for querier pods", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "priorityClassName": { + "description": "The name of the PriorityClass for querier pods", + "type": [ + "string", + "null" + ] + }, + "replicas": { + "description": "Number of replicas for the querier. Set to null to omit spec.replicas from the workload, allowing an external controller (e.g. HPA, KEDA, rollout-operator) to manage replica counts without Helm resetting them.", + "type": [ + "integer", + "null" + ] + }, + "resizePolicy": { + "description": "Container resize policy for the querier Example: resizePolicy: - resourceName: cpu restartPolicy: NotRequired - resourceName: memory restartPolicy: RestartContainer", + "type": "array" + }, + "resources": { + "description": "Resource requests and limits for the querier", + "type": "object", + "additionalProperties": true + }, + "service": { + "type": "object", + "properties": { + "annotations": { + "description": "Annotations for querier Service", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "appProtocol": { + "description": "Adds the appProtocol field to the querier service. This allows querier to work with istio protocol selection.", + "type": "object", + "properties": { + "grpc": { + "description": "Set the optional grpc service protocol. Ex: \"grpc\", \"http2\" or \"https\"", + "type": "string" + } + } + }, + "ipFamilies": { + "description": "ipFamilies for querier Service Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services", + "type": "array" + }, + "ipFamilyPolicy": { + "description": "ipFamilyPolicy for querier Service Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services", + "type": "string" + }, + "labels": { + "description": "Additional labels for querier Service", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "sessionAffinity": { + "description": "Session affinity for querier Service", + "type": "string" + }, + "sessionAffinityConfig": { + "description": "Session affinity config for querier Service", + "type": "object", + "additionalProperties": true + }, + "trafficDistribution": { + "description": "trafficDistribution for querier Service", + "type": "string" + }, + "type": { + "description": "Service Type for querier Service", + "type": "string" + } + } + }, + "serviceAccount": { + "type": "object", + "properties": { + "annotations": { + "description": "Annotations for the service account", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "automountServiceAccountToken": { + "description": "Set this toggle to false to opt out of automounting API credentials for the service account", + "type": "boolean" + }, + "create": { + "description": "Specifies whether a ServiceAccount should be created", + "type": "boolean" + }, + "imagePullSecrets": { + "description": "Image pull secrets for the service account", + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + } + } + } + }, + "labels": { + "description": "Labels for the service account", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "name": { + "description": "The name of the ServiceAccount to use. If not set and create is true, a name is generated using the fullname template", + "type": [ + "string", + "null" + ] + } + } + }, + "serviceAnnotations": { + "description": "Annotations for querier service", + "deprecated": true, + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "serviceLabels": { + "description": "Labels for querier service", + "deprecated": true, + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "serviceType": { + "description": "Service type for querier service", + "deprecated": true, + "type": "string" + }, + "strategy": { + "description": "Strategy for the querier.", + "type": "object", + "additionalProperties": true + }, + "terminationGracePeriodSeconds": { + "description": "Grace period to allow the querier to shutdown before it is killed", + "type": "integer" + }, + "tolerations": { + "description": "Tolerations for querier pods", + "type": "array" + }, + "topologySpreadConstraints": { + "description": "topologySpread for querier pods. The value will be passed through tpl.", + "type": "array", + "items": { + "type": "object", + "properties": { + "labelSelector": { + "type": "object", + "properties": { + "matchLabels": { + "type": "object", + "properties": { + "app.kubernetes.io/component": { + "type": "string" + }, + "app.kubernetes.io/instance": { + "type": "string" + }, + "app.kubernetes.io/name": { + "type": "string" + } + } + } + } + }, + "maxSkew": { + "type": "integer" + }, + "topologyKey": { + "type": "string" + }, + "whenUnsatisfiable": { + "type": "string" + } + } + } + }, + "trafficDistribution": { + "description": "trafficDistribution for querier service", + "type": "string" + } + } + }, + "queryFrontend": { + "description": "Configuration for the query-frontend", + "type": "object", + "properties": { + "affinity": { + "description": "Affinity for query-frontend pods. The value will be passed through tpl.", + "type": [ + "object", + "null" + ], + "additionalProperties": true + }, + "annotations": { + "description": "Annotations for query-frontend", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "appProtocol": { + "description": "Adds the appProtocol field to the queryFrontend service. This allows queryFrontend to work with istio protocol selection.", + "deprecated": true, + "type": "object", + "properties": { + "grpc": { + "description": "Set the optional grpc service protocol. Ex: \"grpc\", \"http2\" or \"https\"", + "deprecated": true, + "type": "string" + } + }, + "additionalProperties": true + }, + "autoscaling": { + "type": "object", + "properties": { + "behavior": { + "description": "HPA behavior configuration, passed directly as a K8s HPA behavior object.", + "type": "object", + "additionalProperties": true + }, + "customMetrics": { + "description": "Allows one to define custom metrics using the HPA/v2 schema (for example, Pods, Object or External metrics)", + "type": "array" + }, + "enabled": { + "description": "Enable autoscaling for the query-frontend", + "type": "boolean" + }, + "maxReplicas": { + "description": "Maximum autoscaling replicas for the query-frontend", + "type": "integer" + }, + "minReplicas": { + "description": "Minimum autoscaling replicas for the query-frontend", + "type": "integer" + }, + "targetCPUUtilizationPercentage": { + "description": "Target CPU utilisation percentage for the query-frontend", + "type": [ + "integer", + "null" + ] + }, + "targetMemoryUtilizationPercentage": { + "description": "Target memory utilisation percentage for the query-frontend", + "type": [ + "integer", + "null" + ] + } + } + }, + "command": { + "description": "Command to execute instead of defined in Docker image", + "type": [ + "string", + "null" + ] + }, + "enabled": { + "description": "Enable the component. Requires `loki.deploymentMode` to be set to `Distributed`.", + "type": "boolean" + }, + "extraArgs": { + "description": "Additional CLI args for the query-frontend", + "type": "array" + }, + "extraContainers": { + "description": "Containers to add to the query-frontend pods", + "type": [ + "string", + "array", + "null" + ] + }, + "extraEnv": { + "description": "Environment variables to add to the query-frontend pods", + "type": "array" + }, + "extraEnvFrom": { + "description": "Environment variables from secrets or configmaps to add to the query-frontend pods", + "type": "array" + }, + "extraVolumeMounts": { + "description": "Volume mounts to add to the query-frontend pods", + "type": "array" + }, + "extraVolumes": { + "description": "Volumes to add to the query-frontend pods", + "type": "array" + }, + "hostAliases": { + "description": "hostAliases to add", + "type": "array" + }, + "hostUsers": { + "description": "Use the host's user namespace in the query-frontend", + "type": [ + "boolean", + "null" + ] + }, + "image": { + "type": "object", + "properties": { + "registry": { + "description": "The Docker registry for the query-frontend image. Overrides `loki.image.registry`", + "type": [ + "string", + "null" + ] + }, + "repository": { + "description": "Docker image repository for the query-frontend image. Overrides `loki.image.repository`", + "type": [ + "string", + "null" + ] + }, + "tag": { + "description": "Docker image tag for the query-frontend image. Overrides `loki.image.tag`", + "type": [ + "string", + "null" + ] + } + } + }, + "initContainers": { + "description": "init containers to add to the query-frontend pods", + "type": [ + "string", + "array", + "null" + ] + }, + "kedaAutoscaling": { + "type": "object", + "properties": { + "behavior": { + "description": "Behavior configuration for KEDA ScaledObject (horizontalPodAutoscalerConfig.behavior). Ref: https://keda.sh/docs/latest/reference/scaledobject-spec/#advanced", + "type": "object", + "additionalProperties": true + }, + "cooldownPeriod": { + "description": "Period to wait after the last trigger reported active before scaling the resource back to 0 (seconds). Defaults to defaults.kedaAutoscaling.cooldownPeriod if not set.", + "type": [ + "integer", + "null" + ] + }, + "enabled": { + "description": "Enable KEDA autoscaling for the query-frontend. Mutually exclusive with autoscaling.enabled", + "type": "boolean" + }, + "fallback": { + "description": "Fallback configuration for KEDA ScaledObject. Applied when the trigger metric cannot be retrieved. Ref: https://keda.sh/docs/latest/reference/scaledobject-spec/#fallback", + "type": "object", + "additionalProperties": true + }, + "maxReplicas": { + "description": "Maximum replicas for KEDA autoscaling", + "type": "integer" + }, + "minReplicas": { + "description": "Minimum replicas for KEDA autoscaling", + "type": "integer" + }, + "pollingInterval": { + "description": "Interval (seconds) to poll each trigger. Defaults to defaults.kedaAutoscaling.pollingInterval if not set.", + "type": [ + "integer", + "null" + ] + }, + "triggers": { + "description": "KEDA triggers for the query-frontend. Ref: https://keda.sh/docs/latest/scalers/", + "type": "array" + } + } + }, + "kind": { + "description": "Kind of compactor deployment. StatefulSet and Deployment are supported.", + "type": "string" + }, + "labels": { + "description": "Labels for query-frontend", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "loadBalancer": { + "description": "Enable load balancer port for query-frontend", + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + } + } + }, + "maxUnavailable": { + "description": "Pod Disruption Budget maxUnavailable", + "deprecated": true, + "type": [ + "string", + "integer", + "null" + ] + }, + "nodeSelector": { + "description": "Node selector for query-frontend pods", + "type": "object", + "additionalProperties": true + }, + "podAnnotations": { + "description": "Annotations for query-frontend pods", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "podDisruptionBudget": { + "type": "object", + "properties": { + "annotations": { + "description": "Annotations for Pod Disruption Budget", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "enabled": { + "description": "Enable Pod Disruption Budget", + "type": "boolean" + }, + "labels": { + "description": "Labels for Pod Disruption Budget", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "maxUnavailable": { + "description": "Pod Disruption Budget maxUnavailable", + "type": [ + "string", + "integer", + "null" + ] + }, + "minAvailable": { + "description": "Pod Disruption Budget minAvailable", + "type": [ + "string", + "integer", + "null" + ] + }, + "unhealthyPodEvictionPolicy": { + "description": "Pod Disruption Budget unhealthyPodEvictionPolicy", + "type": [ + "string", + "null" + ] + } + } + }, + "podLabels": { + "description": "Labels for query-frontend pods", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "priorityClassName": { + "description": "The name of the PriorityClass for query-frontend pods", + "type": [ + "string", + "null" + ] + }, + "replicas": { + "description": "Number of replicas for the query-frontend. Set to null to omit spec.replicas from the workload, allowing an external controller (e.g. HPA, KEDA, rollout-operator) to manage replica counts without Helm resetting them.", + "type": [ + "integer", + "null" + ] + }, + "resizePolicy": { + "description": "Container resize policy for the query-frontend Example: resizePolicy: - resourceName: cpu restartPolicy: NotRequired - resourceName: memory restartPolicy: RestartContainer", + "type": "array" + }, + "resources": { + "description": "Resource requests and limits for the query-frontend", + "type": "object", + "additionalProperties": true + }, + "service": { + "type": "object", + "properties": { + "annotations": { + "description": "Annotations for query-frontend Service", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "appProtocol": { + "description": "Adds the appProtocol field to the query-frontend service. This allows query-frontend to work with istio protocol selection.", + "type": "object", + "properties": { + "grpc": { + "description": "Set the optional grpc service protocol. Ex: \"grpc\", \"http2\" or \"https\"", + "type": "string" + } + } + }, + "ipFamilies": { + "description": "ipFamilies for query-frontend Service Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services", + "type": "array" + }, + "ipFamilyPolicy": { + "description": "ipFamilyPolicy for query-frontend Service Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services", + "type": "string" + }, + "labels": { + "description": "Additional labels for query-frontend Service", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "sessionAffinity": { + "description": "Session affinity for query-frontend Service", + "type": "string" + }, + "sessionAffinityConfig": { + "description": "Session affinity config for query-frontend Service", + "type": "object", + "additionalProperties": true + }, + "trafficDistribution": { + "description": "trafficDistribution for query-frontend Service", + "type": "string" + }, + "type": { + "description": "Service Type for query-frontend Service", + "type": "string" + } + } + }, + "serviceAccount": { + "type": "object", + "properties": { + "annotations": { + "description": "Annotations for the service account", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "automountServiceAccountToken": { + "description": "Set this toggle to false to opt out of automounting API credentials for the service account", + "type": "boolean" + }, + "create": { + "description": "Specifies whether a ServiceAccount should be created", + "type": "boolean" + }, + "imagePullSecrets": { + "description": "Image pull secrets for the service account", + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + } + } + } + }, + "labels": { + "description": "Labels for the service account", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "name": { + "description": "The name of the ServiceAccount to use. If not set and create is true, a name is generated using the fullname template", + "type": [ + "string", + "null" + ] + } + } + }, + "serviceAnnotations": { + "description": "Annotations for query-frontend service", + "deprecated": true, + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "serviceLabels": { + "description": "Labels for query-frontend service", + "deprecated": true, + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "serviceType": { + "description": "Service type for query-frontend service", + "deprecated": true, + "type": "string" + }, + "strategy": { + "description": "Strategy for the querier.", + "type": "object", + "additionalProperties": true + }, + "terminationGracePeriodSeconds": { + "description": "Grace period to allow the query-frontend to shutdown before it is killed", + "type": "integer" + }, + "tolerations": { + "type": "array" + }, + "topologySpreadConstraints": { + "description": "Topology Spread Constraints for query-frontend pods The value will be passed through tpl.", + "type": "array", + "items": { + "type": "object" + } + }, + "trafficDistribution": { + "description": "trafficDistribution for query-frontend service", + "type": "string" + } + } + }, + "queryScheduler": { + "description": "Configuration for the query-scheduler", + "type": "object", + "properties": { + "affinity": { + "description": "Affinity for query-scheduler pods. The value will be passed through tpl.", + "type": [ + "object", + "null" + ], + "additionalProperties": true + }, + "annotations": { + "description": "Annotations for query-scheduler", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "appProtocol": { + "description": "Set the optional grpc service protocol. Ex: \"grpc\", \"http2\" or \"https\"", + "deprecated": true, + "type": "object", + "properties": { + "grpc": { + "type": "string" + } + }, + "additionalProperties": true + }, + "dnsConfig": { + "description": "DNSConfig for query-scheduler", + "type": "object", + "additionalProperties": true + }, + "enabled": { + "description": "Enable the component. Requires `loki.deploymentMode` to be set to `Distributed`.", + "type": "boolean" + }, + "extraArgs": { + "description": "Additional CLI args for the query-scheduler", + "type": "array" + }, + "extraContainers": { + "description": "Containers to add to the query-scheduler pods", + "type": [ + "string", + "array", + "null" + ] + }, + "extraEnv": { + "description": "Environment variables to add to the query-scheduler pods", + "type": "array" + }, + "extraEnvFrom": { + "description": "Environment variables from secrets or configmaps to add to the query-scheduler pods", + "type": "array" + }, + "extraVolumeMounts": { + "description": "Volume mounts to add to the query-scheduler pods", + "type": "array" + }, + "extraVolumes": { + "description": "Volumes to add to the query-scheduler pods", + "type": "array" + }, + "hostAliases": { + "description": "hostAliases to add", + "type": "array" + }, + "hostUsers": { + "description": "Use the host's user namespace in the query-scheduler", + "type": [ + "boolean", + "null" + ] + }, + "image": { + "type": "object", + "properties": { + "registry": { + "description": "The Docker registry for the query-scheduler image. Overrides `loki.image.registry`", + "type": [ + "string", + "null" + ] + }, + "repository": { + "description": "Docker image repository for the query-scheduler image. Overrides `loki.image.repository`", + "type": [ + "string", + "null" + ] + }, + "tag": { + "description": "Docker image tag for the query-scheduler image. Overrides `loki.image.tag`", + "type": [ + "string", + "null" + ] + } + } + }, + "initContainers": { + "description": "init containers to add to the query-scheduler pods", + "type": [ + "string", + "array", + "null" + ] + }, + "kind": { + "description": "Kind of query-scheduler deployment. StatefulSet and Deployment are supported.", + "type": "string" + }, + "labels": { + "description": "Labels for query-scheduler", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "maxUnavailable": { + "description": "Pod Disruption Budget maxUnavailable", + "deprecated": true, + "type": [ + "string", + "integer", + "null" + ] + }, + "nodeSelector": { + "description": "Node selector for query-scheduler pods", + "type": "object", + "additionalProperties": true + }, + "podAnnotations": { + "description": "Annotations for query-scheduler pods", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "podDisruptionBudget": { + "type": "object", + "properties": { + "annotations": { + "description": "Annotations for Pod Disruption Budget", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "enabled": { + "description": "Enable Pod Disruption Budget", + "type": "boolean" + }, + "labels": { + "description": "Labels for Pod Disruption Budget", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "maxUnavailable": { + "description": "Pod Disruption Budget maxUnavailable", + "type": [ + "string", + "integer", + "null" + ] + }, + "minAvailable": { + "description": "Pod Disruption Budget minAvailable", + "type": [ + "string", + "integer", + "null" + ] + }, + "unhealthyPodEvictionPolicy": { + "description": "Pod Disruption Budget unhealthyPodEvictionPolicy", + "type": [ + "string", + "null" + ] + } + } + }, + "podLabels": { + "description": "Labels for query-scheduler pods", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "priorityClassName": { + "description": "The name of the PriorityClass for query-scheduler pods", + "type": [ + "string", + "null" + ] + }, + "replicas": { + "description": "Number of replicas for the query-scheduler. It should be lower than `-querier.max-concurrent` to avoid generating back-pressure in queriers; it's also recommended that this value evenly divides the latter Set to null to omit spec.replicas from the workload, allowing an external controller (e.g. HPA, KEDA, rollout-operator) to manage replica counts without Helm resetting them.", + "type": [ + "integer", + "null" + ] + }, + "resizePolicy": { + "description": "Container resize policy for the query-scheduler Example: resizePolicy: - resourceName: cpu restartPolicy: NotRequired - resourceName: memory restartPolicy: RestartContainer", + "type": "array" + }, + "resources": { + "description": "Resource requests and limits for the query-scheduler", + "type": "object", + "additionalProperties": true + }, + "service": { + "type": "object", + "properties": { + "annotations": { + "description": "Annotations for query-scheduler Service", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "appProtocol": { + "description": "Adds the appProtocol field to the query-scheduler service. This allows query-scheduler to work with istio protocol selection.", + "type": "object", + "properties": { + "grpc": { + "description": "Set the optional grpc service protocol. Ex: \"grpc\", \"http2\" or \"https\"", + "type": "string" + } + } + }, + "ipFamilies": { + "description": "ipFamilies for query-scheduler Service Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services", + "type": "array" + }, + "ipFamilyPolicy": { + "description": "ipFamilyPolicy for query-scheduler Service Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services", + "type": "string" + }, + "labels": { + "description": "Additional labels for query-scheduler Service", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "sessionAffinity": { + "description": "Session affinity for query-scheduler Service", + "type": "string" + }, + "sessionAffinityConfig": { + "description": "Session affinity config for query-scheduler Service", + "type": "object", + "additionalProperties": true + }, + "trafficDistribution": { + "description": "trafficDistribution for query-scheduler Service", + "type": "string" + }, + "type": { + "description": "Service Type for query-scheduler Service", + "type": "string" + } + } + }, + "serviceAccount": { + "type": "object", + "properties": { + "annotations": { + "description": "Annotations for the service account", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "automountServiceAccountToken": { + "description": "Set this toggle to false to opt out of automounting API credentials for the service account", + "type": "boolean" + }, + "create": { + "description": "Specifies whether a ServiceAccount should be created", + "type": "boolean" + }, + "imagePullSecrets": { + "description": "Image pull secrets for the service account", + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + } + } + } + }, + "labels": { + "description": "Labels for the service account", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "name": { + "description": "The name of the ServiceAccount to use. If not set and create is true, a name is generated using the fullname template", + "type": [ + "string", + "null" + ] + } + } + }, + "serviceAnnotations": { + "description": "Annotations for query-scheduler service", + "deprecated": true, + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "serviceLabels": { + "description": "Labels for query-scheduler service", + "deprecated": true, + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "serviceType": { + "description": "Service type for query-scheduler service", + "deprecated": true, + "type": "string" + }, + "strategy": { + "description": "Strategy for the query-scheduler.", + "type": "object", + "additionalProperties": true + }, + "terminationGracePeriodSeconds": { + "description": "Grace period to allow the query-scheduler to shutdown before it is killed", + "type": "integer" + }, + "tolerations": { + "type": "array" + }, + "topologySpreadConstraints": { + "description": "Topology Spread Constraints for query-scheduler pods The value will be passed through tpl.", + "type": "array", + "items": { + "type": "object" + } + }, + "trafficDistribution": { + "description": "trafficDistribution for query-scheduler service", + "type": "string" + } + } + }, + "rbac": { + "type": "object", + "properties": { + "namespaced": { + "description": "Whether to install RBAC in the namespace only or cluster-wide. Useful if you want to watch ConfigMap globally.", + "type": "boolean" + }, + "sccAllowHostDirVolumePlugin": { + "description": "Toggle this to true to allow the use of hostPath volumes on OpenShift", + "type": "boolean" + }, + "sccEnabled": { + "description": "For OpenShift set sccEnabled to 'true' to use the SecurityContextConstraints.", + "type": "boolean" + } + } + }, + "read": { + "description": "Configuration for the read pod(s)", + "type": "object", + "properties": { + "affinity": { + "description": "Affinity for read pods. The value will be passed through tpl.", + "type": [ + "object", + "null" + ], + "additionalProperties": true + }, + "annotations": { + "description": "Annotations for read deployment", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "autoscaling": { + "type": "object", + "properties": { + "behavior": { + "description": "Behavior policies while scaling.", + "type": "object", + "additionalProperties": true + }, + "enabled": { + "description": "Enable autoscaling for the read, this is only used if `queryIndex.enabled: true`", + "type": "boolean" + }, + "maxReplicas": { + "description": "Maximum autoscaling replicas for the read", + "type": "integer" + }, + "minReplicas": { + "description": "Minimum autoscaling replicas for the read", + "type": "integer" + }, + "targetCPUUtilizationPercentage": { + "description": "Target CPU utilisation percentage for the read", + "type": [ + "integer", + "null" + ] + }, + "targetMemoryUtilizationPercentage": { + "description": "Target memory utilisation percentage for the read", + "type": [ + "integer", + "null" + ] + } + } + }, + "dnsConfig": { + "description": "DNS config for read pods", + "type": "object", + "additionalProperties": true + }, + "enabled": { + "description": "Enable the component. Requires `loki.deploymentMode` to be set to `SimpleScalable`.", + "type": "boolean" + }, + "extraArgs": { + "description": "Additional CLI args for the read", + "type": "array" + }, + "extraContainers": { + "description": "Containers to add to the read pods", + "type": [ + "string", + "array", + "null" + ] + }, + "extraEnv": { + "description": "Environment variables to add to the read pods", + "type": "array" + }, + "extraEnvFrom": { + "description": "Environment variables from secrets or configmaps to add to the read pods", + "type": "array" + }, + "extraVolumeMounts": { + "description": "Volume mounts to add to the read pods", + "type": "array" + }, + "extraVolumes": { + "description": "Volumes to add to the read pods", + "type": "array" + }, + "fullnameOverride": { + "description": "Override for the read fullname. By default, this is generated using the fullname template with \"-backend\"", + "type": "string" + }, + "hostUsers": { + "description": "Use the host's user namespace in the read pods.", + "type": [ + "boolean", + "null" + ] + }, + "image": { + "type": "object", + "properties": { + "registry": { + "description": "The Docker registry for the read image. Overrides `loki.image.registry`", + "type": [ + "string", + "null" + ] + }, + "repository": { + "description": "Docker image repository for the read image. Overrides `loki.image.repository`", + "type": [ + "string", + "null" + ] + }, + "tag": { + "description": "Docker image tag for the read image. Overrides `loki.image.tag`", + "type": [ + "string", + "null" + ] + } + } + }, + "initContainers": { + "description": "init containers to add to the read pods", + "type": [ + "string", + "array", + "null" + ] + }, + "kedaAutoscaling": { + "type": "object", + "properties": { + "behavior": { + "description": "Behavior configuration for KEDA ScaledObject (horizontalPodAutoscalerConfig.behavior). Ref: https://keda.sh/docs/latest/reference/scaledobject-spec/#advanced", + "type": "object", + "additionalProperties": true + }, + "cooldownPeriod": { + "description": "Period to wait after the last trigger reported active before scaling the resource back to 0 (seconds). Defaults to defaults.kedaAutoscaling.cooldownPeriod if not set.", + "type": [ + "integer", + "null" + ] + }, + "enabled": { + "description": "Enable KEDA autoscaling for the read. Mutually exclusive with autoscaling.enabled", + "type": "boolean" + }, + "fallback": { + "description": "Fallback configuration for KEDA ScaledObject. Applied when the trigger metric cannot be retrieved. Ref: https://keda.sh/docs/latest/reference/scaledobject-spec/#fallback", + "type": "object", + "additionalProperties": true + }, + "maxReplicas": { + "description": "Maximum replicas for KEDA autoscaling", + "type": "integer" + }, + "minReplicas": { + "description": "Minimum replicas for KEDA autoscaling", + "type": "integer" + }, + "pollingInterval": { + "description": "Interval (seconds) to poll each trigger. Defaults to defaults.kedaAutoscaling.pollingInterval if not set.", + "type": [ + "integer", + "null" + ] + }, + "triggers": { + "description": "KEDA triggers for the read. Ref: https://keda.sh/docs/latest/scalers/", + "type": "array" + } + } + }, + "kind": { + "description": "Kind of read deployment. StatefulSet and Deployment are supported.", + "type": "string" + }, + "labels": { + "description": "Additional labels for read deployment", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "lifecycle": { + "description": "Lifecycle for the read container", + "type": "object" + }, + "livenessProbe": { + "description": "liveness probe settings for read pods. If empty, applies no livenessProbe", + "type": "object", + "additionalProperties": true + }, + "maxUnavailable": { + "description": "Pod Disruption Budget maxUnavailable", + "deprecated": true, + "type": [ + "string", + "integer", + "null" + ] + }, + "nodeSelector": { + "description": "Node selector for read pods", + "type": "object", + "additionalProperties": true + }, + "podAnnotations": { + "description": "Annotations for read pods", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "podDisruptionBudget": { + "type": "object", + "properties": { + "annotations": { + "description": "Annotations for read Pod Disruption Budget", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "enabled": { + "description": "Enable Pod Disruption Budget for read pods", + "type": "boolean" + }, + "labels": { + "description": "Labels for read Pod Disruption Budget", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "maxUnavailable": { + "description": "Pod Disruption Budget maxUnavailable", + "type": [ + "string", + "integer", + "null" + ] + }, + "minAvailable": { + "description": "Pod Disruption Budget minAvailable", + "type": [ + "string", + "integer", + "null" + ] + }, + "unhealthyPodEvictionPolicy": { + "description": "Pod Disruption Budget unhealthyPodEvictionPolicy", + "type": [ + "string", + "null" + ] + } + } + }, + "podLabels": { + "description": "Additional labels for each `read` pod", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "priorityClassName": { + "description": "The name of the PriorityClass for read pods", + "type": [ + "string", + "null" + ] + }, + "replicas": { + "description": "Number of replicas for the read. Set to null to omit spec.replicas from the workload, allowing an external controller (e.g. HPA, KEDA, rollout-operator) to manage replica counts without Helm resetting them.", + "type": [ + "integer", + "null" + ] + }, + "resizePolicy": { + "description": "Container resize policy for the read Example: resizePolicy: - resourceName: cpu restartPolicy: NotRequired - resourceName: memory restartPolicy: RestartContainer", + "type": "array" + }, + "resources": { + "description": "Resource requests and limits for the read", + "type": "object", + "additionalProperties": true + }, + "selectorLabels": { + "description": "Additional selector labels for each `read` pod", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "service": { + "type": "object", + "properties": { + "annotations": { + "description": "Annotations for read Service", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "appProtocol": { + "description": "Adds the appProtocol field to the read service. This allows read to work with istio protocol selection.", + "type": "object", + "properties": { + "grpc": { + "description": "Set the optional grpc service protocol. Ex: \"grpc\", \"http2\" or \"https\"", + "type": "string" + } + } + }, + "ipFamilies": { + "description": "ipFamilies for read Service Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services", + "type": "array" + }, + "ipFamilyPolicy": { + "description": "ipFamilyPolicy for read Service Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services", + "type": "string" + }, + "labels": { + "description": "Additional labels for read Service", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "sessionAffinity": { + "description": "Session affinity for read Service", + "type": "string" + }, + "sessionAffinityConfig": { + "description": "Session affinity config for read Service", + "type": "object", + "additionalProperties": true + }, + "trafficDistribution": { + "description": "trafficDistribution for read Service", + "type": "string" + }, + "type": { + "description": "Service Type for read Service", + "type": "string" + } + } + }, + "serviceAccount": { + "description": "The default is to deploy all pods in parallel.", + "type": "object", + "properties": { + "annotations": { + "description": "Annotations for the service account", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "automountServiceAccountToken": { + "description": "Set this toggle to false to opt out of automounting API credentials for the service account", + "type": "boolean" + }, + "create": { + "description": "Specifies whether a ServiceAccount should be created", + "type": "boolean" + }, + "imagePullSecrets": { + "description": "Image pull secrets for the service account", + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + } + } + } + }, + "labels": { + "description": "Labels for the service account", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "name": { + "description": "The name of the ServiceAccount to use. If not set and create is true, a name is generated using the fullname template", + "type": [ + "string", + "null" + ] + } + } + }, + "startupProbe": { + "description": "startup probe for the read pods. If empty, applies no startupProbe", + "type": "object", + "additionalProperties": true + }, + "strategy": { + "description": "UpdateStrategy or Strategy for the read.", + "type": "object", + "additionalProperties": true + }, + "terminationGracePeriodSeconds": { + "description": "Grace period to allow the read to shutdown before it is killed", + "type": "integer" + }, + "tolerations": { + "type": "array" + }, + "topologySpreadConstraints": { + "description": "Topology Spread Constraints for read pods The value will be passed through tpl.", + "type": "array", + "items": { + "type": "object" + } + } + } + }, + "resultsCache": { + "type": "object", + "properties": { + "addresses": { + "description": "Comma separated addresses list in DNS Service Discovery format", + "type": "string" + }, + "affinity": { + "description": "Affinity for results-cache pods", + "type": [ + "object", + "null" + ], + "additionalProperties": true + }, + "allocatedCPU": { + "description": "Amount of cpu allocated to results-cache for object storage (in integer or millicores).", + "type": "string" + }, + "allocatedMemory": { + "description": "Amount of memory allocated to results-cache for object storage (in MB).", + "type": "integer" + }, + "annotations": { + "description": "Annotations for the results-cache pods", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "connectionLimit": { + "description": "Maximum number of connections allowed", + "type": "integer" + }, + "defaultValidity": { + "description": "Specify how long cached results should be stored in the results-cache before being expired", + "type": "string" + }, + "dnsConfig": { + "description": "DNSConfig for results-cache", + "type": "object", + "additionalProperties": true + }, + "enabled": { + "description": "Specifies whether memcached based results-cache should be enabled", + "type": "boolean" + }, + "extraArgs": { + "description": "Additional CLI args for results-cache", + "type": "object" + }, + "extraContainers": { + "description": "Additional containers to be added to the results-cache pod.", + "type": [ + "array", + "null" + ] + }, + "extraExtendedOptions": { + "description": "Add extended options for results-cache memcached container. The format is the same as for the memcached -o/--extend flag. Example: extraExtendedOptions: 'tls,modern,track_sizes'", + "type": "string" + }, + "extraVolumeMounts": { + "description": "Additional volume mounts to be added to the results-cache pod (applies to both memcached and exporter containers). Example: extraVolumeMounts: - name: extra-volume mountPath: /etc/extra-volume readOnly: true", + "type": "array" + }, + "extraVolumes": { + "description": "Additional volumes to be added to the results-cache pod (applies to both memcached and exporter containers). Example: extraVolumes: - name: extra-volume secret: secretName: extra-volume-secret", + "type": "array" + }, + "hostUsers": { + "description": "Use the host's user namespace in results-cache pods", + "type": [ + "boolean", + "null" + ] + }, + "initContainers": { + "description": "Extra init containers for results-cache pods", + "type": "array" + }, + "maxItemMemory": { + "description": "Maximum item results-cache for memcached (in MB).", + "type": "integer" + }, + "maxUnavailable": { + "description": "Pod Disruption Budget maxUnavailable", + "deprecated": true, + "type": [ + "string", + "integer", + "null" + ] + }, + "nodeSelector": { + "description": "Node selector for results-cache pods", + "type": "object", + "additionalProperties": true + }, + "persistence": { + "description": "Persistence settings for the results-cache", + "type": "object", + "properties": { + "enabled": { + "description": "Enable creating PVCs for the results-cache", + "type": "boolean" + }, + "labels": { + "description": "PVC additional labels", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "mountPath": { + "description": "Volume mount path", + "type": "string" + }, + "storageClass": { + "description": "Storage class to be used. If defined, storageClassName: \u003cstorageClass\u003e. If set to \"-\", storageClassName: \"\", which disables dynamic provisioning. If empty or set to null, no storageClassName spec is set, choosing the default provisioner (gp2 on AWS, standard on GKE, AWS, and OpenStack).", + "type": [ + "string", + "null" + ] + }, + "storageSize": { + "description": "Size of persistent disk, must be in G or Gi", + "type": "string" + }, + "volumeAttributesClassName": { + "description": "Volume attributes class name to be used. If empty or set to null, no volumeAttributesClassName spec is set. Requires Kubernetes 1.31", + "type": [ + "string", + "null" + ] + } + } + }, + "podAnnotations": { + "description": "Annotations for results-cache pods", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "podDisruptionBudget": { + "type": "object", + "properties": { + "annotations": { + "description": "Annotations for Pod Disruption Budget", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "enabled": { + "description": "Enable Pod Disruption Budget", + "type": "boolean" + }, + "labels": { + "description": "Labels for Pod Disruption Budget", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "maxUnavailable": { + "description": "Pod Disruption Budget maxUnavailable", + "type": [ + "string", + "integer", + "null" + ] + }, + "minAvailable": { + "description": "Pod Disruption Budget minAvailable", + "type": [ + "string", + "integer", + "null" + ] + }, + "unhealthyPodEvictionPolicy": { + "description": "Pod Disruption Budget unhealthyPodEvictionPolicy", + "type": [ + "string", + "null" + ] + } + } + }, + "podLabels": { + "description": "Labels for results-cache pods", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "podManagementPolicy": { + "description": "Management policy for results-cache pods", + "type": "string" + }, + "port": { + "description": "Port of the results-cache service", + "type": "integer" + }, + "priorityClassName": { + "description": "The name of the PriorityClass for results-cache pods", + "type": [ + "string", + "null" + ] + }, + "replicas": { + "description": "Total number of results-cache replicas", + "type": "integer" + }, + "resizePolicy": { + "description": "Container resize policy for the results-cache Example: resizePolicy: - resourceName: cpu restartPolicy: NotRequired - resourceName: memory restartPolicy: RestartContainer", + "type": "array" + }, + "resources": { + "description": "Resource requests and limits for the results-cache By default a safe memory limit will be requested based on allocatedMemory value (floor (* 1.2 allocatedMemory)).", + "type": "object", + "additionalProperties": true + }, + "service": { + "description": "Service annotations and labels", + "type": "object", + "properties": { + "annotations": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "statefulStrategy": { + "description": "Stateful results-cache strategy", + "type": "object", + "additionalProperties": true + }, + "terminationGracePeriodSeconds": { + "description": "Grace period to allow the results-cache to shutdown before it is killed", + "type": "integer" + }, + "timeout": { + "description": "Memcached operation timeout", + "type": "string" + }, + "tolerations": { + "description": "Tolerations for results-cache pods", + "type": "array" + }, + "topologySpreadConstraints": { + "description": "topologySpreadConstraints allows to customize the default topologySpreadConstraints. This can be either a single dict as shown below or a slice of topologySpreadConstraints. labelSelector is taken from the constraint itself (if it exists) or is generated by the chart using the same selectors as for services.", + "type": "array", + "items": { + "type": "object" + } + }, + "writebackBuffer": { + "description": "Max number of objects to use for cache write back", + "type": "integer" + }, + "writebackParallelism": { + "description": "Number of parallel threads for cache write back", + "type": "integer" + }, + "writebackSizeLimit": { + "description": "Max memory to use for cache write back", + "type": "string" + } + } + }, + "rollout_operator": { + "description": "Setting for the Grafana Rollout Operator https://github.com/grafana/helm-charts/tree/main/charts/rollout-operator", + "type": "object", + "additionalProperties": true + }, + "route": { + "description": "Gateway API routes for direct routing to Loki services, bypassing the nginx gateway. Use either this or the top-level ingress, but not both at once. Each entry in the map creates a separate HTTPRoute resource. The key \"main\" produces a route named after the loki fullname; any other key appends the key as a suffix. This allows defining multiple routes, e.g. one HTTPRoute and one GRPCRoute.", + "type": "object", + "properties": { + "main": { + "type": "object", + "properties": { + "additionalRules": { + "description": "Additional rules to prepend before the generated path-routing rules. Each entry is rendered into spec.rules as written (templating is supported), so any HTTPRoute/GRPCRoute rule shape is accepted — including filter-only rules with no backendRefs (e.g. RequestRedirect, URLRewrite).", + "type": "array" + }, + "annotations": { + "description": "Annotations for the route", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "apiVersion": { + "description": "Gateway API version to use. Auto-detected from cluster capabilities if empty.", + "type": "string" + }, + "backendPort": { + "description": "Backend port override for all generated rules. When unset, GRPCRoute automatically uses loki.server.grpc_listen_port (default 9095) and all other kinds use loki.server.http_listen_port (default 3100).", + "type": [ + "integer", + "null" + ] + }, + "enabled": { + "description": "Specifies whether this Gateway API route should be created", + "type": "boolean" + }, + "hostnames": { + "description": "Hostnames for the route", + "type": "array" + }, + "kind": { + "description": "Kind of the route resource. Valid options are GRPCRoute, HTTPRoute, TCPRoute, TLSRoute, UDPRoute", + "type": "string" + }, + "labels": { + "description": "Labels for the route", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "parentRefs": { + "description": "Parent references for the route (required for Gateway API)", + "type": "array" + }, + "paths": { + "description": "Paths routed to each Loki service group. The target service depends on the deployment mode. To produce a route that contains only `additionalRules` and no chart-generated path rules (for example, a dedicated HTTP-to-HTTPS redirect route), set every entry below to an empty list — e.g. `distributor: []`, `queryFrontend: []`, `ruler: []`, `compactor: []`.", + "type": "object", + "properties": { + "compactor": { + "description": "Paths that are exposed by Loki Compactor. If deployment mode is Distributed, the requests are forwarded to the service. If deployment mode is SimpleScalable, the requests are forwarded to k8s service. If deployment mode is SingleBinary, the requests are forwarded to the central/single k8s service.", + "type": "array", + "items": { + "type": "string" + } + }, + "distributor": { + "description": "Paths that are exposed by Loki Distributor. If deployment mode is Distributed, the requests are forwarded to the service: `{{\"loki.distributorFullname\"}}`. If deployment mode is SimpleScalable, the requests are forwarded to write k8s service: `{{\"loki.writeFullname\"}}`. If deployment mode is SingleBinary, the requests are forwarded to the central/single k8s service: `{{\"loki.fullname\"}}`", + "type": "array", + "items": { + "type": "string" + } + }, + "queryFrontend": { + "description": "Paths that are exposed by Loki Query Frontend. If deployment mode is Distributed, the requests are forwarded to the service. If deployment mode is SimpleScalable, the requests are forwarded to read k8s service. If deployment mode is SingleBinary, the requests are forwarded to the central/single k8s service`", + "type": "array", + "items": { + "type": "string" + } + }, + "ruler": { + "description": "Paths that are exposed by Loki Ruler. If deployment mode is Distributed, the requests are forwarded to the service. If deployment mode is SimpleScalable, the requests are forwarded to k8s service. If deployment mode is SingleBinary, the requests are forwarded to the central/single k8s service.", + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + } + } + }, + "ruler": { + "description": "Configuration for the ruler", + "type": "object", + "properties": { + "affinity": { + "description": "Affinity for ruler pods. The value will be passed through tpl.", + "type": [ + "object", + "null" + ], + "additionalProperties": true + }, + "annotations": { + "description": "Annotations for ruler", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "appProtocol": { + "description": "Set the optional grpc service protocol. Ex: \"grpc\", \"http2\" or \"https\"", + "deprecated": true, + "type": "object", + "properties": { + "grpc": { + "type": "string" + } + }, + "additionalProperties": true + }, + "command": { + "description": "Command to execute instead of defined in Docker image", + "type": [ + "string", + "null" + ] + }, + "directories": { + "description": "Directories containing rules files. If used, you must also configure `loki.rulerConfig.storage` to use local storage.", + "type": "object" + }, + "dnsConfig": { + "description": "DNSConfig for ruler pods", + "type": "object", + "additionalProperties": true + }, + "enabled": { + "description": "The ruler component is optional and can be disabled if desired.", + "type": "boolean" + }, + "extraArgs": { + "description": "Additional CLI args for the ruler", + "type": "array" + }, + "extraContainers": { + "description": "Containers to add to the ruler pods", + "type": [ + "string", + "array", + "null" + ] + }, + "extraEnv": { + "description": "Environment variables to add to the ruler pods", + "type": "array" + }, + "extraEnvFrom": { + "description": "Environment variables from secrets or configmaps to add to the ruler pods", + "type": "array" + }, + "extraVolumeMounts": { + "description": "Volume mounts to add to the ruler pods", + "type": "array" + }, + "extraVolumes": { + "description": "Volumes to add to the ruler pods", + "type": "array" + }, + "hostAliases": { + "description": "hostAliases to add", + "type": "array" + }, + "hostUsers": { + "description": "Use the host's user namespace in the ruler", + "type": [ + "boolean", + "null" + ] + }, + "image": { + "type": "object", + "properties": { + "registry": { + "description": "The Docker registry for the ruler image. Overrides `loki.image.registry`", + "type": [ + "string", + "null" + ] + }, + "repository": { + "description": "Docker image repository for the ruler image. Overrides `loki.image.repository`", + "type": [ + "string", + "null" + ] + }, + "tag": { + "description": "Docker image tag for the ruler image. Overrides `loki.image.tag`", + "type": [ + "string", + "null" + ] + } + } + }, + "initContainers": { + "description": "Init containers to add to the ruler pods", + "type": [ + "string", + "array", + "null" + ] + }, + "kind": { + "description": "Kind of ruler deployment. StatefulSet and Deployment are supported.", + "type": "string" + }, + "labels": { + "description": "Labels for ruler", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "maxUnavailable": { + "description": "Pod Disruption Budget maxUnavailable", + "deprecated": true, + "type": [ + "string", + "integer", + "null" + ] + }, + "nodeSelector": { + "description": "Node selector for ruler pods", + "type": "object", + "additionalProperties": true + }, + "persistence": { + "type": "object", + "properties": { + "accessModes": { + "description": "Set access modes on the PersistentVolumeClaim", + "type": "array", + "items": { + "type": "string" + } + }, + "annotations": { + "description": "Annotations for ruler PVCs", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "enabled": { + "description": "Enable creating PVCs which is required when using recording rules", + "type": "boolean" + }, + "labels": { + "description": "Labels for ruler PVCs", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "size": { + "description": "Size of persistent disk", + "type": "string" + }, + "storageClass": { + "description": "Storage class to be used. If defined, storageClassName: \u003cstorageClass\u003e. If set to \"-\", storageClassName: \"\", which disables dynamic provisioning. If empty or set to null, no storageClassName spec is set, choosing the default provisioner (gp2 on AWS, standard on GKE, AWS, and OpenStack).", + "type": [ + "string", + "null" + ] + }, + "volumeAttributesClassName": { + "description": "Volume attributes class name to be used. If empty or set to null, no volumeAttributesClassName spec is set. Requires Kubernetes 1.31", + "type": [ + "string", + "null" + ] + } + } + }, + "podAnnotations": { + "description": "Annotations for ruler pods", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "podDisruptionBudget": { + "type": "object", + "properties": { + "annotations": { + "description": "Annotations for Pod Disruption Budget", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "enabled": { + "description": "Enable Pod Disruption Budget", + "type": "boolean" + }, + "labels": { + "description": "Labels for Pod Disruption Budget", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "maxUnavailable": { + "description": "Pod Disruption Budget maxUnavailable", + "type": [ + "string", + "integer", + "null" + ] + }, + "minAvailable": { + "description": "Pod Disruption Budget minAvailable", + "type": [ + "string", + "integer", + "null" + ] + }, + "unhealthyPodEvictionPolicy": { + "description": "Pod Disruption Budget unhealthyPodEvictionPolicy", + "type": [ + "string", + "null" + ] + } + } + }, + "podLabels": { + "description": "Labels for ruler pods", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "priorityClassName": { + "description": "The name of the PriorityClass for ruler pods", + "type": [ + "string", + "null" + ] + }, + "replicas": { + "description": "Number of replicas for the ruler. Set to null to omit spec.replicas from the workload, allowing an external controller (e.g. HPA, KEDA, rollout-operator) to manage replica counts without Helm resetting them.", + "type": [ + "integer", + "null" + ] + }, + "resizePolicy": { + "description": "Container resize policy for the ruler Example: resizePolicy: - resourceName: cpu restartPolicy: NotRequired - resourceName: memory restartPolicy: RestartContainer", + "type": "array" + }, + "resources": { + "description": "Resource requests and limits for the ruler", + "type": "object", + "additionalProperties": true + }, + "service": { + "type": "object", + "properties": { + "annotations": { + "description": "Annotations for ruler Service", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "appProtocol": { + "description": "Adds the appProtocol field to the ruler service. This allows ruler to work with istio protocol selection.", + "type": "object", + "properties": { + "grpc": { + "description": "Set the optional grpc service protocol. Ex: \"grpc\", \"http2\" or \"https\"", + "type": "string" + } + } + }, + "ipFamilies": { + "description": "ipFamilies for ruler Service Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services", + "type": "array" + }, + "ipFamilyPolicy": { + "description": "ipFamilyPolicy for ruler Service Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services", + "type": "string" + }, + "labels": { + "description": "Additional labels for ruler Service", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "sessionAffinity": { + "description": "Session affinity for ruler Service", + "type": "string" + }, + "sessionAffinityConfig": { + "description": "Session affinity config for ruler Service", + "type": "object", + "additionalProperties": true + }, + "trafficDistribution": { + "description": "trafficDistribution for ruler Service", + "type": "string" + }, + "type": { + "description": "Service Type for ruler Service", + "type": "string" + } + } + }, + "serviceAccount": { + "type": "object", + "properties": { + "annotations": { + "description": "Annotations for the service account", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "automountServiceAccountToken": { + "description": "Set this toggle to false to opt out of automounting API credentials for the service account", + "type": "boolean" + }, + "create": { + "description": "Specifies whether a ServiceAccount should be created", + "type": "boolean" + }, + "imagePullSecrets": { + "description": "Image pull secrets for the service account", + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + } + } + } + }, + "labels": { + "description": "Labels for the service account", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "name": { + "description": "The name of the ServiceAccount to use. If not set and create is true, a name is generated using the fullname template", + "type": [ + "string", + "null" + ] + } + } + }, + "serviceAnnotations": { + "description": "Annotations for ruler service", + "deprecated": true, + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "serviceLabels": { + "description": "Labels for ruler service", + "deprecated": true, + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "sidecar": { + "description": "Whether to enable the rules sidecar", + "type": "boolean" + }, + "statefulSetRecreateJob": { + "description": "EXPERIMENTAL: Enable creating a Job to recreate the ruler StatefulSet when the ruler configuration is changed. # Only applicable if `ruler.kind` is StatefulSet. Useful for PVC size changes, which require recreating the StatefulSet.", + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + } + } + }, + "terminationGracePeriodSeconds": { + "description": "Grace period to allow the ruler to shutdown before it is killed", + "type": "integer" + }, + "tolerations": { + "type": "array" + }, + "topologySpreadConstraints": { + "description": "Topology Spread Constraints for ruler pods The value will be passed through tpl.", + "type": "array", + "items": { + "type": "object" + } + } + } + }, + "serviceAccount": { + "type": "object", + "properties": { + "annotations": { + "description": "Annotations for the service account", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "automountServiceAccountToken": { + "description": "Set this toggle to false to opt out of automounting API credentials for the service account", + "type": "boolean" + }, + "create": { + "description": "Specifies whether a ServiceAccount should be created", + "type": "boolean" + }, + "imagePullSecrets": { + "description": "Image pull secrets for the service account", + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + } + } + } + }, + "labels": { + "description": "Labels for the service account", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "name": { + "description": "The name of the ServiceAccount to use. If not set and create is true, a name is generated using the fullname template", + "type": [ + "string", + "null" + ] + } + } + }, + "sidecar": { + "type": "object", + "properties": { + "disableX509StrictVerification": { + "description": "Set to true to disable strict x509 verification for kube api calls.", + "type": "boolean" + }, + "enableUniqueFilenames": { + "description": "Ensure that rule files aren't conflicting and being overwritten by prefixing their name with the namespace they are defined in.", + "type": "boolean" + }, + "image": { + "type": "object", + "properties": { + "pullPolicy": { + "description": "Docker image pull policy", + "type": "string" + }, + "registry": { + "type": "string" + }, + "repository": { + "description": "The Docker registry and image for the k8s sidecar", + "type": "string" + }, + "sha": { + "description": "Docker image sha. If empty, no sha will be used", + "type": "string" + }, + "tag": { + "description": "Docker image tag", + "type": "string" + } + } + }, + "livenessProbe": { + "description": "Liveness probe definition.", + "type": "object", + "additionalProperties": true + }, + "readinessProbe": { + "description": "Readiness probe definition.", + "type": "object", + "additionalProperties": true + }, + "resizePolicy": { + "description": "Container resize policy for the sidecar Example: resizePolicy: - resourceName: cpu restartPolicy: NotRequired - resourceName: memory restartPolicy: RestartContainer", + "type": "array" + }, + "resources": { + "description": "Resource requests and limits for the sidecar", + "type": "object", + "additionalProperties": true + }, + "rules": { + "type": "object", + "properties": { + "enabled": { + "description": "Whether or not to create a sidecar to ingest rule from specific ConfigMaps and/or Secrets.", + "type": "boolean" + }, + "folder": { + "description": "Folder into which the rules will be placed.", + "type": "string" + }, + "folderAnnotation": { + "description": "The annotation overwriting the folder value. The annotation value can be either an absolute or a relative path. Relative paths will be relative to FOLDER. Useful for multi-tenancy setups.", + "type": [ + "string", + "null" + ] + }, + "healthPort": { + "description": "Health Server port of the sidecar container.", + "type": "integer" + }, + "label": { + "description": "Label that the configmaps/secrets with rules will be marked with.", + "type": "string" + }, + "labelValue": { + "description": "Label value that the configmaps/secrets with rules will be set to.", + "type": "string" + }, + "logLevel": { + "description": "Log level of the sidecar container.", + "type": "string" + }, + "resource": { + "description": "Search in configmap, secret, or both.", + "type": "string" + }, + "script": { + "description": "Absolute path to the shell script to execute after a configmap or secret has been reloaded.", + "type": [ + "string", + "null" + ] + }, + "searchNamespace": { + "description": "Comma separated list of namespaces. If specified, the sidecar will search for config-maps/secrets inside these namespaces. Otherwise the namespace in which the sidecar is running will be used. It's also possible to specify 'ALL' to search in all namespaces.", + "type": [ + "string", + "null" + ] + }, + "watchClientTimeout": { + "description": "WatchClientTimeout: is a client-side timeout, configuring your local socket. If you have a network outage dropping all packets with no RST/FIN, this is how long your client waits before realizing \u0026 dropping the connection. Defaults to 66sec.", + "type": "integer" + }, + "watchMethod": { + "description": "Method to use to detect ConfigMap changes. With WATCH the sidecar will do a WATCH request, with SLEEP it will list all ConfigMaps, then sleep for 60 seconds.", + "type": "string" + }, + "watchServerTimeout": { + "description": "WatchServerTimeout: request to the server, asking it to cleanly close the connection after that. defaults to 60sec; much higher values like 3600 seconds (1h) are feasible for non-Azure K8S.", + "type": "integer" + } + } + }, + "securityContext": { + "description": "The SecurityContext for the sidecar.", + "type": "object", + "additionalProperties": true + }, + "skipTlsVerify": { + "description": "Set to true to skip tls verification for kube api calls.", + "type": "boolean" + }, + "startupProbe": { + "description": "Startup probe definition.", + "type": "object", + "additionalProperties": true + } + } + }, + "singleBinary": { + "type": "object", + "properties": { + "affinity": { + "description": "Affinity for single binary pods. The value will be passed through tpl.", + "type": [ + "object", + "null" + ], + "additionalProperties": true + }, + "annotations": { + "description": "Annotations for single binary StatefulSet", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "autoscaling": { + "type": "object", + "properties": { + "behavior": { + "description": "HPA behavior configuration, passed directly as a K8s HPA behavior object.", + "type": "object", + "additionalProperties": true + }, + "customMetrics": { + "description": "Allows one to define custom metrics using the HPA/v2 schema (for example, Pods, Object or External metrics)", + "type": "array" + }, + "enabled": { + "description": "Enable autoscaling", + "type": "boolean" + }, + "maxReplicas": { + "description": "Maximum autoscaling replicas for the single binary", + "type": "integer" + }, + "minReplicas": { + "description": "Minimum autoscaling replicas for the single binary", + "type": "integer" + }, + "targetCPUUtilizationPercentage": { + "description": "Target CPU utilisation percentage for the single binary", + "type": [ + "integer", + "null" + ] + }, + "targetMemoryUtilizationPercentage": { + "description": "Target memory utilisation percentage for the single binary", + "type": [ + "integer", + "null" + ] + } + } + }, + "dnsConfig": { + "type": "object", + "additionalProperties": true + }, + "enabled": { + "description": "Enable the single binary component. Requires `loki.deploymentMode` to be set to `SingleBinary`.", + "type": "boolean" + }, + "extraArgs": { + "description": "Labels for single binary service", + "type": "array" + }, + "extraContainers": { + "description": "Extra containers to add to the single binary loki pod", + "type": [ + "string", + "array", + "null" + ] + }, + "extraEnv": { + "description": "Environment variables to add to the single binary pods", + "type": "array" + }, + "extraEnvFrom": { + "description": "Environment variables from secrets or configmaps to add to the single binary pods", + "type": "array" + }, + "extraVolumeMounts": { + "description": "Volume mounts to add to the single binary pods", + "type": "array" + }, + "extraVolumes": { + "description": "Volumes to add to the single binary pods", + "type": "array" + }, + "hostUsers": { + "description": "Use the host's user namespace in the single binary pods", + "type": [ + "boolean", + "null" + ] + }, + "image": { + "type": "object", + "properties": { + "registry": { + "description": "The Docker registry for the single binary image. Overrides `loki.image.registry`", + "type": [ + "string", + "null" + ] + }, + "repository": { + "description": "Docker image repository for the single binary image. Overrides `loki.image.repository`", + "type": [ + "string", + "null" + ] + }, + "tag": { + "description": "Docker image tag for the single binary image. Overrides `loki.image.tag`", + "type": [ + "string", + "null" + ] + } + } + }, + "initContainers": { + "description": "Init containers to add to the single binary pods", + "type": [ + "string", + "array", + "null" + ] + }, + "kedaAutoscaling": { + "type": "object", + "properties": { + "behavior": { + "description": "Behavior configuration for KEDA ScaledObject (horizontalPodAutoscalerConfig.behavior). Ref: https://keda.sh/docs/latest/reference/scaledobject-spec/#advanced", + "type": "object", + "additionalProperties": true + }, + "cooldownPeriod": { + "description": "Period to wait after the last trigger reported active before scaling the resource back to 0 (seconds). Defaults to defaults.kedaAutoscaling.cooldownPeriod if not set.", + "type": [ + "integer", + "null" + ] + }, + "enabled": { + "description": "Enable KEDA autoscaling for the single binary. Mutually exclusive with autoscaling.enabled", + "type": "boolean" + }, + "fallback": { + "description": "Fallback configuration for KEDA ScaledObject. Applied when the trigger metric cannot be retrieved. Ref: https://keda.sh/docs/latest/reference/scaledobject-spec/#fallback", + "type": "object", + "additionalProperties": true + }, + "maxReplicas": { + "description": "Maximum replicas for KEDA autoscaling", + "type": "integer" + }, + "minReplicas": { + "description": "Minimum replicas for KEDA autoscaling", + "type": "integer" + }, + "pollingInterval": { + "description": "Interval (seconds) to poll each trigger. Defaults to defaults.kedaAutoscaling.pollingInterval if not set.", + "type": [ + "integer", + "null" + ] + }, + "triggers": { + "description": "KEDA triggers for the single binary. Ref: https://keda.sh/docs/latest/scalers/", + "type": "array" + } + } + }, + "kind": { + "description": "Kind of read deployment. StatefulSet and Deployment are supported.", + "type": "string" + }, + "labels": { + "description": "Additional labels for single binary StatefulSet", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "nodeSelector": { + "description": "Node selector for single binary pods", + "type": "object", + "additionalProperties": true + }, + "persistence": { + "type": "object", + "properties": { + "accessModes": { + "description": "Set access modes on the PersistentVolumeClaim", + "type": "array", + "items": { + "type": "string" + } + }, + "annotations": { + "description": "Annotations for volume claim", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "dataVolumeParameters": { + "description": "Parameters used for the `storage` volume when persistence.enabled is false. Allows replacing the default emptyDir volume with a custom volume definition. For example, to use an existing PVC: dataVolumeParameters: persistentVolumeClaim: claimName: my-existing-pvc", + "type": "object", + "additionalProperties": true + }, + "enableStatefulSetAutoDeletePVC": { + "description": "Enable StatefulSetAutoDeletePVC feature", + "type": "boolean" + }, + "enabled": { + "description": "Enable persistent disk", + "type": "boolean" + }, + "labels": { + "description": "Labels for volume claim", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "selector": { + "description": "Selector for persistent disk", + "type": [ + "object", + "null" + ] + }, + "size": { + "description": "Size of persistent disk", + "type": "string" + }, + "storageClass": { + "description": "Storage class to be used. If defined, storageClassName: \u003cstorageClass\u003e. If set to \"-\", storageClassName: \"\", which disables dynamic provisioning. If empty or set to null, no storageClassName spec is set, choosing the default provisioner (gp2 on AWS, standard on GKE, AWS, and OpenStack).", + "type": [ + "string", + "null" + ] + }, + "whenDeleted": { + "description": "What to do with the volumes when the StatefulSet is deleted.", + "type": "string" + }, + "whenScaled": { + "description": "What to do with the volume when the StatefulSet is scaled down.", + "type": "string" + } + } + }, + "podAnnotations": { + "description": "Annotations for single binary pods", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "podDisruptionBudget": { + "type": "object", + "properties": { + "annotations": { + "description": "Annotations for Pod Disruption Budget", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "enabled": { + "description": "Enable Pod Disruption Budget", + "type": "boolean" + }, + "labels": { + "description": "Labels for Pod Disruption Budget", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "maxUnavailable": { + "description": "Pod Disruption Budget maxUnavailable", + "type": [ + "string", + "integer", + "null" + ] + }, + "minAvailable": { + "description": "Pod Disruption Budget minAvailable", + "type": [ + "string", + "integer", + "null" + ] + }, + "unhealthyPodEvictionPolicy": { + "description": "Pod Disruption Budget unhealthyPodEvictionPolicy", + "type": [ + "string", + "null" + ] + } + } + }, + "podLabels": { + "description": "Additional labels for each `single binary` pod", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "podManagementPolicy": { + "description": "The default is to deploy all pods in parallel.", + "type": "string" + }, + "priorityClassName": { + "description": "The name of the PriorityClass for single binary pods", + "type": [ + "string", + "null" + ] + }, + "replicas": { + "description": "Number of replicas for the single binary. Set to null to omit spec.replicas from the workload, allowing an external controller (e.g. HPA, KEDA, rollout-operator) to manage replica counts without Helm resetting them.", + "type": [ + "integer", + "null" + ] + }, + "resizePolicy": { + "description": "Container resize policy for the single binary Example: resizePolicy: - resourceName: cpu restartPolicy: NotRequired - resourceName: memory restartPolicy: RestartContainer", + "type": "array" + }, + "resources": { + "description": "Resource requests and limits for the single binary", + "type": "object", + "additionalProperties": true + }, + "selectorLabels": { + "description": "Additional selector labels for each `single binary` pod", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "service": { + "type": "object", + "properties": { + "annotations": { + "description": "Annotations for single binary Service", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "appProtocol": { + "description": "Adds the appProtocol field to the single binary service. This allows single binary to work with istio protocol selection.", + "type": "object", + "properties": { + "grpc": { + "description": "Set the optional grpc service protocol. Ex: \"grpc\", \"http2\" or \"https\"", + "type": "string" + } + } + }, + "ipFamilies": { + "description": "ipFamilies for single binary Service Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services", + "type": "array" + }, + "ipFamilyPolicy": { + "description": "ipFamilyPolicy for single binary Service Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services", + "type": "string" + }, + "labels": { + "description": "Additional labels for single binary Service", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "sessionAffinity": { + "description": "Session affinity for single binary Service", + "type": "string" + }, + "sessionAffinityConfig": { + "description": "Session affinity config for single binary Service", + "type": "object", + "additionalProperties": true + }, + "trafficDistribution": { + "description": "trafficDistribution single binary Service", + "type": "string" + }, + "type": { + "description": "Service Type for single binary Service", + "type": "string" + } + } + }, + "sidecar": { + "description": "Whether to enable the rules sidecar", + "type": "boolean" + }, + "statefulSetRecreateJob": { + "description": "EXPERIMENTAL: Enable creating a Job to recreate the write StatefulSet when the compactor configuration is changed. # Only applicable if `compactor.kind` is StatefulSet. Useful for PVC size changes, which require recreating the StatefulSet.", + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + } + } + }, + "strategy": { + "description": "UpdateStrategy or Strategy for single binary.", + "type": "object", + "additionalProperties": true + }, + "targetModule": { + "description": "Comma-separated list of Loki modules to load for the single binary", + "type": "string" + }, + "terminationGracePeriodSeconds": { + "description": "Grace period to allow the single binary to shutdown before it is killed", + "type": "integer" + }, + "tolerations": { + "description": "Tolerations for single binary pods", + "type": "array" + }, + "topologySpreadConstraints": { + "description": "Topology Spread Constraints for single binary pods The value will be passed through tpl.", + "type": "array", + "items": { + "type": "object" + } + } + } + }, + "tableManager": { + "description": "DEPRECATED Configuration for the table-manager. The table-manager is only necessary when using a deprecated index type such as Cassandra, Bigtable, or DynamoDB, it has not been necessary since loki introduced self- contained index types like 'boltdb-shipper' and 'tsdb'. This will be removed in a future helm chart.", + "deprecated": true, + "type": "object", + "properties": { + "affinity": { + "description": "Affinity for table-manager pods. The value will be passed through tpl.", + "type": [ + "object", + "null" + ], + "additionalProperties": true + }, + "annotations": { + "description": "Annotations for table-manager deployment", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "command": { + "description": "Command to execute instead of defined in Docker image", + "type": [ + "string", + "null" + ] + }, + "dnsConfig": { + "description": "DNS config table-manager pods", + "type": "object", + "additionalProperties": true + }, + "enabled": { + "description": "Specifies whether the table-manager should be enabled", + "type": "boolean" + }, + "extraArgs": { + "description": "Additional CLI args for the table-manager", + "type": "array" + }, + "extraContainers": { + "description": "Containers to add to the table-manager pods", + "type": [ + "string", + "array", + "null" + ] + }, + "extraEnv": { + "description": "Environment variables to add to the table-manager pods", + "type": "array" + }, + "extraEnvFrom": { + "description": "Environment variables from secrets or configmaps to add to the table-manager pods", + "type": "array" + }, + "extraVolumeMounts": { + "description": "Volume mounts to add to the table-manager pods", + "type": "array" + }, + "extraVolumes": { + "description": "Volumes to add to the table-manager pods", + "type": "array" + }, + "hostUsers": { + "description": "Use the host's user namespace in table-manager pods", + "type": [ + "boolean", + "null" + ] + }, + "image": { + "type": "object", + "properties": { + "registry": { + "description": "The Docker registry for the table-manager image. Overrides `loki.image.registry`", + "type": [ + "string", + "null" + ] + }, + "repository": { + "description": "Docker image repository for the table-manager image. Overrides `loki.image.repository`", + "type": [ + "string", + "null" + ] + }, + "tag": { + "description": "Docker image tag for the table-manager image. Overrides `loki.image.tag`", + "type": [ + "string", + "null" + ] + } + } + }, + "nodeSelector": { + "description": "Node selector for table-manager pods", + "type": "object", + "additionalProperties": true + }, + "podAnnotations": { + "description": "Annotations for table-manager pods", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "podLabels": { + "description": "Labels for table-manager pods", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "priorityClassName": { + "description": "The name of the PriorityClass for table-manager pods", + "type": [ + "string", + "null" + ] + }, + "resizePolicy": { + "description": "Container resize policy for the table-manager Example: resizePolicy: - resourceName: cpu restartPolicy: NotRequired - resourceName: memory restartPolicy: RestartContainer", + "type": "array" + }, + "resources": { + "description": "Resource requests and limits for the table-manager", + "type": "object", + "additionalProperties": true + }, + "retention_deletes_enabled": { + "description": "Enable deletes by retention", + "type": "boolean" + }, + "retention_period": { + "description": "Set retention period", + "type": [ + "string", + "integer" + ] + }, + "service": { + "type": "object", + "properties": { + "annotations": { + "description": "Annotations for table-manager Service", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "appProtocol": { + "description": "Adds the appProtocol field to the table-manager service. This allows table-manager to work with istio protocol selection.", + "type": "object", + "properties": { + "grpc": { + "description": "Set the optional grpc service protocol. Ex: \"grpc\", \"http2\" or \"https\"", + "type": "string" + } + } + }, + "ipFamilies": { + "description": "ipFamilies for table-manager Service Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services", + "type": "array" + }, + "ipFamilyPolicy": { + "description": "ipFamilyPolicy for table-manager Service Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services", + "type": "string" + }, + "labels": { + "description": "Additional labels for table-manager Service", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "sessionAffinity": { + "description": "Session affinity for table-manager Service", + "type": "string" + }, + "sessionAffinityConfig": { + "description": "Session affinity config for table-manager Service", + "type": "object", + "additionalProperties": true + }, + "trafficDistribution": { + "description": "trafficDistribution for table-manager Service", + "type": "string" + }, + "type": { + "description": "Service Type for table-manager Service", + "type": "string" + } + } + }, + "serviceAccount": { + "type": "object", + "properties": { + "annotations": { + "description": "Annotations for the service account", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "automountServiceAccountToken": { + "description": "Set this toggle to false to opt out of automounting API credentials for the service account", + "type": "boolean" + }, + "create": { + "description": "Specifies whether a ServiceAccount should be created", + "type": "boolean" + }, + "imagePullSecrets": { + "description": "Image pull secrets for the service account", + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + } + } + } + }, + "labels": { + "description": "Labels for the service account", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "name": { + "description": "The name of the ServiceAccount to use. If not set and create is true, a name is generated using the fullname template", + "type": [ + "string", + "null" + ] + } + } + }, + "terminationGracePeriodSeconds": { + "description": "Grace period to allow the table-manager to shutdown before it is killed", + "type": "integer" + }, + "tolerations": { + "description": "Tolerations for table-manager pods", + "type": "array" + } + } + }, + "test": { + "description": "Section for configuring optional Helm test", + "type": "object", + "properties": { + "annotations": { + "description": "Additional annotations for test pods", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "canaryServiceAddress": { + "description": "Used to directly query the metrics endpoint of the canary for testing, this approach avoids needing prometheus for testing. This in a newer approach to using prometheusAddress such that tests do not have a dependency on prometheus", + "type": "string" + }, + "enabled": { + "type": "boolean" + }, + "hostUsers": { + "description": "Use the host's user namespace in test pods", + "type": [ + "boolean", + "null" + ] + }, + "image": { + "description": "Image to use for loki canary", + "type": "object", + "properties": { + "digest": { + "description": "Overrides the image tag with an image digest", + "type": [ + "string", + "null" + ] + }, + "pullPolicy": { + "description": "Docker image pull policy", + "type": "string" + }, + "registry": { + "description": "The Docker registry", + "type": "string" + }, + "repository": { + "description": "Docker image repository", + "type": "string" + }, + "tag": { + "description": "Overrides the image tag whose default is the chart's appVersion", + "type": "string" + } + } + }, + "labels": { + "description": "Additional labels for the test pods", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "prometheusAddress": { + "description": "Address of the prometheus server to query for the test. This overrides any value set for canaryServiceAddress. This is kept for backward compatibility and may be removed in future releases. Previous value was 'http://prometheus:9090'", + "type": "string" + }, + "timeout": { + "description": "Number of times to retry the test before failing", + "type": "string" + } + } + }, + "write": { + "type": "object", + "properties": { + "affinity": { + "description": "Affinity for write pods. The value will be passed through tpl.", + "type": [ + "object", + "null" + ], + "additionalProperties": true + }, + "annotations": { + "description": "Annotations for write StatefulSet", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "autoscaling": { + "type": "object", + "properties": { + "behavior": { + "description": "Behavior policies while scaling.", + "type": "object", + "additionalProperties": true + }, + "enabled": { + "description": "Enable autoscaling for the write.", + "type": "boolean" + }, + "maxReplicas": { + "description": "Maximum autoscaling replicas for the write.", + "type": "integer" + }, + "minReplicas": { + "description": "Minimum autoscaling replicas for the write.", + "type": "integer" + }, + "targetCPUUtilizationPercentage": { + "description": "Target CPU utilisation percentage for the write.", + "type": [ + "integer", + "null" + ] + }, + "targetMemoryUtilizationPercentage": { + "description": "Target memory utilization percentage for the write.", + "type": [ + "integer", + "null" + ] + } + } + }, + "dnsConfig": { + "description": "DNS config for write pods", + "type": "object", + "additionalProperties": true + }, + "enabled": { + "description": "Enable the component. Requires `loki.deploymentMode` to be set to `SimpleScalable`.", + "type": "boolean" + }, + "extraArgs": { + "description": "Additional CLI args for the write", + "type": "array" + }, + "extraContainers": { + "description": "Containers to add to the write pods", + "type": [ + "string", + "array", + "null" + ] + }, + "extraEnv": { + "description": "Environment variables to add to the write pods", + "type": "array" + }, + "extraEnvFrom": { + "description": "Environment variables from secrets or configmaps to add to the write pods", + "type": "array" + }, + "extraVolumeClaimTemplates": { + "description": "volumeClaimTemplates to add to StatefulSet", + "type": "array" + }, + "extraVolumeMounts": { + "description": "Volume mounts to add to the write pods", + "type": "array" + }, + "extraVolumes": { + "description": "Volumes to add to the write pods", + "type": "array" + }, + "fullnameOverride": { + "description": "Override for the write fullname. By default, this is generated using the fullname template with \"-backend\"", + "type": "string" + }, + "hostUsers": { + "description": "Use the host's user namespace in the write pods.", + "type": [ + "boolean", + "null" + ] + }, + "image": { + "type": "object", + "properties": { + "registry": { + "description": "The Docker registry for the write image. Overrides `loki.image.registry`", + "type": [ + "string", + "null" + ] + }, + "repository": { + "description": "Docker image repository for the write image. Overrides `loki.image.repository`", + "type": [ + "string", + "null" + ] + }, + "tag": { + "description": "Docker image tag for the write image. Overrides `loki.image.tag`", + "type": [ + "string", + "null" + ] + } + } + }, + "initContainers": { + "description": "Init containers to add to the write pods", + "type": [ + "string", + "array", + "null" + ] + }, + "kedaAutoscaling": { + "type": "object", + "properties": { + "behavior": { + "description": "Behavior configuration for KEDA ScaledObject (horizontalPodAutoscalerConfig.behavior). Ref: https://keda.sh/docs/latest/reference/scaledobject-spec/#advanced", + "type": "object", + "additionalProperties": true + }, + "cooldownPeriod": { + "description": "Period to wait after the last trigger reported active before scaling the resource back to 0 (seconds). Defaults to defaults.kedaAutoscaling.cooldownPeriod if not set.", + "type": [ + "integer", + "null" + ] + }, + "enabled": { + "description": "Enable KEDA autoscaling for the write. Mutually exclusive with autoscaling.enabled", + "type": "boolean" + }, + "fallback": { + "description": "Fallback configuration for KEDA ScaledObject. Applied when the trigger metric cannot be retrieved. Ref: https://keda.sh/docs/latest/reference/scaledobject-spec/#fallback", + "type": "object", + "additionalProperties": true + }, + "maxReplicas": { + "description": "Maximum replicas for KEDA autoscaling", + "type": "integer" + }, + "minReplicas": { + "description": "Minimum replicas for KEDA autoscaling", + "type": "integer" + }, + "pollingInterval": { + "description": "Interval (seconds) to poll each trigger. Defaults to defaults.kedaAutoscaling.pollingInterval if not set.", + "type": [ + "integer", + "null" + ] + }, + "triggers": { + "description": "KEDA triggers for the write. Ref: https://keda.sh/docs/latest/scalers/", + "type": "array" + } + } + }, + "kind": { + "description": "Kind of write workload. StatefulSet and Deployment are supported.", + "type": "string" + }, + "labels": { + "description": "Additional labels for write StatefulSet", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "lifecycle": { + "description": "Lifecycle for the write container", + "type": "object" + }, + "maxUnavailable": { + "description": "Pod Disruption Budget maxUnavailable", + "deprecated": true, + "type": [ + "string", + "integer", + "null" + ] + }, + "nodeSelector": { + "description": "Node selector for write pods", + "type": "object", + "additionalProperties": true + }, + "persistence": { + "type": "object", + "properties": { + "accessModes": { + "description": "Set access modes on the PersistentVolumeClaim", + "type": "array", + "items": { + "type": "string" + } + }, + "annotations": { + "description": "Annotations for volume claim", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "dataVolumeParameters": { + "description": "Parameters used for the `data` volume when volumeClaimEnabled if false", + "type": "object", + "additionalProperties": true + }, + "enableStatefulSetAutoDeletePVC": { + "description": "Enable StatefulSetAutoDeletePVC feature", + "type": "boolean" + }, + "labels": { + "description": "Labels for volume claim", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "selector": { + "description": "Selector for persistent disk", + "type": [ + "object", + "null" + ] + }, + "size": { + "description": "Size of persistent disk", + "type": "string" + }, + "storageClass": { + "description": "Storage class to be used. If defined, storageClassName: \u003cstorageClass\u003e. If set to \"-\", storageClassName: \"\", which disables dynamic provisioning. If empty or set to null, no storageClassName spec is set, choosing the default provisioner (gp2 on AWS, standard on GKE, AWS, and OpenStack).", + "type": [ + "string", + "null" + ] + }, + "volumeAttributesClassName": { + "description": "Volume attributes class name to be used. If empty or set to null, no volumeAttributesClassName spec is set. Requires Kubernetes 1.31", + "type": [ + "string", + "null" + ] + }, + "volumeClaimsEnabled": { + "description": "Enable volume claims in pod spec", + "type": "boolean" + } + } + }, + "podAnnotations": { + "description": "Annotations for write pods", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "podDisruptionBudget": { + "type": "object", + "properties": { + "annotations": { + "description": "Annotations for Pod Disruption Budget", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "enabled": { + "description": "Enable Pod Disruption Budget", + "type": "boolean" + }, + "labels": { + "description": "Labels for Pod Disruption Budget", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "maxUnavailable": { + "description": "Pod Disruption Budget maxUnavailable", + "type": [ + "string", + "integer", + "null" + ] + }, + "minAvailable": { + "description": "Pod Disruption Budget minAvailable", + "type": [ + "string", + "integer", + "null" + ] + }, + "unhealthyPodEvictionPolicy": { + "description": "Pod Disruption Budget unhealthyPodEvictionPolicy", + "type": [ + "string", + "null" + ] + } + } + }, + "podLabels": { + "description": "Additional labels for each `write` pod", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "podManagementPolicy": { + "description": "The default is to deploy all pods in parallel.", + "type": "string" + }, + "priorityClassName": { + "description": "The name of the PriorityClass for write pods", + "type": [ + "string", + "null" + ] + }, + "replicas": { + "description": "Number of replicas for the write. Set to null to omit spec.replicas from the workload, allowing an external controller (e.g. HPA, KEDA, rollout-operator) to manage replica counts without Helm resetting them.", + "type": [ + "integer", + "null" + ] + }, + "resizePolicy": { + "description": "Container resize policy for the write Example: resizePolicy: - resourceName: cpu restartPolicy: NotRequired - resourceName: memory restartPolicy: RestartContainer", + "type": "array" + }, + "resources": { + "description": "Resource requests and limits for the write", + "type": "object", + "additionalProperties": true + }, + "selectorLabels": { + "description": "Additional selector labels for each `write` pod", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "service": { + "type": "object", + "properties": { + "annotations": { + "description": "Annotations for write Service", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "appProtocol": { + "description": "Adds the appProtocol field to the write service. This allows write to work with istio protocol selection.", + "type": "object", + "properties": { + "grpc": { + "description": "Set the optional grpc service protocol. Ex: \"grpc\", \"http2\" or \"https\"", + "type": "string" + } + } + }, + "ipFamilies": { + "description": "ipFamilies for write Service Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services", + "type": "array" + }, + "ipFamilyPolicy": { + "description": "ipFamilyPolicy for write Service Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services", + "type": "string" + }, + "labels": { + "description": "Additional labels for write Service", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "sessionAffinity": { + "description": "Session affinity for write Service", + "type": "string" + }, + "sessionAffinityConfig": { + "description": "Session affinity config for write Service", + "type": "object", + "additionalProperties": true + }, + "trafficDistribution": { + "description": "trafficDistribution for write Service", + "type": "string" + }, + "type": { + "description": "Service Type for write Service", + "type": "string" + } + } + }, + "serviceAccount": { + "type": "object", + "properties": { + "annotations": { + "description": "Annotations for the service account", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "automountServiceAccountToken": { + "description": "Set this toggle to false to opt out of automounting API credentials for the service account", + "type": "boolean" + }, + "create": { + "description": "Specifies whether a ServiceAccount should be created", + "type": "boolean" + }, + "imagePullSecrets": { + "description": "Image pull secrets for the service account", + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + } + } + } + }, + "labels": { + "description": "Labels for the service account", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "name": { + "description": "The name of the ServiceAccount to use. If not set and create is true, a name is generated using the fullname template", + "type": [ + "string", + "null" + ] + } + } + }, + "statefulSetRecreateJob": { + "description": "EXPERIMENTAL: Enable creating a Job to recreate the write StatefulSet when the compactor configuration is changed. # Only applicable if `compactor.kind` is StatefulSet. Useful for PVC size changes, which require recreating the StatefulSet.", + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + } + } + }, + "strategy": { + "description": "UpdateStrategy or Strategy for the write.", + "type": "object", + "additionalProperties": true + }, + "terminationGracePeriodSeconds": { + "description": "Grace period to allow the write to shutdown before it is killed. Especially for the ingester, this must be increased. It must be long enough so writes can be gracefully shutdown flushing/transferring all data and to successfully leave the member ring on shutdown.", + "type": "integer" + }, + "tolerations": { + "type": "array" + }, + "topologySpreadConstraints": { + "description": "Topology Spread Constraints for write pods The value will be passed through tpl.", + "type": "array", + "items": { + "type": "object" + } + } + } + } + }, + "additionalProperties": true, + "$defs": { + "_definitions.json": { + "definitions": { + "io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector": { + "description": "A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.", + "type": "object", + "properties": { + "matchExpressions": { + "description": "matchExpressions is a list of label selector requirements. The requirements are ANDed.", + "type": "array", + "items": { + "$ref": "#/$defs/_definitions.json/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelectorRequirement" + } + }, + "matchLabels": { + "description": "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelectorRequirement": { + "description": "A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.", + "type": "object", + "required": [ + "key", + "operator" + ], + "properties": { + "key": { + "description": "key is the label key that the selector applies to.", + "type": "string" + }, + "operator": { + "description": "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.", + "type": "string" + }, + "values": { + "description": "values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.", + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + } + } +} diff --git a/packs/loki-3.7.4/charts/loki/values.yaml b/packs/loki-3.7.4/charts/loki/values.yaml new file mode 100644 index 00000000..a60a556d --- /dev/null +++ b/packs/loki-3.7.4/charts/loki/values.yaml @@ -0,0 +1,7331 @@ +# $schema: ./values.schema.json + +# -- Overrides the version used to determine compatibility of resources with the target Kubernetes cluster. +# This is useful when using `helm template`, because then helm will use the client version of kubectl as the Kubernetes version, +# which may or may not match your cluster's server version. Example: 'v1.24.4'. Set to null to use the version that helm +# devises. +kubeVersionOverride: "" + +global: + # @schema type:[string, null] + # -- Overrides the Docker registry globally for all images (standard format). + # This has the highest precedence and overrides every component-level image.registry value. + imageRegistry: null + image: + # @schema type:[string, null] + # -- Overrides the Docker registry globally for all images (deprecated, use global.imageRegistry). + # This has lower precedence than global.imageRegistry, but higher precedence than component-level image.registry values. + registry: null + # @schema type:[string, null] + # -- Overrides the priorityClassName for all pods + priorityClassName: null + # -- configures cluster domain ("cluster.local" by default) + clusterDomain: "cluster.local" + # -- configures DNS service name + dnsService: "kube-dns" + # -- configures DNS service namespace + dnsNamespace: "kube-system" + # -- Common additional CLI arguments for all jobs (that is, -log.level debug, -config.expand-env=true or -log-config-reverse-order) + # (deprecated, use defaults.extraArgs) + # scope: backend, bloom-builder, bloom-gateway, bloom-planner, compactor, distributor, index-gateway, ingester, overrides-exporter, pattern-ingester, querier, query-frontend, query-scheduler, read, ruler, write. + extraArgs: [] + # -- Common environment variables to add to all pods directly managed by this chart. + # (deprecated, use defaults.extraEnv) + # scope: backend, bloom-builder, bloom-gateway, bloom-planner, compactor, distributor, index-gateway, ingester, overrides-exporter, pattern-ingester, querier, query-frontend, query-scheduler, read, ruler, write. + extraEnv: [] + # -- Common source of environment injections to add to all pods directly managed by this chart. + # (deprecated, use defaults.extraEnvFrom) + # scope: backend, bloom-builder, bloom-gateway, bloom-planner, compactor, distributor, index-gateway, ingester, overrides-exporter, pattern-ingester, querier, query-frontend, query-scheduler, read, ruler, write. + # For example to inject values from a Secret, use: + # extraEnvFrom: + # - secretRef: + # name: mysecret + extraEnvFrom: [] + # -- Common volumes to add to all pods directly managed by this chart. + # (deprecated, use defaults.extraVolumes) + # scope: backend, bloom-builder, bloom-gateway, bloom-planner, compactor, distributor, index-gateway, ingester, overrides-exporter, pattern-ingester, querier, query-frontend, query-scheduler, read, ruler, write. + extraVolumes: [] + # -- Common mount points to add to all pods directly managed by this chart. + # (deprecated, use defaults.extraVolumeMounts) + # scope: backend, bloom-builder, bloom-gateway, bloom-planner, compactor, distributor, index-gateway, ingester, overrides-exporter, pattern-ingester, querier, query-frontend, query-scheduler, read, ruler, write. + extraVolumeMounts: [] +# -- Overrides the chart's name +nameOverride: "" +# -- Overrides the chart's computed fullname +fullnameOverride: "" +# -- Overrides the chart's namespace +namespaceOverride: "" +# -- Image pull secrets for Docker images +imagePullSecrets: [] +# -- Deployment mode lets you specify how to deploy Loki. +# There are 3 options: +# - Monolithic (deprecated: SingleBinary): Loki is deployed as a single binary, useful for small installs typically without HA, up to a few tens of GB/day. +# - SimpleScalable (deprecated, removed in Loki 4): Loki is deployed as 3 targets: read, write, and backend. Useful for medium installs easier to manage than distributed, up to a about 1TB/day. +# - Distributed: Loki is deployed as individual microservices. The most complicated but most capable, useful for large installs, typically over 1TB/day. +# There are also 2 additional modes used for migrating between deployment modes: +# - Monolithic<->SimpleScalable (deprecated: SingleBinary<->SimpleScalable): Migrate from SingleBinary to SimpleScalable (or vice versa) +# - SimpleScalable<->Distributed: Migrate from SimpleScalable to Distributed (or vice versa) +# Note: SimpleScalable and Distributed REQUIRE the use of object storage. +# Ref: https://grafana.com/docs/loki/latest/get-started/deployment-modes/ +deploymentMode: Monolithic +# @schema additionalProperties:{"type":"string"} +# -- Labels to be added to resources +commonLabels: {} + +###################################################################################################################### +# +# Defaults applied to loki components only. Not applied to loki-canary, memcache, gateway/nginx or other components. +# +###################################################################################################################### +defaults: + goSettings: + # -- Fraction of the container memory limit used to compute GOMEMLIMIT (e.g. 0.85 = 85%). + # Set to 0 to disable automatic GOMEMLIMIT injection. + goMemLimitFactor: 0.85 + # -- Value to set for GOGC alongside GOMEMLIMIT. Lowering below the default of 100 reduces + # heap growth between GC cycles, working in tandem with GOMEMLIMIT to smooth memory usage. + # Set to 0 to disable automatic GOGC injection. + gogc: 80 + # @schema additionalProperties:true + # -- DNSConfig for loki pods + dnsConfig: {} + # -- hostAliases for loki pods + hostAliases: [] + # @schema type:[boolean, null] + # - ip: 1.2.3.4 + # hostnames: + # - domain.tld + # -- Use the host's user namespace for loki pods + hostUsers: null + # @schema type:[string, null] + # -- The name of the PriorityClass for loki pods + priorityClassName: "" + # @schema skipProperties:true;additionalProperties:true + # -- The SecurityContext for loki pods + podSecurityContext: {} + # -- Grace period to allow the gateway to shutdown before it is killed + terminationGracePeriodSeconds: 30 + # @schema type:[string, null] + # -- Command to execute instead of defined in Docker image + command: null + # -- Common additional CLI arguments for loki pods + extraArgs: [] + # -- Common environment variables to add to all pods directly managed by this chart. + extraEnv: [] + # -- Common source of environment injections to add to all pods directly managed by this chart. + # For example to inject values from a Secret, use: + # extraEnvFrom: + # - secretRef: + # name: mysecret + extraEnvFrom: [] + # -- Common volumes to add to all pods directly managed by this chart. + extraVolumes: [] + # -- Common mount points to add to all pods directly managed by this chart. + extraVolumeMounts: [] + # @schema skipProperties:true;additionalProperties:true + # -- The SecurityContext for Loki containers for loki pods + containerSecurityContext: {} + # @schema skipProperties:true;additionalProperties:true + # -- Configures the liveness probe for loki pods + livenessProbe: {} + # @schema skipProperties:true;additionalProperties:true + # -- Configures the readiness probe for loki pods + readinessProbe: {} + # @schema skipProperties:true;additionalProperties:true + # -- Configures the startup probe for loki pods + startupProbe: {} + # @schema additionalProperties:true + # -- Node selector for loki pods + nodeSelector: {} + # -- Tolerations for loki pods + tolerations: [] + # -- Set this toggle to false to opt out of automounting API credentials for the service account + automountServiceAccountToken: true + # @schema additionalProperties:{"type":"string"} + # -- Annotations for loki Deployments/StatefulSets + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Additional labels for loki Deployments/StatefulSets + labels: {} + # @schema additionalProperties:{"type":"string"} + # -- Annotations for loki pods + podAnnotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Additional labels for loki pod + podLabels: {} + # -- Should enableServiceLinks be enabled. Default to enable + enableServiceLinks: true + service: + # @schema additionalProperties:{"type":"string"} + # -- Common annotations for all services + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Common labels for all services + labels: {} + # -- trafficDistribution for services + # Ref: https://kubernetes.io/docs/concepts/services-networking/service/#traffic-distribution + trafficDistribution: "" + # -- ipFamilyPolicy for all services + # Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services + ipFamilyPolicy: "" + # -- ipFamilies for all services + # Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services + ipFamilies: [] + # -- KEDA autoscaling shared configuration for all components that support KEDA + kedaAutoscaling: + # -- Prometheus server address for KEDA triggers + prometheusAddress: "" + # -- Whether to skip SSL verification when connecting to Prometheus + unsafeSsl: false + # -- Whether to ignore null values from Prometheus queries + ignoreNullValues: true + # -- Custom HTTP headers to include in Prometheus requests. Useful for multi-tenant setups (e.g. "X-Scope-OrgID=tenant1") + customHeaders: "" + # -- Interval (seconds) to poll each trigger. Overridable per component. + pollingInterval: 30 + # -- Period (seconds) to wait after the last trigger reported active before scaling back to 0. Overridable per component. + cooldownPeriod: 300 + # -- KEDA trigger authentication settings. Ref: https://keda.sh/docs/latest/concepts/authentication/ + authentication: + # -- Enable TriggerAuthentication for KEDA triggers + enabled: false + # -- Authentication modes for the trigger (e.g. "bearer", "basic") + authModes: "" + # -- Secret key references for TriggerAuthentication + secretTargetRef: [] + statefulSetRecreateJob: + # -- Enable the PVC resize job for statefulsets. This job will be triggered when the storage size is increased and + # will recreate the statefulset to allow resizing of PVCs, which is not natively supported by Kubernetes. + patchPVC: true + image: + registry: registry.k8s.io + repository: kubectl + # -- Overrides the image tag. Defaults to .Capabilities.KubeVersion.Version + tag: '' + +###################################################################################################################### +# +# Base Loki Configs including kubernetes configurations and configurations for Loki itself, +# see below for more specifics on Loki's configuration. +# +###################################################################################################################### +# -- Configuration for running Loki +# @default -- See values.yaml +loki: + # @schema skipProperties:true;additionalProperties:true + # Configures the liveness probe for all of the Loki pods + livenessProbe: + httpGet: + path: /loki/api/v1/status/buildinfo + port: http-metrics + periodSeconds: 30 + successThreshold: 1 + failureThreshold: 10 + timeoutSeconds: 1 + # @schema skipProperties:true;additionalProperties:true + # Configures the readiness probe for all of the Loki pods + readinessProbe: + httpGet: + path: /ready + port: http-metrics + periodSeconds: 10 + initialDelaySeconds: 15 + successThreshold: 1 + failureThreshold: 3 + timeoutSeconds: 1 + # @schema skipProperties:true;additionalProperties:true + # Configures the startup probe for all of the Loki pods + startupProbe: {} + image: + # -- The Docker registry + registry: docker.io + # -- Docker image repository + repository: grafana/loki + # @schema type:[string, null] + # -- Overrides the image tag whose default is the chart's appVersion + tag: null + # @schema type:[string, null] + # -- Overrides the image tag with an image digest + digest: null + # -- Docker image pull policy + pullPolicy: IfNotPresent + # @schema additionalProperties:{"type":"string"} + # -- Common annotations for all deployments/StatefulSets + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Common annotations for all pods + podAnnotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Common labels for all pods + podLabels: {} + # @schema additionalProperties:{"type":"string"} + # -- Common annotations for all services + serviceAnnotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Common labels for all services + serviceLabels: {} + # -- The number of old ReplicaSets to retain to allow rollback + revisionHistoryLimit: 10 + # @schema skipProperties:true;additionalProperties:true + # -- The SecurityContext for Loki pods + podSecurityContext: + fsGroup: 10001 + fsGroupChangePolicy: OnRootMismatch + runAsGroup: 10001 + runAsNonRoot: true + runAsUser: 10001 + seccompProfile: + type: RuntimeDefault + # @schema skipProperties:true;additionalProperties:true + # -- The SecurityContext for Loki containers + containerSecurityContext: + readOnlyRootFilesystem: true + capabilities: + drop: + - ALL + allowPrivilegeEscalation: false + seccompProfile: + type: RuntimeDefault + # -- Should enableServiceLinks be enabled. Default to enable + enableServiceLinks: true + # @schema additionalProperties:true + # -- DNS config for Loki pods + dnsConfig: {} + ###################################################################################################################### + # + # Loki Configuration + # + # There are several ways to pass configuration to Loki, listing them here in order of our preference for how + # you should use this chart. + # 1. Use the templated value of loki.config below and the corresponding override sections which follow. + # This allows us to set a lot of important Loki configurations and defaults and also allows us to maintain them + # over time as Loki changes and evolves. + # 2. Use the loki.structuredConfig section. + # This will completely override the templated value of loki.config, so you MUST provide the entire Loki config + # including any configuration that we set in loki.config unless you explicitly are trying to change one of those + # values and are not able to do so with the templated sections. + # If you choose this approach the burden is on you to maintain any changes we make to the templated config. + # 3. Use an existing secret or configmap to provide the configuration. + # This option is mostly provided for folks who have external processes which provide or modify the configuration. + # When using this option you can specify a different name for loki.generatedConfigObjectName and configObjectName + # if you have a process which takes the generated config and modifies it, or you can stop the chart from generating + # a config entirely by setting loki.generatedConfigObjectName to + # + ###################################################################################################################### + + # -- Defines what kind of object stores the configuration, a ConfigMap or a Secret. + # In order to move sensitive information (such as credentials) from the ConfigMap/Secret to a more secure location (e.g. vault), it is possible to use [environment variables in the configuration](https://grafana.com/docs/loki/latest/configuration/#use-environment-variables-in-the-configuration). + # Such environment variables can be then stored in a separate Secret and injected via the global.extraEnvFrom value. For details about environment injection from a Secret please see [Secrets](https://kubernetes.io/docs/concepts/configuration/secret/#use-case-as-container-environment-variables). + configStorageType: ConfigMap + # -- The name of the object which Loki will mount as a volume containing the config. + # If the configStorageType is Secret, this will be the name of the Secret, if it is ConfigMap, this will be the name of the ConfigMap. + # The value will be passed through tpl. + configObjectName: '{{ include "loki.name" . }}' + # -- The name of the Secret or ConfigMap that will be created by this chart. + # If empty, no configmap or secret will be created. + # The value will be passed through tpl. + generatedConfigObjectName: '{{ include "loki.name" . }}' + # -- Config file contents for Loki + # @default -- See values.yaml + config: | + auth_enabled: {{ .Values.loki.auth_enabled }} + + {{- with .Values.loki.server }} + server: + {{- toYaml . | nindent 2}} + {{- end}} + + {{- with .Values.loki.pattern_ingester }} + pattern_ingester: + {{- tpl (. | toYaml) $ | nindent 4 }} + {{- end }} + + memberlist: + {{- if .Values.loki.memberlistConfig }} + {{- toYaml .Values.loki.memberlistConfig | nindent 2 }} + {{- else }} + {{- if .Values.loki.extraMemberlistConfig}} + {{- toYaml .Values.loki.extraMemberlistConfig | nindent 2}} + {{- end }} + join_members: + - {{ include "loki.memberlist" . }}.{{ include "loki.namespace" $ }}.svc.{{ .Values.global.clusterDomain }} + {{- with .Values.migrate.fromDistributed }} + {{- if .enabled }} + - {{ .memberlistService }} + {{- end }} + {{- end }} + {{- end }} + + {{- with .Values.loki.ingester }} + ingester: + {{- tpl (. | toYaml) $ | nindent 4 }} + {{- end }} + + {{- with .Values.loki.ingester_client }} + ingester_client: + {{- tpl (. | toYaml) $ | nindent 4 }} + {{- end }} + + {{- with .Values.loki.block_builder }} + block_builder: + {{- tpl (. | toYaml) $ | nindent 4 }} + {{- end }} + + {{- if .Values.loki.commonConfig}} + common: + {{- toYaml .Values.loki.commonConfig | nindent 2}} + storage: + {{- include "loki.commonStorageConfig" . | nindent 4}} + {{- end}} + + {{- with .Values.loki.limits_config }} + limits_config: + {{- tpl (. | toYaml) $ | nindent 4 }} + {{- end }} + + runtime_config: + file: /etc/loki/runtime-config/runtime-config.yaml + + {{- if .Values.chunksCache.enabled }} + {{- with .Values.chunksCache }} + chunk_store_config: + chunk_cache_config: + default_validity: {{ .defaultValidity }} + background: + writeback_goroutines: {{ .writebackParallelism }} + writeback_buffer: {{ .writebackBuffer }} + writeback_size_limit: {{ .writebackSizeLimit }} + memcached: + batch_size: {{ .batchSize }} + parallelism: {{ .parallelism }} + memcached_client: + addresses: {{ .addresses }} + consistent_hash: true + timeout: {{ .timeout }} + max_idle_conns: 72 + {{- end }} + {{- with .Values.chunksCache.l2 }} + {{- if .enabled }} + l2_chunk_cache_handoff: {{ .l2ChunkCacheHandoff }} + chunk_cache_config_l2: + default_validity: {{ .defaultValidity }} + background: + writeback_goroutines: {{ .writebackParallelism }} + writeback_buffer: {{ .writebackBuffer }} + writeback_size_limit: {{ .writebackSizeLimit }} + memcached: + batch_size: {{ .batchSize }} + parallelism: {{ .parallelism }} + memcached_client: + addresses: {{ .addresses }} + consistent_hash: true + timeout: {{ .timeout }} + max_idle_conns: 72 + {{- end }} + {{- end }} + {{- end }} + + {{- if .Values.loki.schemaConfig }} + schema_config: + {{- toYaml .Values.loki.schemaConfig | nindent 2}} + {{- end }} + + {{- if .Values.loki.useTestSchema }} + schema_config: + {{- toYaml .Values.loki.testSchemaConfig | nindent 2}} + {{- end }} + + {{- if .Values.ruler.enabled }} + {{ include "loki.rulerConfig" . }} + {{- end }} + + {{- if and .Values.loki.storage.use_thanos_objstore .Values.ruler.enabled}} + ruler_storage: + {{- include "loki.rulerThanosStorageConfig" . | nindent 2 }} + {{- end }} + + {{- if or .Values.tableManager.retention_deletes_enabled .Values.tableManager.retention_period }} + table_manager: + retention_deletes_enabled: {{ .Values.tableManager.retention_deletes_enabled }} + retention_period: {{ .Values.tableManager.retention_period }} + {{- end }} + + query_range: + align_queries_with_step: true + {{- with .Values.loki.query_range }} + {{- tpl (. | toYaml) $ | nindent 2 }} + {{- end }} + {{- if .Values.resultsCache.enabled }} + {{- with .Values.resultsCache }} + cache_results: true + results_cache: + cache: + default_validity: {{ .defaultValidity }} + background: + writeback_goroutines: {{ .writebackParallelism }} + writeback_buffer: {{ .writebackBuffer }} + writeback_size_limit: {{ .writebackSizeLimit }} + memcached_client: + addresses: {{ .addresses }} + consistent_hash: true + timeout: {{ .timeout }} + update_interval: 1m + {{- end }} + {{- end }} + + {{- with .Values.loki.storage_config }} + storage_config: + {{- if not (hasKey $.Values.loki.storage_config "use_thanos_objstore") }} + use_thanos_objstore: {{ $.Values.loki.storage.use_thanos_objstore }} + {{- end }} + {{- tpl (. | toYaml) $ | nindent 4 }} + {{- end }} + + {{- with .Values.loki.query_scheduler }} + query_scheduler: + {{- tpl (. | toYaml) $ | nindent 4 }} + {{- end }} + + {{- with .Values.loki.compactor }} + compactor: + {{- tpl (. | toYaml) $ | nindent 4 }} + {{- end }} + + {{- with .Values.loki.compactor_grpc_client }} + compactor_grpc_client: + {{- tpl (. | toYaml) $ | nindent 4 }} + {{- end }} + + {{- with .Values.loki.analytics }} + analytics: + {{- tpl (. | toYaml) $ | nindent 4 }} + {{- end }} + + {{- if .Values.loki.ui.enabled }} + ui: + enabled: true + {{- end }} + {{- with .Values.loki.querier }} + querier: + {{- tpl (. | toYaml) $ | nindent 4 }} + {{- end }} + + {{- with .Values.loki.index_gateway }} + index_gateway: + {{- tpl (. | toYaml) $ | nindent 4 }} + {{- end }} + + {{- with .Values.loki.frontend }} + frontend: + {{- tpl (. | toYaml) $ | nindent 4 }} + {{- end }} + + {{- with .Values.loki.frontend_worker }} + frontend_worker: + {{- tpl (. | toYaml) $ | nindent 4 }} + {{- end }} + + {{- with .Values.loki.distributor }} + distributor: + {{- tpl (. | toYaml) $ | nindent 4 }} + {{- end }} + + tracing: + enabled: {{ .Values.loki.tracing.enabled }} + + {{- with .Values.loki.bloom_build }} + bloom_build: + {{- tpl (. | toYaml) $ | nindent 4 }} + {{- end }} + + {{- with .Values.loki.bloom_gateway }} + bloom_gateway: + {{- tpl (. | toYaml) $ | nindent 4 }} + {{- end }} + + {{- with .Values.loki.operational_config }} + operational_config: + {{- tpl (. | toYaml) $ | nindent 4 }} + {{- end }} + # Should authentication be enabled + auth_enabled: true + # @schema skipProperties:true;additionalProperties:true + # -- memberlist configuration (overrides embedded default) + memberlistConfig: {} + # @schema skipProperties:true;additionalProperties:true + # -- Extra memberlist configuration + extraMemberlistConfig: + abort_if_cluster_join_fails: true + advertise_port: 7946 + bind_port: 7946 + max_join_backoff: 1m + max_join_retries: 10 + min_join_backoff: 1s + rejoin_interval: 90s + # -- Tenants list to be created on nginx htpasswd file, with name and password or passwordHash keys

+ # Example: + #
+  # tenants:
+ # - name: "test-user-1"
+ # password: "test-password-1"
+ # - name: "test-user-2"
+ # passwordHash: "$2y$10$7O40CaY1yz7fu9O24k2/u.ct/wELYHRBsn25v/7AyuQ8E8hrLqpva" # generated using `htpasswd -nbBC10 test-user-2 test-password-2` + #
+ tenants: [] + # @schema skipProperties:true;additionalProperties:true + # -- Check https://grafana.com/docs/loki/latest/configuration/#server for more info on the server configuration. + server: + graceful_shutdown_timeout: 5s + grpc_listen_port: 9095 + grpc_server_min_time_between_pings: '10s' + grpc_server_ping_without_stream_allowed: true + grpc_server_max_concurrent_streams: 1000 + grpc_server_max_recv_msg_size: 104857600 + grpc_server_max_send_msg_size: 104857600 + http_listen_port: 3100 + http_server_idle_timeout: 30s + http_server_read_timeout: 10m0s + http_server_write_timeout: 10m0s + log_level: info + service: + # -- trafficDistribution for services + # Ref: https://kubernetes.io/docs/concepts/services-networking/service/#traffic-distribution + trafficDistribution: "" + # -- ipFamilyPolicy for all services + # Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services + ipFamilyPolicy: "" + # -- ipFamilies for all services + # Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services + ipFamilies: [] + # @schema skipProperties:true;additionalProperties:true + # -- Limits config + limits_config: + reject_old_samples: true + reject_old_samples_max_age: 168h + max_cache_freshness_per_query: 10m + split_queries_by_interval: 15m + query_timeout: 300s + volume_enabled: true + # -- Provides a reloadable runtime configuration file for some specific configuration + runtimeConfig: {} + # @schema skipProperties:true;additionalProperties:true + # -- Check https://grafana.com/docs/loki/latest/configuration/#common_config for more info on how to provide a common configuration + commonConfig: + path_prefix: /var/loki + replication_factor: 3 + # -- The gRPC address of the compactor. The use of compactor_grpc_address is preferred over compactor_address. + # If a customized compactor_address is set, compactor_grpc_address should be set to an empty string. + compactor_grpc_address: '{{ include "loki.compactorAddress" . }}' + # @schema skipProperties:true;additionalProperties:true + # -- Storage config. Providing this will automatically populate all necessary storage configs in the templated config. + # -- In case of using thanos storage, enable use_thanos_objstore and the configuration should be done inside the object_store section. + storage: + # Loki requires a bucket for chunks and the ruler. + # Please provide these values if you are using object storage. + # bucketNames: + # chunks: FIXME + # ruler: FIXME + type: s3 + s3: + # @schema type:[string, null] + s3: null + # @schema type:[string, null] + endpoint: null + # @schema type:[string, null] + region: null + # @schema type:[string, null] + secretAccessKey: null + # @schema type:[string, null] + accessKeyId: null + # @schema type:[string, null] + signatureVersion: null + s3ForcePathStyle: false + insecure: false + http_config: {} + # -- Check https://grafana.com/docs/loki/latest/configure/#s3_storage_config for more info on how to provide a backoff_config + backoff_config: {} + disable_dualstack: false + gcs: + chunkBufferSize: 0 + requestTimeout: "0s" + enableHttp2: true + azure: + # @schema type:[string, null] + accountName: null + # @schema type:[string, null] + accountKey: null + # @schema type:[string, null] + connectionString: null + useManagedIdentity: false + useFederatedToken: false + # @schema type:[string, null] + userAssignedId: null + # @schema type:[string, null] + requestTimeout: null + # @schema type:[string, null] + endpointSuffix: null + # @schema type:[string, null] + chunkDelimiter: null + swift: + # @schema type:[string, null] + auth_version: null + # @schema type:[string, null] + auth_url: null + # @schema type:[string, null] + internal: null + # @schema type:[string, null] + username: null + # @schema type:[string, null] + user_domain_name: null + # @schema type:[string, null] + user_domain_id: null + # @schema type:[string, null] + user_id: null + # @schema type:[string, null] + password: null + # @schema type:[string, null] + domain_id: null + # @schema type:[string, null] + domain_name: null + # @schema type:[string, null] + project_id: null + # @schema type:[string, null] + project_name: null + # @schema type:[string, null] + project_domain_id: null + # @schema type:[string, null] + project_domain_name: null + # @schema type:[string, null] + region_name: null + # @schema type:[string, null] + container_name: null + # @schema type:[string, null] + max_retries: null + # @schema type:[string, null] + connect_timeout: null + # @schema type:[string, null] + request_timeout: null + filesystem: + chunks_directory: /var/loki/chunks + rules_directory: /var/loki/rules + + # Loki now supports using thanos storage clients for connecting to object storage backend. + # This will become the default way to configure storage in a future releases. + use_thanos_objstore: false + + # @schema skipProperties:true;additionalProperties:true + object_store: + # Type of object store. Valid options are: s3, gcs, azure + type: s3 + # @schema type:[string, null] + # Optional prefix for storage keys + storage_prefix: null + # S3 configuration (when type is "s3") + s3: + # @schema type:[string, null] + # S3 endpoint URL + endpoint: null + # @schema type:[string, null] + # Optional region + region: null + # @schema type:[string, null] + # Optional access key + access_key_id: null + # @schema type:[string, null] + # Optional secret key + secret_access_key: null + # Optional. Enable if using self-signed TLS + insecure: false + # Optional server-side encryption configuration + sse: {} + # Optional HTTP client configuration + http: {} + + # GCS configuration (when type is "gcs") + gcs: + # @schema type:[string, null] + # Name of the bucket + bucket_name: null + # @schema type:[string, null] + # Optional service account JSON + service_account: null + + # Azure configuration (when type is "azure") + azure: + # @schema type:[string, null] + # Storage account name + account_name: null + # @schema type:[string, null] + # Optional storage account key + account_key: null + + # -- Check https://grafana.com/docs/loki/latest/configuration/#schema_config for more info on how to configure schemas + schemaConfig: {} + # -- a real Loki install requires a proper schemaConfig defined above this, however for testing or playing around + # you can enable useTestSchema + useTestSchema: false + # @schema skipProperties:true;additionalProperties:true + testSchemaConfig: + configs: + - from: 2024-04-01 + store: tsdb + object_store: '{{ include "loki.testSchemaObjectStore" . }}' + schema: v13 + index: + prefix: index_ + period: 24h + # @schema skipProperties:true;additionalProperties:true + ## A separate loki ruler storage configuration can be provided via rulerStorage.storage section: + ## rulerConfig: + ## storage: + ## type: local + # -- Check https://grafana.com/docs/loki/latest/configuration/#ruler for more info on configuring ruler + rulerConfig: + wal: + dir: /var/loki/ruler-wal + # -- Storage for the ruler. If defining rules in `ruler.directories`, this must be configured to use local storage as shown below. + # storage: + # type: local + # local: + # directory: /etc/loki/rules + # @schema skipProperties:true;additionalProperties:true + # -- Structured loki configuration, takes precedence over `loki.config`, `loki.schemaConfig`, `loki.storageConfig` + structuredConfig: {} + # @schema skipProperties:true;additionalProperties:true + # -- Additional query scheduler config + query_scheduler: {} + # @schema skipProperties:true;additionalProperties:true + # -- Additional storage config + storage_config: + boltdb_shipper: + index_gateway_client: + server_address: '{{ include "loki.indexGatewayAddress" . }}' + tsdb_shipper: + index_gateway_client: + server_address: '{{ include "loki.indexGatewayAddress" . }}' + bloom_shipper: + working_directory: /var/loki/data/bloomshipper + hedging: + at: "250ms" + max_per_second: 20 + up_to: 3 + # @schema skipProperties:true;additionalProperties:true + # -- Optional compactor configuration + compactor: {} + # @schema skipProperties:true;additionalProperties:true + # -- Optional compactor grpc client configuration + compactor_grpc_client: {} + # @schema skipProperties:true;additionalProperties:true + # -- Optional pattern ingester configuration + pattern_ingester: + enabled: false + # @schema skipProperties:true;additionalProperties:true + # -- Optional analytics configuration + analytics: {} + # @schema skipProperties:true;additionalProperties:true + # -- Optional Loki UI: Provides access to a operators UI for Loki distributed. When enabled UI will be available at /ui/ of loki-gateway + ui: + # Disabled by default for backwards compatibility. Enable to use the Loki UI. + enabled: false + gateway: + # enable gateway proxying to UI under /ui + enabled: true + # @schema skipProperties:true;additionalProperties:true + # -- Optional querier configuration + query_range: {} + # @schema skipProperties:true;additionalProperties:true + # -- Optional querier configuration + querier: {} + # @schema skipProperties:true;additionalProperties:true + # -- Optional ingester configuration + ingester: + wal: + flush_on_shutdown: true + # @schema skipProperties:true;additionalProperties:true + # -- Optional ingester client configuration + ingester_client: {} + # @schema skipProperties:true;additionalProperties:true + # -- Optional block builder configuration + block_builder: {} + # @schema skipProperties:true;additionalProperties:true + # -- Optional index gateway configuration + index_gateway: + mode: simple + # @schema skipProperties:true;additionalProperties:true + frontend: + scheduler_address: '{{ include "loki.querySchedulerAddress" . }}' + tail_proxy_url: '{{ include "loki.querierAddress" . }}' + # @schema skipProperties:true;additionalProperties:true + frontend_worker: + scheduler_address: '{{ include "loki.querySchedulerAddress" . }}' + # @schema skipProperties:true;additionalProperties:true + # -- Optional distributor configuration + distributor: {} + # @schema skipProperties:true;additionalProperties:true + # -- Enable tracing + tracing: + enabled: false + # @schema skipProperties:true;additionalProperties:true + bloom_build: + enabled: false + builder: + planner_address: '{{ include "loki.bloomPlannerAddress" . }}' + # @schema skipProperties:true;additionalProperties:true + bloom_gateway: + enabled: false + client: + addresses: '{{ include "loki.bloomGatewayAddresses" . }}' + # @schema skipProperties:true;additionalProperties:true + # -- Optional operational configuration + operational_config: {} + +###################################################################################################################### +# +# Chart Testing +# +###################################################################################################################### + +# -- Section for configuring optional Helm test +test: + enabled: true + # -- Used to directly query the metrics endpoint of the canary for testing, this approach avoids needing prometheus for testing. + # This in a newer approach to using prometheusAddress such that tests do not have a dependency on prometheus + canaryServiceAddress: 'http://{{ include "loki-canary.fullname" $ }}.{{ include "loki.namespace" $ }}.svc.{{ .Values.global.clusterDomain }}:3500/metrics' + # -- Address of the prometheus server to query for the test. This overrides any value set for canaryServiceAddress. + # This is kept for backward compatibility and may be removed in future releases. Previous value was 'http://prometheus:9090' + prometheusAddress: "" + # -- Number of times to retry the test before failing + timeout: 1m + # @schema additionalProperties:{"type":"string"} + # -- Additional labels for the test pods + labels: {} + # @schema additionalProperties:{"type":"string"} + # -- Additional annotations for test pods + annotations: {} + # -- Image to use for loki canary + image: + # -- The Docker registry + registry: docker.io + # -- Docker image repository + repository: grafana/loki-helm-test + # -- Overrides the image tag whose default is the chart's appVersion + tag: "latest" + # @schema type:[string, null] + # -- Overrides the image tag with an image digest + digest: null + # -- Docker image pull policy + pullPolicy: IfNotPresent + # @schema type:[boolean, null] + # -- Use the host's user namespace in test pods + hostUsers: null +# The Loki canary pushes logs to and queries from this loki installation to test +# that it's working correctly +lokiCanary: + enabled: true + # -- The type of the loki canary k8s rollout. This can be a DaemonSet or Deployment. + kind: DaemonSet + # -- If true, the canary will send directly to Loki via the address configured for verification -- + # -- If false, it will write to stdout and an Agent will be needed to scrape and send the logs -- + push: true + # @schema type:[string, null] + # -- If set overwrites the default value set by loki.host helper function. Use this if gateway not enabled. + lokiurl: null + # -- The name of the label to look for at loki when doing the checks. + labelname: pod + # @schema additionalProperties:{"type":"string"} + # -- Additional annotations for the `loki-canary` Daemonset + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Additional labels for the `loki-canary` Daemonset + labels: {} + # @schema additionalProperties:{"type":"string"} + # -- Additional annotations for each `loki-canary` pod + podAnnotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Additional labels for each `loki-canary` pod + podLabels: {} + # -- The number of old ReplicaSets to retain to allow rollback + revisionHistoryLimit: 10 + service: + # @schema additionalProperties:{"type":"string"} + # -- Annotations for loki-canary Service + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Additional labels for loki-canary Service + labels: {} + # -- Additional CLI arguments for the 'loki-canary' command + extraArgs: [] + # -- Environment variables to add to the canary pods + extraEnv: [] + # -- Environment variables from secrets or configmaps to add to the canary pods + extraEnvFrom: [] + # -- Volume mounts to add to the canary pods + extraVolumeMounts: [] + # -- Volumes to add to the canary pods + extraVolumes: [] + # @schema additionalProperties:true + # -- Resource requests and limits for the canary + resources: {} + # -- Container resize policy for the canary + # Example: + # resizePolicy: + # - resourceName: cpu + # restartPolicy: NotRequired + # - resourceName: memory + # restartPolicy: RestartContainer + resizePolicy: [] + # @schema additionalProperties:true + # -- DNS config for canary pods + dnsConfig: {} + # @schema additionalProperties:true + # -- Node selector for canary pods + nodeSelector: {} + # -- Tolerations for canary pods + tolerations: [] + # @schema type:[object, null];skipProperties:true;additionalProperties:true + # -- Affinity for canary pods + affinity: {} + # -- Set this toggle to false to opt out of automounting API credentials for the service account + automountServiceAccountToken: false + # @schema type:[string, null] + # -- The name of the PriorityClass for loki-canary pods + priorityClassName: null + # @schema type:[boolean, null] + # -- Use the host's user namespace in loki-canary pods + hostUsers: null + podDisruptionBudget: + # -- Enable Pod Disruption Budget + enabled: true + # @schema additionalProperties:{"type":"string"} + # -- Annotations for Pod Disruption Budget + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Labels for Pod Disruption Budget + labels: {} + + # @schema type:[string, integer, null] + # -- Pod Disruption Budget minAvailable + minAvailable: null + # @schema type:[string, integer, null] + # -- Pod Disruption Budget maxUnavailable + maxUnavailable: null + # @schema type:[string, null] + # -- Pod Disruption Budget unhealthyPodEvictionPolicy + unhealthyPodEvictionPolicy: null + # @schema skipProperties:true;additionalProperties:true + # -- The SecurityContext for loki-canary pods + podSecurityContext: + fsGroup: 10001 + fsGroupChangePolicy: OnRootMismatch + runAsGroup: 10001 + runAsNonRoot: true + runAsUser: 10001 + seccompProfile: + type: RuntimeDefault + # @schema skipProperties:true;additionalProperties:true + # -- The SecurityContext for loki-canary containers + containerSecurityContext: + readOnlyRootFilesystem: true + capabilities: + drop: + - ALL + allowPrivilegeEscalation: false + seccompProfile: + type: RuntimeDefault + # -- Image to use for loki canary + image: + # -- The Docker registry + registry: docker.io + # -- Docker image repository + repository: grafana/loki-canary + # @schema type:[string, null] + # -- Overrides the image tag whose default is the chart's appVersion + tag: null + # @schema type:[string, null] + # -- Overrides the image tag with an image digest + digest: null + # -- Docker image pull policy + pullPolicy: IfNotPresent + # @schema skipProperties:true;additionalProperties:true + # -- Liveness probe + livenessProbe: + httpGet: + path: /metrics + port: http-metrics + initialDelaySeconds: 15 + timeoutSeconds: 1 + # @schema skipProperties:true;additionalProperties:true + # -- Readiness probe + readinessProbe: + httpGet: + path: /metrics + port: http-metrics + initialDelaySeconds: 15 + timeoutSeconds: 1 + # @schema skipProperties:true;additionalProperties:true + # -- Startup probe + startupProbe: {} + # @schema skipProperties:true;additionalProperties:true + # -- Update strategy for the `loki-canary` Daemonset pods + updateStrategy: + type: RollingUpdate + rollingUpdate: + # @schema type:[string, integer, null] + # -- Pod Disruption Budget maxUnavailable + maxUnavailable: 1 + # -- Replicas for `loki-canary` when using a Deployment + replicas: 1 + # -- Tenant to use for loki-canary + tenant: + # -- Name of the tenant for loki-canary + name: "self-monitoring" + # @schema type:[string, null] + # -- Password of the gateway for Basic auth for loki-canary + password: null + serviceAccount: + # -- Specifies whether a ServiceAccount should be created + create: true + # @schema type:[string, null] + # -- The name of the ServiceAccount to use. + # If not set and create is true, a name is generated using the fullname template + name: null + # @schema item:object;itemProperties:{"name": {"type": "string"}} + # -- Image pull secrets for the service account + imagePullSecrets: [] + # @schema additionalProperties:{"type":"string"} + # -- Annotations for the service account + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Labels for the service account + labels: {} + # -- Set this toggle to false to opt out of automounting API credentials for the service account + automountServiceAccountToken: false + +###################################################################################################################### +# +# Service Accounts and Kubernetes RBAC +# +###################################################################################################################### +serviceAccount: + # -- Specifies whether a ServiceAccount should be created + create: true + # @schema type:[string, null] + # -- The name of the ServiceAccount to use. + # If not set and create is true, a name is generated using the fullname template + name: null + # @schema item:object;itemProperties:{"name": {"type": "string"}} + # -- Image pull secrets for the service account + imagePullSecrets: [] + # @schema additionalProperties:{"type":"string"} + # -- Annotations for the service account + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Labels for the service account + labels: {} + # -- Set this toggle to false to opt out of automounting API credentials for the service account + automountServiceAccountToken: true + +# RBAC configuration +rbac: + # -- For OpenShift set sccEnabled to 'true' to use the SecurityContextConstraints. + sccEnabled: false + # -- Toggle this to true to allow the use of hostPath volumes on OpenShift + sccAllowHostDirVolumePlugin: false + # -- Whether to install RBAC in the namespace only or cluster-wide. Useful if you want to watch ConfigMap globally. + namespaced: false + +###################################################################################################################### +# +# Network Policy configuration +# +###################################################################################################################### +networkPolicy: + # -- Specifies whether Network Policies should be created + enabled: false + metrics: + # -- Specifies the Pods which are allowed to access the metrics port. + # As this is cross-namespace communication, you also need the namespaceSelector. + podSelector: {} + # -- Specifies the namespaces which are allowed to access the metrics port + namespaceSelector: {} + # -- Specifies specific network CIDRs which are allowed to access the metrics port. + # In case you use namespaceSelector, you also have to specify your kubelet networks here. + # The metrics ports are also used for probes. + cidrs: [] + ingress: + # -- Specifies the Pods which are allowed to access the http port. + # As this is cross-namespace communication, you also need the namespaceSelector. + podSelector: {} + # -- Specifies the namespaces which are allowed to access the http port + namespaceSelector: {} + alertmanager: + # @schema type:[string, integer] + # -- Specify the Alertmanager port used for alerting + port: 9093 + # -- Specifies the Alertmanager Pods. + # As this is cross-namespace communication, you also need the namespaceSelector. + podSelector: {} + # -- Specifies the namespace the Alertmanager is running in + namespaceSelector: {} + externalStorage: + # -- Specify the port used for external storage, e.g. AWS S3 + ports: [] + # -- Specifies specific network CIDRs you want to limit access to + cidrs: [] + discovery: + # @schema type:[string, integer, null] + # -- (int) Specify the port used for discovery + port: null + # -- Specifies the Pods labels used for discovery. + # As this is cross-namespace communication, you also need the namespaceSelector. + podSelector: {} + # -- Specifies the namespace the discovery Pods are running in + namespaceSelector: {} +###################################################################################################################### +# +# Global memberlist configuration +# +###################################################################################################################### + +# Configuration for the memberlist service +memberlist: + service: + publishNotReadyAddresses: false + # @schema additionalProperties:{"type":"string"} + annotations: {} + +###################################################################################################################### +# +# Gateway and Ingress +# +# By default this chart will deploy a Nginx container to act as a gateway which handles routing of traffic +# and can also do auth. +# +# If you would prefer you can optionally disable this and enable using k8s ingress to do the incoming routing. +# +###################################################################################################################### + +# Configuration for the gateway +gateway: + # -- Specifies whether the gateway should be enabled + enabled: true + # -- Number of replicas for the gateway + replicas: 1 + # -- Default container port + containerPort: 8080 + # -- Enable logging of 2xx and 3xx HTTP requests + verboseLogging: true + autoscaling: + # -- Enable autoscaling for the gateway + enabled: false + # -- Minimum autoscaling replicas for the gateway + minReplicas: 1 + # -- Maximum autoscaling replicas for the gateway + maxReplicas: 3 + # @schema type:[integer, null] + # -- Target CPU utilisation percentage for the gateway + targetCPUUtilizationPercentage: 60 + # @schema type:[integer, null] + # -- Target memory utilisation percentage for the gateway + targetMemoryUtilizationPercentage: null + # @schema skipProperties:true;additionalProperties:true + # -- See `kubectl explain deployment.spec.strategy` for more + # -- ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy + # -- Behavior policies while scaling. + behavior: {} + # scaleUp: + # stabilizationWindowSeconds: 300 + # policies: + # - type: Pods + # value: 1 + # periodSeconds: 60 + # scaleDown: + # stabilizationWindowSeconds: 300 + # policies: + # - type: Pods + # value: 1 + # periodSeconds: 180 + kedaAutoscaling: + # -- Enable KEDA autoscaling for the gateway. Mutually exclusive with autoscaling.enabled + enabled: false + # @schema type:[integer, null] + # -- Interval (seconds) to poll each trigger. Defaults to defaults.kedaAutoscaling.pollingInterval if not set. + pollingInterval: null + # -- Minimum replicas for KEDA autoscaling + minReplicas: 1 + # -- Maximum replicas for KEDA autoscaling + maxReplicas: 3 + # @schema type:[integer, null] + # -- Period to wait after the last trigger reported active before scaling the resource back to 0 (seconds). + # Defaults to defaults.kedaAutoscaling.cooldownPeriod if not set. + cooldownPeriod: null + # @schema additionalProperties:true + # -- Fallback configuration for KEDA ScaledObject. Applied when the trigger metric cannot be retrieved. + # Ref: https://keda.sh/docs/latest/reference/scaledobject-spec/#fallback + fallback: {} + # @schema skipProperties:true;additionalProperties:true + # -- Behavior configuration for KEDA ScaledObject (horizontalPodAutoscalerConfig.behavior). + # Ref: https://keda.sh/docs/latest/reference/scaledobject-spec/#advanced + behavior: {} + # -- KEDA triggers for the gateway. + # Ref: https://keda.sh/docs/latest/scalers/ + triggers: [] + deploymentStrategy: + type: RollingUpdate + image: + # -- The Docker registry for the gateway image + registry: docker.io + # -- The gateway image repository + repository: nginxinc/nginx-unprivileged + # -- The gateway image tag + tag: 1.31-alpine + # @schema type:[string, null] + # -- Overrides the gateway image tag with an image digest + digest: null + # -- The gateway image pull policy + pullPolicy: IfNotPresent + # @schema type:[string, null] + # -- The name of the PriorityClass for gateway pods + priorityClassName: null + # @schema additionalProperties:{"type":"string"} + # -- Annotations for gateway deployment + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Annotations for gateway pods + podAnnotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Additional labels for gateway pods + podLabels: {} + # -- Additional CLI args for the gateway + extraArgs: [] + # -- Environment variables to add to the gateway pods + extraEnv: [] + # -- Environment variables from secrets or configmaps to add to the gateway pods + extraEnvFrom: [] + # -- Lifecycle for the gateway container + lifecycle: {} + # -- Volumes to add to the gateway pods + extraVolumes: [] + # -- Volume mounts to add to the gateway pods + extraVolumeMounts: [] + # @schema skipProperties:true;additionalProperties:true + # -- The SecurityContext for gateway containers + podSecurityContext: + fsGroup: 101 + runAsGroup: 101 + runAsNonRoot: true + runAsUser: 101 + seccompProfile: + type: RuntimeDefault + # @schema skipProperties:true;additionalProperties:true + # -- The SecurityContext for gateway containers + containerSecurityContext: + readOnlyRootFilesystem: true + capabilities: + drop: ["ALL"] + seccompProfile: + type: "RuntimeDefault" + allowPrivilegeEscalation: false + + # @schema type:[boolean, null] + # -- Use the host's user namespace in the gateway + hostUsers: null + # @schema additionalProperties:true + # -- Resource requests and limits for the gateway + resources: {} + # -- Container resize policy for the gateway + # Example: + # resizePolicy: + # - resourceName: cpu + # restartPolicy: NotRequired + # - resourceName: memory + # restartPolicy: RestartContainer + resizePolicy: [] + # @schema type:[array, null] + # -- Containers to add to the gateway pods + extraContainers: [] + # -- Grace period to allow the gateway to shutdown before it is killed + terminationGracePeriodSeconds: 30 + podDisruptionBudget: + # -- Enable Pod Disruption Budget + enabled: true + # @schema additionalProperties:{"type":"string"} + # -- Annotations for Pod Disruption Budget + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Labels for Pod Disruption Budget + labels: {} + + # @schema type:[string, integer, null] + # -- Pod Disruption Budget minAvailable + minAvailable: null + # @schema type:[string, integer, null] + # -- Pod Disruption Budget maxUnavailable + maxUnavailable: null + # @schema type:[string, null] + # -- Pod Disruption Budget unhealthyPodEvictionPolicy + unhealthyPodEvictionPolicy: null + # @schema type:[object, null];skipProperties:true;additionalProperties:true + # -- Affinity for gateway pods. + # @default -- Hard node anti-affinity + # The value will be passed through tpl. + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchLabels: + app.kubernetes.io/component: gateway + app.kubernetes.io/name: '{{ include "loki.name" . }}' + app.kubernetes.io/instance: '{{ .Release.Name }}' + topologyKey: kubernetes.io/hostname + # @schema additionalProperties:true + # -- DNS config for gateway pods + dnsConfig: {} + # @schema additionalProperties:true + # -- Node selector for gateway pods + nodeSelector: {} + # -- Set this toggle to false to opt out of automounting API credentials for the service account + automountServiceAccountToken: false + # @schema item:object + # -- Topology Spread Constraints for gateway pods + # The value will be passed through tpl. + topologySpreadConstraints: [] + tolerations: [] + # Gateway service configuration + service: + # -- Port of the gateway service + port: 80 + # -- Type of the gateway service + type: ClusterIP + # @schema type:[string, null] + # -- ClusterIP of the gateway service + clusterIP: null + # @schema type:[integer, null] + # -- (int) Node port if service type is NodePort + nodePort: null + # @schema type:[string, null] + # -- Load balancer IPO address if service type is LoadBalancer + loadBalancerIP: null + # @schema additionalProperties:{"type":"string"} + # -- Annotations for the gateway service + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Labels for gateway service + labels: {} + # -- trafficDistribution for gateway Service + trafficDistribution: "" + # -- Session affinity for gateway Service + sessionAffinity: "" + # @schema additionalProperties:true + # -- Session affinity config for gateway Service + sessionAffinityConfig: {} + # -- ipFamilyPolicy for gateway Service + # Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services + ipFamilyPolicy: "" + # -- ipFamilies for gateway Service + # Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services + ipFamilies: [] + serviceAccount: + # -- Specifies whether a ServiceAccount should be created + create: true + # @schema type:[string, null] + # -- The name of the ServiceAccount to use. + # If not set and create is true, a name is generated using the fullname template + name: null + # @schema item:object;itemProperties:{"name": {"type": "string"}} + # -- Image pull secrets for the service account + imagePullSecrets: [] + # @schema additionalProperties:{"type":"string"} + # -- Annotations for the service account + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Labels for the service account + labels: {} + # -- Set this toggle to false to opt out of automounting API credentials for the service account + automountServiceAccountToken: false + # Gateway ingress configuration + ingress: + # -- Specifies whether an ingress for the gateway should be created + enabled: false + # -- Ingress Class Name. MAY be required for Kubernetes versions >= 1.18 + ingressClassName: "" + # @schema additionalProperties:{"type":"string"} + # -- Annotations for the gateway ingress + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Labels for the gateway ingress + labels: {} + # -- Hosts configuration for the gateway ingress, passed through the `tpl` function to allow templating + hosts: + - host: gateway.loki.example.com + paths: + - path: / + # -- pathType (e.g. ImplementationSpecific, Prefix, .. etc.) might also be required by some Ingress Controllers + # pathType: Prefix + # -- TLS configuration for the gateway ingress. Hosts passed through the `tpl` function to allow templating + tls: + - secretName: loki-gateway-tls + hosts: + - gateway.loki.example.com + # Basic auth configuration + basicAuth: + # -- Enables basic authentication for the gateway + enabled: false + # @schema type:[string, null] + # -- The basic auth username for the gateway + username: null + # @schema type:[string, null] + # -- The basic auth password for the gateway + password: null + # -- Uses the specified users from the `loki.tenants` list to create the htpasswd file. + # if `loki.tenants` is not set, the `gateway.basicAuth.username` and `gateway.basicAuth.password` are used. + # The value is templated using `tpl`. Override this to use a custom htpasswd, e.g. in case the default causes + # high CPU load. + # @default -- Either `loki.tenants` or `gateway.basicAuth.username` and `gateway.basicAuth.password`. + htpasswd: | + {{- with $tenants := .Values.loki.tenants }} + {{- range $t := $tenants }} + {{- $username := required "All tenants must have a 'name' set" $t.name }} + {{- if $passwordHash := $t.passwordHash }} + {{- printf "%s:%s\n" $username $passwordHash }} + {{- else if $password := $t.password }} + {{- printf "%s\n" (htpasswd $username $password) }} + {{- else }} + {{- fail "All tenants must have a 'password' or 'passwordHash' set" }} + {{- end }} + {{- end }} + {{- else }} + {{- printf "%s\n" (htpasswd (required "'gateway.basicAuth.username' is required" .Values.gateway.basicAuth.username) (required "'gateway.basicAuth.password' is required" .Values.gateway.basicAuth.password)) }} + {{- end }} + # @schema type:[string, null] + # -- Existing basic auth secret to use. Must contain '.htpasswd' + existingSecret: null + # -- Gateway API routes configuration. Mutually exclusive with gateway.ingress. + # Use either ingress or route, but not both at once. + # Each entry in the map creates a separate HTTPRoute resource. The key "main" produces + # a route named after the gateway fullname; any other key appends the key as a suffix. + # This allows defining multiple routes, e.g. one HTTPRoute and one GRPCRoute. + route: + main: + # -- Specifies whether this Gateway API route should be created + enabled: false + # -- Set the route apiVersion, e.g. gateway.networking.k8s.io/v1 or gateway.networking.k8s.io/v1beta1. + # If not set, the latest available version will be auto-detected. + apiVersion: "" + # -- Set the route kind. Valid options are GRPCRoute, HTTPRoute, TCPRoute, TLSRoute, UDPRoute + kind: HTTPRoute + # @schema additionalProperties:{"type":"string"} + # -- Additional annotations for the route + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Additional labels for the route + labels: {} + # -- Hostnames for the route + hostnames: [] + # - gateway.loki.example.com + # -- Parent gateway references to attach the route to + parentRefs: [] + # - name: my-gateway + # namespace: gateway-namespace + # -- Additional rules to prepend before the default catch-all rule. + # Each entry is rendered into spec.rules as written (templating is supported), + # so any HTTPRoute/GRPCRoute rule shape is accepted — including filter-only rules + # with no backendRefs (e.g. RequestRedirect, URLRewrite). + # Useful for advanced routing logic (e.g. header-based routing, auth policies, redirects). + # Note: the chart-generated rule that points at the gateway service is always rendered + # for this route — additionalRules are prepended, not a replacement. + # Example HTTP-to-HTTPS redirect: + # additionalRules: + # - filters: + # - type: RequestRedirect + # requestRedirect: + # scheme: https + # statusCode: 301 + # matches: + # - path: { type: PathPrefix, value: / } + additionalRules: [] + # -- Matches for the default rule. Defaults to match all paths. + matches: + - path: + type: PathPrefix + value: / + # -- Filters for the default rule + filters: [] + # -- Timeouts for the default rule + timeouts: {} + # @schema skipProperties:true;additionalProperties:true + # -- liveness probe for the nginx container in the gateway pods. + livenessProbe: {} + # @schema skipProperties:true;additionalProperties:true + # Configures the readiness probe for the gateway + readinessProbe: + httpGet: + path: / + port: http + initialDelaySeconds: 15 + timeoutSeconds: 1 + # @schema skipProperties:true;additionalProperties:true + # -- startup probe for the nginx container in the gateway pods. + startupProbe: {} + nginxConfig: + # -- Which schema to be used when building URLs. Can be 'http' or 'https'. + schema: http + # -- Enable listener for IPv6, disable on IPv4-only systems + enableIPv6: true + # -- NGINX log format + logFormat: |- + main '$remote_addr - $remote_user [$time_local] $status ' + '"$request" $body_bytes_sent "$http_referer" ' + '"$http_user_agent" "$http_x_forwarded_for"'; + # -- Allows appending custom configuration to the server block + serverSnippet: "" + # -- Allows appending custom configuration to the http block, passed through the `tpl` function to allow templating + httpSnippet: "" + # -- Allows appending custom configuration inside every location block, useful for authentication or setting headers that are not inherited from the server block, passed through the `tpl` function to allow templating. + locationSnippet: >- + {{ if .Values.loki.tenants }}proxy_set_header X-Scope-OrgID $remote_user;{{ end }} + # -- Allows customizing the `client_max_body_size` directive + clientMaxBodySize: 4M + # -- Whether ssl should be appended to the listen directive of the server block or not. + ssl: false + # @schema type:[string, null] + # -- Override Read URL + customReadUrl: null + # @schema type:[string, null] + # -- Override Write URL + customWriteUrl: null + # @schema type:[string, null] + # -- Override Backend URL + customBackendUrl: null + # -- Allows overriding the DNS resolver address nginx will use. + resolver: "" + # -- Config file contents for Nginx. Passed through the `tpl` function to allow templating + # @default -- See values.yaml + file: | + {{- include "loki.nginxFile" . -}} + + metrics: + # -- Whether gateway metrics should be exported + enabled: true + image: + registry: ghcr.io + repository: "jkroepke/access-log-exporter" + tag: "0.4.8" + pullPolicy: IfNotPresent + # @schema additionalProperties:true + resources: + requests: {} + limits: {} + # -- Container resize policy for the gateway metrics exporter + # Example: + # resizePolicy: + # - resourceName: cpu + # restartPolicy: NotRequired + # - resourceName: memory + # restartPolicy: RestartContainer + resizePolicy: [] + # @schema skipProperties:true;additionalProperties:true + # -- The SecurityContext for memcached exporter containers + containerSecurityContext: + allowPrivilegeEscalation: false + readOnlyRootFilesystem: true + capabilities: + drop: ["ALL"] + seccompProfile: + type: RuntimeDefault + privileged: false + runAsNonRoot: true + runAsUser: 65532 + runAsGroup: 65532 + # -- Extra args to add to the exporter container. + extraArgs: [] + # @schema skipProperties:true;additionalProperties:true + # -- Liveness probe for memcached exporter + livenessProbe: + httpGet: + path: /health + port: http-metrics + initialDelaySeconds: 30 + periodSeconds: 10 + timeoutSeconds: 5 + failureThreshold: 3 + # @schema skipProperties:true;additionalProperties:true + # -- Readiness probe for memcached exporter + readinessProbe: + httpGet: + path: /health + port: http-metrics + initialDelaySeconds: 5 + periodSeconds: 5 + timeoutSeconds: 3 + failureThreshold: 3 + # @schema skipProperties:true;additionalProperties:true + # -- Startup probe for memcached exporter + startupProbe: {} + service: + # @schema additionalProperties:{"type":"string"} + # -- Annotations for the gateway metrics exporter service. + # Use this instead of gateway.service.annotations to avoid propagating + # annotations (e.g. external-dns) to the exporter ClusterIP service. + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Labels for the gateway metrics exporter service. + labels: {} + +# -- Ingress configuration Use either this ingress or the gateway, but not both at once. +# If you enable this, make sure to disable the gateway. +# You'll need to supply authn configuration for your ingress controller. +ingress: + enabled: false + ingressClassName: "" + # @schema additionalProperties:{"type":"string"} + annotations: {} + # @schema additionalProperties:{"type":"string"} + # nginx.ingress.kubernetes.io/auth-type: basic + # nginx.ingress.kubernetes.io/auth-secret: loki-distributed-basic-auth + # nginx.ingress.kubernetes.io/auth-secret-type: auth-map + # nginx.ingress.kubernetes.io/configuration-snippet: | + # proxy_set_header X-Scope-OrgID $remote_user; + labels: {} + # blackbox.monitoring.exclude: "true" + paths: + # -- Paths that are exposed by Loki Distributor. + # If deployment mode is Distributed, the requests are forwarded to the service:. + # If deployment mode is SimpleScalable, the requests are forwarded to write k8s service:. + # If deployment mode is SingleBinary, the requests are forwarded to the central/single k8s service: + distributor: + - /api/prom/push + - /loki/api/v1/push + - /otlp/v1/logs + # -- Paths that are exposed by Loki Query Frontend. + # If deployment mode is Distributed, the requests are forwarded to the service. + # If deployment mode is SimpleScalable, the requests are forwarded to write k8s service`. + # If deployment mode is SingleBinary, the requests are forwarded to the central/single k8s service` + queryFrontend: + - /api/prom/query + # this path covers labels and labelValues endpoints + - /api/prom/label + - /api/prom/series + - /api/prom/tail + - /loki/api/v1/query + - /loki/api/v1/query_range + - /loki/api/v1/tail + # this path covers labels and labelValues endpoints + - /loki/api/v1/label + - /loki/api/v1/labels + - /loki/api/v1/series + - /loki/api/v1/index/stats + - /loki/api/v1/index/volume + - /loki/api/v1/index/volume_range + - /loki/api/v1/format_query + - /loki/api/v1/detected_field + - /loki/api/v1/detected_fields + - /loki/api/v1/detected_labels + - /loki/api/v1/patterns + # this path covers UI API + - /ui + # -- Paths that are exposed by Loki Ruler. + # If deployment mode is Distributed, the requests are forwarded to the service. + # If deployment mode is SimpleScalable, the requests are forwarded to k8s service. + # If deployment mode is SingleBinary, the requests are forwarded to the central/single k8s service + ruler: + - /api/prom/rules + - /api/prom/api/v1/rules + - /api/prom/api/v1/alerts + - /loki/api/v1/rules + - /prometheus/api/v1/rules + - /prometheus/api/v1/alerts + # -- Paths that are exposed by Loki Compactor. + # If deployment mode is Distributed, the requests are forwarded to the service. + # If deployment mode is SimpleScalable, the requests are forwarded to k8s service. + # If deployment mode is SingleBinary, the requests are forwarded to the central/single k8s service` + compactor: + - /loki/api/v1/delete + # -- Hosts configuration for the ingress, passed through the `tpl` function to allow templating + hosts: + - loki.example.com + # -- TLS configuration for the ingress. Hosts passed through the `tpl` function to allow templating + tls: [] +# - hosts: +# - loki.example.com +# secretName: loki-distributed-tls + +# -- Gateway API routes for direct routing to Loki services, bypassing the nginx gateway. +# Use either this or the top-level ingress, but not both at once. +# Each entry in the map creates a separate HTTPRoute resource. The key "main" produces +# a route named after the loki fullname; any other key appends the key as a suffix. +# This allows defining multiple routes, e.g. one HTTPRoute and one GRPCRoute. +route: + main: + # -- Specifies whether this Gateway API route should be created + enabled: false + # -- Gateway API version to use. Auto-detected from cluster capabilities if empty. + apiVersion: "" + # -- Kind of the route resource. Valid options are GRPCRoute, HTTPRoute, TCPRoute, TLSRoute, UDPRoute + kind: HTTPRoute + # @schema additionalProperties:{"type":"string"} + # -- Annotations for the route + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Labels for the route + labels: {} + # -- Hostnames for the route + hostnames: [] + # -- Parent references for the route (required for Gateway API) + parentRefs: [] + # -- Additional rules to prepend before the generated path-routing rules. + # Each entry is rendered into spec.rules as written (templating is supported), + # so any HTTPRoute/GRPCRoute rule shape is accepted — including filter-only rules + # with no backendRefs (e.g. RequestRedirect, URLRewrite). + additionalRules: [] + # @schema type:[integer, null] + # -- Backend port override for all generated rules. + # When unset, GRPCRoute automatically uses loki.server.grpc_listen_port (default 9095) + # and all other kinds use loki.server.http_listen_port (default 3100). + backendPort: null + # -- Paths routed to each Loki service group. The target service depends on the deployment mode. + # To produce a route that contains only `additionalRules` and no chart-generated path rules + # (for example, a dedicated HTTP-to-HTTPS redirect route), set every entry below to an empty + # list — e.g. `distributor: []`, `queryFrontend: []`, `ruler: []`, `compactor: []`. + paths: + # -- Paths that are exposed by Loki Distributor. + # If deployment mode is Distributed, the requests are forwarded to the service: `{{"loki.distributorFullname"}}`. + # If deployment mode is SimpleScalable, the requests are forwarded to write k8s service: `{{"loki.writeFullname"}}`. + # If deployment mode is SingleBinary, the requests are forwarded to the central/single k8s service: `{{"loki.fullname"}}` + distributor: + - /api/prom/push + - /loki/api/v1/push + - /otlp/v1/logs + # -- Paths that are exposed by Loki Query Frontend. + # If deployment mode is Distributed, the requests are forwarded to the service. + # If deployment mode is SimpleScalable, the requests are forwarded to read k8s service. + # If deployment mode is SingleBinary, the requests are forwarded to the central/single k8s service` + queryFrontend: + - /api/prom/query + # this path covers labels and labelValues endpoints + - /api/prom/label + - /api/prom/series + - /api/prom/tail + - /loki/api/v1/query + - /loki/api/v1/query_range + - /loki/api/v1/tail + # this path covers labels and labelValues endpoints + - /loki/api/v1/label + - /loki/api/v1/labels + - /loki/api/v1/series + - /loki/api/v1/index/stats + - /loki/api/v1/index/volume + - /loki/api/v1/index/volume_range + - /loki/api/v1/format_query + - /loki/api/v1/detected_field + - /loki/api/v1/detected_fields + - /loki/api/v1/detected_labels + - /loki/api/v1/patterns + # this path covers UI API + - /ui + # -- Paths that are exposed by Loki Ruler. + # If deployment mode is Distributed, the requests are forwarded to the service. + # If deployment mode is SimpleScalable, the requests are forwarded to k8s service. + # If deployment mode is SingleBinary, the requests are forwarded to the central/single k8s service. + ruler: + - /api/prom/rules + - /api/prom/api/v1/rules + - /api/prom/api/v1/alerts + - /loki/api/v1/rules + - /prometheus/api/v1/rules + - /prometheus/api/v1/alerts + # -- Paths that are exposed by Loki Compactor. + # If deployment mode is Distributed, the requests are forwarded to the service. + # If deployment mode is SimpleScalable, the requests are forwarded to k8s service. + # If deployment mode is SingleBinary, the requests are forwarded to the central/single k8s service. + compactor: + - /loki/api/v1/delete + +###################################################################################################################### +# +# Migration +# +###################################################################################################################### + +# -- Options that may be necessary when performing a migration from another helm chart +migrate: + # -- When migrating from a distributed chart like loki-distributed or enterprise-logs + fromDistributed: + # -- Set to true if migrating from a distributed helm chart + enabled: false + # -- If migrating from a distributed service, provide the distributed deployment's + # memberlist service DNS so the new deployment can join its ring. + memberlistService: "" +###################################################################################################################### +# +# Single Binary Deployment +# +# For small Loki installations up to a few 10's of GB per day, or for testing and development. +# +###################################################################################################################### + +# -- Pod Disruption Budget for single binary deployment. Deprecated in favor of `singleBinary.podDisruptionBudget` +podDisruptionBudget: + enabled: true + +# Configuration for the single binary node(s) +singleBinary: + # -- Enable the single binary component. Requires `loki.deploymentMode` to be set to `SingleBinary`. + enabled: true + # -- Kind of read deployment. StatefulSet and Deployment are supported. + kind: StatefulSet + # @schema type:[integer, null] + # -- Number of replicas for the single binary. Set to null to omit spec.replicas from the workload, + # allowing an external controller (e.g. HPA, KEDA, rollout-operator) to manage replica counts without Helm resetting them. + replicas: 0 + # -- EXPERIMENTAL: Enable creating a Job to recreate the write StatefulSet when the compactor configuration is changed. + ## Only applicable if `compactor.kind` is StatefulSet. Useful for PVC size changes, which require recreating the StatefulSet. + statefulSetRecreateJob: + enabled: false + # @schema skipProperties:true;additionalProperties:true + # -- UpdateStrategy or Strategy for single binary. + strategy: + rollingUpdate: + partition: 0 + # -- Whether to enable the rules sidecar + sidecar: true + autoscaling: + # -- Enable autoscaling + enabled: false + # -- Minimum autoscaling replicas for the single binary + minReplicas: 1 + # -- Maximum autoscaling replicas for the single binary + maxReplicas: 3 + # @schema type:[integer, null] + # -- Target CPU utilisation percentage for the single binary + targetCPUUtilizationPercentage: 60 + # @schema type:[integer, null] + # -- Target memory utilisation percentage for the single binary + targetMemoryUtilizationPercentage: null + # -- Allows one to define custom metrics using the HPA/v2 schema (for example, Pods, Object or External metrics) + customMetrics: [] + # - type: Pods + # pods: + # metric: + # name: loki_lines_total + # target: + # type: AverageValue + # averageValue: 10k + # @schema skipProperties:true;additionalProperties:true + # -- HPA behavior configuration, passed directly as a K8s HPA behavior object. + behavior: + # -- Enable autoscaling behaviours + enabled: false + # -- define scale down policies, must conform to HPAScalingRules + scaleDown: {} + # -- define scale up policies, must conform to HPAScalingRules + scaleUp: {} + kedaAutoscaling: + # -- Enable KEDA autoscaling for the single binary. Mutually exclusive with autoscaling.enabled + enabled: false + # @schema type:[integer, null] + # -- Interval (seconds) to poll each trigger. Defaults to defaults.kedaAutoscaling.pollingInterval if not set. + pollingInterval: null + # -- Minimum replicas for KEDA autoscaling + minReplicas: 1 + # -- Maximum replicas for KEDA autoscaling + maxReplicas: 3 + # @schema type:[integer, null] + # -- Period to wait after the last trigger reported active before scaling the resource back to 0 (seconds). + # Defaults to defaults.kedaAutoscaling.cooldownPeriod if not set. + cooldownPeriod: null + # @schema additionalProperties:true + # -- Fallback configuration for KEDA ScaledObject. Applied when the trigger metric cannot be retrieved. + # Ref: https://keda.sh/docs/latest/reference/scaledobject-spec/#fallback + fallback: {} + # @schema skipProperties:true;additionalProperties:true + # -- Behavior configuration for KEDA ScaledObject (horizontalPodAutoscalerConfig.behavior). + # Ref: https://keda.sh/docs/latest/reference/scaledobject-spec/#advanced + behavior: {} + # -- KEDA triggers for the single binary. + # Ref: https://keda.sh/docs/latest/scalers/ + triggers: [] + image: + # @schema type:[string, null] + # -- The Docker registry for the single binary image. Overrides `loki.image.registry` + registry: null + # @schema type:[string, null] + # -- Docker image repository for the single binary image. Overrides `loki.image.repository` + repository: null + # @schema type:[string, null] + # -- Docker image tag for the single binary image. Overrides `loki.image.tag` + tag: null + # @schema type:[string, null] + # -- The name of the PriorityClass for single binary pods + priorityClassName: null + # @schema additionalProperties:{"type":"string"} + # -- Annotations for single binary StatefulSet + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Additional labels for single binary StatefulSet + labels: {} + # @schema additionalProperties:{"type":"string"} + # -- Annotations for single binary pods + podAnnotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Additional labels for each `single binary` pod + podLabels: {} + # @schema additionalProperties:{"type":"string"} + # -- Additional selector labels for each `single binary` pod + selectorLabels: {} + podDisruptionBudget: + # -- Enable Pod Disruption Budget + enabled: true + # @schema additionalProperties:{"type":"string"} + # -- Annotations for Pod Disruption Budget + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Labels for Pod Disruption Budget + labels: {} + + # @schema type:[string, integer, null] + # -- Pod Disruption Budget minAvailable + minAvailable: null + # @schema type:[string, integer, null] + # -- Pod Disruption Budget maxUnavailable + maxUnavailable: null + # @schema type:[string, null] + # -- Pod Disruption Budget unhealthyPodEvictionPolicy + unhealthyPodEvictionPolicy: null + service: + # @schema additionalProperties:{"type":"string"} + # -- Annotations for single binary Service + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Additional labels for single binary Service + labels: {} + # -- Service Type for single binary Service + type: "ClusterIP" + # -- trafficDistribution single binary Service + trafficDistribution: "" + # -- Session affinity for single binary Service + sessionAffinity: "" + # @schema additionalProperties:true + # -- Session affinity config for single binary Service + sessionAffinityConfig: {} + # -- ipFamilyPolicy for single binary Service + # Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services + ipFamilyPolicy: "" + # -- ipFamilies for single binary Service + # Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services + ipFamilies: [] + # -- Adds the appProtocol field to the single binary service. This allows single binary to work with istio protocol selection. + appProtocol: + # -- Set the optional grpc service protocol. Ex: "grpc", "http2" or "https" + grpc: "" + # -- Comma-separated list of Loki modules to load for the single binary + targetModule: "all" + # -- Labels for single binary service + extraArgs: [] + # -- Environment variables to add to the single binary pods + extraEnv: [] + # -- Environment variables from secrets or configmaps to add to the single binary pods + extraEnvFrom: [] + # @schema type:[string, array, null] + # -- Extra containers to add to the single binary loki pod + extraContainers: [] + # @schema type:[string, array, null] + # -- Init containers to add to the single binary pods + initContainers: [] + # -- Volume mounts to add to the single binary pods + extraVolumeMounts: [] + # -- Volumes to add to the single binary pods + extraVolumes: [] + # @schema additionalProperties:true + # -- Resource requests and limits for the single binary + resources: {} + # -- Container resize policy for the single binary + # Example: + # resizePolicy: + # - resourceName: cpu + # restartPolicy: NotRequired + # - resourceName: memory + # restartPolicy: RestartContainer + resizePolicy: [] + # -- Grace period to allow the single binary to shutdown before it is killed + terminationGracePeriodSeconds: 30 + # @schema type:[boolean, null] + # -- Use the host's user namespace in the single binary pods + hostUsers: null + # @schema type:[object, null];skipProperties:true;additionalProperties:true + # -- Affinity for single binary pods. + # @default -- Hard node anti-affinity + # The value will be passed through tpl. + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchLabels: + app.kubernetes.io/component: single-binary + app.kubernetes.io/name: '{{ include "loki.name" . }}' + app.kubernetes.io/instance: '{{ .Release.Name }}' + topologyKey: kubernetes.io/hostname + # @schema item:object + # -- Topology Spread Constraints for single binary pods + # The value will be passed through tpl. + topologySpreadConstraints: [] + # @schema additionalProperties:true + dnsConfig: {} + # @schema additionalProperties:true + # -- Node selector for single binary pods + nodeSelector: {} + # -- Tolerations for single binary pods + tolerations: [] + # -- The default is to deploy all pods in parallel. + podManagementPolicy: "Parallel" + persistence: + # -- What to do with the volume when the StatefulSet is scaled down. + whenScaled: Delete + # -- What to do with the volumes when the StatefulSet is deleted. + whenDeleted: Delete + # -- Enable StatefulSetAutoDeletePVC feature + enableStatefulSetAutoDeletePVC: false + # -- Enable persistent disk + enabled: true + # -- Set access modes on the PersistentVolumeClaim + accessModes: + - ReadWriteOnce + # -- Size of persistent disk + size: 10Gi + # @schema type:[string, null] + # -- Storage class to be used. + # If defined, storageClassName: . + # If set to "-", storageClassName: "", which disables dynamic provisioning. + # If empty or set to null, no storageClassName spec is + # set, choosing the default provisioner (gp2 on AWS, standard on GKE, AWS, and OpenStack). + storageClass: null + # @schema type:[object, null] + # -- Selector for persistent disk + selector: null + # @schema additionalProperties:{"type":"string"} + # -- Annotations for volume claim + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Labels for volume claim + labels: {} + # @schema skipProperties:true;additionalProperties:true + # -- Parameters used for the `storage` volume when persistence.enabled is false. + # Allows replacing the default emptyDir volume with a custom volume definition. + # For example, to use an existing PVC: + # dataVolumeParameters: + # persistentVolumeClaim: + # claimName: my-existing-pvc + dataVolumeParameters: {} +###################################################################################################################### +# +# Simple Scalable Deployment (SSD) Mode +# +# For small to medium size Loki deployments up to around 1 TB/day, this is the default mode for this helm chart +# +###################################################################################################################### + +# Configuration for the write pod(s) +write: + # -- Enable the component. Requires `loki.deploymentMode` to be set to `SimpleScalable`. + enabled: true + # -- Kind of write workload. StatefulSet and Deployment are supported. + kind: StatefulSet + # -- Override for the write fullname. By default, this is generated using the fullname template with "-backend" + fullnameOverride: '{{ include "loki.name" . }}-write' + # -- EXPERIMENTAL: Enable creating a Job to recreate the write StatefulSet when the compactor configuration is changed. + ## Only applicable if `compactor.kind` is StatefulSet. Useful for PVC size changes, which require recreating the StatefulSet. + statefulSetRecreateJob: + enabled: false + # @schema type:[integer, null] + # -- Number of replicas for the write. Set to null to omit spec.replicas from the workload, + # allowing an external controller (e.g. HPA, KEDA, rollout-operator) to manage replica counts without Helm resetting them. + replicas: 3 + # @schema skipProperties:true;additionalProperties:true + # -- UpdateStrategy or Strategy for the write. + strategy: + rollingUpdate: + partition: 0 + autoscaling: + # -- Enable autoscaling for the write. + enabled: false + # -- Minimum autoscaling replicas for the write. + minReplicas: 2 + # -- Maximum autoscaling replicas for the write. + maxReplicas: 6 + # @schema type:[integer, null] + # -- Target CPU utilisation percentage for the write. + targetCPUUtilizationPercentage: 60 + # @schema type:[integer, null] + # -- Target memory utilization percentage for the write. + targetMemoryUtilizationPercentage: null + # @schema skipProperties:true;additionalProperties:true + # -- Behavior policies while scaling. + behavior: + # -- see https://github.com/grafana/loki/blob/main/docs/sources/operations/storage/wal.md#how-to-scale-updown for scaledown details + scaleUp: + policies: + - type: Pods + value: 1 + periodSeconds: 900 + scaleDown: + policies: + - type: Pods + value: 1 + periodSeconds: 1800 + stabilizationWindowSeconds: 3600 + kedaAutoscaling: + # -- Enable KEDA autoscaling for the write. Mutually exclusive with autoscaling.enabled + enabled: false + # @schema type:[integer, null] + # -- Interval (seconds) to poll each trigger. Defaults to defaults.kedaAutoscaling.pollingInterval if not set. + pollingInterval: null + # -- Minimum replicas for KEDA autoscaling + minReplicas: 2 + # -- Maximum replicas for KEDA autoscaling + maxReplicas: 6 + # @schema type:[integer, null] + # -- Period to wait after the last trigger reported active before scaling the resource back to 0 (seconds). + # Defaults to defaults.kedaAutoscaling.cooldownPeriod if not set. + cooldownPeriod: null + # @schema additionalProperties:true + # -- Fallback configuration for KEDA ScaledObject. Applied when the trigger metric cannot be retrieved. + # Ref: https://keda.sh/docs/latest/reference/scaledobject-spec/#fallback + fallback: {} + # @schema skipProperties:true;additionalProperties:true + # -- Behavior configuration for KEDA ScaledObject (horizontalPodAutoscalerConfig.behavior). + # Ref: https://keda.sh/docs/latest/reference/scaledobject-spec/#advanced + behavior: {} + # -- KEDA triggers for the write. + # Ref: https://keda.sh/docs/latest/scalers/ + triggers: [] + image: + # @schema type:[string, null] + # -- The Docker registry for the write image. Overrides `loki.image.registry` + registry: null + # @schema type:[string, null] + # -- Docker image repository for the write image. Overrides `loki.image.repository` + repository: null + # @schema type:[string, null] + # -- Docker image tag for the write image. Overrides `loki.image.tag` + tag: null + # @schema type:[string, null] + # -- The name of the PriorityClass for write pods + priorityClassName: null + # @schema additionalProperties:{"type":"string"} + # -- Annotations for write StatefulSet + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Additional labels for write StatefulSet + labels: {} + # @schema additionalProperties:{"type":"string"} + # -- Annotations for write pods + podAnnotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Additional labels for each `write` pod + podLabels: {} + # @schema additionalProperties:{"type":"string"} + # -- Additional selector labels for each `write` pod + selectorLabels: {} + service: + # @schema additionalProperties:{"type":"string"} + # -- Annotations for write Service + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Additional labels for write Service + labels: {} + # -- Service Type for write Service + type: "ClusterIP" + # -- trafficDistribution for write Service + trafficDistribution: "" + # -- Session affinity for write Service + sessionAffinity: "" + # @schema additionalProperties:true + # -- Session affinity config for write Service + sessionAffinityConfig: {} + # -- ipFamilyPolicy for write Service + # Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services + ipFamilyPolicy: "" + # -- ipFamilies for write Service + # Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services + ipFamilies: [] + # -- Adds the appProtocol field to the write service. This allows write to work with istio protocol selection. + appProtocol: + # -- Set the optional grpc service protocol. Ex: "grpc", "http2" or "https" + grpc: "" + # -- Additional CLI args for the write + extraArgs: [] + # -- Environment variables to add to the write pods + extraEnv: [] + # -- Environment variables from secrets or configmaps to add to the write pods + extraEnvFrom: [] + # -- Lifecycle for the write container + lifecycle: {} + # @schema type:[string, array, null] + # -- Init containers to add to the write pods + initContainers: [] + # @schema type:[string, array, null] + # -- Containers to add to the write pods + extraContainers: [] + # -- Volume mounts to add to the write pods + extraVolumeMounts: [] + # -- Volumes to add to the write pods + extraVolumes: [] + # -- volumeClaimTemplates to add to StatefulSet + extraVolumeClaimTemplates: [] + # @schema additionalProperties:true + # -- Resource requests and limits for the write + resources: {} + # -- Container resize policy for the write + # Example: + # resizePolicy: + # - resourceName: cpu + # restartPolicy: NotRequired + # - resourceName: memory + # restartPolicy: RestartContainer + resizePolicy: [] + # -- Grace period to allow the write to shutdown before it is killed. Especially for the ingester, + # this must be increased. It must be long enough so writes can be gracefully shutdown flushing/transferring + # all data and to successfully leave the member ring on shutdown. + terminationGracePeriodSeconds: 300 + # @schema type:[boolean, null] + # -- Use the host's user namespace in the write pods. + hostUsers: null + # @schema type:[object, null];skipProperties:true;additionalProperties:true + # -- Affinity for write pods. + # @default -- Hard node anti-affinity + # The value will be passed through tpl. + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchLabels: + app.kubernetes.io/component: write + app.kubernetes.io/name: '{{ include "loki.name" . }}' + app.kubernetes.io/instance: '{{ .Release.Name }}' + topologyKey: kubernetes.io/hostname + # @schema additionalProperties:true + # -- DNS config for write pods + dnsConfig: {} + # @schema type:[string, integer, null];deprecated:true + # -- Pod Disruption Budget maxUnavailable + # @deprecated -- This is deprecated in favor of `podDisruptionBudget.maxUnavailable`. + maxUnavailable: 1 + podDisruptionBudget: + # -- Enable Pod Disruption Budget + enabled: true + # @schema additionalProperties:{"type":"string"} + # -- Annotations for Pod Disruption Budget + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Labels for Pod Disruption Budget + labels: {} + + # @schema type:[string, integer, null] + # -- Pod Disruption Budget minAvailable + minAvailable: null + # @schema type:[string, integer, null] + # -- Pod Disruption Budget maxUnavailable + maxUnavailable: null + # @schema type:[string, null] + # -- Pod Disruption Budget unhealthyPodEvictionPolicy + unhealthyPodEvictionPolicy: null + # @schema additionalProperties:true + # -- Node selector for write pods + nodeSelector: {} + # @schema item:object + # -- Topology Spread Constraints for write pods + # The value will be passed through tpl. + topologySpreadConstraints: [] + tolerations: [] + # -- The default is to deploy all pods in parallel. + podManagementPolicy: "Parallel" + persistence: + # -- Enable volume claims in pod spec + volumeClaimsEnabled: true + # -- Set access modes on the PersistentVolumeClaim + accessModes: + - ReadWriteOnce + # @schema skipProperties:true;additionalProperties:true + # -- Parameters used for the `data` volume when volumeClaimEnabled if false + dataVolumeParameters: + emptyDir: {} + # -- Enable StatefulSetAutoDeletePVC feature + enableStatefulSetAutoDeletePVC: false + # -- Size of persistent disk + size: 10Gi + # @schema type:[string, null] + # -- Storage class to be used. + # If defined, storageClassName: . + # If set to "-", storageClassName: "", which disables dynamic provisioning. + # If empty or set to null, no storageClassName spec is + # set, choosing the default provisioner (gp2 on AWS, standard on GKE, AWS, and OpenStack). + storageClass: null + # @schema type:[string, null] + # -- Volume attributes class name to be used. + # If empty or set to null, no volumeAttributesClassName spec is set. + # Requires Kubernetes 1.31 + volumeAttributesClassName: null + # @schema type:[object, null] + # -- Selector for persistent disk + selector: null + # @schema additionalProperties:{"type":"string"} + # -- Annotations for volume claim + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Labels for volume claim + labels: {} + serviceAccount: + # -- Specifies whether a ServiceAccount should be created + create: false + # @schema type:[string, null] + # -- The name of the ServiceAccount to use. + # If not set and create is true, a name is generated using the fullname template + name: null + # @schema item:object;itemProperties:{"name": {"type": "string"}} + # -- Image pull secrets for the service account + imagePullSecrets: [] + # @schema additionalProperties:{"type":"string"} + # -- Annotations for the service account + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Labels for the service account + labels: {} + # -- Set this toggle to false to opt out of automounting API credentials for the service account + automountServiceAccountToken: true + +# -- Configuration for the read pod(s) +read: + # -- Enable the component. Requires `loki.deploymentMode` to be set to `SimpleScalable`. + enabled: true + # -- Kind of read deployment. StatefulSet and Deployment are supported. + kind: Deployment + # -- Override for the read fullname. By default, this is generated using the fullname template with "-backend" + fullnameOverride: '{{ include "loki.name" . }}-read' + # @schema type:[integer, null] + # -- Number of replicas for the read. Set to null to omit spec.replicas from the workload, + # allowing an external controller (e.g. HPA, KEDA, rollout-operator) to manage replica counts without Helm resetting them. + replicas: 3 + # @schema skipProperties:true;additionalProperties:true + # -- UpdateStrategy or Strategy for the read. + strategy: + rollingUpdate: + maxSurge: 0 + # @schema type:[string, integer, null] + # -- Pod Disruption Budget maxUnavailable + maxUnavailable: 1 + autoscaling: + # -- Enable autoscaling for the read, this is only used if `queryIndex.enabled: true` + enabled: false + # -- Minimum autoscaling replicas for the read + minReplicas: 2 + # -- Maximum autoscaling replicas for the read + maxReplicas: 6 + # @schema type:[integer, null] + # -- Target CPU utilisation percentage for the read + targetCPUUtilizationPercentage: 60 + # @schema type:[integer, null] + # -- Target memory utilisation percentage for the read + targetMemoryUtilizationPercentage: null + # @schema skipProperties:true;additionalProperties:true + # -- Behavior policies while scaling. + behavior: {} + # scaleUp: + # stabilizationWindowSeconds: 300 + # policies: + # - type: Pods + # value: 1 + # periodSeconds: 60 + # scaleDown: + # stabilizationWindowSeconds: 300 + # policies: + # - type: Pods + # value: 1 + # periodSeconds: 180 + kedaAutoscaling: + # -- Enable KEDA autoscaling for the read. Mutually exclusive with autoscaling.enabled + enabled: false + # @schema type:[integer, null] + # -- Interval (seconds) to poll each trigger. Defaults to defaults.kedaAutoscaling.pollingInterval if not set. + pollingInterval: null + # -- Minimum replicas for KEDA autoscaling + minReplicas: 2 + # -- Maximum replicas for KEDA autoscaling + maxReplicas: 6 + # @schema type:[integer, null] + # -- Period to wait after the last trigger reported active before scaling the resource back to 0 (seconds). + # Defaults to defaults.kedaAutoscaling.cooldownPeriod if not set. + cooldownPeriod: null + # @schema additionalProperties:true + # -- Fallback configuration for KEDA ScaledObject. Applied when the trigger metric cannot be retrieved. + # Ref: https://keda.sh/docs/latest/reference/scaledobject-spec/#fallback + fallback: {} + # @schema skipProperties:true;additionalProperties:true + # -- Behavior configuration for KEDA ScaledObject (horizontalPodAutoscalerConfig.behavior). + # Ref: https://keda.sh/docs/latest/reference/scaledobject-spec/#advanced + behavior: {} + # -- KEDA triggers for the read. + # Ref: https://keda.sh/docs/latest/scalers/ + triggers: [] + image: + # @schema type:[string, null] + # -- The Docker registry for the read image. Overrides `loki.image.registry` + registry: null + # @schema type:[string, null] + # -- Docker image repository for the read image. Overrides `loki.image.repository` + repository: null + # @schema type:[string, null] + # -- Docker image tag for the read image. Overrides `loki.image.tag` + tag: null + # @schema type:[string, null] + # -- The name of the PriorityClass for read pods + priorityClassName: null + # @schema additionalProperties:{"type":"string"} + # -- Annotations for read deployment + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Additional labels for read deployment + labels: {} + # @schema additionalProperties:{"type":"string"} + # -- Annotations for read pods + podAnnotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Additional labels for each `read` pod + podLabels: {} + # @schema additionalProperties:{"type":"string"} + # -- Additional selector labels for each `read` pod + selectorLabels: {} + service: + # @schema additionalProperties:{"type":"string"} + # -- Annotations for read Service + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Additional labels for read Service + labels: {} + # -- Service Type for read Service + type: ClusterIP + # -- trafficDistribution for read Service + trafficDistribution: "" + # -- Session affinity for read Service + sessionAffinity: "" + # @schema additionalProperties:true + # -- Session affinity config for read Service + sessionAffinityConfig: {} + # -- ipFamilyPolicy for read Service + # Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services + ipFamilyPolicy: "" + # -- ipFamilies for read Service + # Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services + ipFamilies: [] + # -- Adds the appProtocol field to the read service. This allows read to work with istio protocol selection. + appProtocol: + # -- Set the optional grpc service protocol. Ex: "grpc", "http2" or "https" + grpc: "" + # -- Additional CLI args for the read + extraArgs: [] + # @schema type:[string, array, null] + # -- init containers to add to the read pods + initContainers: [] + # @schema type:[string, array, null] + # -- Containers to add to the read pods + extraContainers: [] + # -- Environment variables to add to the read pods + extraEnv: [] + # -- Environment variables from secrets or configmaps to add to the read pods + extraEnvFrom: [] + # -- Lifecycle for the read container + lifecycle: {} + # -- Volume mounts to add to the read pods + extraVolumeMounts: [] + # -- Volumes to add to the read pods + extraVolumes: [] + # @schema additionalProperties:true + # -- Resource requests and limits for the read + resources: {} + # -- Container resize policy for the read + # Example: + # resizePolicy: + # - resourceName: cpu + # restartPolicy: NotRequired + # - resourceName: memory + # restartPolicy: RestartContainer + resizePolicy: [] + # @schema skipProperties:true;additionalProperties:true + # -- liveness probe settings for read pods. If empty, applies no livenessProbe + livenessProbe: {} + # @schema skipProperties:true;additionalProperties:true + # -- startup probe for the read pods. If empty, applies no startupProbe + startupProbe: {} + # -- Grace period to allow the read to shutdown before it is killed + terminationGracePeriodSeconds: 30 + # @schema type:[boolean, null] + # -- Use the host's user namespace in the read pods. + hostUsers: null + # @schema type:[object, null];skipProperties:true;additionalProperties:true + # -- Affinity for read pods. + # @default -- Hard node anti-affinity + # The value will be passed through tpl. + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchLabels: + app.kubernetes.io/component: read + app.kubernetes.io/name: '{{ include "loki.name" . }}' + app.kubernetes.io/instance: '{{ .Release.Name }}' + topologyKey: kubernetes.io/hostname + # @schema additionalProperties:true + # -- DNS config for read pods + dnsConfig: {} + # @schema type:[string, integer, null];deprecated:true + # -- Pod Disruption Budget maxUnavailable + # @deprecated -- This is deprecated in favor of `podDisruptionBudget.maxUnavailable`. + maxUnavailable: 1 + podDisruptionBudget: + # -- Enable Pod Disruption Budget for read pods + enabled: true + # @schema additionalProperties:{"type":"string"} + # -- Annotations for read Pod Disruption Budget + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Labels for read Pod Disruption Budget + labels: {} + + # @schema type:[string, integer, null] + # -- Pod Disruption Budget minAvailable + minAvailable: null + # @schema type:[string, integer, null] + # -- Pod Disruption Budget maxUnavailable + maxUnavailable: null + # @schema type:[string, null] + # -- Pod Disruption Budget unhealthyPodEvictionPolicy + unhealthyPodEvictionPolicy: null + # @schema additionalProperties:true + # -- Node selector for read pods + nodeSelector: {} + # @schema item:object + # -- Topology Spread Constraints for read pods + # The value will be passed through tpl. + topologySpreadConstraints: [] + tolerations: [] + # -- The default is to deploy all pods in parallel. + serviceAccount: + # -- Specifies whether a ServiceAccount should be created + create: false + # @schema type:[string, null] + # -- The name of the ServiceAccount to use. + # If not set and create is true, a name is generated using the fullname template + name: null + # @schema item:object;itemProperties:{"name": {"type": "string"}} + # -- Image pull secrets for the service account + imagePullSecrets: [] + # @schema additionalProperties:{"type":"string"} + # -- Annotations for the service account + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Labels for the service account + labels: {} + # -- Set this toggle to false to opt out of automounting API credentials for the service account + automountServiceAccountToken: true + +# -- Configuration for the backend pod(s) +backend: + # -- Enable the component. Requires `loki.deploymentMode` to be set to `SimpleScalable`. + enabled: true + # -- Kind of backend workload. StatefulSet and Deployment are supported. + kind: StatefulSet + # -- Override for the backend fullname. By default, this is generated using the fullname template with "-backend" + fullnameOverride: '{{ include "loki.name" . }}-backend' + # -- EXPERIMENTAL: Enable creating a Job to recreate the backend StatefulSet when the compactor configuration is changed. + ## Only applicable if `compactor.kind` is StatefulSet. Useful for PVC size changes, which require recreating the StatefulSet. + statefulSetRecreateJob: + enabled: false + # @schema type:[integer, null] + # -- Number of replicas for the backend. Set to null to omit spec.replicas from the workload, + # allowing an external controller (e.g. HPA, KEDA, rollout-operator) to manage replica counts without Helm resetting them. + replicas: 3 + # @schema skipProperties:true;additionalProperties:true + # -- UpdateStrategy or Strategy for the backend. + strategy: + rollingUpdate: + partition: 0 + # -- Whether to enable the rules sidecar + sidecar: true + # -- Set this toggle to false to opt out of automounting API credentials for the service account + automountServiceAccountToken: true + autoscaling: + # -- Enable autoscaling for the backend. + enabled: false + # -- Minimum autoscaling replicas for the backend. + minReplicas: 3 + # -- Maximum autoscaling replicas for the backend. + maxReplicas: 6 + # @schema type:[integer, null] + # -- Target CPU utilization percentage for the backend. + targetCPUUtilizationPercentage: 60 + # @schema type:[integer, null] + # -- Target memory utilization percentage for the backend. + targetMemoryUtilizationPercentage: null + # @schema skipProperties:true;additionalProperties:true + # -- Behavior policies while scaling. + behavior: {} + # scaleUp: + # stabilizationWindowSeconds: 300 + # policies: + # - type: Pods + # value: 1 + # periodSeconds: 60 + # scaleDown: + # stabilizationWindowSeconds: 300 + # policies: + # - type: Pods + # value: 1 + # periodSeconds: 180 + kedaAutoscaling: + # -- Enable KEDA autoscaling for the backend. Mutually exclusive with autoscaling.enabled + enabled: false + # @schema type:[integer, null] + # -- Interval (seconds) to poll each trigger. Defaults to defaults.kedaAutoscaling.pollingInterval if not set. + pollingInterval: null + # -- Minimum replicas for KEDA autoscaling + minReplicas: 3 + # -- Maximum replicas for KEDA autoscaling + maxReplicas: 6 + # @schema type:[integer, null] + # -- Period to wait after the last trigger reported active before scaling the resource back to 0 (seconds). + # Defaults to defaults.kedaAutoscaling.cooldownPeriod if not set. + cooldownPeriod: null + # @schema additionalProperties:true + # -- Fallback configuration for KEDA ScaledObject. Applied when the trigger metric cannot be retrieved. + # Ref: https://keda.sh/docs/latest/reference/scaledobject-spec/#fallback + fallback: {} + # @schema skipProperties:true;additionalProperties:true + # -- Behavior configuration for KEDA ScaledObject (horizontalPodAutoscalerConfig.behavior). + # Ref: https://keda.sh/docs/latest/reference/scaledobject-spec/#advanced + behavior: {} + # -- KEDA triggers for the backend. + # Ref: https://keda.sh/docs/latest/scalers/ + triggers: [] + image: + # @schema type:[string, null] + # -- The Docker registry for the backend image. Overrides `loki.image.registry` + registry: null + # @schema type:[string, null] + # -- Docker image repository for the backend image. Overrides `loki.image.repository` + repository: null + # @schema type:[string, null] + # -- Docker image tag for the backend image. Overrides `loki.image.tag` + tag: null + # @schema type:[string, null] + # -- The name of the PriorityClass for backend pods + priorityClassName: null + # @schema additionalProperties:{"type":"string"} + # -- Annotations for backend StatefulSet + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Additional labels for backend StatefulSet + labels: {} + # @schema additionalProperties:{"type":"string"} + # -- Annotations for backend pods + podAnnotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Additional labels for each `backend` pod + podLabels: {} + # @schema additionalProperties:{"type":"string"} + # -- Additional selector labels for each `backend` pod + selectorLabels: {} + service: + # @schema additionalProperties:{"type":"string"} + # -- Annotations for backend Service + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Additional labels for backend Service + labels: {} + # -- Service type for backend Service + type: ClusterIP + # -- trafficDistribution for backend Service + trafficDistribution: "" + # -- Session affinity for backend Service + sessionAffinity: "" + # @schema additionalProperties:true + # -- Session affinity config for backend Service + sessionAffinityConfig: {} + # -- ipFamilyPolicy for backend Service + # Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services + ipFamilyPolicy: "" + # -- ipFamilies for backend Service + # Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services + ipFamilies: [] + # -- Adds the appProtocol field to the backend service. This allows backend to work with istio protocol selection. + appProtocol: + # -- Set the optional grpc service protocol. Ex: "grpc", "http2" or "https" + grpc: "" + # -- Additional CLI args for the backend + extraArgs: [] + # -- Environment variables to add to the backend pods + extraEnv: [] + # -- Environment variables from secrets or configmaps to add to the backend pods + extraEnvFrom: [] + # @schema type:[string, array, null] + # -- Init containers to add to the backend pods + initContainers: [] + # @schema type:[string, array, null] + # -- Containers to add to the backend pods + extraContainers: [] + # -- Volume mounts to add to the backend pods + extraVolumeMounts: [] + # -- Volumes to add to the backend pods + extraVolumes: [] + # @schema additionalProperties:true + # -- Resource requests and limits for the backend + resources: {} + # -- Container resize policy for the backend + # Example: + # resizePolicy: + # - resourceName: cpu + # restartPolicy: NotRequired + # - resourceName: memory + # restartPolicy: RestartContainer + resizePolicy: [] + # -- Grace period to allow the backend to shutdown before it is killed. Especially for the ingester, + # this must be increased. It must be long enough so backends can be gracefully shutdown flushing/transferring + # all data and to successfully leave the member ring on shutdown. + terminationGracePeriodSeconds: 300 + # @schema type:[boolean, null] + # -- Use the host's user namespace in the backend pods. + hostUsers: null + # @schema type:[object, null];skipProperties:true;additionalProperties:true + # -- Affinity for backend pods. + # @default -- Hard node anti-affinity + # The value will be passed through tpl. + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchLabels: + app.kubernetes.io/component: backend + app.kubernetes.io/name: '{{ include "loki.name" . }}' + app.kubernetes.io/instance: '{{ .Release.Name }}' + topologyKey: kubernetes.io/hostname + # @schema additionalProperties:true + # -- DNS config for backend pods + dnsConfig: {} + # @schema type:[string, integer, null];deprecated:true + # -- Pod Disruption Budget maxUnavailable + # @deprecated -- This is deprecated in favor of `podDisruptionBudget.maxUnavailable`. + maxUnavailable: 1 + podDisruptionBudget: + # -- Enable Pod Disruption Budget + enabled: true + # @schema additionalProperties:{"type":"string"} + # -- Annotations for Pod Disruption Budget + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Labels for Pod Disruption Budget + labels: {} + + # @schema type:[string, integer, null] + # -- Pod Disruption Budget minAvailable + minAvailable: null + # @schema type:[string, integer, null] + # -- Pod Disruption Budget maxUnavailable + maxUnavailable: null + # @schema type:[string, null] + # -- Pod Disruption Budget unhealthyPodEvictionPolicy + unhealthyPodEvictionPolicy: null + # @schema additionalProperties:true + # -- Node selector for backend pods + nodeSelector: {} + # @schema item:object + # -- Topology Spread Constraints for backend pods + # The value will be passed through tpl. + topologySpreadConstraints: [] + tolerations: [] + # -- The default is to deploy all pods in parallel. + podManagementPolicy: "Parallel" + persistence: + # -- Enable volume claims in pod spec + enabled: false + # -- Enable volume claims in pod spec. Deprecated in favor of `persistence.enabled`. + volumeClaimsEnabled: true + # -- Set access modes on the PersistentVolumeClaim + accessModes: + - ReadWriteOnce + # @schema skipProperties:true;additionalProperties:true + # -- Parameters used for the `data` volume when volumeClaimEnabled if false + dataVolumeParameters: + emptyDir: {} + # -- What to do with the volume when the StatefulSet is scaled down. + whenScaled: Delete + # -- What to do with the volumes when the StatefulSet is deleted. + whenDeleted: Delete + # -- Enable StatefulSetAutoDeletePVC feature + enableStatefulSetAutoDeletePVC: true + # -- Size of persistent disk + size: 10Gi + # @schema type:[string, null] + # -- Storage class to be used. + # If defined, storageClassName: . + # If set to "-", storageClassName: "", which disables dynamic provisioning. + # If empty or set to null, no storageClassName spec is + # set, choosing the default provisioner (gp2 on AWS, standard on GKE, AWS, and OpenStack). + storageClass: null + # @schema type:[string, null] + # -- Volume attributes class name to be used. + # If empty or set to null, no volumeAttributesClassName spec is set. + # Requires Kubernetes 1.31 + volumeAttributesClassName: null + # @schema type:[object, null] + # -- Selector for persistent disk + selector: null + # @schema additionalProperties:{"type":"string"} + # -- Annotations for volume claim + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Labels for volume claim + labels: {} + serviceAccount: + # -- Specifies whether a ServiceAccount should be created + create: false + # @schema type:[string, null] + # -- The name of the ServiceAccount to use. + # If not set and create is true, a name is generated using the fullname template + name: null + # @schema item:object;itemProperties:{"name": {"type": "string"}} + # -- Image pull secrets for the service account + imagePullSecrets: [] + # @schema additionalProperties:{"type":"string"} + # -- Annotations for the service account + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Labels for the service account + labels: {} + # -- Set this toggle to false to opt out of automounting API credentials for the service account + automountServiceAccountToken: true +###################################################################################################################### +# +# Microservices Mode +# +# For large Loki deployments ingesting more than 1 TB/day +# +###################################################################################################################### + +# -- Configuration for the ingester +ingester: + # -- Enable the component. Requires `loki.deploymentMode` to be set to `Distributed`. + enabled: true + # -- Kind of compactor deployment. StatefulSet and Deployment are supported. + kind: StatefulSet + # -- EXPERIMENTAL: Enable creating a Job to recreate the ingester StatefulSet + ## Only applicable if `ingester.kind` is StatefulSet. Useful for PVC size changes, which require recreating the StatefulSet. + statefulSetRecreateJob: + enabled: false + # @schema skipProperties:true;additionalProperties:true + # -- UpdateStrategy or Strategy for the ingester. + strategy: + type: RollingUpdate + # -- PodManagementPolicy for the ingester StatefulSet. Only applicable if `compactor.kind` is StatefulSet. + ## OrderedReady and Parallel are supported. + podManagementPolicy: Parallel + # @schema type:[integer, null] + # -- Number of replicas for the ingester, when zoneAwareReplication.enabled is true, the total + # number of replicas will match this value with each zone having 1/3rd of the total replicas. + # Set to null to omit spec.replicas from the StatefulSet, allowing an external controller + # (e.g. HPA, KEDA, rollout-operator) to manage replica counts without Helm resetting them. + replicas: 0 + # @schema additionalProperties:true + # -- DNSConfig for ingester pods + dnsConfig: {} + # -- hostAliases to add + hostAliases: [] + # @schema type:[boolean, null] + # - ip: 1.2.3.4 + # hostnames: + # - domain.tld + # -- Use the host's user namespace in the ingester + hostUsers: null + autoscaling: + # -- Enable autoscaling for the ingester + enabled: false + # -- Minimum autoscaling replicas for the ingester + minReplicas: 1 + # -- Maximum autoscaling replicas for the ingester + maxReplicas: 3 + # @schema type:[integer, null] + # -- Target CPU utilisation percentage for the ingester + targetCPUUtilizationPercentage: 60 + # @schema type:[integer, null] + # -- Target memory utilisation percentage for the ingester + targetMemoryUtilizationPercentage: null + # -- Allows one to define custom metrics using the HPA/v2 schema (for example, Pods, Object or External metrics) + customMetrics: [] + # - type: Pods + # pods: + # metric: + # name: loki_lines_total + # target: + # type: AverageValue + # averageValue: 10k + # @schema skipProperties:true;additionalProperties:true + # -- HPA behavior configuration, passed directly as a K8s HPA behavior object. + behavior: + # -- Enable autoscaling behaviours + enabled: false + # -- define scale down policies, must conform to HPAScalingRules + scaleDown: {} + # -- define scale up policies, must conform to HPAScalingRules + scaleUp: {} + kedaAutoscaling: + # -- Enable KEDA autoscaling for the ingester. Mutually exclusive with autoscaling.enabled + enabled: false + # @schema type:[integer, null] + # -- Interval (seconds) to poll each trigger. Defaults to defaults.kedaAutoscaling.pollingInterval if not set. + pollingInterval: null + # -- Minimum replicas for KEDA autoscaling + minReplicas: 1 + # -- Maximum replicas for KEDA autoscaling + maxReplicas: 3 + # @schema type:[integer, null] + # -- Period to wait after the last trigger reported active before scaling the resource back to 0 (seconds). + # Defaults to defaults.kedaAutoscaling.cooldownPeriod if not set. + cooldownPeriod: null + # @schema additionalProperties:true + # -- Fallback configuration for KEDA ScaledObject. Applied when the trigger metric cannot be retrieved. + # Ref: https://keda.sh/docs/latest/reference/scaledobject-spec/#fallback + fallback: {} + # @schema skipProperties:true;additionalProperties:true + # -- Behavior configuration for KEDA ScaledObject (horizontalPodAutoscalerConfig.behavior). + # Ref: https://keda.sh/docs/latest/reference/scaledobject-spec/#advanced + behavior: {} + # -- KEDA triggers for the ingester. + # Ref: https://keda.sh/docs/latest/scalers/ + triggers: [] + image: + # @schema type:[string, null] + # -- The Docker registry for the ingester image. Overrides `loki.image.registry` + registry: null + # @schema type:[string, null] + # -- Docker image repository for the ingester image. Overrides `loki.image.repository` + repository: null + # @schema type:[string, null] + # -- Docker image tag for the ingester image. Overrides `loki.image.tag` + tag: null + # @schema type:[string, null] + # -- Command to execute instead of defined in Docker image + command: null + # @schema additionalProperties:{"type":"string"} + # -- Labels for ingester + labels: {} + # @schema additionalProperties:{"type":"string"} + # -- Annotations for ingester + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Labels for ingester pods + podLabels: {} + # @schema additionalProperties:{"type":"string"} + # -- Annotations for ingester pods + podAnnotations: {} + # @schema type:[string, null] + # -- The name of the PriorityClass for ingester pods + priorityClassName: null + # @schema additionalProperties:{"type":"string"};deprecated:true + # -- Labels for ingester service + # @deprecated -- This option is deprecated in favor of `ingester.service.labels` + serviceLabels: {} + # @schema additionalProperties:{"type":"string"};deprecated:true + # -- Annotations for ingester service + # @deprecated -- This option is deprecated in favor of `ingester.service.annotations` + serviceAnnotations: {} + # @schema type:string;deprecated:true + # -- Service type for ingester service + # @deprecated -- This option is deprecated in favor of `ingester.service.type` + serviceType: "ClusterIP" + service: + # @schema additionalProperties:{"type":"string"} + # -- Annotations for ingester Service + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Additional labels for ingester Service + labels: {} + # -- Service Type for ingester Service + type: "ClusterIP" + # -- trafficDistribution for ingester Service + trafficDistribution: "" + # -- Session affinity for ingester Service + sessionAffinity: "" + # @schema additionalProperties:true + # -- Session affinity config for ingester Service + sessionAffinityConfig: {} + # -- ipFamilyPolicy for ingester Service + # Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services + ipFamilyPolicy: "" + # -- ipFamilies for ingester Service + # Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services + ipFamilies: [] + # -- Adds the appProtocol field to the ingester service. This allows ingester to work with istio protocol selection. + appProtocol: + # -- Set the optional grpc service protocol. Ex: "grpc", "http2" or "https" + grpc: "" + # -- Additional CLI args for the ingester + extraArgs: [] + # -- Environment variables to add to the ingester pods + extraEnv: [] + # -- Environment variables from secrets or configmaps to add to the ingester pods + extraEnvFrom: [] + # -- Volume mounts to add to the ingester pods + extraVolumeMounts: [] + # -- Volumes to add to the ingester pods + extraVolumes: [] + # @schema additionalProperties:true + # -- Resource requests and limits for the ingester + resources: {} + # -- Container resize policy for the ingester + # Example: + # resizePolicy: + # - resourceName: cpu + # restartPolicy: NotRequired + # - resourceName: memory + # restartPolicy: RestartContainer + resizePolicy: [] + # @schema type:[string, array, null] + # -- Containers to add to the ingester pods + extraContainers: [] + # @schema type:[string, array, null] + # -- Init containers to add to the ingester pods + initContainers: [] + # -- Grace period to allow the ingester to shutdown before it is killed. Especially for the ingestor, + # this must be increased. It must be long enough so ingesters can be gracefully shutdown flushing/transferring + # all data and to successfully leave the member ring on shutdown. + terminationGracePeriodSeconds: 300 + # -- Lifecycle for the ingester container + lifecycle: {} + # @schema item:object + # -- topologySpread for ingester pods. + # @default -- Defaults to allow skew no more than 1 node + # The value will be passed through tpl. + topologySpreadConstraints: + - maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: ScheduleAnyway + labelSelector: + matchLabels: + app.kubernetes.io/component: ingester + app.kubernetes.io/name: '{{ include "loki.name" . }}' + app.kubernetes.io/instance: '{{ .Release.Name }}' + # @schema type:[object, null];skipProperties:true;additionalProperties:true + # -- Affinity for ingester pods. Ignored if zoneAwareReplication is enabled. + # @default -- Hard node anti-affinity + # The value will be passed through tpl. + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchLabels: + app.kubernetes.io/component: ingester + app.kubernetes.io/name: '{{ include "loki.name" . }}' + app.kubernetes.io/instance: '{{ .Release.Name }}' + topologyKey: kubernetes.io/hostname + # @schema type:[string, integer, null];deprecated:true + # -- Pod Disruption Budget maxUnavailable + # @deprecated -- This is deprecated in favor of `podDisruptionBudget.maxUnavailable`. + maxUnavailable: 1 + podDisruptionBudget: + # -- Enable Pod Disruption Budget + enabled: true + # @schema additionalProperties:{"type":"string"} + # -- Annotations for Pod Disruption Budget + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Labels for Pod Disruption Budget + labels: {} + + # @schema type:[string, integer, null] + # -- Pod Disruption Budget minAvailable + minAvailable: null + # @schema type:[string, integer, null] + # -- Pod Disruption Budget maxUnavailable + maxUnavailable: null + # @schema type:[string, null] + # -- Pod Disruption Budget unhealthyPodEvictionPolicy + unhealthyPodEvictionPolicy: null + # @schema additionalProperties:true + # -- Node selector for ingester pods + nodeSelector: {} + # -- Tolerations for ingester pods + tolerations: [] + # @schema skipProperties:true;additionalProperties:true + # -- readiness probe settings for ingester pods. If empty, use `loki.readinessProbe` + readinessProbe: {} + # @schema skipProperties:true;additionalProperties:true + # -- liveness probe settings for ingester pods. If empty use `loki.livenessProbe` + livenessProbe: {} + # @schema skipProperties:true;additionalProperties:true + # -- startup probe settings for ingester pods. If empty use `loki.startupProbe` + startupProbe: {} + # @schema skipProperties:true;additionalProperties:true + # -- UpdateStrategy for the ingester StatefulSets. + updateStrategy: + # -- One of 'OnDelete' or 'RollingUpdate' + type: RollingUpdate + # -- Optional for updateStrategy.type=RollingUpdate. See [Partitioned rolling updates](https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#partitions) in the StatefulSet docs for details. + # rollingUpdate: + # partition: 0 + persistence: + # -- Enable creating PVCs which is required when using boltdb-shipper + enabled: false + # -- Use emptyDir with ramdisk for storage. **Please note that all data in ingester will be lost on pod restart** + inMemory: false + # -- List of the ingester PVCs + # @notationType -- list + claims: + - name: data + # -- Set access modes on the PersistentVolumeClaim + accessModes: + - ReadWriteOnce + size: 10Gi + # @schema type:[string, null] + # -- Storage class to be used. + # If defined, storageClassName: . + # If set to "-", storageClassName: "", which disables dynamic provisioning. + # If empty or set to null, no storageClassName spec is + # set, choosing the default provisioner (gp2 on AWS, standard on GKE, AWS, and OpenStack). + storageClass: null + # @schema type:[string, null] + # -- Volume attributes class name to be used. + # If empty or set to null, no volumeAttributesClassName spec is set. + # Requires Kubernetes 1.31 + volumeAttributesClassName: null + # - name: wal + # size: 150Gi + # -- Enable StatefulSetAutoDeletePVC feature + enableStatefulSetAutoDeletePVC: false + whenDeleted: Retain + whenScaled: Retain + serviceAccount: + # -- Specifies whether a ServiceAccount should be created + create: false + # @schema type:[string, null] + # -- The name of the ServiceAccount to use. + # If not set and create is true, a name is generated using the fullname template + name: null + # @schema item:object;itemProperties:{"name": {"type": "string"}} + # -- Image pull secrets for the service account + imagePullSecrets: [] + # @schema additionalProperties:{"type":"string"} + # -- Annotations for the service account + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Labels for the service account + labels: {} + # -- Set this toggle to false to opt out of automounting API credentials for the service account + automountServiceAccountToken: true + # @schema additionalProperties:true;deprecated:true + # -- Adds the appProtocol field to the ingester service. This allows ingester to work with istio protocol selection. + # @deprecated -- This option is deprecated in favor of `ingester.service.appProtocol` + appProtocol: + # @schema type:string;deprecated:true + # -- Set the optional grpc service protocol. Ex: "grpc", "http2" or "https" + # @deprecated -- This option is deprecated in favor of `ingester.service.appProtocol.grpc` + grpc: "" + # -- trafficDistribution for ingester service + trafficDistribution: "" + # -- Enabling zone awareness on ingesters will create 3 statefulests where all writes will send a replica to each zone. + # This is primarily intended to accelerate rollout operations by allowing for multiple ingesters within a single + # zone to be shutdown and restart simultaneously (the remaining 2 zones will be guaranteed to have at least one copy + # of the data). + # Note: This can be used to run Loki over multiple cloud provider availability zones however this is not currently + # recommended as Loki is not optimized for this and cross zone network traffic costs can become extremely high + # extremely quickly. Even with zone awareness enabled, it is recommended to run Loki in a single availability zone. + zoneAwareReplication: + # -- Enable zone awareness. + enabled: true + # -- The percent of replicas in each zone that will be restarted at once. In a value of 0-100 + maxUnavailablePct: 33 + # -- zoneA configuration + zoneA: + # @schema type:[object, null] + # @schema additionalProperties:true + # -- optionally define a node selector for this zone + nodeSelector: null + # -- optionally define extra affinity rules, by default different zones are not allowed to schedule on the same host + # The value will be passed through tpl. + extraAffinity: {} + # @schema additionalProperties:{"type":"string"} + # -- Specific annotations to add to zone A statefulset + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Specific annotations to add to zone A pods + podAnnotations: {} + # -- Persistence overrides applied only to the zone A StatefulSet. + persistence: + # @schema type:[string, null] + # -- Storage class to use for every PVC in zone A. Overrides the `storageClass` of each entry in + # `ingester.persistence.claims` for this zone only. Use this when you have one StorageClass per + # availability zone (for example a topology-pinned EBS/PD StorageClass). If null, the + # claim-level `storageClass` is used as before, preserving existing behavior. + # If set to "-", `storageClassName: ""` is rendered, which disables dynamic provisioning. + storageClass: null + zoneB: + # @schema type:[object, null] + # @schema additionalProperties:true + # -- optionally define a node selector for this zone + nodeSelector: null + # -- optionally define extra affinity rules, by default different zones are not allowed to schedule on the same host + # The value will be passed through tpl. + extraAffinity: {} + # @schema additionalProperties:{"type":"string"} + # -- Specific annotations to add to zone B statefulset + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Specific annotations to add to zone B pods + podAnnotations: {} + # -- Persistence overrides applied only to the zone B StatefulSet. + persistence: + # @schema type:[string, null] + # -- Storage class to use for every PVC in zone B. See + # `ingester.zoneAwareReplication.zoneA.persistence.storageClass` for details. If null, the + # claim-level `storageClass` is used as before. + storageClass: null + zoneC: + # @schema type:[object, null] + # @schema additionalProperties:true + # -- optionally define a node selector for this zone + nodeSelector: null + # -- optionally define extra affinity rules, by default different zones are not allowed to schedule on the same host + # The value will be passed through tpl. + extraAffinity: {} + # @schema additionalProperties:{"type":"string"} + # -- Specific annotations to add to zone C statefulset + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Specific annotations to add to zone C pods + podAnnotations: {} + # -- Persistence overrides applied only to the zone C StatefulSet. + persistence: + # @schema type:[string, null] + # -- Storage class to use for every PVC in zone C. See + # `ingester.zoneAwareReplication.zoneA.persistence.storageClass` for details. If null, the + # claim-level `storageClass` is used as before. + storageClass: null + # -- The migration block allows migrating non zone aware ingesters to zone aware ingesters. + migration: + enabled: false + excludeDefaultZone: false + readPath: false + writePath: false + + # @schema type:[string, null] + # optionally allow adding arbitrary prefix to the ingester rollout-group label + rolloutGroupPrefix: null + # optionally allow adding 'loki-' prefix to ingester name label + addIngesterNamePrefix: false + +# -- Configuration for the distributor +distributor: + # -- Enable the component. Requires `loki.deploymentMode` to be set to `Distributed`. + enabled: true + # @schema type:[integer, null] + # -- Number of replicas for the distributor. Set to null to omit spec.replicas from the workload, + # allowing an external controller (e.g. HPA, KEDA, rollout-operator) to manage replica counts without Helm resetting them. + replicas: 0 + # -- Kind of compactor deployment. StatefulSet and Deployment are supported. + kind: Deployment + # @schema skipProperties:true;additionalProperties:true + # -- UpdateStrategy or Strategy for the distributor. + strategy: + rollingUpdate: + maxSurge: 0 + # @schema type:[string, integer, null] + # -- Pod Disruption Budget maxUnavailable + maxUnavailable: 1 + # -- hostAliases to add + hostAliases: [] + # @schema type:[boolean, null] + # - ip: 1.2.3.4 + # hostnames: + # - domain.tld + # -- Use the host's user namespace in the distributor + hostUsers: null + # @schema additionalProperties:true + # -- DNSConfig for distributor pods + dnsConfig: {} + autoscaling: + # -- Enable autoscaling for the distributor + enabled: false + # -- Minimum autoscaling replicas for the distributor + minReplicas: 1 + # -- Maximum autoscaling replicas for the distributor + maxReplicas: 3 + # @schema type:[integer, null] + # -- Target CPU utilisation percentage for the distributor + targetCPUUtilizationPercentage: 60 + # @schema type:[integer, null] + # -- Target memory utilisation percentage for the distributor + targetMemoryUtilizationPercentage: null + # -- Allows one to define custom metrics using the HPA/v2 schema (for example, Pods, Object or External metrics) + customMetrics: [] + # - type: Pods + # pods: + # metric: + # name: loki_lines_total + # target: + # type: AverageValue + # averageValue: 10k + # @schema skipProperties:true;additionalProperties:true + # -- HPA behavior configuration, passed directly as a K8s HPA behavior object. + behavior: + # -- Enable autoscaling behaviours + enabled: false + # -- define scale down policies, must conform to HPAScalingRules + scaleDown: {} + # -- define scale up policies, must conform to HPAScalingRules + scaleUp: {} + kedaAutoscaling: + # -- Enable KEDA autoscaling for the distributor. Mutually exclusive with autoscaling.enabled + enabled: false + # @schema type:[integer, null] + # -- Interval (seconds) to poll each trigger. Defaults to defaults.kedaAutoscaling.pollingInterval if not set. + pollingInterval: null + # -- Minimum replicas for KEDA autoscaling + minReplicas: 1 + # -- Maximum replicas for KEDA autoscaling + maxReplicas: 3 + # @schema type:[integer, null] + # -- Period to wait after the last trigger reported active before scaling the resource back to 0 (seconds). + # Defaults to defaults.kedaAutoscaling.cooldownPeriod if not set. + cooldownPeriod: null + # @schema additionalProperties:true + # -- Fallback configuration for KEDA ScaledObject. Applied when the trigger metric cannot be retrieved. + # Ref: https://keda.sh/docs/latest/reference/scaledobject-spec/#fallback + fallback: {} + # @schema skipProperties:true;additionalProperties:true + # -- Behavior configuration for KEDA ScaledObject (horizontalPodAutoscalerConfig.behavior). + # Ref: https://keda.sh/docs/latest/reference/scaledobject-spec/#advanced + behavior: {} + # -- KEDA triggers for the distributor. + # Ref: https://keda.sh/docs/latest/scalers/ + triggers: [] + image: + # @schema type:[string, null] + # -- The Docker registry for the distributor image. Overrides `loki.image.registry` + registry: null + # @schema type:[string, null] + # -- Docker image repository for the distributor image. Overrides `loki.image.repository` + repository: null + # @schema type:[string, null] + # -- Docker image tag for the distributor image. Overrides `loki.image.tag` + tag: null + # @schema type:[string, null] + # -- Command to execute instead of defined in Docker image + command: null + # @schema type:[string, null] + # -- The name of the PriorityClass for distributor pods + priorityClassName: null + # @schema additionalProperties:{"type":"string"} + # -- Labels for distributor + labels: {} + # @schema additionalProperties:{"type":"string"} + # -- Annotations for distributor + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Labels for distributor pods + podLabels: {} + # @schema additionalProperties:{"type":"string"} + # -- Annotations for distributor pods + podAnnotations: {} + # @schema additionalProperties:{"type":"string"};deprecated:true + # -- Labels for distributor service + # @deprecated -- This option is deprecated in favor of `ingester.service.labels` + serviceLabels: {} + # @schema additionalProperties:{"type":"string"};deprecated:true + # -- Annotations for distributor service + # @deprecated -- This option is deprecated in favor of `ingester.service.annotations` + serviceAnnotations: {} + # @schema type:string;deprecated:true + # -- Service type for distributor service + # @deprecated -- This option is deprecated in favor of `ingester.service.type` + serviceType: "ClusterIP" + service: + # @schema additionalProperties:{"type":"string"} + # -- Annotations for distributor Service + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Additional labels for distributor Service + labels: {} + # -- Service Type for distributor Service + type: "ClusterIP" + # -- trafficDistribution for distributor Service + trafficDistribution: "" + # -- Session affinity for distributor Service + sessionAffinity: "" + # @schema additionalProperties:true + # -- Session affinity config for distributor Service + sessionAffinityConfig: {} + # -- ipFamilyPolicy for distributor Service + # Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services + ipFamilyPolicy: "" + # -- ipFamilies for distributor Service + # Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services + ipFamilies: [] + # -- Adds the appProtocol field to the distributor service. This allows distributor to work with istio protocol selection. + appProtocol: + # -- Set the optional grpc service protocol. Ex: "grpc", "http2" or "https" + grpc: "" + # -- Additional CLI args for the distributor + extraArgs: [] + # -- Environment variables to add to the distributor pods + extraEnv: [] + # -- Environment variables from secrets or configmaps to add to the distributor pods + extraEnvFrom: [] + # -- Volume mounts to add to the distributor pods + extraVolumeMounts: [] + # -- Volumes to add to the distributor pods + extraVolumes: [] + # @schema additionalProperties:true + # -- Resource requests and limits for the distributor + resources: {} + # -- Container resize policy for the distributor + # Example: + # resizePolicy: + # - resourceName: cpu + # restartPolicy: NotRequired + # - resourceName: memory + # restartPolicy: RestartContainer + resizePolicy: [] + # @schema type:[string, array, null] + # -- Init containers to add to the distributor pods + initContainers: [] + # @schema type:[string, array, null] + # -- Containers to add to the distributor pods + extraContainers: [] + # @schema type:[string, null] + # -- On SIGTERM, report 503 on /ready and wait this long before shutdown so the LB drains the pod before connections are cut. + # "0s" (default) disables. When enabling, keep terminationGracePeriodSeconds above shutdownDelay + server.graceful_shutdown_timeout. + shutdownDelay: 0s + # -- Grace period to allow the distributor to shutdown before it is killed + terminationGracePeriodSeconds: 30 + podDisruptionBudget: + # -- Enable Pod Disruption Budget + enabled: true + # @schema additionalProperties:{"type":"string"} + # -- Annotations for Pod Disruption Budget + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Labels for Pod Disruption Budget + labels: {} + + # @schema type:[string, integer, null] + # -- Pod Disruption Budget minAvailable + minAvailable: null + # @schema type:[string, integer, null] + # -- Pod Disruption Budget maxUnavailable + maxUnavailable: null + # @schema type:[string, null] + # -- Pod Disruption Budget unhealthyPodEvictionPolicy + unhealthyPodEvictionPolicy: null + # @schema type:[object, null];skipProperties:true;additionalProperties:true + # -- Affinity for distributor pods. + # @default -- Hard node anti-affinity + # The value will be passed through tpl. + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchLabels: + app.kubernetes.io/component: distributor + app.kubernetes.io/name: '{{ include "loki.name" . }}' + app.kubernetes.io/instance: '{{ .Release.Name }}' + topologyKey: kubernetes.io/hostname + # @schema type:[string, integer, null];deprecated:true + # -- Pod Disruption Budget maxUnavailable + # @deprecated -- This is deprecated in favor of `podDisruptionBudget.maxUnavailable`. + maxUnavailable: null + # @schema type:[string, integer] + # -- Max Surge for distributor pods + maxSurge: 0 + # @schema additionalProperties:true + # -- Node selector for distributor pods + nodeSelector: {} + # @schema item:object + # -- Topology Spread Constraints for distributor pods + # The value will be passed through tpl. + topologySpreadConstraints: [] + tolerations: [] + # @schema additionalProperties:true;deprecated:true + # -- Adds the appProtocol field to the distributor service. This allows distributor to work with istio protocol selection. + # @deprecated -- This option is deprecated in favor of `distributor.service.appProtocol` + appProtocol: + # @schema type:string;deprecated:true + # -- Set the optional grpc service protocol. Ex: "grpc", "http2" or "https" + # @deprecated -- This option is deprecated in favor of `distributor.service.appProtocol.grpc` + grpc: "" + # -- trafficDistribution for distributor service + trafficDistribution: "" + serviceAccount: + # -- Specifies whether a ServiceAccount should be created + create: false + # @schema type:[string, null] + # -- The name of the ServiceAccount to use. + # If not set and create is true, a name is generated using the fullname template + name: null + # @schema item:object;itemProperties:{"name": {"type": "string"}} + # -- Image pull secrets for the service account + imagePullSecrets: [] + # @schema additionalProperties:{"type":"string"} + # -- Annotations for the service account + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Labels for the service account + labels: {} + # -- Set this toggle to false to opt out of automounting API credentials for the service account + automountServiceAccountToken: true + +# -- Configuration for the querier +querier: + # -- Enable the component. Requires `loki.deploymentMode` to be set to `Distributed`. + enabled: true + # -- Kind of compactor deployment. StatefulSet and Deployment are supported. + kind: Deployment + # @schema type:[integer, null] + # -- Number of replicas for the querier. Set to null to omit spec.replicas from the workload, + # allowing an external controller (e.g. HPA, KEDA, rollout-operator) to manage replica counts without Helm resetting them. + replicas: 0 + # @schema skipProperties:true;additionalProperties:true + # -- Strategy for the querier. + strategy: + type: RollingUpdate + rollingUpdate: + maxSurge: 0 + # @schema type:[string, integer, null] + # -- Pod Disruption Budget maxUnavailable + maxUnavailable: 1 + # -- hostAliases to add + hostAliases: [] + # @schema type:[boolean, null] + # - ip: 1.2.3.4 + # hostnames: + # - domain.tld + # -- Use the host's user namespace in the querier + hostUsers: null + autoscaling: + # -- Enable autoscaling for the querier, this is only used if `indexGateway.enabled: true` + enabled: false + # -- Minimum autoscaling replicas for the querier + minReplicas: 1 + # -- Maximum autoscaling replicas for the querier + maxReplicas: 3 + # @schema type:[integer, null] + # -- Target CPU utilisation percentage for the querier + targetCPUUtilizationPercentage: 60 + # @schema type:[integer, null] + # -- Target memory utilisation percentage for the querier + targetMemoryUtilizationPercentage: null + # -- Allows one to define custom metrics using the HPA/v2 schema (for example, Pods, Object or External metrics) + customMetrics: [] + # - type: External + # external: + # metric: + # name: loki_inflight_queries + # target: + # type: AverageValue + # averageValue: 12 + # @schema skipProperties:true;additionalProperties:true + # -- HPA behavior configuration, passed directly as a K8s HPA behavior object. + behavior: + # -- Enable autoscaling behaviours + enabled: false + # -- define scale down policies, must conform to HPAScalingRules + scaleDown: {} + # -- define scale up policies, must conform to HPAScalingRules + scaleUp: {} + kedaAutoscaling: + # -- Enable KEDA autoscaling for the querier. Mutually exclusive with autoscaling.enabled + enabled: false + # @schema type:[integer, null] + # -- Interval (seconds) to poll each trigger. Defaults to defaults.kedaAutoscaling.pollingInterval if not set. + pollingInterval: null + # -- Minimum replicas for KEDA autoscaling + minReplicas: 1 + # -- Maximum replicas for KEDA autoscaling + maxReplicas: 10 + # @schema type:[integer, null] + # -- Period to wait after the last trigger reported active before scaling the resource back to 0 (seconds). + # Defaults to defaults.kedaAutoscaling.cooldownPeriod if not set. + cooldownPeriod: null + # @schema additionalProperties:true + # -- Fallback configuration for KEDA ScaledObject. Applied when the trigger metric cannot be retrieved. + # Ref: https://keda.sh/docs/latest/reference/scaledobject-spec/#fallback + fallback: {} + # @schema skipProperties:true;additionalProperties:true + # -- Behavior configuration for KEDA ScaledObject (horizontalPodAutoscalerConfig.behavior). + # Ref: https://keda.sh/docs/latest/reference/scaledobject-spec/#advanced + behavior: {} + # -- KEDA triggers for the querier. Defaults to a Prometheus trigger using inflight requests. + triggers: + - type: prometheus + name: querier_autoscaling_metric + metadata: + serverAddress: "{{ .Values.defaults.kedaAutoscaling.prometheusAddress }}" + query: sum(max_over_time(loki_query_scheduler_inflight_requests{quantile="0.75"}[2m])) + threshold: "4" + unsafeSsl: "{{ .Values.defaults.kedaAutoscaling.unsafeSsl }}" + ignoreNullValues: "{{ .Values.defaults.kedaAutoscaling.ignoreNullValues }}" + customHeaders: "{{ .Values.defaults.kedaAutoscaling.customHeaders }}" + authModes: "{{ .Values.defaults.kedaAutoscaling.authentication.authModes }}" + image: + # @schema type:[string, null] + # -- The Docker registry for the querier image. Overrides `loki.image.registry` + registry: null + # @schema type:[string, null] + # -- Docker image repository for the querier image. Overrides `loki.image.repository` + repository: null + # @schema type:[string, null] + # -- Docker image tag for the querier image. Overrides `loki.image.tag` + tag: null + # @schema type:[string, null] + # -- Command to execute instead of defined in Docker image + command: null + # @schema type:[string, null] + # -- The name of the PriorityClass for querier pods + priorityClassName: null + # @schema additionalProperties:{"type":"string"} + # -- Labels for querier + labels: {} + # @schema additionalProperties:{"type":"string"} + # -- Annotations for querier + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Labels for querier pods + podLabels: {} + # @schema additionalProperties:{"type":"string"} + # -- Annotations for querier pods + podAnnotations: {} + # @schema additionalProperties:{"type":"string"};deprecated:true + # -- Labels for querier service + # @deprecated -- This option is deprecated in favor of `querier.service.labels` + serviceLabels: {} + # @schema additionalProperties:{"type":"string"};deprecated:true + # -- Annotations for querier service + # @deprecated -- This option is deprecated in favor of `querier.service.annotations` + serviceAnnotations: {} + # @schema type:string;deprecated:true + # -- Service type for querier service + # @deprecated -- This option is deprecated in favor of `querier.service.type` + serviceType: "ClusterIP" + service: + # @schema additionalProperties:{"type":"string"} + # -- Annotations for querier Service + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Additional labels for querier Service + labels: {} + # -- Service Type for querier Service + type: "ClusterIP" + # -- trafficDistribution for querier Service + trafficDistribution: "" + # -- Session affinity for querier Service + sessionAffinity: "" + # @schema additionalProperties:true + # -- Session affinity config for querier Service + sessionAffinityConfig: {} + # -- ipFamilyPolicy for querier Service + # Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services + ipFamilyPolicy: "" + # -- ipFamilies for querier Service + # Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services + ipFamilies: [] + # -- Adds the appProtocol field to the querier service. This allows querier to work with istio protocol selection. + appProtocol: + # -- Set the optional grpc service protocol. Ex: "grpc", "http2" or "https" + grpc: "" + # -- Additional CLI args for the querier + extraArgs: [] + # -- Environment variables to add to the querier pods + extraEnv: [] + # -- Environment variables from secrets or configmaps to add to the querier pods + extraEnvFrom: [] + # -- Volume mounts to add to the querier pods + extraVolumeMounts: [] + # -- Volumes to add to the querier pods + extraVolumes: [] + # @schema additionalProperties:true + # -- Resource requests and limits for the querier + resources: {} + # -- Container resize policy for the querier + # Example: + # resizePolicy: + # - resourceName: cpu + # restartPolicy: NotRequired + # - resourceName: memory + # restartPolicy: RestartContainer + resizePolicy: [] + # @schema type:[string, array, null] + # -- Containers to add to the querier pods + extraContainers: [] + # @schema type:[string, array, null] + # -- Init containers to add to the querier pods + initContainers: [] + # -- Grace period to allow the querier to shutdown before it is killed + terminationGracePeriodSeconds: 30 + podDisruptionBudget: + # -- Enable Pod Disruption Budget + enabled: true + # @schema additionalProperties:{"type":"string"} + # -- Annotations for Pod Disruption Budget + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Labels for Pod Disruption Budget + labels: {} + + # @schema type:[string, integer, null] + # -- Pod Disruption Budget minAvailable + minAvailable: null + # @schema type:[string, integer, null] + # -- Pod Disruption Budget maxUnavailable + maxUnavailable: null + # @schema type:[string, null] + # -- Pod Disruption Budget unhealthyPodEvictionPolicy + unhealthyPodEvictionPolicy: null + # @schema item:object + # -- topologySpread for querier pods. + # @default -- Defaults to allow skew no more then 1 node + # The value will be passed through tpl. + topologySpreadConstraints: + - maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: ScheduleAnyway + labelSelector: + matchLabels: + app.kubernetes.io/component: querier + app.kubernetes.io/name: '{{ include "loki.name" . }}' + app.kubernetes.io/instance: '{{ .Release.Name }}' + # @schema type:[object, null];skipProperties:true;additionalProperties:true + # -- Affinity for querier pods. + # @default -- Hard node anti-affinity + # The value will be passed through tpl. + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchLabels: + app.kubernetes.io/component: querier + app.kubernetes.io/name: '{{ include "loki.name" . }}' + app.kubernetes.io/instance: '{{ .Release.Name }}' + topologyKey: kubernetes.io/hostname + # @schema type:[string, integer, null];deprecated:true + # -- Pod Disruption Budget maxUnavailable + # @deprecated -- This is deprecated in favor of `podDisruptionBudget.maxUnavailable`. + maxUnavailable: null + # @schema type:[string, integer] + # -- Max Surge for querier pods + maxSurge: 0 + # @schema additionalProperties:true + # -- Node selector for querier pods + nodeSelector: {} + # -- Tolerations for querier pods + tolerations: [] + # @schema additionalProperties:true + # -- DNSConfig for querier pods + dnsConfig: {} + # @schema additionalProperties:true;deprecated:true + # -- Adds the appProtocol field to the querier service. This allows querier to work with istio protocol selection. + # @deprecated -- This option is deprecated in favor of `querier.service.appProtocol` + appProtocol: + # @schema type:string;deprecated:true + # -- Set the optional grpc service protocol. Ex: "grpc", "http2" or "https" + # @deprecated -- This option is deprecated in favor of `querier.service.appProtocol.grpc` + grpc: "" + # -- trafficDistribution for querier service + trafficDistribution: "" + serviceAccount: + # -- Specifies whether a ServiceAccount should be created + create: false + # @schema type:[string, null] + # -- The name of the ServiceAccount to use. + # If not set and create is true, a name is generated using the fullname template + name: null + # @schema item:object;itemProperties:{"name": {"type": "string"}} + # -- Image pull secrets for the service account + imagePullSecrets: [] + # @schema additionalProperties:{"type":"string"} + # -- Annotations for the service account + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Labels for the service account + labels: {} + # -- Set this toggle to false to opt out of automounting API credentials for the service account + automountServiceAccountToken: true + +# -- Configuration for the query-frontend +queryFrontend: + # -- Enable the component. Requires `loki.deploymentMode` to be set to `Distributed`. + enabled: true + # -- Kind of compactor deployment. StatefulSet and Deployment are supported. + kind: Deployment + # @schema type:[integer, null] + # -- Number of replicas for the query-frontend. Set to null to omit spec.replicas from the workload, + # allowing an external controller (e.g. HPA, KEDA, rollout-operator) to manage replica counts without Helm resetting them. + replicas: 0 + # @schema skipProperties:true;additionalProperties:true + # -- Strategy for the querier. + strategy: + type: RollingUpdate + rollingUpdate: + maxSurge: 0 + # @schema type:[string, integer, null] + # -- Pod Disruption Budget maxUnavailable + maxUnavailable: 1 + # -- hostAliases to add + hostAliases: [] + # @schema type:[boolean, null] + # - ip: 1.2.3.4 + # hostnames: + # - domain.tld + # -- Use the host's user namespace in the query-frontend + hostUsers: null + autoscaling: + # -- Enable autoscaling for the query-frontend + enabled: false + # -- Minimum autoscaling replicas for the query-frontend + minReplicas: 1 + # -- Maximum autoscaling replicas for the query-frontend + maxReplicas: 3 + # @schema type:[integer, null] + # -- Target CPU utilisation percentage for the query-frontend + targetCPUUtilizationPercentage: 60 + # @schema type:[integer, null] + # -- Target memory utilisation percentage for the query-frontend + targetMemoryUtilizationPercentage: null + # -- Allows one to define custom metrics using the HPA/v2 schema (for example, Pods, Object or External metrics) + customMetrics: [] + # - type: Pods + # pods: + # metric: + # name: loki_query_rate + # target: + # type: AverageValue + # averageValue: 100 + # @schema skipProperties:true;additionalProperties:true + # -- HPA behavior configuration, passed directly as a K8s HPA behavior object. + behavior: + # -- Enable autoscaling behaviours + enabled: false + # -- define scale down policies, must conform to HPAScalingRules + scaleDown: {} + # -- define scale up policies, must conform to HPAScalingRules + scaleUp: {} + kedaAutoscaling: + # -- Enable KEDA autoscaling for the query-frontend. Mutually exclusive with autoscaling.enabled + enabled: false + # @schema type:[integer, null] + # -- Interval (seconds) to poll each trigger. Defaults to defaults.kedaAutoscaling.pollingInterval if not set. + pollingInterval: null + # -- Minimum replicas for KEDA autoscaling + minReplicas: 1 + # -- Maximum replicas for KEDA autoscaling + maxReplicas: 3 + # @schema type:[integer, null] + # -- Period to wait after the last trigger reported active before scaling the resource back to 0 (seconds). + # Defaults to defaults.kedaAutoscaling.cooldownPeriod if not set. + cooldownPeriod: null + # @schema additionalProperties:true + # -- Fallback configuration for KEDA ScaledObject. Applied when the trigger metric cannot be retrieved. + # Ref: https://keda.sh/docs/latest/reference/scaledobject-spec/#fallback + fallback: {} + # @schema skipProperties:true;additionalProperties:true + # -- Behavior configuration for KEDA ScaledObject (horizontalPodAutoscalerConfig.behavior). + # Ref: https://keda.sh/docs/latest/reference/scaledobject-spec/#advanced + behavior: {} + # -- KEDA triggers for the query-frontend. + # Ref: https://keda.sh/docs/latest/scalers/ + triggers: [] + image: + # @schema type:[string, null] + # -- The Docker registry for the query-frontend image. Overrides `loki.image.registry` + registry: null + # @schema type:[string, null] + # -- Docker image repository for the query-frontend image. Overrides `loki.image.repository` + repository: null + # @schema type:[string, null] + # -- Docker image tag for the query-frontend image. Overrides `loki.image.tag` + tag: null + # @schema type:[string, null] + # -- Command to execute instead of defined in Docker image + command: null + # @schema type:[string, null] + # -- The name of the PriorityClass for query-frontend pods + priorityClassName: null + # @schema additionalProperties:{"type":"string"} + # -- Labels for query-frontend + labels: {} + # @schema additionalProperties:{"type":"string"} + # -- Annotations for query-frontend + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Labels for query-frontend pods + podLabels: {} + # @schema additionalProperties:{"type":"string"} + # -- Annotations for query-frontend pods + podAnnotations: {} + # @schema additionalProperties:{"type":"string"};deprecated:true + # -- Labels for query-frontend service + # @deprecated -- This option is deprecated in favor of `queryFrontend.service.labels` + serviceLabels: {} + # @schema additionalProperties:{"type":"string"};deprecated:true + # -- Annotations for query-frontend service + # @deprecated -- This option is deprecated in favor of `queryFrontend.service.annotations` + serviceAnnotations: {} + # @schema type:string;deprecated:true + # -- Service type for query-frontend service + # @deprecated -- This option is deprecated in favor of `queryFrontend.service.type` + serviceType: "ClusterIP" + service: + # @schema additionalProperties:{"type":"string"} + # -- Annotations for query-frontend Service + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Additional labels for query-frontend Service + labels: {} + # -- Service Type for query-frontend Service + type: "ClusterIP" + # -- trafficDistribution for query-frontend Service + trafficDistribution: "" + # -- Session affinity for query-frontend Service + sessionAffinity: "" + # @schema additionalProperties:true + # -- Session affinity config for query-frontend Service + sessionAffinityConfig: {} + # -- ipFamilyPolicy for query-frontend Service + # Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services + ipFamilyPolicy: "" + # -- ipFamilies for query-frontend Service + # Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services + ipFamilies: [] + # -- Adds the appProtocol field to the query-frontend service. This allows query-frontend to work with istio protocol selection. + appProtocol: + # -- Set the optional grpc service protocol. Ex: "grpc", "http2" or "https" + grpc: "" + # -- Additional CLI args for the query-frontend + extraArgs: [] + # -- Environment variables to add to the query-frontend pods + extraEnv: [] + # -- Environment variables from secrets or configmaps to add to the query-frontend pods + extraEnvFrom: [] + # -- Volume mounts to add to the query-frontend pods + extraVolumeMounts: [] + # -- Volumes to add to the query-frontend pods + extraVolumes: [] + # @schema additionalProperties:true + # -- Resource requests and limits for the query-frontend + resources: {} + # -- Container resize policy for the query-frontend + # Example: + # resizePolicy: + # - resourceName: cpu + # restartPolicy: NotRequired + # - resourceName: memory + # restartPolicy: RestartContainer + resizePolicy: [] + # @schema type:[string, array, null] + # -- init containers to add to the query-frontend pods + initContainers: [] + # @schema type:[string, array, null] + # -- Containers to add to the query-frontend pods + extraContainers: [] + # -- Grace period to allow the query-frontend to shutdown before it is killed + terminationGracePeriodSeconds: 30 + podDisruptionBudget: + # -- Enable Pod Disruption Budget + enabled: true + # @schema additionalProperties:{"type":"string"} + # -- Annotations for Pod Disruption Budget + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Labels for Pod Disruption Budget + labels: {} + + # @schema type:[string, integer, null] + # -- Pod Disruption Budget minAvailable + minAvailable: null + # @schema type:[string, integer, null] + # -- Pod Disruption Budget maxUnavailable + maxUnavailable: null + # @schema type:[string, null] + # -- Pod Disruption Budget unhealthyPodEvictionPolicy + unhealthyPodEvictionPolicy: null + # @schema type:[object, null];skipProperties:true;additionalProperties:true + # -- Affinity for query-frontend pods. + # @default -- Hard node anti-affinity + # The value will be passed through tpl. + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchLabels: + app.kubernetes.io/component: query-frontend + app.kubernetes.io/name: '{{ include "loki.name" . }}' + app.kubernetes.io/instance: '{{ .Release.Name }}' + topologyKey: kubernetes.io/hostname + # @schema type:[string, integer, null];deprecated:true + # -- Pod Disruption Budget maxUnavailable + # @deprecated -- This is deprecated in favor of `podDisruptionBudget.maxUnavailable`. + maxUnavailable: null + # @schema additionalProperties:true + # -- Node selector for query-frontend pods + nodeSelector: {} + # @schema item:object + # -- Topology Spread Constraints for query-frontend pods + # The value will be passed through tpl. + topologySpreadConstraints: [] + tolerations: [] + # @schema additionalProperties:true;deprecated:true + # -- Adds the appProtocol field to the queryFrontend service. This allows queryFrontend to work with istio protocol selection. + # @deprecated -- This option is deprecated in favor of `queryFrontend.service.appProtocol` + appProtocol: + # @schema type:string;deprecated:true + # -- Set the optional grpc service protocol. Ex: "grpc", "http2" or "https" + # @deprecated -- This option is deprecated in favor of `queryFrontend.service.appProtocol.grpc` + grpc: "" + # -- Enable load balancer port for query-frontend + loadBalancer: + enabled: true + # -- trafficDistribution for query-frontend service + trafficDistribution: "" + serviceAccount: + # -- Specifies whether a ServiceAccount should be created + create: false + # @schema type:[string, null] + # -- The name of the ServiceAccount to use. + # If not set and create is true, a name is generated using the fullname template + name: null + # @schema item:object;itemProperties:{"name": {"type": "string"}} + # -- Image pull secrets for the service account + imagePullSecrets: [] + # @schema additionalProperties:{"type":"string"} + # -- Annotations for the service account + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Labels for the service account + labels: {} + # -- Set this toggle to false to opt out of automounting API credentials for the service account + automountServiceAccountToken: true + +# -- Configuration for the query-scheduler +queryScheduler: + # -- Enable the component. Requires `loki.deploymentMode` to be set to `Distributed`. + enabled: true + # -- Kind of query-scheduler deployment. StatefulSet and Deployment are supported. + kind: Deployment + # @schema type:[integer, null] + # -- Number of replicas for the query-scheduler. + # It should be lower than `-querier.max-concurrent` to avoid generating back-pressure in queriers; + # it's also recommended that this value evenly divides the latter + # Set to null to omit spec.replicas from the workload, allowing an external controller + # (e.g. HPA, KEDA, rollout-operator) to manage replica counts without Helm resetting them. + replicas: 0 + # @schema skipProperties:true;additionalProperties:true + # -- Strategy for the query-scheduler. + strategy: + type: RollingUpdate + rollingUpdate: + maxSurge: 0 + # @schema type:[string, integer, null] + # -- Pod Disruption Budget maxUnavailable + maxUnavailable: 1 + # @schema additionalProperties:true + # -- DNSConfig for query-scheduler + dnsConfig: {} + # -- hostAliases to add + hostAliases: [] + # @schema type:[boolean, null] + # - ip: 1.2.3.4 + # hostnames: + # - domain.tld + # -- Use the host's user namespace in the query-scheduler + hostUsers: null + image: + # @schema type:[string, null] + # -- The Docker registry for the query-scheduler image. Overrides `loki.image.registry` + registry: null + # @schema type:[string, null] + # -- Docker image repository for the query-scheduler image. Overrides `loki.image.repository` + repository: null + # @schema type:[string, null] + # -- Docker image tag for the query-scheduler image. Overrides `loki.image.tag` + tag: null + # @schema type:[string, null] + # -- The name of the PriorityClass for query-scheduler pods + priorityClassName: null + # @schema additionalProperties:{"type":"string"} + # -- Labels for query-scheduler + labels: {} + # @schema additionalProperties:{"type":"string"} + # -- Annotations for query-scheduler + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Labels for query-scheduler pods + podLabels: {} + # @schema additionalProperties:{"type":"string"} + # -- Annotations for query-scheduler pods + podAnnotations: {} + # @schema additionalProperties:{"type":"string"};deprecated:true + # -- Labels for query-scheduler service + # @deprecated -- This option is deprecated in favor of `queryScheduler.service.labels` + serviceLabels: {} + # @schema additionalProperties:{"type":"string"};deprecated:true + # -- Annotations for query-scheduler service + # @deprecated -- This option is deprecated in favor of `queryScheduler.service.annotations` + serviceAnnotations: {} + # @schema type:string;deprecated:true + # -- Service type for query-scheduler service + # @deprecated -- This option is deprecated in favor of `queryScheduler.service.type` + serviceType: "ClusterIP" + service: + # @schema additionalProperties:{"type":"string"} + # -- Annotations for query-scheduler Service + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Additional labels for query-scheduler Service + labels: {} + # -- Service Type for query-scheduler Service + type: "ClusterIP" + # -- trafficDistribution for query-scheduler Service + trafficDistribution: "" + # -- Session affinity for query-scheduler Service + sessionAffinity: "" + # @schema additionalProperties:true + # -- Session affinity config for query-scheduler Service + sessionAffinityConfig: {} + # -- ipFamilyPolicy for query-scheduler Service + # Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services + ipFamilyPolicy: "" + # -- ipFamilies for query-scheduler Service + # Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services + ipFamilies: [] + # -- Adds the appProtocol field to the query-scheduler service. This allows query-scheduler to work with istio protocol selection. + appProtocol: + # -- Set the optional grpc service protocol. Ex: "grpc", "http2" or "https" + grpc: "" + # -- Additional CLI args for the query-scheduler + extraArgs: [] + # -- Environment variables to add to the query-scheduler pods + extraEnv: [] + # -- Environment variables from secrets or configmaps to add to the query-scheduler pods + extraEnvFrom: [] + # -- Volume mounts to add to the query-scheduler pods + extraVolumeMounts: [] + # -- Volumes to add to the query-scheduler pods + extraVolumes: [] + # @schema additionalProperties:true + # -- Resource requests and limits for the query-scheduler + resources: {} + # -- Container resize policy for the query-scheduler + # Example: + # resizePolicy: + # - resourceName: cpu + # restartPolicy: NotRequired + # - resourceName: memory + # restartPolicy: RestartContainer + resizePolicy: [] + # @schema type:[string, array, null] + # -- init containers to add to the query-scheduler pods + initContainers: [] + # @schema type:[string, array, null] + # -- Containers to add to the query-scheduler pods + extraContainers: [] + # -- Grace period to allow the query-scheduler to shutdown before it is killed + terminationGracePeriodSeconds: 30 + # @schema type:[object, null];skipProperties:true;additionalProperties:true + # -- Affinity for query-scheduler pods. + # @default -- Hard node anti-affinity + # The value will be passed through tpl. + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchLabels: + app.kubernetes.io/component: query-scheduler + app.kubernetes.io/name: '{{ include "loki.name" . }}' + app.kubernetes.io/instance: '{{ .Release.Name }}' + topologyKey: kubernetes.io/hostname + # @schema type:[string, integer, null];deprecated:true + # -- Pod Disruption Budget maxUnavailable + # @deprecated -- This is deprecated in favor of `podDisruptionBudget.maxUnavailable`. + maxUnavailable: 1 + podDisruptionBudget: + # -- Enable Pod Disruption Budget + enabled: true + # @schema additionalProperties:{"type":"string"} + # -- Annotations for Pod Disruption Budget + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Labels for Pod Disruption Budget + labels: {} + + # @schema type:[string, integer, null] + # -- Pod Disruption Budget minAvailable + minAvailable: null + # @schema type:[string, integer, null] + # -- Pod Disruption Budget maxUnavailable + maxUnavailable: null + # @schema type:[string, null] + # -- Pod Disruption Budget unhealthyPodEvictionPolicy + unhealthyPodEvictionPolicy: null + # @schema additionalProperties:true + # -- Node selector for query-scheduler pods + nodeSelector: {} + # @schema item:object + # -- Topology Spread Constraints for query-scheduler pods + # The value will be passed through tpl. + topologySpreadConstraints: [] + tolerations: [] + # @schema additionalProperties:true;deprecated:true + # -- Set the optional grpc service protocol. Ex: "grpc", "http2" or "https" + # @deprecated -- This option is deprecated in favor of `queryScheduler.service.appProtocol` + appProtocol: + grpc: "" + # -- trafficDistribution for query-scheduler service + trafficDistribution: "" + serviceAccount: + # -- Specifies whether a ServiceAccount should be created + create: false + # @schema type:[string, null] + # -- The name of the ServiceAccount to use. + # If not set and create is true, a name is generated using the fullname template + name: null + # @schema item:object;itemProperties:{"name": {"type": "string"}} + # -- Image pull secrets for the service account + imagePullSecrets: [] + # @schema additionalProperties:{"type":"string"} + # -- Annotations for the service account + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Labels for the service account + labels: {} + # -- Set this toggle to false to opt out of automounting API credentials for the service account + automountServiceAccountToken: true + +# -- Configuration for the index-gateway +indexGateway: + # -- Enable the component. Requires `loki.deploymentMode` to be set to `Distributed`. + enabled: true + # -- Kind of index-gateway deployment. StatefulSet and Deployment are supported. + kind: StatefulSet + # -- EXPERIMENTAL: Enable creating a Job to recreate the compactor StatefulSet when the compactor configuration is changed. + ## Only applicable if `compactor.kind` is StatefulSet. Useful for PVC size changes, which require recreating the StatefulSet. + statefulSetRecreateJob: + enabled: false + # @schema type:[integer, null] + # -- Number of replicas for the index-gateway. Set to null to omit spec.replicas from the workload, + # allowing an external controller (e.g. HPA, KEDA, rollout-operator) to manage replica counts without Helm resetting them. + replicas: 0 + # -- Whether the index gateway should join the memberlist hashring + joinMemberlist: true + # @schema additionalProperties:true + # -- DNSConfig for index-gateway pods + dnsConfig: {} + # -- hostAliases to add + hostAliases: [] + # @schema type:[boolean, null] + # - ip: 1.2.3.4 + # hostnames: + # - domain.tld + # -- Use the host's user namespace in the index-gateway + hostUsers: null + image: + # @schema type:[string, null] + # -- The Docker registry for the index-gateway image. Overrides `loki.image.registry` + registry: null + # @schema type:[string, null] + # -- Docker image repository for the index-gateway image. Overrides `loki.image.repository` + repository: null + # @schema type:[string, null] + # -- Docker image tag for the index-gateway image. Overrides `loki.image.tag` + tag: null + # @schema type:[string, null] + # -- The name of the PriorityClass for index-gateway pods + priorityClassName: null + # @schema additionalProperties:{"type":"string"} + # -- Labels for index-gateway + labels: {} + # @schema additionalProperties:{"type":"string"} + # -- Annotations for index-gateway + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Labels for index-gateway pods + podLabels: {} + # @schema additionalProperties:{"type":"string"} + # -- Annotations for index-gateway pods + podAnnotations: {} + # @schema additionalProperties:{"type":"string"};deprecated:true + # -- Labels for index-gateway service + # @deprecated -- This option is deprecated in favor of `indexGateway.service.labels` + serviceLabels: {} + # @schema additionalProperties:{"type":"string"};deprecated:true + # -- Annotations for index-gateway service + # @deprecated -- This option is deprecated in favor of `indexGateway.service.annotations` + serviceAnnotations: {} + # @schema type:string;deprecated:true + # -- Service type for index-gateway service + # @deprecated -- This option is deprecated in favor of `indexGateway.service.type` + serviceType: "ClusterIP" + service: + # @schema additionalProperties:{"type":"string"} + # -- Annotations for index-gateway Service + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Additional labels for index-gateway Service + labels: {} + # -- Service Type for index-gateway Service + type: "ClusterIP" + # -- trafficDistribution for index-gateway Service + trafficDistribution: "" + # -- Session affinity for index-gateway Service + sessionAffinity: "" + # @schema additionalProperties:true + # -- Session affinity config for index-gateway Service + sessionAffinityConfig: {} + # -- ipFamilyPolicy for index-gateway Service + # Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services + ipFamilyPolicy: "" + # -- ipFamilies for index-gateway Service + # Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services + ipFamilies: [] + # -- Adds the appProtocol field to the index-gateway service. This allows index-gateway to work with istio protocol selection. + appProtocol: + # -- Set the optional grpc service protocol. Ex: "grpc", "http2" or "https" + grpc: "" + # -- Additional CLI args for the index-gateway + extraArgs: [] + # -- Environment variables to add to the index-gateway pods + extraEnv: [] + # -- Environment variables from secrets or configmaps to add to the index-gateway pods + extraEnvFrom: [] + # -- Volume mounts to add to the index-gateway pods + extraVolumeMounts: [] + # -- Volumes to add to the index-gateway pods + extraVolumes: [] + # @schema additionalProperties:true + # -- Resource requests and limits for the index-gateway + resources: {} + # -- Container resize policy for the index-gateway + # Example: + # resizePolicy: + # - resourceName: cpu + # restartPolicy: NotRequired + # - resourceName: memory + # restartPolicy: RestartContainer + resizePolicy: [] + # @schema type:[string, array, null] + # -- Containers to add to the index-gateway pods + extraContainers: [] + # @schema type:[string, array, null] + # -- Init containers to add to the index-gateway pods + initContainers: [] + # -- Grace period to allow the index-gateway to shutdown before it is killed. + terminationGracePeriodSeconds: 300 + podDisruptionBudget: + # -- Enable Pod Disruption Budget + enabled: true + # @schema additionalProperties:{"type":"string"} + # -- Annotations for Pod Disruption Budget + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Labels for Pod Disruption Budget + labels: {} + + # @schema type:[string, integer, null] + # -- Pod Disruption Budget minAvailable + minAvailable: null + # @schema type:[string, integer, null] + # -- Pod Disruption Budget maxUnavailable + maxUnavailable: null + # @schema type:[string, null] + # -- Pod Disruption Budget unhealthyPodEvictionPolicy + unhealthyPodEvictionPolicy: null + # -- Lifecycle for the index-gateway container + lifecycle: {} + # @schema type:[object, null];skipProperties:true;additionalProperties:true + # -- Affinity for index-gateway pods. + # @default -- Hard node anti-affinity + # The value will be passed through tpl. + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchLabels: + app.kubernetes.io/component: index-gateway + app.kubernetes.io/name: '{{ include "loki.name" . }}' + app.kubernetes.io/instance: '{{ .Release.Name }}' + topologyKey: kubernetes.io/hostname + # @schema type:[string, integer, null];deprecated:true + # -- Pod Disruption Budget maxUnavailable + # @deprecated -- This is deprecated in favor of `podDisruptionBudget.maxUnavailable`. + maxUnavailable: null + # @schema additionalProperties:true + # -- Node selector for index-gateway pods + nodeSelector: {} + # @schema item:object + # -- Topology Spread Constraints for index-gateway pods + # The value will be passed through tpl. + topologySpreadConstraints: [] + tolerations: [] + persistence: + # -- Enable creating PVCs which is required when using boltdb-shipper + enabled: false + # -- Set access modes on the PersistentVolumeClaim + accessModes: + - ReadWriteOnce + # @schema skipProperties:true;additionalProperties:true + # -- Parameters used for the `data` volume when volumeClaimEnabled if false + dataVolumeParameters: + emptyDir: {} + # -- Size of persistent disk + size: 10Gi + # @schema type:[string, null] + # -- Storage class to be used. + # If defined, storageClassName: . + # If set to "-", storageClassName: "", which disables dynamic provisioning. + # If empty or set to null, no storageClassName spec is + # set, choosing the default provisioner (gp2 on AWS, standard on GKE, AWS, and OpenStack). + storageClass: null + # @schema type:[string, null] + # -- Volume attributes class name to be used. + # If empty or set to null, no volumeAttributesClassName spec is set. + # Requires Kubernetes 1.31 + volumeAttributesClassName: null + # @schema additionalProperties:{"type":"string"} + # -- Annotations for index gateway PVCs + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Labels for index gateway PVCs + labels: {} + # -- Enable StatefulSetAutoDeletePVC feature + enableStatefulSetAutoDeletePVC: false + whenDeleted: Retain + whenScaled: Retain + # @schema additionalProperties:true;deprecated:true + # -- Set the optional grpc service protocol. Ex: "grpc", "http2" or "https" + # @deprecated -- This option is deprecated in favor of `indexGateway.service.appProtocol` + appProtocol: + grpc: "" + # -- trafficDistribution for index-gateway service + trafficDistribution: "" + # @schema skipProperties:true;additionalProperties:true + # -- UpdateStrategy for the index-gateway workload. + strategy: + # -- One of 'OnDelete' or 'RollingUpdate' + type: RollingUpdate + # -- Optional for updateStrategy.type=RollingUpdate. See [Partitioned rolling updates](https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#partitions) in the StatefulSet docs for details. + # rollingUpdate: + # partition: 0 + serviceAccount: + # -- Specifies whether a ServiceAccount should be created + create: false + # @schema type:[string, null] + # -- The name of the ServiceAccount to use. + # If not set and create is true, a name is generated using the fullname template + name: null + # @schema item:object;itemProperties:{"name": {"type": "string"}} + # -- Image pull secrets for the service account + imagePullSecrets: [] + # @schema additionalProperties:{"type":"string"} + # -- Annotations for the service account + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Labels for the service account + labels: {} + # -- Set this toggle to false to opt out of automounting API credentials for the service account + automountServiceAccountToken: true + +# -- Configuration for the compactor +compactor: + # -- Enable the component. Requires `loki.deploymentMode` to be set to `Distributed`. + enabled: true + # -- Kind of compactor deployment. StatefulSet and Deployment are supported. + kind: StatefulSet + # -- EXPERIMENTAL: Enable creating a Job to recreate the compactor StatefulSet when the compactor configuration is changed. + ## Only applicable if `compactor.kind` is StatefulSet. Useful for PVC size changes, which require recreating the StatefulSet. + statefulSetRecreateJob: + enabled: false + # @schema type:[integer, null] + # -- Number of replicas for the compactor. Set to null to omit spec.replicas from the workload, + # allowing an external controller (e.g. HPA, KEDA, rollout-operator) to manage replica counts without Helm resetting them. + replicas: 0 + # @schema skipProperties:true;additionalProperties:true + # -- UpdateStrategy or Strategy for the compactor. + strategy: + rollingUpdate: + partition: 0 + # -- PodManagementPolicy for the compactor StatefulSet. Only applicable if `compactor.kind` is StatefulSet. + ## OrderedReady and Parallel are supported. + podManagementPolicy: Parallel + # -- hostAliases to add + hostAliases: [] + # @schema type:[boolean, null] + # - ip: 1.2.3.4 + # hostnames: + # - domain.tld + # -- Use the host's user namespace in the compactor + hostUsers: null + # @schema additionalProperties:true + # -- DNSConfig for compactor pods + dnsConfig: {} + image: + # @schema type:[string, null] + # -- The Docker registry for the compactor image. Overrides `loki.image.registry` + registry: null + # @schema type:[string, null] + # -- Docker image repository for the compactor image. Overrides `loki.image.repository` + repository: null + # @schema type:[string, null] + # -- Docker image tag for the compactor image. Overrides `loki.image.tag` + tag: null + # @schema type:[string, null] + # -- Command to execute instead of defined in Docker image + command: null + # @schema type:[string, null] + # -- The name of the PriorityClass for compactor pods + priorityClassName: null + # @schema additionalProperties:{"type":"string"} + # -- Labels for compactor + labels: {} + # @schema additionalProperties:{"type":"string"} + # -- Annotations for compactor + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Labels for compactor pods + podLabels: {} + # @schema additionalProperties:{"type":"string"} + # -- Annotations for compactor pods + podAnnotations: {} + # @schema type:[object, null];skipProperties:true;additionalProperties:true + # -- Affinity for compactor pods. + # @default -- Hard node anti-affinity + # The value will be passed through tpl. + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchLabels: + app.kubernetes.io/component: compactor + app.kubernetes.io/name: '{{ include "loki.name" . }}' + app.kubernetes.io/instance: '{{ .Release.Name }}' + topologyKey: kubernetes.io/hostname + # @schema additionalProperties:{"type":"string"};deprecated:true + # -- Labels for compactor service + # @deprecated -- This option is deprecated in favor of `compactor.service.labels` + serviceLabels: {} + # @schema additionalProperties:{"type":"string"};deprecated:true + # -- Annotations for compactor service + # @deprecated -- This option is deprecated in favor of `compactor.service.annotations` + serviceAnnotations: {} + # @schema type:string;deprecated:true + # -- Service type for compactor service + # @deprecated -- This option is deprecated in favor of `compactor.service.type` + serviceType: "ClusterIP" + service: + # @schema additionalProperties:{"type":"string"} + # -- Annotations for compactor Service + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Additional labels for compactor Service + labels: {} + # -- Service Type for compactor Service + type: "ClusterIP" + # -- trafficDistribution for compactor Service + trafficDistribution: "" + # -- Session affinity for compactor Service + sessionAffinity: "" + # @schema additionalProperties:true + # -- Session affinity config for compactor Service + sessionAffinityConfig: {} + # -- ipFamilyPolicy for compactor Service + # Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services + ipFamilyPolicy: "" + # -- ipFamilies for compactor Service + # Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services + ipFamilies: [] + # -- Adds the appProtocol field to the compactor service. This allows compactor to work with istio protocol selection. + appProtocol: + # -- Set the optional grpc service protocol. Ex: "grpc", "http2" or "https" + grpc: "" + # -- Additional CLI args for the compactor + extraArgs: [] + # -- Environment variables to add to the compactor pods + extraEnv: [] + # -- Environment variables from secrets or configmaps to add to the compactor pods + extraEnvFrom: [] + # -- Volume mounts to add to the compactor pods + extraVolumeMounts: [] + # -- Volumes to add to the compactor pods + extraVolumes: [] + # @schema skipProperties:true;additionalProperties:true + # -- readiness probe settings for compactor pods. If empty, use `loki.readinessProbe` + readinessProbe: {} + # @schema skipProperties:true;additionalProperties:true + # -- liveness probe settings for compactor pods. If empty use `loki.livenessProbe` + livenessProbe: {} + # @schema skipProperties:true;additionalProperties:true + # -- liveness probe settings for ingester pods. If empty use `loki.livenessProbe` + startupProbe: {} + # @schema additionalProperties:true + # -- Resource requests and limits for the compactor + resources: {} + # -- Container resize policy for the compactor + # Example: + # resizePolicy: + # - resourceName: cpu + # restartPolicy: NotRequired + # - resourceName: memory + # restartPolicy: RestartContainer + resizePolicy: [] + # @schema type:[string, array, null] + # -- Containers to add to the compactor pods + extraContainers: [] + # @schema type:[string, array, null] + # -- Init containers to add to the compactor pods + initContainers: [] + # -- Grace period to allow the compactor to shutdown before it is killed + terminationGracePeriodSeconds: 30 + # @schema additionalProperties:true + # -- Node selector for compactor pods + nodeSelector: {} + # -- Tolerations for compactor pods + tolerations: [] + # @schema additionalProperties:true;deprecated:true + # -- Set the optional grpc service protocol. Ex: "grpc", "http2" or "https" + # @deprecated -- This option is deprecated in favor of `compactor.service.appProtocol` + appProtocol: + grpc: "" + persistence: + # -- Enable creating PVCs for the compactor + enabled: false + # -- Storage type for the compactor. pvc and ephemeral are supported. + type: pvc + # @schema type:[string, null] + # -- Storage class to be used. + # If defined, storageClassName: . + # If set to "-", storageClassName: "", which disables dynamic provisioning. + # If empty or set to null, no storageClassName spec is + # set, choosing the default provisioner (gp2 on AWS, standard on GKE, AWS, and OpenStack). + storageClass: null + # -- Set access modes on the PersistentVolumeClaim + accessModes: + - ReadWriteOnce + # -- Size of persistent disk + size: 10Gi + # @schema type:[string, null] + # -- Size of persistent disk + # -- Volume attributes class name to be used. + # If empty or set to null, no volumeAttributesClassName spec is set. + # Requires Kubernetes 1.31 + volumeAttributesClassName: null + # @schema additionalProperties:{"type":"string"} + # -- Annotations for the generated volumeClaimTemplate. + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Labels for the generated volumeClaimTemplate. + labels: {} + # @schema type:[object, null] + # -- Selector for the generated volumeClaimTemplate. + selector: null + # @schema skipProperties:true;additionalProperties:true + # -- Parameters used for the `data` volume when volumeClaimEnabled if false + dataVolumeParameters: + emptyDir: {} + # -- List of the compactor PVCs. Deprecated in favor of `compactor.persistence.dataVolumeParameters` and `compactor.persistence.size`. + # @notationType -- list + claims: + - name: data + # -- Set access modes on the PersistentVolumeClaim + accessModes: + - ReadWriteOnce + size: 10Gi + # @schema type:[string, null] + # -- Storage class to be used. + # If defined, storageClassName: . + # If set to "-", storageClassName: "", which disables dynamic provisioning. + # If empty or set to null, no storageClassName spec is + # set, choosing the default provisioner (gp2 on AWS, standard on GKE, AWS, and OpenStack). + storageClass: null + # @schema type:[string, null] + # -- Volume attributes class name to be used. + # If empty or set to null, no volumeAttributesClassName spec is set. + # Requires Kubernetes 1.31 + volumeAttributesClassName: null + # @schema additionalProperties:{"type":"string"} + # -- Annotations for compactor PVCs + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Labels for compactor PVCs + labels: {} + # - name: wal + # size: 150Gi + # -- Enable StatefulSetAutoDeletePVC feature + enableStatefulSetAutoDeletePVC: false + whenDeleted: Retain + whenScaled: Retain + serviceAccount: + create: false + # @schema type:[string, null] + # -- The name of the ServiceAccount to use for the compactor. + # If not set and create is true, a name is generated by appending + # "-compactor" to the common ServiceAccount. + name: null + # @schema item:object;itemProperties:{"name": {"type": "string"}} + # -- Image pull secrets for the compactor service account + imagePullSecrets: [] + # @schema additionalProperties:{"type":"string"} + # -- Annotations for the compactor service account + annotations: {} + # -- Set this toggle to false to opt out of automounting API credentials for the service account + automountServiceAccountToken: true + +# -- Configuration for the bloom-gateway +bloomGateway: + # -- Enable the component. Requires `loki.deploymentMode` to be set to `Distributed`. + enabled: false + # -- Kind of compactor deployment. StatefulSet and Deployment are supported. + kind: StatefulSet + # -- Enable creating a Job to recreate the StatefulSet when the StatefulSet configuration is changed. + ## Only applicable if `compactor.kind` is StatefulSet. Useful for PVC size changes, which require recreating the StatefulSet. + statefulSetRecreateJob: + enabled: false + # -- Number of replicas for the bloom-gateway + replicas: 0 + # -- hostAliases to add + hostAliases: [] + # @schema type:[boolean, null] + # - ip: 1.2.3.4 + # hostnames: + # - domain.tld + # -- Use the host's user namespace in the bloom-gateway + hostUsers: null + # @schema skipProperties:true;additionalProperties:true + # -- UpdateStrategy or Strategy for the pattern ingester. + strategy: + rollingUpdate: + partition: 0 + # @schema additionalProperties:true + # -- DNSConfig for bloom-gateway pods + dnsConfig: {} + image: + # @schema type:[string, null] + # -- The Docker registry for the bloom-gateway image. Overrides `loki.image.registry` + registry: null + # @schema type:[string, null] + # -- Docker image repository for the bloom-gateway image. Overrides `loki.image.repository` + repository: null + # @schema type:[string, null] + # -- Docker image tag for the bloom-gateway image. Overrides `loki.image.tag` + tag: null + # @schema type:[string, null] + # -- Command to execute instead of defined in Docker image + command: null + # @schema type:[string, null] + # -- The name of the PriorityClass for bloom-gateway pods + priorityClassName: null + # @schema additionalProperties:{"type":"string"} + # -- Labels for bloom-builder + labels: {} + # @schema additionalProperties:{"type":"string"} + # -- Annotations for bloom-builder + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Labels for bloom-gateway pods + podLabels: {} + # @schema additionalProperties:{"type":"string"} + # -- Annotations for bloom-gateway pods + podAnnotations: {} + # @schema type:[object, null];skipProperties:true;additionalProperties:true + # -- Affinity for bloom-gateway pods. + # @default -- Hard node anti-affinity + # The value will be passed through tpl. + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchLabels: + app.kubernetes.io/component: bloom-gateway + app.kubernetes.io/name: '{{ include "loki.name" . }}' + app.kubernetes.io/instance: '{{ .Release.Name }}' + topologyKey: kubernetes.io/hostname + # @schema additionalProperties:{"type":"string"};deprecated:true + # -- Labels for bloom-gateway service + # @deprecated -- This option is deprecated in favor of `bloomGateway.service.labels` + serviceLabels: {} + # @schema additionalProperties:{"type":"string"};deprecated:true + # -- Annotations for bloom-gateway service + # @deprecated -- This option is deprecated in favor of `bloomGateway.service.annotations` + serviceAnnotations: {} + service: + # @schema additionalProperties:{"type":"string"} + # -- Annotations for bloom-gateway Service + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Additional labels for bloom-gateway Service + labels: {} + # -- Service Type for bloom-gateway Service + type: "ClusterIP" + # -- trafficDistribution for bloom-gateway Service + trafficDistribution: "" + # -- Session affinity for bloom-gateway Service + sessionAffinity: "" + # @schema additionalProperties:true + # -- Session affinity config for bloom-gateway Service + sessionAffinityConfig: {} + # -- ipFamilyPolicy for bloom-gateway Service + # Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services + ipFamilyPolicy: "" + # -- ipFamilies for bloom-gateway Service + # Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services + ipFamilies: [] + # -- Adds the appProtocol field to the bloom-gateway service. This allows bloom-gateway to work with istio protocol selection. + appProtocol: + # -- Set the optional grpc service protocol. Ex: "grpc", "http2" or "https" + grpc: "" + # -- Additional CLI args for the bloom-gateway + extraArgs: [] + # -- Environment variables to add to the bloom-gateway pods + extraEnv: [] + # -- Environment variables from secrets or configmaps to add to the bloom-gateway pods + extraEnvFrom: [] + # -- Volume mounts to add to the bloom-gateway pods + extraVolumeMounts: [] + # -- Volumes to add to the bloom-gateway pods + extraVolumes: [] + # @schema skipProperties:true;additionalProperties:true + # -- readiness probe settings for bloom-gateway pods. If empty, use `loki.readinessProbe` + readinessProbe: {} + # @schema skipProperties:true;additionalProperties:true + # -- liveness probe settings for bloom-gateway pods. If empty use `loki.livenessProbe` + livenessProbe: {} + # @schema skipProperties:true;additionalProperties:true + # -- startup probe settings for bloom-gateway pods. If empty, use `loki.startupProbe` + startupProbe: {} + # @schema additionalProperties:true + # -- Resource requests and limits for the bloom-gateway + resources: {} + # -- Container resize policy for the bloom-gateway + # Example: + # resizePolicy: + # - resourceName: cpu + # restartPolicy: NotRequired + # - resourceName: memory + # restartPolicy: RestartContainer + resizePolicy: [] + # @schema type:[string, array, null] + # -- Containers to add to the bloom-gateway pods + extraContainers: [] + # @schema type:[string, array, null] + # -- Init containers to add to the bloom-gateway pods + initContainers: [] + # -- Grace period to allow the bloom-gateway to shutdown before it is killed + terminationGracePeriodSeconds: 30 + podDisruptionBudget: + # -- Enable Pod Disruption Budget + enabled: true + # @schema additionalProperties:{"type":"string"} + # -- Annotations for Pod Disruption Budget + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Labels for Pod Disruption Budget + labels: {} + + # @schema type:[string, integer, null] + # -- Pod Disruption Budget minAvailable + minAvailable: null + # @schema type:[string, integer, null] + # -- Pod Disruption Budget maxUnavailable + maxUnavailable: null + # @schema type:[string, null] + # -- Pod Disruption Budget unhealthyPodEvictionPolicy + unhealthyPodEvictionPolicy: null + # @schema additionalProperties:true + # -- Node selector for bloom-gateway pods + nodeSelector: {} + # -- Tolerations for bloom-gateway pods + tolerations: [] + # @schema additionalProperties:true;deprecated:true + # -- Set the optional grpc service protocol. Ex: "grpc", "http2" or "https" + # @deprecated -- This option is deprecated in favor of `bloomGateway.service.appProtocol` + appProtocol: + grpc: "" + # -- The default is to deploy all pods in parallel. + podManagementPolicy: "Parallel" + persistence: + # -- Enable creating PVCs for the bloom-gateway + enabled: false + # @schema additionalProperties:{"type":"string"} + # -- Annotations for bloom-gateway PVCs + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Labels for bloom gateway PVCs + labels: {} + # -- List of the bloom-gateway PVCs + # @notationType -- list + claims: + - name: data + # -- Set access modes on the PersistentVolumeClaim + accessModes: + - ReadWriteOnce + # -- Size of persistent disk + size: 10Gi + # @schema type:[string, null] + # -- Storage class to be used. + # If defined, storageClassName: . + # If set to "-", storageClassName: "", which disables dynamic provisioning. + # If empty or set to null, no storageClassName spec is + # set, choosing the default provisioner (gp2 on AWS, standard on GKE, AWS, and OpenStack). + storageClass: null + # @schema type:[string, null] + # -- Volume attributes class name to be used. + # If empty or set to null, no volumeAttributesClassName spec is set. + # Requires Kubernetes 1.31 + volumeAttributesClassName: null + # -- Enable StatefulSetAutoDeletePVC feature + enableStatefulSetAutoDeletePVC: false + whenDeleted: Retain + whenScaled: Retain + serviceAccount: + # -- Specifies whether a ServiceAccount should be created + create: false + # @schema type:[string, null] + # -- The name of the ServiceAccount to use. + # If not set and create is true, a name is generated using the fullname template + name: null + # @schema item:object;itemProperties:{"name": {"type": "string"}} + # -- Image pull secrets for the service account + imagePullSecrets: [] + # @schema additionalProperties:{"type":"string"} + # -- Annotations for the service account + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Labels for the service account + labels: {} + # -- Set this toggle to false to opt out of automounting API credentials for the service account + automountServiceAccountToken: true + +# -- Configuration for the bloom-planner +bloomPlanner: + # -- Enable the component. Requires `loki.deploymentMode` to be set to `Distributed`. + enabled: false + # -- Kind of compactor deployment. StatefulSet and Deployment are supported. + kind: StatefulSet + # -- Enable creating a Job to recreate the StatefulSet when the StatefulSet configuration is changed. + ## Only applicable if `compactor.kind` is StatefulSet. Useful for PVC size changes, which require recreating the StatefulSet. + statefulSetRecreateJob: + enabled: false + # -- Number of replicas for the bloom-planner + replicas: 0 + # -- hostAliases to add + hostAliases: [] + # @schema type:[boolean, null] + # - ip: 1.2.3.4 + # hostnames: + # - domain.tld + # -- Use the host's user namespace in the bloom-planner + hostUsers: null + # @schema additionalProperties:true + # -- DNSConfig for bloom-planner pods + dnsConfig: {} + # @schema skipProperties:true;additionalProperties:true + # -- UpdateStrategy or Strategy for the pattern ingester. + strategy: + rollingUpdate: + partition: 0 + image: + # @schema type:[string, null] + # -- The Docker registry for the bloom-planner image. Overrides `loki.image.registry` + registry: null + # @schema type:[string, null] + # -- Docker image repository for the bloom-planner image. Overrides `loki.image.repository` + repository: null + # @schema type:[string, null] + # -- Docker image tag for the bloom-planner image. Overrides `loki.image.tag` + tag: null + # @schema type:[string, null] + # -- Command to execute instead of defined in Docker image + command: null + # @schema type:[string, null] + # -- The name of the PriorityClass for bloom-planner pods + priorityClassName: null + # @schema additionalProperties:{"type":"string"} + # -- Labels for bloom-builder + labels: {} + # @schema additionalProperties:{"type":"string"} + # -- Annotations for bloom-builder + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Labels for bloom-planner pods + podLabels: {} + # @schema additionalProperties:{"type":"string"} + # -- Annotations for bloom-planner pods + podAnnotations: {} + # @schema type:[object, null];skipProperties:true;additionalProperties:true + # -- Affinity for bloom-planner pods. + # @default -- Hard node anti-affinity + # The value will be passed through tpl. + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchLabels: + app.kubernetes.io/component: bloom-planner + app.kubernetes.io/name: '{{ include "loki.name" . }}' + app.kubernetes.io/instance: '{{ .Release.Name }}' + topologyKey: kubernetes.io/hostname + # @schema additionalProperties:{"type":"string"};deprecated:true + # -- Labels for bloom-planner service + # @deprecated -- This option is deprecated in favor of `bloomPlanner.service.labels` + serviceLabels: {} + # @schema additionalProperties:{"type":"string"};deprecated:true + # -- Annotations for bloom-planner service + # @deprecated -- This option is deprecated in favor of `bloomPlanner.service.annotations` + serviceAnnotations: {} + service: + # @schema additionalProperties:{"type":"string"} + # -- Annotations for bloom-planner Service + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Additional labels for bloom-planner Service + labels: {} + # -- Service Type for bloom-planner Service + type: "ClusterIP" + # -- trafficDistribution for bloom-planner Service + trafficDistribution: "" + # -- Session affinity for bloom-planner Service + sessionAffinity: "" + # @schema additionalProperties:true + # -- Session affinity config for bloom-planner Service + sessionAffinityConfig: {} + # -- ipFamilyPolicy for bloom-planner Service + # Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services + ipFamilyPolicy: "" + # -- ipFamilies for bloom-planner Service + # Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services + ipFamilies: [] + # -- Adds the appProtocol field to the bloom-planner service. This allows bloom-planner to work with istio protocol selection. + appProtocol: + # -- Set the optional grpc service protocol. Ex: "grpc", "http2" or "https" + grpc: "" + # -- Additional CLI args for the bloom-planner + extraArgs: [] + # -- Environment variables to add to the bloom-planner pods + extraEnv: [] + # -- Environment variables from secrets or configmaps to add to the bloom-planner pods + extraEnvFrom: [] + # -- Volume mounts to add to the bloom-planner pods + extraVolumeMounts: [] + # -- Volumes to add to the bloom-planner pods + extraVolumes: [] + # @schema skipProperties:true;additionalProperties:true + # -- readiness probe settings for bloom-planner pods. If empty, use `loki.readinessProbe` + readinessProbe: {} + # @schema skipProperties:true;additionalProperties:true + # -- liveness probe settings for bloom-planner pods. If empty use `loki.livenessProbe` + livenessProbe: {} + # @schema skipProperties:true;additionalProperties:true + # -- startup probe settings for bloom-planner pods. If empty use `loki.startupProbe` + startupProbe: {} + # @schema additionalProperties:true + # -- Resource requests and limits for the bloom-planner + resources: {} + # -- Container resize policy for the bloom-planner + # Example: + # resizePolicy: + # - resourceName: cpu + # restartPolicy: NotRequired + # - resourceName: memory + # restartPolicy: RestartContainer + resizePolicy: [] + # @schema type:[string, array, null] + # -- Containers to add to the bloom-planner pods + extraContainers: [] + # @schema type:[string, array, null] + # -- Init containers to add to the bloom-planner pods + initContainers: [] + # -- Grace period to allow the bloom-planner to shutdown before it is killed + terminationGracePeriodSeconds: 30 + podDisruptionBudget: + # -- Enable Pod Disruption Budget + enabled: true + # @schema additionalProperties:{"type":"string"} + # -- Annotations for Pod Disruption Budget + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Labels for Pod Disruption Budget + labels: {} + + # @schema type:[string, integer, null] + # -- Pod Disruption Budget minAvailable + minAvailable: null + # @schema type:[string, integer, null] + # -- Pod Disruption Budget maxUnavailable + maxUnavailable: null + # @schema type:[string, null] + # -- Pod Disruption Budget unhealthyPodEvictionPolicy + unhealthyPodEvictionPolicy: null + # @schema additionalProperties:true + # -- Node selector for bloom-planner pods + nodeSelector: {} + # -- Tolerations for bloom-planner pods + tolerations: [] + # @schema additionalProperties:true;deprecated:true + # -- Set the optional grpc service protocol. Ex: "grpc", "http2" or "https" + # @deprecated -- This option is deprecated in favor of `bloomPlanner.service.appProtocol` + appProtocol: + grpc: "" + # -- The default is to deploy all pods in parallel. + podManagementPolicy: "Parallel" + persistence: + # -- Enable creating PVCs for the bloom-planner + enabled: false + # -- List of the bloom-planner PVCs + # @notationType -- list + claims: + - name: data + # -- Set access modes on the PersistentVolumeClaim + accessModes: + - ReadWriteOnce + # -- Size of persistent disk + size: 10Gi + # @schema type:[string, null] + # -- Storage class to be used. + # If defined, storageClassName: . + # If set to "-", storageClassName: "", which disables dynamic provisioning. + # If empty or set to null, no storageClassName spec is + # set, choosing the default provisioner (gp2 on AWS, standard on GKE, AWS, and OpenStack). + storageClass: null + # @schema type:[string, null] + # -- Volume attributes class name to be used. + # If empty or set to null, no volumeAttributesClassName spec is set. + # Requires Kubernetes 1.31 + volumeAttributesClassName: null + # @schema additionalProperties:{"type":"string"} + # -- Annotations for bloom-planner PVCs + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Labels for bloom planner PVCs + labels: {} + # -- Enable StatefulSetAutoDeletePVC feature + enableStatefulSetAutoDeletePVC: false + whenDeleted: Retain + whenScaled: Retain + serviceAccount: + # -- Specifies whether a ServiceAccount should be created + create: false + # @schema type:[string, null] + # -- The name of the ServiceAccount to use. + # If not set and create is true, a name is generated using the fullname template + name: null + # @schema item:object;itemProperties:{"name": {"type": "string"}} + # -- Image pull secrets for the service account + imagePullSecrets: [] + # @schema additionalProperties:{"type":"string"} + # -- Annotations for the service account + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Labels for the service account + labels: {} + # -- Set this toggle to false to opt out of automounting API credentials for the service account + automountServiceAccountToken: true + +# -- Configuration for the bloom-builder +bloomBuilder: + # -- Enable the component. Requires `loki.deploymentMode` to be set to `Distributed`. + enabled: false + # -- Kind of compactor deployment. StatefulSet and Deployment are supported. + kind: Deployment + # -- Enable creating a Job to recreate the compactor StatefulSet when the compactor configuration is changed. + ## Only applicable if `compactor.kind` is StatefulSet. Useful for PVC size changes, which require recreating the StatefulSet. + statefulSetRecreateJob: + enabled: false + # @schema type:[integer, null] + # -- Number of replicas for the bloom-builder. Set to null to omit spec.replicas from the workload, + # allowing an external controller (e.g. HPA, KEDA, rollout-operator) to manage replica counts without Helm resetting them. + replicas: 0 + # -- hostAliases to add + hostAliases: [] + # @schema type:[boolean, null] + # - ip: 1.2.3.4 + # hostnames: + # - domain.tld + # -- Use the host's user namespace in the boom-builder + hostUsers: null + # @schema additionalProperties:true + # -- DNSConfig for bloom-builder pods + dnsConfig: {} + autoscaling: + # -- Enable autoscaling for the bloom-builder + enabled: false + # -- Minimum autoscaling replicas for the bloom-builder + minReplicas: 1 + # -- Maximum autoscaling replicas for the bloom-builder + maxReplicas: 3 + # @schema type:[integer, null] + # -- Target CPU utilisation percentage for the bloom-builder + targetCPUUtilizationPercentage: 60 + # @schema type:[integer, null] + # -- Target memory utilisation percentage for the bloom-builder + targetMemoryUtilizationPercentage: null + # -- Allows one to define custom metrics using the HPA/v2 schema (for example, Pods, Object or External metrics) + customMetrics: [] + # - type: Pods + # pods: + # metric: + # name: loki_query_rate + # target: + # type: AverageValue + # averageValue: 100 + # @schema skipProperties:true;additionalProperties:true + # -- HPA behavior configuration, passed directly as a K8s HPA behavior object. + behavior: + # -- Enable autoscaling behaviours + enabled: false + # -- define scale down policies, must conform to HPAScalingRules + scaleDown: {} + # -- define scale up policies, must conform to HPAScalingRules + scaleUp: {} + kedaAutoscaling: + # -- Enable KEDA autoscaling for the bloom-builder. Mutually exclusive with autoscaling.enabled + enabled: false + # @schema type:[integer, null] + # -- Interval (seconds) to poll each trigger. Defaults to defaults.kedaAutoscaling.pollingInterval if not set. + pollingInterval: null + # -- Minimum replicas for KEDA autoscaling + minReplicas: 1 + # -- Maximum replicas for KEDA autoscaling + maxReplicas: 3 + # @schema type:[integer, null] + # -- Period to wait after the last trigger reported active before scaling the resource back to 0 (seconds). + # Defaults to defaults.kedaAutoscaling.cooldownPeriod if not set. + cooldownPeriod: null + # @schema additionalProperties:true + # -- Fallback configuration for KEDA ScaledObject. Applied when the trigger metric cannot be retrieved. + # Ref: https://keda.sh/docs/latest/reference/scaledobject-spec/#fallback + fallback: {} + # @schema skipProperties:true;additionalProperties:true + # -- Behavior configuration for KEDA ScaledObject (horizontalPodAutoscalerConfig.behavior). + # Ref: https://keda.sh/docs/latest/reference/scaledobject-spec/#advanced + behavior: {} + # -- KEDA triggers for the bloom-builder. + # Ref: https://keda.sh/docs/latest/scalers/ + triggers: [] + image: + # @schema type:[string, null] + # -- The Docker registry for the bloom-builder image. Overrides `loki.image.registry` + registry: null + # @schema type:[string, null] + # -- Docker image repository for the bloom-builder image. Overrides `loki.image.repository` + repository: null + # @schema type:[string, null] + # -- Docker image tag for the bloom-builder image. Overrides `loki.image.tag` + tag: null + # @schema type:[string, null] + # -- Command to execute instead of defined in Docker image + command: null + # @schema type:[string, null] + # -- The name of the PriorityClass for bloom-builder pods + priorityClassName: null + # @schema additionalProperties:{"type":"string"} + # -- Labels for bloom-builder + labels: {} + # @schema additionalProperties:{"type":"string"} + # -- Annotations for bloom-builder + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Labels for bloom-builder pods + podLabels: {} + # @schema additionalProperties:{"type":"string"} + # -- Annotations for bloom-builder pods + podAnnotations: {} + # @schema additionalProperties:{"type":"string"};deprecated:true + # -- Labels for bloom-builder service + # @deprecated -- This option is deprecated in favor of `bloomBuilder.service.labels` + serviceLabels: {} + # @schema additionalProperties:{"type":"string"};deprecated:true + # -- Annotations for bloom-builder service + # @deprecated -- This option is deprecated in favor of `bloomBuilder.service.annotations` + serviceAnnotations: {} + service: + # @schema additionalProperties:{"type":"string"} + # -- Annotations for bloom-builder Service + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Additional labels for bloom-builder Service + labels: {} + # -- Service Type for bloom-builder Service + type: "ClusterIP" + # -- trafficDistribution for bloom-builder Service + trafficDistribution: "" + # -- Session affinity for bloom-builder Service + sessionAffinity: "" + # @schema additionalProperties:true + # -- Session affinity config for bloom-builder Service + sessionAffinityConfig: {} + # -- ipFamilyPolicy for bloom-builder Service + # Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services + ipFamilyPolicy: "" + # -- ipFamilies for bloom-builder Service + # Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services + ipFamilies: [] + # -- Adds the appProtocol field to the bloom-builder service. This allows bloom-builder to work with istio protocol selection. + appProtocol: + # -- Set the optional grpc service protocol. Ex: "grpc", "http2" or "https" + grpc: "" + # -- Additional CLI args for the bloom-builder + extraArgs: [] + # -- Environment variables to add to the bloom-builder pods + extraEnv: [] + # -- Environment variables from secrets or configmaps to add to the bloom-builder pods + extraEnvFrom: [] + # -- Volume mounts to add to the bloom-builder pods + extraVolumeMounts: [] + # -- Volumes to add to the bloom-builder pods + extraVolumes: [] + # @schema additionalProperties:true + # -- Resource requests and limits for the bloom-builder + resources: {} + # -- Container resize policy for the bloom-builder + # Example: + # resizePolicy: + # - resourceName: cpu + # restartPolicy: NotRequired + # - resourceName: memory + # restartPolicy: RestartContainer + resizePolicy: [] + # @schema type:[string, array, null] + # -- Init containers to add to the bloom-builder pods + initContainers: [] + # @schema type:[string, array, null] + # -- Containers to add to the bloom-builder pods + extraContainers: [] + # -- Grace period to allow the bloom-builder to shutdown before it is killed + terminationGracePeriodSeconds: 30 + podDisruptionBudget: + # -- Enable Pod Disruption Budget + enabled: true + # @schema additionalProperties:{"type":"string"} + # -- Annotations for Pod Disruption Budget + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Labels for Pod Disruption Budget + labels: {} + + # @schema type:[string, integer, null] + # -- Pod Disruption Budget minAvailable + minAvailable: null + # @schema type:[string, integer, null] + # -- Pod Disruption Budget maxUnavailable + maxUnavailable: null + # @schema type:[string, null] + # -- Pod Disruption Budget unhealthyPodEvictionPolicy + unhealthyPodEvictionPolicy: null + # @schema type:[object, null];skipProperties:true;additionalProperties:true + # -- Affinity for bloom-builder pods. + # @default -- Hard node anti-affinity + # The value will be passed through tpl. + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchLabels: + app.kubernetes.io/component: bloom-builder + app.kubernetes.io/name: '{{ include "loki.name" . }}' + app.kubernetes.io/instance: '{{ .Release.Name }}' + topologyKey: kubernetes.io/hostname + # @schema type:[string, integer, null];deprecated:true + # -- Pod Disruption Budget maxUnavailable + # @deprecated -- This is deprecated in favor of `podDisruptionBudget.maxUnavailable`. + maxUnavailable: null + # @schema additionalProperties:true + # -- Node selector for bloom-builder pods + nodeSelector: {} + # -- Tolerations for bloom-builder pods + tolerations: [] + # @schema additionalProperties:true;deprecated:true + # -- Adds the appProtocol field to the queryFrontend service. This allows bloomBuilder to work with istio protocol selection. + # @deprecated -- This option is deprecated in favor of `bloomBuilder.service.appProtocol` + appProtocol: + # -- Set the optional grpc service protocol. Ex: "grpc", "http2" or "https" + grpc: "" + # @schema skipProperties:true;additionalProperties:true + # -- Update strategy for bloom-builder deployment + strategy: + rollingUpdate: + maxSurge: 0 + # @schema type:[string, integer, null] + # -- Pod Disruption Budget maxUnavailable + maxUnavailable: 1 + persistence: + # -- Enable generic ephemeral volume-backed storage for the bloom-builder `data` volume. + enabled: false + # -- Storage type for the bloom-builder. pvc and ephemeral are supported. + type: ephemeral + # -- Set access modes on the generated volumeClaimTemplate. + accessModes: + - ReadWriteOnce + # -- Size of the generated volumeClaimTemplate. + size: 10Gi + # @schema type:[string, null] + # -- Storage class to be used for the generated volumeClaimTemplate. + # If defined, storageClassName: . + # If set to "-", storageClassName: "", which disables dynamic provisioning. + # If empty or set to null, no storageClassName spec is set, choosing the default provisioner. + storageClass: null + # @schema type:[string, null] + # -- Volume attributes class name to be used for the generated volumeClaimTemplate. + # If empty or set to null, no volumeAttributesClassName spec is set. + # Requires Kubernetes 1.31 + volumeAttributesClassName: null + # @schema type:[object, null] + # -- Selector for the generated volumeClaimTemplate. + selector: null + # @schema additionalProperties:{"type":"string"} + # -- Annotations for the generated volumeClaimTemplate. + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Labels for the generated volumeClaimTemplate. + labels: {} + serviceAccount: + # -- Specifies whether a ServiceAccount should be created + create: false + # @schema type:[string, null] + # -- The name of the ServiceAccount to use. + # If not set and create is true, a name is generated using the fullname template + name: null + # @schema item:object;itemProperties:{"name": {"type": "string"}} + # -- Image pull secrets for the service account + imagePullSecrets: [] + # @schema additionalProperties:{"type":"string"} + # -- Annotations for the service account + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Labels for the service account + labels: {} + # -- Set this toggle to false to opt out of automounting API credentials for the service account + automountServiceAccountToken: true + +# -- Configuration for the pattern ingester +patternIngester: + # -- Enable the component. Requires `loki.deploymentMode` to be set to `Distributed`. + enabled: false + # -- Kind of compactor deployment. StatefulSet and Deployment are supported. + kind: StatefulSet + # -- EXPERIMENTAL: Enable creating a Job to recreate the compactor StatefulSet when the compactor configuration is changed. + ## Only applicable if `compactor.kind` is StatefulSet. Useful for PVC size changes, which require recreating the StatefulSet. + statefulSetRecreateJob: + enabled: false + # @schema type:[integer, null] + # -- Number of replicas for the pattern ingester. Set to null to omit spec.replicas from the workload, + # allowing an external controller (e.g. HPA, KEDA, rollout-operator) to manage replica counts without Helm resetting them. + replicas: 0 + # @schema skipProperties:true;additionalProperties:true + # -- UpdateStrategy or Strategy for the pattern ingester. + strategy: + rollingUpdate: + partition: 0 + # @schema additionalProperties:true + # -- DNSConfig for pattern ingester pods + dnsConfig: {} + # -- hostAliases to add + hostAliases: [] + # @schema type:[boolean, null] + # - ip: 1.2.3.4 + # hostnames: + # - domain.tld + # -- Use the host's user namespace in the pattern ingester + hostUsers: null + image: + # @schema type:[string, null] + # -- The Docker registry for the pattern ingester image. Overrides `loki.image.registry` + registry: null + # @schema type:[string, null] + # -- Docker image repository for the pattern ingester image. Overrides `loki.image.repository` + repository: null + # @schema type:[string, null] + # -- Docker image tag for the pattern ingester image. Overrides `loki.image.tag` + tag: null + # @schema type:[string, null] + # -- Command to execute instead of defined in Docker image + command: null + # @schema type:[string, null] + # -- The name of the PriorityClass for pattern ingester pods + priorityClassName: null + # @schema additionalProperties:{"type":"string"} + # -- Labels for pattern ingester + labels: {} + # @schema additionalProperties:{"type":"string"} + # -- Annotations for pattern ingester + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Labels for pattern ingester pods + podLabels: {} + # @schema additionalProperties:{"type":"string"} + # -- Annotations for pattern ingester pods + podAnnotations: {} + # @schema type:[object, null];skipProperties:true;additionalProperties:true + # -- Affinity for pattern ingester pods. + # @default -- Hard node anti-affinity + # The value will be passed through tpl. + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchLabels: + app.kubernetes.io/component: pattern-ingester + app.kubernetes.io/name: '{{ include "loki.name" . }}' + app.kubernetes.io/instance: '{{ .Release.Name }}' + topologyKey: kubernetes.io/hostname + # @schema type:[string, integer, null];deprecated:true + # -- Pod Disruption Budget maxUnavailable + # @deprecated -- This is deprecated in favor of `podDisruptionBudget.maxUnavailable`. + maxUnavailable: null + # -- Additional CLI args for the pattern ingester + extraArgs: [] + # -- Environment variables to add to the pattern ingester pods + extraEnv: [] + # -- Environment variables from secrets or configmaps to add to the pattern ingester pods + extraEnvFrom: [] + # -- Volume mounts to add to the pattern ingester pods + extraVolumeMounts: [] + # -- Volumes to add to the pattern ingester pods + extraVolumes: [] + # @schema skipProperties:true;additionalProperties:true + # -- readiness probe settings for pattern ingester pods. If empty, use `loki.readinessProbe` + readinessProbe: {} + # @schema skipProperties:true;additionalProperties:true + # -- liveness probe settings for pattern ingester pods. If empty use `loki.livenessProbe` + livenessProbe: {} + # @schema skipProperties:true;additionalProperties:true + # -- startup probe settings for pattern ingester pods. If empty use `loki.startupProbe` + startupProbe: {} + # @schema additionalProperties:true + # -- Resource requests and limits for the pattern ingester + resources: {} + # -- Container resize policy for the pattern ingester + # Example: + # resizePolicy: + # - resourceName: cpu + # restartPolicy: NotRequired + # - resourceName: memory + # restartPolicy: RestartContainer + resizePolicy: [] + # @schema type:[string, array, null] + # -- Containers to add to the pattern ingester pods + extraContainers: [] + # @schema type:[string, array, null] + # -- Init containers to add to the pattern ingester pods + initContainers: [] + # -- Grace period to allow the pattern ingester to shutdown before it is killed + terminationGracePeriodSeconds: 30 + podDisruptionBudget: + # -- Enable Pod Disruption Budget + enabled: true + # @schema additionalProperties:{"type":"string"} + # -- Annotations for Pod Disruption Budget + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Labels for Pod Disruption Budget + labels: {} + + # @schema type:[string, integer, null] + # -- Pod Disruption Budget minAvailable + minAvailable: null + # @schema type:[string, integer, null] + # -- Pod Disruption Budget maxUnavailable + maxUnavailable: null + # @schema type:[string, null] + # -- Pod Disruption Budget unhealthyPodEvictionPolicy + unhealthyPodEvictionPolicy: null + # @schema additionalProperties:true + # -- Node selector for pattern ingester pods + nodeSelector: {} + # @schema item:object + # -- Topology Spread Constraints for pattern ingester pods + # The value will be passed through tpl. + topologySpreadConstraints: [] + tolerations: [] + # -- Set the optional grpc service protocol. Ex: "grpc", "http2" or "https" + appProtocol: + grpc: "" + persistence: + # -- Enable creating PVCs for the pattern ingester + enabled: false + # -- Size of persistent disk + size: 10Gi + # @schema type:[string, null] + # -- Storage class to be used. + # If defined, storageClassName: . + # If set to "-", storageClassName: "", which disables dynamic provisioning. + # If empty or set to null, no storageClassName spec is + # set, choosing the default provisioner (gp2 on AWS, standard on GKE, AWS, and OpenStack). + storageClass: null + # -- List of the pattern ingester PVCs + # @notationType -- list + claims: + - name: data + # -- Set access modes on the PersistentVolumeClaim + accessModes: + - ReadWriteOnce + size: 10Gi + # @schema type:[string, null] + # -- Storage class to be used. + # If defined, storageClassName: . + # If set to "-", storageClassName: "", which disables dynamic provisioning. + # If empty or set to null, no storageClassName spec is + # set, choosing the default provisioner (gp2 on AWS, standard on GKE, AWS, and OpenStack). + storageClass: null + # @schema type:[string, null] + # -- Volume attributes class name to be used. + # If empty or set to null, no volumeAttributesClassName spec is set. + # Requires Kubernetes 1.31 + volumeAttributesClassName: null + # @schema additionalProperties:{"type":"string"} + # -- Annotations for pattern ingester PVCs + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Labels for pattern ingester PVCs + labels: {} + # - name: wal + # size: 150Gi + # -- Enable StatefulSetAutoDeletePVC feature + enableStatefulSetAutoDeletePVC: false + whenDeleted: Retain + whenScaled: Retain + serviceAccount: + # -- Specifies whether a ServiceAccount should be created + create: false + # @schema type:[string, null] + # -- The name of the ServiceAccount to use. + # If not set and create is true, a name is generated using the fullname template + name: null + # @schema item:object;itemProperties:{"name": {"type": "string"}} + # -- Image pull secrets for the service account + imagePullSecrets: [] + # @schema additionalProperties:{"type":"string"} + # -- Annotations for the service account + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Labels for the service account + labels: {} + # -- Set this toggle to false to opt out of automounting API credentials for the service account + automountServiceAccountToken: true + +# -- Configuration for the ruler +ruler: + # -- The ruler component is optional and can be disabled if desired. + enabled: true + # -- Kind of ruler deployment. StatefulSet and Deployment are supported. + kind: StatefulSet + # -- EXPERIMENTAL: Enable creating a Job to recreate the ruler StatefulSet when the ruler configuration is changed. + ## Only applicable if `ruler.kind` is StatefulSet. Useful for PVC size changes, which require recreating the StatefulSet. + statefulSetRecreateJob: + enabled: false + # -- Whether to enable the rules sidecar + sidecar: false + # @schema type:[integer, null] + # -- Number of replicas for the ruler. Set to null to omit spec.replicas from the workload, + # allowing an external controller (e.g. HPA, KEDA, rollout-operator) to manage replica counts without Helm resetting them. + replicas: 0 + # -- hostAliases to add + hostAliases: [] + # @schema type:[boolean, null] + # - ip: 1.2.3.4 + # hostnames: + # - domain.tld + # -- Use the host's user namespace in the ruler + hostUsers: null + image: + # @schema type:[string, null] + # -- The Docker registry for the ruler image. Overrides `loki.image.registry` + registry: null + # @schema type:[string, null] + # -- Docker image repository for the ruler image. Overrides `loki.image.repository` + repository: null + # @schema type:[string, null] + # -- Docker image tag for the ruler image. Overrides `loki.image.tag` + tag: null + # @schema type:[string, null] + # -- Command to execute instead of defined in Docker image + command: null + # @schema type:[string, null] + # -- The name of the PriorityClass for ruler pods + priorityClassName: null + # @schema additionalProperties:{"type":"string"} + # -- Labels for ruler + labels: {} + # @schema additionalProperties:{"type":"string"} + # -- Annotations for ruler + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Labels for ruler pods + podLabels: {} + # @schema additionalProperties:{"type":"string"} + # -- Annotations for ruler pods + podAnnotations: {} + # @schema additionalProperties:{"type":"string"};deprecated:true + # -- Labels for ruler service + # @deprecated -- This option is deprecated in favor of `ruler.service.labels` + serviceLabels: {} + # @schema additionalProperties:{"type":"string"};deprecated:true + # -- Annotations for ruler service + # @deprecated -- This option is deprecated in favor of `ruler.service.annotations` + serviceAnnotations: {} + service: + # @schema additionalProperties:{"type":"string"} + # -- Annotations for ruler Service + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Additional labels for ruler Service + labels: {} + # -- Service Type for ruler Service + type: "ClusterIP" + # -- trafficDistribution for ruler Service + trafficDistribution: "" + # -- Session affinity for ruler Service + sessionAffinity: "" + # @schema additionalProperties:true + # -- Session affinity config for ruler Service + sessionAffinityConfig: {} + # -- ipFamilyPolicy for ruler Service + # Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services + ipFamilyPolicy: "" + # -- ipFamilies for ruler Service + # Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services + ipFamilies: [] + # -- Adds the appProtocol field to the ruler service. This allows ruler to work with istio protocol selection. + appProtocol: + # -- Set the optional grpc service protocol. Ex: "grpc", "http2" or "https" + grpc: "" + # -- Additional CLI args for the ruler + extraArgs: [] + # -- Environment variables to add to the ruler pods + extraEnv: [] + # -- Environment variables from secrets or configmaps to add to the ruler pods + extraEnvFrom: [] + # -- Volume mounts to add to the ruler pods + extraVolumeMounts: [] + # -- Volumes to add to the ruler pods + extraVolumes: [] + # @schema additionalProperties:true + # -- Resource requests and limits for the ruler + resources: {} + # -- Container resize policy for the ruler + # Example: + # resizePolicy: + # - resourceName: cpu + # restartPolicy: NotRequired + # - resourceName: memory + # restartPolicy: RestartContainer + resizePolicy: [] + # @schema type:[string, array, null] + # -- Containers to add to the ruler pods + extraContainers: [] + # @schema type:[string, array, null] + # -- Init containers to add to the ruler pods + initContainers: [] + # -- Grace period to allow the ruler to shutdown before it is killed + terminationGracePeriodSeconds: 300 + podDisruptionBudget: + # -- Enable Pod Disruption Budget + enabled: true + # @schema additionalProperties:{"type":"string"} + # -- Annotations for Pod Disruption Budget + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Labels for Pod Disruption Budget + labels: {} + + # @schema type:[string, integer, null] + # -- Pod Disruption Budget minAvailable + minAvailable: null + # @schema type:[string, integer, null] + # -- Pod Disruption Budget maxUnavailable + maxUnavailable: null + # @schema type:[string, null] + # -- Pod Disruption Budget unhealthyPodEvictionPolicy + unhealthyPodEvictionPolicy: null + # @schema type:[object, null];skipProperties:true;additionalProperties:true + # -- Affinity for ruler pods. + # @default -- Hard node anti-affinity + # The value will be passed through tpl. + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchLabels: + app.kubernetes.io/component: ruler + app.kubernetes.io/name: '{{ include "loki.name" . }}' + app.kubernetes.io/instance: '{{ .Release.Name }}' + topologyKey: kubernetes.io/hostname + # @schema type:[string, integer, null];deprecated:true + # -- Pod Disruption Budget maxUnavailable + # @deprecated -- This is deprecated in favor of `podDisruptionBudget.maxUnavailable`. + maxUnavailable: null + # @schema additionalProperties:true + # -- Node selector for ruler pods + nodeSelector: {} + # @schema item:object + # -- Topology Spread Constraints for ruler pods + # The value will be passed through tpl. + topologySpreadConstraints: [] + tolerations: [] + # @schema additionalProperties:true + # -- DNSConfig for ruler pods + dnsConfig: {} + persistence: + # -- Enable creating PVCs which is required when using recording rules + enabled: false + # -- Set access modes on the PersistentVolumeClaim + accessModes: + - ReadWriteOnce + # -- Size of persistent disk + size: 10Gi + # @schema type:[string, null] + # -- Storage class to be used. + # If defined, storageClassName: . + # If set to "-", storageClassName: "", which disables dynamic provisioning. + # If empty or set to null, no storageClassName spec is + # set, choosing the default provisioner (gp2 on AWS, standard on GKE, AWS, and OpenStack). + storageClass: null + # @schema type:[string, null] + # -- Volume attributes class name to be used. + # If empty or set to null, no volumeAttributesClassName spec is set. + # Requires Kubernetes 1.31 + volumeAttributesClassName: null + # @schema additionalProperties:{"type":"string"} + # -- Annotations for ruler PVCs + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Labels for ruler PVCs + labels: {} + # @schema additionalProperties:true;deprecated:true + # -- Set the optional grpc service protocol. Ex: "grpc", "http2" or "https" + # @deprecated -- This option is deprecated in favor of `ruler.service.appProtocol` + appProtocol: + grpc: "" + # -- Directories containing rules files. If used, you must also configure `loki.rulerConfig.storage` to use local storage. + directories: {} + # tenant_foo: + # rules1.txt: | + # groups: + # - name: should_fire + # rules: + # - alert: HighPercentageError + # expr: | + # sum(rate({app="foo", env="production"} |= "error" [5m])) by (job) + # / + # sum(rate({app="foo", env="production"}[5m])) by (job) + # > 0.05 + # for: 10m + # labels: + # severity: warning + # annotations: + # summary: High error rate + # - name: credentials_leak + # rules: + # - alert: http-credentials-leaked + # annotations: + # message: "{{ $labels.job }} is leaking http basic auth credentials." + # expr: 'sum by (cluster, job, pod) (count_over_time({namespace="prod"} |~ "http(s?)://(\\w+):(\\w+)@" [5m]) > 0)' + # for: 10m + # labels: + # severity: critical + # rules2.txt: | + # groups: + # - name: example + # rules: + # - alert: HighThroughputLogStreams + # expr: sum by(container) (rate({job=~"loki-dev/.*"}[1m])) > 1000 + # for: 2m + # tenant_bar: + # rules1.txt: | + # groups: + # - name: should_fire + # rules: + # - alert: HighPercentageError + # expr: | + # sum(rate({app="foo", env="production"} |= "error" [5m])) by (job) + # / + # sum(rate({app="foo", env="production"}[5m])) by (job) + # > 0.05 + # for: 10m + # labels: + # severity: warning + # annotations: + # summary: High error rate + # - name: credentials_leak + # rules: + # - alert: http-credentials-leaked + # annotations: + # message: "{{ $labels.job }} is leaking http basic auth credentials." + # expr: 'sum by (cluster, job, pod) (count_over_time({namespace="prod"} |~ "http(s?)://(\\w+):(\\w+)@" [5m]) > 0)' + # for: 10m + # labels: + # severity: critical + # rules2.txt: | + # groups: + # - name: example + # rules: + # - alert: HighThroughputLogStreams + # expr: sum by(container) (rate({job=~"loki-dev/.*"}[1m])) > 1000 + # for: 2m + + serviceAccount: + # -- Specifies whether a ServiceAccount should be created + create: false + # @schema type:[string, null] + # -- The name of the ServiceAccount to use. + # If not set and create is true, a name is generated using the fullname template + name: null + # @schema item:object;itemProperties:{"name": {"type": "string"}} + # -- Image pull secrets for the service account + imagePullSecrets: [] + # @schema additionalProperties:{"type":"string"} + # -- Annotations for the service account + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Labels for the service account + labels: {} + # -- Set this toggle to false to opt out of automounting API credentials for the service account + automountServiceAccountToken: true + +# -- Configuration for the overrides-exporter +overridesExporter: + # -- The overrides-exporter component is optional and can be disabled if desired. + enabled: false + # -- Kind of backend workload. StatefulSet and Deployment are supported. + kind: Deployment + # @schema type:[integer, null] + # -- Number of replicas for the overrides-exporter. Set to null to omit spec.replicas from the workload, + # allowing an external controller (e.g. HPA, KEDA, rollout-operator) to manage replica counts without Helm resetting them. + replicas: 0 + # @schema additionalProperties:true + # -- DNSConfig for overrides-exporter + dnsConfig: {} + # -- hostAliases to add + hostAliases: [] + # @schema type:[boolean, null] + # - ip: 1.2.3.4 + # hostnames: + # - domain.tld + # -- Use the host's user namespace in the overrides-exporter + hostUsers: null + image: + # @schema type:[string, null] + # -- The Docker registry for the overrides-exporter image. Overrides `loki.image.registry` + registry: null + # @schema type:[string, null] + # -- Docker image repository for the overrides-exporter image. Overrides `loki.image.repository` + repository: null + # @schema type:[string, null] + # -- Docker image tag for the overrides-exporter image. Overrides `loki.image.tag` + tag: null + # @schema type:[string, null] + # -- Command to execute instead of defined in Docker image + command: null + # @schema type:[string, null] + # -- The name of the PriorityClass for overrides-exporter pods + priorityClassName: null + # @schema additionalProperties:{"type":"string"} + # -- Labels for overrides-exporter + labels: {} + # @schema additionalProperties:{"type":"string"} + # -- Annotations for overrides-exporter + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Labels for overrides-exporter pods + podLabels: {} + # @schema additionalProperties:{"type":"string"} + # -- Annotations for overrides-exporter pods + podAnnotations: {} + # @schema additionalProperties:{"type":"string"};deprecated:true + # -- Labels for overrides-exporter service + # @deprecated -- This option is deprecated in favor of `overridesExporter.service.labels` + serviceLabels: {} + # @schema additionalProperties:{"type":"string"};deprecated:true + # -- Annotations for overrides-exporter service + # @deprecated -- This option is deprecated in favor of `overridesExporter.service.annotations` + serviceAnnotations: {} + service: + # @schema additionalProperties:{"type":"string"} + # -- Annotations for overrides-exporter Service + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Additional labels for overrides-exporter Service + labels: {} + # -- Service Type for overrides-exporter Service + type: "ClusterIP" + # -- trafficDistribution for overrides-exporter Service + trafficDistribution: "" + # -- Session affinity for overrides-exporter Service + sessionAffinity: "" + # @schema additionalProperties:true + # -- Session affinity config for overrides-exporter Service + sessionAffinityConfig: {} + # -- ipFamilyPolicy for overrides-exporter Service + # Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services + ipFamilyPolicy: "" + # -- ipFamilies for overrides-exporter Service + # Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services + ipFamilies: [] + # -- Adds the appProtocol field to the overrides-exporter service. This allows overrides-exporter to work with istio protocol selection. + appProtocol: + # -- Set the optional grpc service protocol. Ex: "grpc", "http2" or "https" + grpc: "" + # -- Additional CLI args for the overrides-exporter + extraArgs: [] + # -- Environment variables to add to the overrides-exporter pods + extraEnv: [] + # -- Environment variables from secrets or configmaps to add to the overrides-exporter pods + extraEnvFrom: [] + # -- Volume mounts to add to the overrides-exporter pods + extraVolumeMounts: [] + # -- Volumes to add to the overrides-exporter pods + extraVolumes: [] + # @schema additionalProperties:true + # -- Resource requests and limits for the overrides-exporter + resources: {} + # -- Container resize policy for the overrides-exporter + # Example: + # resizePolicy: + # - resourceName: cpu + # restartPolicy: NotRequired + # - resourceName: memory + # restartPolicy: RestartContainer + resizePolicy: [] + # @schema type:[string, array, null] + # -- Containers to add to the overrides-exporter pods + extraContainers: [] + # @schema type:[string, array, null] + # -- Init containers to add to the overrides-exporter pods + initContainers: [] + # -- Grace period to allow the overrides-exporter to shutdown before it is killed + terminationGracePeriodSeconds: 300 + podDisruptionBudget: + # -- Enable Pod Disruption Budget + enabled: true + # @schema additionalProperties:{"type":"string"} + # -- Annotations for Pod Disruption Budget + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Labels for Pod Disruption Budget + labels: {} + + # @schema type:[string, integer, null] + # -- Pod Disruption Budget minAvailable + minAvailable: null + # @schema type:[string, integer, null] + # -- Pod Disruption Budget maxUnavailable + maxUnavailable: null + # @schema type:[string, null] + # -- Pod Disruption Budget unhealthyPodEvictionPolicy + unhealthyPodEvictionPolicy: null + # @schema type:[object, null];skipProperties:true;additionalProperties:true + # -- Affinity for overrides-exporter pods. + # @default -- Hard node anti-affinity + # The value will be passed through tpl. + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchLabels: + app.kubernetes.io/component: overrides-exporter + app.kubernetes.io/name: '{{ include "loki.name" . }}' + app.kubernetes.io/instance: '{{ .Release.Name }}' + topologyKey: kubernetes.io/hostname + # @schema type:[string, integer, null];deprecated:true + # -- Pod Disruption Budget maxUnavailable + # @deprecated -- This is deprecated in favor of `podDisruptionBudget.maxUnavailable`. + maxUnavailable: null + # @schema additionalProperties:true + # -- Node selector for overrides-exporter pods + nodeSelector: {} + # @schema item:object + # -- Topology Spread Constraints for overrides-exporter pods + # The value will be passed through tpl. + topologySpreadConstraints: [] + tolerations: [] + # @schema additionalProperties:true;deprecated:true + # -- Set the optional grpc service protocol. Ex: "grpc", "http2" or "https" + # @deprecated -- This option is deprecated in favor of `overridesExporter.service.appProtocol` + appProtocol: + grpc: "" + + serviceAccount: + # -- Specifies whether a ServiceAccount should be created + create: false + # @schema type:[string, null] + # -- The name of the ServiceAccount to use. + # If not set and create is true, a name is generated using the fullname template + name: null + # @schema item:object;itemProperties:{"name": {"type": "string"}} + # -- Image pull secrets for the service account + imagePullSecrets: [] + # @schema additionalProperties:{"type":"string"} + # -- Annotations for the service account + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Labels for the service account + labels: {} + # -- Set this toggle to false to opt out of automounting API credentials for the service account + automountServiceAccountToken: true + +# You can use a self hosted memcached by setting enabled to false and providing addresses. +memcached: + # -- Enable the built in memcached server provided by the chart + enabled: true + image: + # -- Memcached Docker image repository + repository: memcached + # -- Memcached Docker image tag + tag: 1.6.45-alpine + # -- Memcached Docker image pull policy + pullPolicy: IfNotPresent + # @schema skipProperties:true;additionalProperties:true + # -- The SecurityContext override for memcached pods + podSecurityContext: + runAsNonRoot: true + runAsUser: 11211 + runAsGroup: 11211 + fsGroup: 11211 + seccompProfile: + type: RuntimeDefault + # @schema type:[string, null] + # -- The name of the PriorityClass for memcached pods + priorityClassName: null + # @schema skipProperties:true;additionalProperties:true + # -- The SecurityContext for memcached containers + containerSecurityContext: + readOnlyRootFilesystem: true + capabilities: + drop: [ALL] + allowPrivilegeEscalation: false + runAsNonRoot: true + seccompProfile: + type: RuntimeDefault + # @schema skipProperties:true;additionalProperties:true + # -- Readiness probe for memcached pods (probe port defaults to container port) + readinessProbe: + tcpSocket: + port: client + initialDelaySeconds: 5 + periodSeconds: 5 + timeoutSeconds: 3 + failureThreshold: 6 + # @schema skipProperties:true;additionalProperties:true + # -- Liveness probe for memcached pods + livenessProbe: + tcpSocket: + port: client + initialDelaySeconds: 30 + periodSeconds: 10 + timeoutSeconds: 5 + failureThreshold: 3 + # @schema skipProperties:true;additionalProperties:true + # -- Startup probe for memcached pods + startupProbe: {} + + serviceAccount: + # -- Specifies whether a ServiceAccount should be created + create: true + # @schema type:[string, null] + # -- The name of the ServiceAccount to use. + # If not set and create is true, a name is generated using the fullname template + name: null + # @schema item:object;itemProperties:{"name": {"type": "string"}} + # -- Image pull secrets for the service account + imagePullSecrets: [] + # @schema additionalProperties:{"type":"string"} + # -- Annotations for the service account + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Labels for the service account + labels: {} + # -- Set this toggle to false to opt out of automounting API credentials for the service account + automountServiceAccountToken: false + + +memcachedExporter: + # -- Whether memcached metrics should be exported + enabled: true + image: + repository: prom/memcached-exporter + tag: v0.16.0 + pullPolicy: IfNotPresent + # @schema additionalProperties:true + resources: + requests: {} + limits: {} + # -- Container resize policy for the memcached exporter + # Example: + # resizePolicy: + # - resourceName: cpu + # restartPolicy: NotRequired + # - resourceName: memory + # restartPolicy: RestartContainer + resizePolicy: [] + # @schema skipProperties:true;additionalProperties:true + # -- The SecurityContext for memcached exporter containers + containerSecurityContext: + readOnlyRootFilesystem: true + capabilities: + drop: [ALL] + allowPrivilegeEscalation: false + runAsNonRoot: true + seccompProfile: + type: RuntimeDefault + # -- Extra args to add to the exporter container. + # Example: + # extraArgs: + # memcached.tls.enable: true + # memcached.tls.cert-file: /certs/cert.crt + # memcached.tls.key-file: /certs/cert.key + # memcached.tls.ca-file: /certs/ca.crt + # memcached.tls.insecure-skip-verify: false + # memcached.tls.server-name: memcached + extraArgs: {} + # @schema skipProperties:true;additionalProperties:true + # -- Liveness probe for memcached exporter + livenessProbe: + httpGet: + path: /metrics + port: http-metrics + initialDelaySeconds: 30 + periodSeconds: 10 + timeoutSeconds: 5 + failureThreshold: 3 + # @schema skipProperties:true;additionalProperties:true + # -- Readiness probe for memcached exporter + readinessProbe: + httpGet: + path: /metrics + port: http-metrics + initialDelaySeconds: 5 + periodSeconds: 5 + timeoutSeconds: 3 + failureThreshold: 3 + # @schema skipProperties:true;additionalProperties:true + # -- Startup probe for memcached exporter + startupProbe: {} + +resultsCache: + # -- Specifies whether memcached based results-cache should be enabled + enabled: true + # -- Comma separated addresses list in DNS Service Discovery format + addresses: dnssrvnoa+_memcached-client._tcp.{{ include "loki.resourceName" (dict "ctx" $ "component" "results-cache") }}.{{ include "loki.namespace" $ }}.svc.{{ .Values.global.clusterDomain }} + # -- Specify how long cached results should be stored in the results-cache before being expired + defaultValidity: 12h + # -- Memcached operation timeout + timeout: 500ms + # -- Total number of results-cache replicas + replicas: 1 + # -- Port of the results-cache service + port: 11211 + # -- Amount of memory allocated to results-cache for object storage (in MB). + allocatedMemory: 1024 + # -- Amount of cpu allocated to results-cache for object storage (in integer or millicores). + allocatedCPU: 500m + # -- Maximum item results-cache for memcached (in MB). + maxItemMemory: 5 + # -- Maximum number of connections allowed + connectionLimit: 16384 + # -- Max memory to use for cache write back + writebackSizeLimit: 500MB + # -- Max number of objects to use for cache write back + writebackBuffer: 500000 + # -- Number of parallel threads for cache write back + writebackParallelism: 1 + # -- Extra init containers for results-cache pods + initContainers: [] + # @schema additionalProperties:{"type":"string"} + # -- Annotations for the results-cache pods + annotations: {} + # @schema additionalProperties:true + # -- Node selector for results-cache pods + nodeSelector: {} + # @schema type:[object, null];skipProperties:true;additionalProperties:true + # -- Affinity for results-cache pods + affinity: {} + # @schema item:object + # -- topologySpreadConstraints allows to customize the default topologySpreadConstraints. This can be either a single dict as shown below or a slice of topologySpreadConstraints. + # labelSelector is taken from the constraint itself (if it exists) or is generated by the chart using the same selectors as for services. + topologySpreadConstraints: [] + # topologyKey: kubernetes.io/hostname + # whenUnsatisfiable: ScheduleAnyway + # -- Tolerations for results-cache pods + tolerations: [] + # @schema type:[string, integer, null];deprecated:true + # -- Pod Disruption Budget maxUnavailable + # @deprecated -- This is deprecated in favor of `podDisruptionBudget.maxUnavailable`. + maxUnavailable: 1 + podDisruptionBudget: + # -- Enable Pod Disruption Budget + enabled: true + # @schema additionalProperties:{"type":"string"} + # -- Annotations for Pod Disruption Budget + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Labels for Pod Disruption Budget + labels: {} + + # @schema type:[string, integer, null] + # -- Pod Disruption Budget minAvailable + minAvailable: null + # @schema type:[string, integer, null] + # -- Pod Disruption Budget maxUnavailable + maxUnavailable: null + # @schema type:[string, null] + # -- Pod Disruption Budget unhealthyPodEvictionPolicy + unhealthyPodEvictionPolicy: null + # @schema additionalProperties:true + # -- DNSConfig for results-cache + dnsConfig: {} + # @schema type:[string, null] + # -- The name of the PriorityClass for results-cache pods + priorityClassName: null + # @schema type:[boolean, null] + # -- Use the host's user namespace in results-cache pods + hostUsers: null + # @schema additionalProperties:{"type":"string"} + # -- Labels for results-cache pods + podLabels: {} + # @schema additionalProperties:{"type":"string"} + # -- Annotations for results-cache pods + podAnnotations: {} + # -- Management policy for results-cache pods + podManagementPolicy: Parallel + # -- Grace period to allow the results-cache to shutdown before it is killed + terminationGracePeriodSeconds: 60 + # @schema skipProperties:true;additionalProperties:true + # -- Stateful results-cache strategy + statefulStrategy: + type: RollingUpdate + # -- Add extended options for results-cache memcached container. The format is the same as for the memcached -o/--extend flag. + # Example: + # extraExtendedOptions: 'tls,modern,track_sizes' + extraExtendedOptions: "" + # -- Additional CLI args for results-cache + extraArgs: {} + # @schema type:[array, null] + # -- Additional containers to be added to the results-cache pod. + extraContainers: [] + # -- Additional volumes to be added to the results-cache pod (applies to both memcached and exporter containers). + # Example: + # extraVolumes: + # - name: extra-volume + # secret: + # secretName: extra-volume-secret + extraVolumes: [] + # -- Additional volume mounts to be added to the results-cache pod (applies to both memcached and exporter containers). + # Example: + # extraVolumeMounts: + # - name: extra-volume + # mountPath: /etc/extra-volume + # readOnly: true + extraVolumeMounts: [] + # @schema additionalProperties:true + # -- Resource requests and limits for the results-cache + # By default a safe memory limit will be requested based on allocatedMemory value (floor (* 1.2 allocatedMemory)). + resources: {} + # -- Container resize policy for the results-cache + # Example: + # resizePolicy: + # - resourceName: cpu + # restartPolicy: NotRequired + # - resourceName: memory + # restartPolicy: RestartContainer + resizePolicy: [] + # -- Service annotations and labels + service: + # @schema additionalProperties:{"type":"string"} + annotations: {} + # @schema additionalProperties:{"type":"string"} + labels: {} + # -- Persistence settings for the results-cache + persistence: + # -- Enable creating PVCs for the results-cache + enabled: false + # -- Size of persistent disk, must be in G or Gi + storageSize: 10G + # @schema type:[string, null] + # -- Storage class to be used. + # If defined, storageClassName: . + # If set to "-", storageClassName: "", which disables dynamic provisioning. + # If empty or set to null, no storageClassName spec is + # set, choosing the default provisioner (gp2 on AWS, standard on GKE, AWS, and OpenStack). + storageClass: null + # @schema type:[string, null] + # -- Volume attributes class name to be used. + # If empty or set to null, no volumeAttributesClassName spec is set. + # Requires Kubernetes 1.31 + volumeAttributesClassName: null + # -- Volume mount path + mountPath: /data + # @schema additionalProperties:{"type":"string"} + # -- PVC additional labels + labels: {} +chunksCache: + # -- Append to the name of the resources to make names different for l1 and l2 + suffix: "" + # -- Specifies whether memcached based chunks-cache should be enabled + enabled: true + # -- Comma separated addresses list in DNS Service Discovery format + addresses: 'dnssrvnoa+_memcached-client._tcp.{{ include "loki.resourceName" (dict "ctx" $ "component" "chunks-cache" "suffix" $.Values.chunksCache.suffix ) }}.{{ include "loki.namespace" $ }}.svc.{{ .Values.global.clusterDomain }}' + # -- Batchsize for sending and receiving chunks from chunks cache + batchSize: 4 + # -- Parallel threads for sending and receiving chunks from chunks cache + parallelism: 5 + # -- Memcached operation timeout + timeout: 2000ms + # -- Specify how long cached chunks should be stored in the chunks-cache before being expired + defaultValidity: 0s + # -- Total number of chunks-cache replicas + replicas: 1 + # -- Port of the chunks-cache service + port: 11211 + # -- Amount of memory allocated to chunks-cache for object storage (in MB). + allocatedMemory: 8192 + # -- Amount of cpu allocated to chunks-cache for object storage (in integer or millicores). + allocatedCPU: 500m + # -- Maximum item memory for chunks-cache (in MB). + maxItemMemory: 5 + # -- Maximum number of connections allowed + connectionLimit: 16384 + # -- Max memory to use for cache write back + writebackSizeLimit: 500MB + # -- Max number of objects to use for cache write back + writebackBuffer: 500000 + # -- Number of parallel threads for cache write back + writebackParallelism: 1 + # -- Extra init containers for chunks-cache pods + initContainers: [] + # @schema additionalProperties:{"type":"string"} + # -- Annotations for the chunks-cache pods + annotations: {} + # @schema additionalProperties:true + # -- Node selector for chunks-cache pods + nodeSelector: {} + # @schema type:[object, null];skipProperties:true;additionalProperties:true + # -- Affinity for chunks-cache pods + affinity: {} + # @schema item:object + # -- topologySpreadConstraints allows to customize the default topologySpreadConstraints. This can be either a single dict as shown below or a slice of topologySpreadConstraints. + # labelSelector is taken from the constraint itself (if it exists) or is generated by the chart using the same selectors as for services. + topologySpreadConstraints: [] + # topologyKey: kubernetes.io/hostname + # whenUnsatisfiable: ScheduleAnyway + # -- Tolerations for chunks-cache pods + tolerations: [] + # @schema type:[string, integer, null];deprecated:true + # -- Pod Disruption Budget maxUnavailable + # @deprecated -- This is deprecated in favor of `podDisruptionBudget.maxUnavailable`. + maxUnavailable: 1 + podDisruptionBudget: + # -- Enable Pod Disruption Budget + enabled: true + # @schema additionalProperties:{"type":"string"} + # -- Annotations for Pod Disruption Budget + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Labels for Pod Disruption Budget + labels: {} + + # @schema type:[string, integer, null] + # -- Pod Disruption Budget minAvailable + minAvailable: null + # @schema type:[string, integer, null] + # -- Pod Disruption Budget maxUnavailable + maxUnavailable: null + # @schema type:[string, null] + # -- Pod Disruption Budget unhealthyPodEvictionPolicy + unhealthyPodEvictionPolicy: null + # @schema additionalProperties:true + # -- DNSConfig for chunks-cache + dnsConfig: {} + # @schema type:[string, null] + # -- The name of the PriorityClass for chunks-cache pods + priorityClassName: null + # @schema type:[boolean, null] + # -- Use the host's user namespace in chunks-cache pods + hostUsers: null + # @schema additionalProperties:{"type":"string"} + # -- Labels for chunks-cache pods + podLabels: {} + # @schema additionalProperties:{"type":"string"} + # -- Annotations for chunks-cache pods + podAnnotations: {} + # -- Management policy for chunks-cache pods + podManagementPolicy: Parallel + # -- Grace period to allow the chunks-cache to shutdown before it is killed + terminationGracePeriodSeconds: 60 + # @schema skipProperties:true;additionalProperties:true + # -- Stateful chunks-cache strategy + statefulStrategy: + type: RollingUpdate + # -- Add extended options for chunks-cache memcached container. The format is the same as for the memcached -o/--extend flag. + # Example: + # extraExtendedOptions: 'tls,no_hashexpand' + extraExtendedOptions: "" + # -- Additional CLI args for chunks-cache + extraArgs: {} + # @schema type:[array, null] + # -- Additional containers to be added to the chunks-cache pod. + extraContainers: [] + # -- Additional volumes to be added to the chunks-cache pod (applies to both memcached and exporter containers). + # Example: + # extraVolumes: + # - name: extra-volume + # secret: + # secretName: extra-volume-secret + extraVolumes: [] + # -- Additional volume mounts to be added to the chunks-cache pod (applies to both memcached and exporter containers). + # Example: + # extraVolumeMounts: + # - name: extra-volume + # mountPath: /etc/extra-volume + # readOnly: true + extraVolumeMounts: [] + # @schema additionalProperties:true + # -- Resource requests and limits for the chunks-cache + # By default a safe memory limit will be requested based on allocatedMemory value (floor (* 1.2 allocatedMemory)). + resources: {} + # -- Container resize policy for the chunks-cache + # Example: + # resizePolicy: + # - resourceName: cpu + # restartPolicy: NotRequired + # - resourceName: memory + # restartPolicy: RestartContainer + resizePolicy: [] + # -- Service annotations and labels + service: + # @schema additionalProperties:{"type":"string"} + annotations: {} + # @schema additionalProperties:{"type":"string"} + labels: {} + # -- Persistence settings for the chunks-cache + persistence: + # -- Enable creating PVCs for the chunks-cache + enabled: false + # -- Size of persistent disk, must be in G or Gi + storageSize: 10G + # @schema type:[string, null] + # -- Storage class to be used. + # If defined, storageClassName: . + # If set to "-", storageClassName: "", which disables dynamic provisioning. + # If empty or set to null, no storageClassName spec is + # set, choosing the default provisioner (gp2 on AWS, standard on GKE, AWS, and OpenStack). + storageClass: null + # @schema type:[string, null] + # -- Volume attributes class name to be used. + # If empty or set to null, no volumeAttributesClassName spec is set. + # Requires Kubernetes 1.31 + volumeAttributesClassName: null + # -- Volume mount path + mountPath: /data + # @schema additionalProperties:{"type":"string"} + labels: {} + # -- l2 memcache configuration + l2: + # -- Append to the name of the resources to make names different for l1 and l2 + suffix: "l2" + # -- The age of chunks should be transferred from l1 cache to l2 + # 4 days + l2ChunkCacheHandoff: 345600s + # -- Specifies whether memcached based chunks-cache-l2 should be enabled + enabled: false + # -- Comma separated addresses list in DNS Service Discovery format + addresses: 'dnssrvnoa+_memcached-client._tcp.{{ include "loki.resourceName" (dict "ctx" $ "component" "chunks-cache" "suffix" $.Values.chunksCache.l2.suffix ) }}.{{ include "loki.namespace" $ }}.svc.{{ .Values.global.clusterDomain }}' + # -- Batchsize for sending and receiving chunks from chunks cache + batchSize: 4 + # -- Parallel threads for sending and receiving chunks from chunks cache + parallelism: 5 + # -- Memcached operation timeout + timeout: 2000ms + # -- Specify how long cached chunks should be stored in the chunks-cache-l2 before being expired + defaultValidity: 0s + # -- Total number of chunks-cache-l2 replicas + replicas: 1 + # -- Port of the chunks-cache-l2 service + port: 11211 + # -- Amount of memory allocated to chunks-cache-l2 for object storage (in MB). + allocatedMemory: 8192 + # -- Amount of cpu allocated to chunks-cache-l2 for object storage (in integer or millicores). + allocatedCPU: 500m + # -- Maximum item memory for chunks-cache-l2 (in MB). + maxItemMemory: 5 + # -- Maximum number of connections allowed + connectionLimit: 16384 + # -- Max memory to use for cache write back + writebackSizeLimit: 500MB + # -- Max number of objects to use for cache write back + writebackBuffer: 500000 + # -- Number of parallel threads for cache write back + writebackParallelism: 1 + # -- Extra init containers for chunks-cache-l2 pods + initContainers: [] + # @schema additionalProperties:{"type":"string"} + # -- Annotations for the chunks-cache-l2 pods + annotations: {} + # @schema additionalProperties:true + # -- Node selector for chunks-cach-l2 pods + nodeSelector: {} + # @schema skipProperties:true;additionalProperties:true + # -- Affinity for chunks-cache-l2 pods + affinity: {} + # @schema item:object + # -- topologySpreadConstraints allows to customize the default topologySpreadConstraints. This can be either a single dict as shown below or a slice of topologySpreadConstraints. + # labelSelector is taken from the constraint itself (if it exists) or is generated by the chart using the same selectors as for services. + topologySpreadConstraints: [] + # topologyKey: kubernetes.io/hostname + # whenUnsatisfiable: ScheduleAnyway + # -- Tolerations for chunks-cache-l2 pods + tolerations: [] + # @schema type:[string, integer, null];deprecated:true + # -- Pod Disruption Budget maxUnavailable + # @deprecated -- This is deprecated in favor of `podDisruptionBudget.maxUnavailable`. + maxUnavailable: 1 + podDisruptionBudget: + # -- Enable Pod Disruption Budget + enabled: true + # @schema additionalProperties:{"type":"string"} + # -- Annotations for Pod Disruption Budget + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Labels for Pod Disruption Budget + labels: {} + # minAvailable: 1 + # maxUnavailable: 1 + # unhealthyPodEvictionPolicy: IfHealthyBudget + # @schema additionalProperties:true + # -- DNSConfig for chunks-cache-l2 + dnsConfig: {} + # @schema type:[string, null] + # -- The name of the PriorityClass for chunks-cache-l2 pods + priorityClassName: null + # @schema type:[boolean, null] + # -- Use the host's user namespace in chunks-cache-l2 pods + hostUsers: null + # @schema additionalProperties:{"type":"string"} + # -- Labels for chunks-cache-l2 pods + podLabels: {} + # @schema additionalProperties:{"type":"string"} + # -- Annotations for chunks-cache-l2 pods + podAnnotations: {} + # -- Management policy for chunks-cache-l2 pods + podManagementPolicy: Parallel + # -- Grace period to allow the chunks-cache-l2 to shutdown before it is killed + terminationGracePeriodSeconds: 60 + # @schema skipProperties:true;additionalProperties:true + # -- Stateful chunks-cache strategy + statefulStrategy: + type: RollingUpdate + # -- Add extended options for chunks-cache-l2 memcached container. The format is the same as for the memcached -o/--extend flag. + # Example: + # extraExtendedOptions: 'tls,no_hashexpand' + extraExtendedOptions: "" + # -- Additional CLI args for chunks-cache-l2 + extraArgs: {} + # @schema type:[array, null] + # -- Additional containers to be added to the chunks-cache-l2 pod. + extraContainers: [] + # -- Additional volumes to be added to the chunks-cache-l2 pod (applies to both memcached and exporter containers). + # Example: + # extraVolumes: + # - name: extra-volume + # secret: + # secretName: extra-volume-secret + extraVolumes: [] + # -- Additional volume mounts to be added to the chunks-cache-l2 pod (applies to both memcached and exporter containers). + # Example: + # extraVolumeMounts: + # - name: extra-volume + # mountPath: /etc/extra-volume + # readOnly: true + extraVolumeMounts: [] + # @schema additionalProperties:true + # -- Resource requests and limits for the chunks-cache-l2 + # By default a safe memory limit will be requested based on allocatedMemory value (floor (* 1.2 allocatedMemory)). + resources: {} + # -- Container resize policy for the chunks-cache-l2 + # Example: + # resizePolicy: + # - resourceName: cpu + # restartPolicy: NotRequired + # - resourceName: memory + # restartPolicy: RestartContainer + resizePolicy: [] + # -- Service annotations and labels + service: + # @schema additionalProperties:{"type":"string"} + annotations: {} + # @schema additionalProperties:{"type":"string"} + labels: {} + # -- Persistence settings for the chunks-cache-l2 + persistence: + # -- Enable creating PVCs for the chunks-cache-l2 + enabled: false + # -- Size of persistent disk, must be in G or Gi + storageSize: 10G + # @schema type:[string, null] + # -- Storage class to be used. + # If defined, storageClassName: . + # If set to "-", storageClassName: "", which disables dynamic provisioning. + # If empty or set to null, no storageClassName spec is + # set, choosing the default provisioner (gp2 on AWS, standard on GKE, AWS, and OpenStack). + storageClass: null + # @schema type:[string, null] + # -- Volume attributes class name to be used. + # If empty or set to null, no volumeAttributesClassName spec is set. + # Requires Kubernetes 1.31 + volumeAttributesClassName: null + # -- Volume mount path + mountPath: /data + # @schema additionalProperties:{"type":"string"} + labels: {} + + +###################################################################################################################### +# +# Subchart configurations +# +###################################################################################################################### + +# @schema skipProperties:true;additionalProperties:true +# -- Setting for the Grafana Rollout Operator https://github.com/grafana/helm-charts/tree/main/charts/rollout-operator +rollout_operator: + enabled: false + # @schema skipProperties:true;additionalProperties:true + # -- podSecurityContext is the pod security context for the rollout operator. + # When installing on OpenShift, override podSecurityContext settings with + # + # rollout_operator: + # podSecurityContext: + # fsGroup: null + # runAsGroup: null + # runAsUser: null + podSecurityContext: + fsGroup: 10001 + runAsGroup: 10001 + runAsNonRoot: true + runAsUser: 10001 + seccompProfile: + type: RuntimeDefault + # @schema skipProperties:true;additionalProperties:true + # Set the container security context + securityContext: + readOnlyRootFilesystem: true + capabilities: + drop: [ALL] + allowPrivilegeEscalation: false + runAsNonRoot: true + seccompProfile: + type: RuntimeDefault + webhooks: + # -- Enable the rollout-operator webhooks. See https://github.com/grafana/rollout-operator/#webhooks. + # Note that the webhooks require custom resource definitions. If upgrading, manually apply the files in the `crds` directory. + enabled: true + # -- Timeout in seconds for the prepare-downscale mutating webhook. Must be between 1 and 30. + timeoutSeconds: 10 + # -- Validating and mutating webhook failure policy. `Ignore` or `Fail`. + failurePolicy: "Ignore" +# -- Ignore MinIO deprecation validation when `minio.enabled=true`. This is a temporary compatibility escape hatch. +ignoreMinioDeprecation: false + +# @schema skipProperties:true;additionalProperties:true +# -- Configuration for the minio subchart (deprecated) +minio: + enabled: false + replicas: 1 + # Minio requires 2 to 16 drives for erasure code (drivesPerNode * replicas) + # https://docs.min.io/docs/minio-erasure-code-quickstart-guide + # Since we only have 1 replica, that means 2 drives must be used. + drivesPerNode: 2 + # root user + rootUser: root-user + rootPassword: supersecretpassword + # The first user in the list below is used for Loki authentication. + # You can add additional users if desired; they will not impact Loki. + # `accessKey` = username, `secretKey` = password + users: + - accessKey: logs-user + secretKey: supersecretpassword + policy: readwrite + buckets: + - name: chunks + policy: none + purge: false + - name: ruler + policy: none + purge: false + persistence: + size: 5Gi + # @schema additionalProperties:{"type":"string"} + annotations: {} + # @schema additionalProperties:true + resources: + requests: + cpu: 100m + memory: 128Mi + # @schema type:[string, null] + # Allow the address used by Loki to refer to Minio to be overridden + address: null + +# @schema type:[array, object, string, null] +# Create extra manifests via values +# Can be a list or dictionary, both are passed through `tpl`. If dict, keys are ignored and only values are used. +# Objects can also be defined as multiline strings, useful for templating field names +extraObjects: null +# - apiVersion: v1 +# kind: ConfigMap +# metadata: +# name: loki-alerting-rules +# data: +# loki-alerting-rules.yaml: |- +# groups: +# - name: example +# rules: +# - alert: example +# expr: | +# sum(count_over_time({app="loki"} |~ "error")) > 0 +# for: 3m +# labels: +# severity: warning +# category: logs +# annotations: +# message: "loki has encountered errors" +# - | +# apiVersion: v1 +# kind: Secret +# type: Opaque +# metadata: +# name: loki-distributed-basic-auth +# data: +# {{- range .Values.loki.tenants }} +# {{ .name }}: {{ b64enc .password | quote }} +# {{- end }} + +sidecar: + image: + registry: docker.io + # -- The Docker registry and image for the k8s sidecar + repository: kiwigrid/k8s-sidecar + # -- Docker image tag + tag: 2.8.1 + # -- Docker image sha. If empty, no sha will be used + sha: "" + # -- Docker image pull policy + pullPolicy: IfNotPresent + # @schema additionalProperties:true + # -- Resource requests and limits for the sidecar + resources: {} + # -- Container resize policy for the sidecar + # Example: + # resizePolicy: + # - resourceName: cpu + # restartPolicy: NotRequired + # - resourceName: memory + # restartPolicy: RestartContainer + resizePolicy: [] + # limits: + # cpu: 100m + # memory: 100Mi + # requests: + # cpu: 50m + # memory: 50Mi + + # @schema skipProperties:true;additionalProperties:true + # -- The SecurityContext for the sidecar. + securityContext: + readOnlyRootFilesystem: true + capabilities: + drop: + - ALL + allowPrivilegeEscalation: false + seccompProfile: + type: RuntimeDefault + # -- Set to true to skip tls verification for kube api calls. + skipTlsVerify: false + # -- Set to true to disable strict x509 verification for kube api calls. + disableX509StrictVerification: false + # -- Ensure that rule files aren't conflicting and being overwritten by prefixing their name with the namespace they are defined in. + enableUniqueFilenames: false + # @schema skipProperties:true;additionalProperties:true + # -- Readiness probe definition. + readinessProbe: + enabled: true + httpGet: + path: /healthz + port: http-sidecar + periodSeconds: 10 + initialDelaySeconds: 3 + successThreshold: 1 + failureThreshold: 3 + timeoutSeconds: 1 + # @schema skipProperties:true;additionalProperties:true + # -- Liveness probe definition. + livenessProbe: + enabled: true + httpGet: + path: /healthz + port: http-sidecar + periodSeconds: 30 + initialDelaySeconds: 30 + successThreshold: 1 + failureThreshold: 3 + timeoutSeconds: 1 + # @schema skipProperties:true;additionalProperties:true + # -- Startup probe definition. + startupProbe: + enabled: false + rules: + # -- Whether or not to create a sidecar to ingest rule from specific ConfigMaps and/or Secrets. + enabled: true + # -- Label that the configmaps/secrets with rules will be marked with. + label: loki_rule + # -- Label value that the configmaps/secrets with rules will be set to. + labelValue: "" + # -- Folder into which the rules will be placed. + folder: /rules + # @schema type:[string, null] + # -- The annotation overwriting the folder value. + # The annotation value can be either an absolute or a relative path. Relative paths will be relative to FOLDER. + # Useful for multi-tenancy setups. + folderAnnotation: null + # @schema type:[string, null] + # -- Comma separated list of namespaces. If specified, the sidecar will search for config-maps/secrets inside these namespaces. + # Otherwise the namespace in which the sidecar is running will be used. + # It's also possible to specify 'ALL' to search in all namespaces. + searchNamespace: null + # -- Method to use to detect ConfigMap changes. With WATCH the sidecar will do a WATCH request, with SLEEP it will list all ConfigMaps, then sleep for 60 seconds. + watchMethod: WATCH + # -- Search in configmap, secret, or both. + resource: both + # @schema type:[string, null] + # -- Absolute path to the shell script to execute after a configmap or secret has been reloaded. + script: null + # -- WatchServerTimeout: request to the server, asking it to cleanly close the connection after that. + # defaults to 60sec; much higher values like 3600 seconds (1h) are feasible for non-Azure K8S. + watchServerTimeout: 60 + # + # -- WatchClientTimeout: is a client-side timeout, configuring your local socket. + # If you have a network outage dropping all packets with no RST/FIN, + # this is how long your client waits before realizing & dropping the connection. + # Defaults to 66sec. + watchClientTimeout: 60 + # -- Log level of the sidecar container. + logLevel: INFO + # -- Health Server port of the sidecar container. + healthPort: 8080 + +# -- Monitoring section determines which monitoring features to enable +monitoring: + # @schema type:[string, null] + # -- Alternative namespace to deploy all monitoring resources (ServiceMonitor, PrometheusRule, ConfigMap dashboards) in. + # Defaults to the release namespace. + namespace: null + + # -- Label name for the app_instance label injected into scraped metrics and recording rules. + appInstanceLabelName: 'app_instance' + # -- Value for the app_instance label injected into scraped metrics and recording rules. + # Supports Helm templating. + appInstanceLabelValue: '{{ include "loki.fullname" . }}' + + multiCluster: + # -- When enabled, shows the cluster variable in dashboards. + # If clusterName is also set, the chart adds 'cluster' labels to scraped + # metrics, recording rules, and alerts, and includes 'cluster' in recording + # rule aggregations. If clusterName is left empty, only dashboard changes + # are applied — use this when an external tool (e.g. Grafana Alloy) manages + # cluster label injection and PromQL rewriting. + enabled: false + # -- Value for the 'cluster' label. Supports Helm templating. + # When empty, recording rules and alerts are not modified — only dashboards + # show the cluster variable. + # e.g. clusterName: '{{ .Values.global.clusterName }}' + clusterName: "" + + # Dashboards for monitoring Loki + dashboards: + # -- If enabled, create configmap resources with dashboards for monitoring Loki + enabled: false + # @schema additionalProperties:{"type":"string"} + # -- Additional annotations for the dashboards ConfigMap resources + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Labels for the dashboards ConfigMap resources + labels: + grafana_dashboard: "1" + # -- Timezone for the default dashboards + defaultDashboardsTimezone: utc + + # -- Editable flag for the default dashboards + defaultDashboardsEditable: true + + # -- Default interval for Grafana dashboards + defaultDashboardsInterval: 1m + + grafanaOperator: + # -- If enabled, GrafanaOperator resources for Grafana Operator are created to deploy the dashboards. + enabled: false + + # @schema additionalProperties:{"type":"string"} + # -- Additional annotations for the GrafanaOperator resources + annotations: {} + + # @schema additionalProperties:{"type":"string"} + # -- Additional labels for the GrafanaOperator resources + labels: {} + + # -- How frequently the operator should resync resources (in duration format) + resyncPeriod: 10m + + # @schema type:[string, null] + # -- Which folder contains all dashboards in Grafana + ## This folder will be created on the Root level + ## Only one of 'folder', 'folderUID' or 'folderRef' can be set + ## + folder: General + + # @schema type:[string, null] + # -- Which UID of the target folder contains all dashboards in Grafana + ## This allows you to use subfolder hierarchy + ## Only one of 'folder', 'folderUID' or 'folderRef' can be set + ## + folderUID: null + + # @schema type:[string, null] + # -- Which GrafanaFolder reference contains all dashboards in Grafana + ## This allows you to use subfolder hierarchy. + ## Only one of 'folder', 'folderUID' or 'folderRef' can be set + ## + folderRef: null + + # @schema $ref: $k8s/_definitions.json#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector + # -- instanceSelector for the GrafanaDashboard resources + ## The grafana-operator matches this against the labels on your Grafana CR + ## An empty selector (the default) matches every Grafana instance + instanceSelector: {} + + # -- Recording rules for monitoring Loki, required for some dashboards + rules: + # -- If enabled, create a PrometheusRule resource with Loki recording rules + enabled: false + # @schema additionalProperties:{"type":"string"} + # -- Additional labels for the PrometheusRule resource + labels: {} + # @schema additionalProperties:{"type":"string"} + # -- Additional annotations for the PrometheusRule resource + annotations: {} + # -- Additional labels applied to all individual recording rules + additionalRuleLabels: {} + # -- Additional annotations applied to all individual recording rules + additionalRuleAnnotations: {} + # -- Extra label dimensions added to all by() aggregation clauses in recording rules + additionalAggregationLabels: [] + + # -- Alert rules for monitoring Loki + alerts: + # -- If enabled, create a PrometheusRule resource with Loki alert rules + enabled: false + # -- Additional labels for the alerts PrometheusRule resource + labels: {} + # -- Additional annotations for the alerts PrometheusRule resource + annotations: {} + # -- Selectively disable individual alerts by name. + # e.g.: disabled: { LokiRequestErrors: true } + disabled: {} + # -- Override for/severity on individual alerts. + # e.g.: overrides: { LokiRequestErrors: { for: 5m, severity: warning } } + overrides: {} + # -- Global keepFiringFor applied to all alert rules + keepFiringFor: "" + # -- Additional labels applied to all individual alert rules + additionalRuleLabels: {} + # -- Additional annotations applied to all individual alert rules + additionalRuleAnnotations: {} + # -- Extra label dimensions added to all by() aggregation clauses in alert expressions + additionalAggregationLabels: [] + + # -- Additional PrometheusRule objects to create alongside the chart-managed ones. + # Each key becomes the resource name suffix; the value must contain a 'groups' key + # with standard Prometheus rule groups. Can contain both recording rules and alerts. + # e.g.: + # additionalPrometheusRules: + # my-alerts: + # groups: + # - name: my-loki-alerts + # rules: + # - alert: MyLokiAlert + # expr: 'up{job="loki"} == 0' + additionalPrometheusRules: {} + + # -- ServiceMonitor configuration + serviceMonitor: + # -- If enabled, ServiceMonitor resources for Prometheus Operator are created + enabled: false + # -- Namespace selector for ServiceMonitor resources + namespaceSelector: {} + # @schema additionalProperties:{"type":"string"} + # -- ServiceMonitor annotations + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Additional ServiceMonitor labels + labels: {} + # -- ServiceMonitor scrape interval + # Default is 15s because included recording rules use a 1m rate, and scrape interval needs to be at + # least 1/4 rate interval. + interval: 15s + # @schema type:[string, null] + # -- ServiceMonitor scrape timeout in Go duration format (e.g. 15s) + scrapeTimeout: null + # -- ServiceMonitor relabel configs to apply to samples before scraping + # https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#relabelconfig + relabelings: [] + # -- ServiceMonitor metric relabel configs to apply to samples before ingestion + # https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#endpoint + metricRelabelings: [] + # -- ServiceMonitor will use http by default, but you can pick https as well + scheme: http + # @schema type:[object, null] + # -- ServiceMonitor will use these tlsConfig settings to make the health check requests + tlsConfig: null + # -- ServiceMonitor job label prefix will be used to generate the job label for the scraped metrics. + # -- The job label is required for the included dashboards to work. + jobPrefix: '{{ include "loki.namespace" $ }}/' + +# @schema deprecated +# -- DEPRECATED Configuration for the table-manager. The table-manager is only necessary when using a deprecated +# index type such as Cassandra, Bigtable, or DynamoDB, it has not been necessary since loki introduced self- +# contained index types like 'boltdb-shipper' and 'tsdb'. This will be removed in a future helm chart. +tableManager: + # -- Specifies whether the table-manager should be enabled + enabled: false + image: + # @schema type:[string, null] + # -- The Docker registry for the table-manager image. Overrides `loki.image.registry` + registry: null + # @schema type:[string, null] + # -- Docker image repository for the table-manager image. Overrides `loki.image.repository` + repository: null + # @schema type:[string, null] + # -- Docker image tag for the table-manager image. Overrides `loki.image.tag` + tag: null + # @schema type:[string, null] + # -- Command to execute instead of defined in Docker image + command: null + # @schema type:[string, null] + # -- The name of the PriorityClass for table-manager pods + priorityClassName: null + # @schema additionalProperties:{"type":"string"} + # -- Labels for table-manager pods + podLabels: {} + # @schema additionalProperties:{"type":"string"} + # -- Annotations for table-manager deployment + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Annotations for table-manager pods + podAnnotations: {} + service: + # @schema additionalProperties:{"type":"string"} + # -- Annotations for table-manager Service + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Additional labels for table-manager Service + labels: {} + # -- Service Type for table-manager Service + type: "ClusterIP" + # -- trafficDistribution for table-manager Service + trafficDistribution: "" + # -- Session affinity for table-manager Service + sessionAffinity: "" + # @schema additionalProperties:true + # -- Session affinity config for table-manager Service + sessionAffinityConfig: {} + # -- ipFamilyPolicy for table-manager Service + # Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services + ipFamilyPolicy: "" + # -- ipFamilies for table-manager Service + # Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services + ipFamilies: [] + # -- Adds the appProtocol field to the table-manager service. This allows table-manager to work with istio protocol selection. + appProtocol: + # -- Set the optional grpc service protocol. Ex: "grpc", "http2" or "https" + grpc: "" + # -- Additional CLI args for the table-manager + extraArgs: [] + # -- Environment variables to add to the table-manager pods + extraEnv: [] + # -- Environment variables from secrets or configmaps to add to the table-manager pods + extraEnvFrom: [] + # -- Volume mounts to add to the table-manager pods + extraVolumeMounts: [] + # -- Volumes to add to the table-manager pods + extraVolumes: [] + # @schema additionalProperties:true + # -- Resource requests and limits for the table-manager + resources: {} + # -- Container resize policy for the table-manager + # Example: + # resizePolicy: + # - resourceName: cpu + # restartPolicy: NotRequired + # - resourceName: memory + # restartPolicy: RestartContainer + resizePolicy: [] + # @schema type:[string, array, null] + # -- Containers to add to the table-manager pods + extraContainers: [] + # -- Grace period to allow the table-manager to shutdown before it is killed + terminationGracePeriodSeconds: 30 + # @schema type:[boolean, null] + # -- Use the host's user namespace in table-manager pods + hostUsers: null + # @schema type:[object, null];skipProperties:true;additionalProperties:true + # -- Affinity for table-manager pods. + # @default -- Hard node and anti-affinity + # The value will be passed through tpl. + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchLabels: + app.kubernetes.io/component: table-manager + app.kubernetes.io/name: '{{ include "loki.name" . }}' + app.kubernetes.io/instance: '{{ .Release.Name }}' + topologyKey: kubernetes.io/hostname + # @schema additionalProperties:true + # -- DNS config table-manager pods + dnsConfig: {} + # @schema additionalProperties:true + # -- Node selector for table-manager pods + nodeSelector: {} + # -- Tolerations for table-manager pods + tolerations: [] + # -- Enable deletes by retention + retention_deletes_enabled: false + # @schema type:[string, integer] + # -- Set retention period + retention_period: 0 + + serviceAccount: + # -- Specifies whether a ServiceAccount should be created + create: false + # @schema type:[string, null] + # -- The name of the ServiceAccount to use. + # If not set and create is true, a name is generated using the fullname template + name: null + # @schema item:object;itemProperties:{"name": {"type": "string"}} + # -- Image pull secrets for the service account + imagePullSecrets: [] + # @schema additionalProperties:{"type":"string"} + # -- Annotations for the service account + annotations: {} + # @schema additionalProperties:{"type":"string"} + # -- Labels for the service account + labels: {} + # -- Set this toggle to false to opt out of automounting API credentials for the service account + automountServiceAccountToken: true diff --git a/packs/loki-3.7.4/logo.png b/packs/loki-3.7.4/logo.png new file mode 100644 index 00000000..db5ec01f Binary files /dev/null and b/packs/loki-3.7.4/logo.png differ diff --git a/packs/loki-3.7.4/pack.json b/packs/loki-3.7.4/pack.json new file mode 100644 index 00000000..121c4224 --- /dev/null +++ b/packs/loki-3.7.4/pack.json @@ -0,0 +1,39 @@ +{ + "addonType": "monitoring", + "cloudTypes": [ + "all" + ], + "displayName": "Loki", + "charts": [ + "charts/loki-18.5.2.tgz" + ], + "layer": "addon", + "name": "loki", + "version": "3.7.4", + "annotations": { + "airgap": "true", + "source": "community", + "contributor": "spectrocloud" + }, + "constraints": { + "dependencies": [ + { + "packName": "kubernetes", + "layer": "k8s", + "minVersion": "1.29", + "maxVersion": "", + "type": "optional" + } + ], + "resources": [ + { + "type": "cpu", + "minLimit": 100 + }, + { + "type": "memory", + "minLimit": 128 + } + ] + } +} \ No newline at end of file diff --git a/packs/loki-3.7.4/values.yaml b/packs/loki-3.7.4/values.yaml new file mode 100644 index 00000000..188c0338 --- /dev/null +++ b/packs/loki-3.7.4/values.yaml @@ -0,0 +1,123 @@ +pack: + content: + images: + - image: docker.io/grafana/loki:3.7.4 + - image: docker.io/grafana/loki-canary:3.7.4 + - image: docker.io/grafana/loki-helm-test:3.7.4 + - image: docker.io/nginxinc/nginx-unprivileged:1.31-alpine + - image: ghcr.io/jkroepke/access-log-exporter:0.4.6 + - image: docker.io/memcached:1.6.45-alpine + - image: quay.io/prometheus/memcached-exporter:v0.16.0 + - image: docker.io/kiwigrid/k8s-sidecar:2.8.1 + - image: registry.k8s.io/kubectl:v1.35.0 + + charts: + - repo: https://grafana-community.github.io/helm-charts + name: loki + version: 18.5.2 + namespace: "loki" + +charts: + loki: + deploymentMode: SingleBinary + + loki: + auth_enabled: false + image: + registry: docker.io + repository: grafana/loki + tag: 3.7.4 + limits_config: + allow_structured_metadata: true + commonConfig: + replication_factor: 1 + storage: + type: filesystem + filesystem: + chunks_directory: /var/loki/chunks + rules_directory: /var/loki/rules + schemaConfig: + configs: + - from: "2024-04-01" + store: tsdb + object_store: filesystem + schema: v13 + index: + prefix: loki_index_ + period: 24h + storage_config: + tsdb_shipper: + active_index_directory: /var/loki/tsdb-index + cache_location: /var/loki/tsdb-cache + cache_ttl: 24h + bloom_shipper: + working_directory: /var/loki/bloom + + singleBinary: + replicas: 1 + persistence: + enabled: true + size: 5Gi + + gateway: + enabled: true + image: + registry: docker.io + repository: nginxinc/nginx-unprivileged + tag: 1.31-alpine + + lokiCanary: + image: + registry: docker.io + repository: grafana/loki-canary + tag: 3.7.4 + + test: + image: + registry: docker.io + repository: grafana/loki-helm-test + tag: 3.7.4 + + memcached: + image: + registry: docker.io + repository: memcached + tag: 1.6.45-alpine + + memcachedExporter: + image: + registry: quay.io + repository: prometheus/memcached-exporter + tag: v0.16.0 + + sidecar: + image: + registry: docker.io + repository: kiwigrid/k8s-sidecar + tag: 2.8.1 + + # Desactivar componentes distribuidos no requeridos en SingleBinary + backend: + replicas: 0 + read: + replicas: 0 + write: + replicas: 0 + ingester: + replicas: 0 + querier: + replicas: 0 + queryFrontend: + replicas: 0 + queryScheduler: + replicas: 0 + distributor: + replicas: 0 + compactor: + replicas: 0 + indexGateway: + replicas: 0 + bloomCompactor: + replicas: 0 + bloomGateway: + replicas: 0 \ No newline at end of file