diff --git a/applicationsets/loki-appset.yaml b/applicationsets/loki-appset.yaml deleted file mode 100644 index 2cd09b3..0000000 --- a/applicationsets/loki-appset.yaml +++ /dev/null @@ -1,38 +0,0 @@ -apiVersion: argoproj.io/v1alpha1 -kind: ApplicationSet -metadata: - name: loki - namespace: argocd -spec: - generators: - - list: - elements: - - env: prod - valuesFile: values-prod.yaml - nameSuffix: loki-prod - host: logs.dvirlabs.com - - env: int - valuesFile: values-int.yaml - nameSuffix: loki-int - host: logs-int.dvirlabs.com - template: - metadata: - name: '{{nameSuffix}}' - spec: - project: observability - source: - repoURL: https://git.dvirlabs.com/dvirlabs/observability-stack.git - targetRevision: master - path: charts/loki - helm: - valueFiles: - - my-values/{{valuesFile}} - destination: - server: https://kubernetes.default.svc - namespace: monitoring - syncPolicy: - automated: - prune: true - selfHeal: true - syncOptions: - - CreateNamespace=true diff --git a/charts/loki/.helmignore b/charts/loki/.helmignore deleted file mode 100644 index 6d90723..0000000 --- a/charts/loki/.helmignore +++ /dev/null @@ -1,32 +0,0 @@ -# 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/ - -# Other -doc.yaml -README.tpl -README.md.gotmpl -ci -CHANGELOG.md diff --git a/charts/loki/Chart.lock b/charts/loki/Chart.lock deleted file mode 100644 index 217b9e5..0000000 --- a/charts/loki/Chart.lock +++ /dev/null @@ -1,12 +0,0 @@ -dependencies: -- name: minio - repository: https://charts.min.io/ - version: 5.4.0 -- name: grafana-agent-operator - repository: https://grafana.github.io/helm-charts - version: 0.5.1 -- name: rollout-operator - repository: https://grafana.github.io/helm-charts - version: 0.28.0 -digest: sha256:67d1f2515f1735024afa3daf2c0634eeb2ce1b7d08c342058c137365030b6d1c -generated: "2025-05-12T10:27:38.865995341Z" diff --git a/charts/loki/Chart.yaml b/charts/loki/Chart.yaml deleted file mode 100644 index eebbb0c..0000000 --- a/charts/loki/Chart.yaml +++ /dev/null @@ -1,32 +0,0 @@ -apiVersion: v2 -appVersion: 3.5.0 -dependencies: -- alias: minio - condition: minio.enabled - name: minio - repository: https://charts.min.io/ - version: 5.4.0 -- alias: grafana-agent-operator - condition: monitoring.selfMonitoring.grafanaAgent.installOperator - name: grafana-agent-operator - repository: https://grafana.github.io/helm-charts - version: 0.5.1 -- alias: rollout_operator - condition: rollout_operator.enabled - name: rollout-operator - repository: https://grafana.github.io/helm-charts - version: 0.28.0 -description: Helm chart for Grafana Loki and Grafana Enterprise Logs supporting monolithic, - simple scalable, and microservices modes. -home: https://grafana.github.io/helm-charts -icon: https://grafana.com/docs/loki/latest/logo_and_name.png -maintainers: -- name: trevorwhitney -- name: jeschkies -name: loki -sources: -- https://github.com/grafana/loki -- https://grafana.com/oss/loki/ -- https://grafana.com/docs/loki/latest/ -type: application -version: 6.30.1 diff --git a/charts/loki/Makefile b/charts/loki/Makefile deleted file mode 100644 index 373086a..0000000 --- a/charts/loki/Makefile +++ /dev/null @@ -1,84 +0,0 @@ -.DEFAULT_GOAL := all -.PHONY: lint lint-yaml install-distributed install-single-binary uninstall update-chart update - -# Optional image override, example: make install-distributed IMAGE=grafana/loki:2.9.0 -IMAGE ?= - -# Optional helm arguments, example: make install-distributed ARGS="--set loki.auth.enabled=true" -ARGS ?= - -# Default arguments to disable affinity for testing -DEFAULT_ARGS = --set gateway.affinity=null \ - --set ingester.affinity=null \ - --set distributor.affinity=null \ - --set querier.affinity=null \ - --set queryFrontend.affinity=null \ - --set queryScheduler.affinity=null \ - --set indexGateway.affinity=null \ - --set compactor.affinity=null \ - --set ruler.affinity=null \ - --set backend.affinity=null \ - --set read.affinity=null \ - --set write.affinity=null \ - --set singleBinary.affinity=null \ - --set memcachedChunks.affinity=null \ - --set memcachedFrontend.affinity=null \ - --set memcachedIndexQueries.affinity=null \ - --set memcachedMetadata.affinity=null \ - --set memcachedResults.affinity=null \ - --set global.podAntiAffinity=null \ - --set global.podAntiAffinityTopologyKey=null - -# Generate image override flag if IMAGE is provided -IMAGE_FLAG = $(if $(IMAGE),\ - $(eval PARTS=$(subst :, ,$(IMAGE)))\ - $(eval REPO_PARTS=$(subst /, ,$(word 1,$(PARTS))))\ - $(eval TAG=$(word 2,$(PARTS)))\ - $(eval REPO_COUNT=$(words $(REPO_PARTS)))\ - $(if $(filter 3,$(REPO_COUNT)),\ - --set loki.image.registry=$(word 1,$(REPO_PARTS))/$(word 2,$(REPO_PARTS)) --set loki.image.repository=$(word 3,$(REPO_PARTS)),\ - --set loki.image.registry=$(word 1,$(REPO_PARTS)) --set loki.image.repository=$(word 2,$(REPO_PARTS))\ - ) --set loki.image.tag=$(TAG),) - -lint: lint-yaml - -lint-yaml: - yamllint -c $(CURDIR)/src/.yamllint.yaml $(CURDIR)/src - -# Helm chart installation targets -install-distributed: - helm upgrade --install loki . \ - -f distributed-values.yaml \ - --create-namespace \ - --namespace loki \ - $(DEFAULT_ARGS) \ - $(IMAGE_FLAG) \ - $(ARGS) - -install-single-binary: - helm upgrade --install loki . \ - -f single-binary-values.yaml \ - --create-namespace \ - --namespace loki \ - $(DEFAULT_ARGS) \ - $(IMAGE_FLAG) \ - $(ARGS) - -# Uninstall Loki helm release and optionally delete the namespace -uninstall: - helm uninstall loki --namespace loki - kubectl delete namespace loki --ignore-not-found - -# Update Helm chart dependencies -update-chart: - helm dependency update . - -# Update existing installation with latest changes -update: - @if [ "$$(helm get values loki -n loki -o yaml | grep "deploymentMode: Distributed")" ]; then \ - echo "Updating distributed deployment..."; \ - helm upgrade loki . -f distributed-values.yaml --namespace loki $(DEFAULT_ARGS) $(IMAGE_FLAG) $(ARGS); \ - else \ - echo "Updating single binary deployment..."; \ - helm upgrade loki . -f single-binary-values.yaml --namespace loki $(DEFAULT_ARGS) $(IMAGE_FLAG) $(ARGS); \ - fi diff --git a/charts/loki/README.md b/charts/loki/README.md deleted file mode 100644 index 90e588b..0000000 --- a/charts/loki/README.md +++ /dev/null @@ -1,65 +0,0 @@ -# loki - -![Version: 6.30.1](https://img.shields.io/badge/Version-6.30.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 3.5.0](https://img.shields.io/badge/AppVersion-3.5.0-informational?style=flat-square) - -Helm chart for Grafana Loki and Grafana Enterprise Logs supporting monolithic, simple scalable, and microservices modes. - -## Source Code - -* -* -* - -## Requirements - -| Repository | Name | Version | -|------------|------|---------| -| https://charts.min.io/ | minio(minio) | 5.4.0 | -| https://grafana.github.io/helm-charts | grafana-agent-operator(grafana-agent-operator) | 0.5.1 | -| https://grafana.github.io/helm-charts | rollout_operator(rollout-operator) | 0.28.0 | - -Find more information in the Loki Helm Chart [documentation](https://grafana.com/docs/loki/next/installation/helm). - -## Contributing and releasing - -If you made any changes to the [Chart.yaml](https://github.com/grafana/loki/blob/main/production/helm/loki/Chart.yaml) or [values.yaml](https://github.com/grafana/loki/blob/main/production/helm/loki/values.yaml) run `make helm-docs` from the root of the repository to update the documentation and commit the changed files. - -Futhermore, please add an entry to the [CHANGELOG.md](./CHANGELOG.md) file about what you changed. This file has a header that looks like this: - -``` -[//]: # ( : do not remove this line. This locator is used by the CI pipeline to automatically create a changelog entry for each new Loki release. Add other chart versions and respective changelog entries bellow this line.) -```` - -Place your changes as a bulleted list below this header. The helm chart is automatically released once a week, at which point the `CHANGELOG.md` file will be updated to reflect the release of all changes between this header the the header of the previous version as the changes for that weeks release. For example, if the weekly release will be `1.21.0`, and the `CHANGELOG.md` file has the following entries: - -``` -[//]: # ( : do not remove this line. This locator is used by the CI pipeline to automatically create a changelog entry for each new Loki release. Add other chart versions and respective changelog entries bellow this line.) - -- [CHANGE] Changed the thing -- [FEATURE] Cool new feature - -## 1.20.0 - -- [BUGFIX] Fixed the bug -``` - -Then the weekly release will create a `CHANGELOG.md` with the following content: -``` -[//]: # ( : do not remove this line. This locator is used by the CI pipeline to automatically create a changelog entry for each new Loki release. Add other chart versions and respective changelog entries bellow this line.) - -## 1.21.0 - -- [CHANGE] Changed the thing -- [FEATURE] Cool new feature - -## 1.20.0 - -- [BUGFIX] Fixed the bug -``` - -#### Versioning - -Normally contributors need _not_ bump the version nor update the [CHANGELOG.md](https://github.com/grafana/loki/blob/main/production/helm/loki/CHANGELOG.md). A new version of the Chart will follow this cadence: -- Automatic weekly releases -- Releases that coincide with Loki/GEL releases -- Manual releases when necessary (ie. to address a CVE or critical bug) diff --git a/charts/loki/charts/grafana-agent-operator/.helmignore b/charts/loki/charts/grafana-agent-operator/.helmignore deleted file mode 100644 index 50af031..0000000 --- a/charts/loki/charts/grafana-agent-operator/.helmignore +++ /dev/null @@ -1,22 +0,0 @@ -# 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 -.vscode/ diff --git a/charts/loki/charts/grafana-agent-operator/Chart.yaml b/charts/loki/charts/grafana-agent-operator/Chart.yaml deleted file mode 100644 index ef2b820..0000000 --- a/charts/loki/charts/grafana-agent-operator/Chart.yaml +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: v2 -appVersion: 0.44.2 -description: A Helm chart for Grafana Agent Operator -home: https://grafana.com/docs/agent/v0.44/ -icon: https://raw.githubusercontent.com/grafana/agent/v0.44.2/docs/sources/assets/logo_and_name.png -maintainers: -- email: grafana-agent-team@googlegroups.com - name: Grafana Agent Team -name: grafana-agent-operator -sources: -- https://github.com/grafana/agent/tree/v0.44.2/static/operator -type: application -version: 0.5.1 diff --git a/charts/loki/charts/grafana-agent-operator/README.md b/charts/loki/charts/grafana-agent-operator/README.md deleted file mode 100644 index 57589a7..0000000 --- a/charts/loki/charts/grafana-agent-operator/README.md +++ /dev/null @@ -1,82 +0,0 @@ -# grafana-agent-operator - -![Version: 0.5.1](https://img.shields.io/badge/Version-0.5.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.44.2](https://img.shields.io/badge/AppVersion-0.44.2-informational?style=flat-square) - -A Helm chart for Grafana Agent Operator - -⚠️ **Please create issues relating to this Helm chart in the [Agent](https://github.com/grafana/agent/issues) repo.** - -## Source Code - -* - -Note that this chart does not provision custom resources like `GrafanaAgent` and `MetricsInstance` (formerly `PrometheusInstance`) or any `*Monitor` resources. - -To learn how to deploy these resources, please see Grafana's [Agent Operator getting started guide](https://grafana.com/docs/agent/latest/operator/getting-started/). - -## CRDs - -The CRDs are synced into this chart manually (for now) from the Grafana Agent [GitHub repo](https://github.com/grafana/agent/tree/main/operations/agent-static-operator/crds). To learn more about how Helm manages CRDs, please see [Custom Resource Definitions](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/) from the Helm docs. - -## Get Repo Info - -```console -helm repo add grafana https://grafana.github.io/helm-charts -helm repo update -``` - -_See [helm repo](https://helm.sh/docs/helm/helm_repo/) for command documentation._ - -## Installing the Chart - -To install the chart with the release name `my-release`: - -```console -helm install my-release grafana/grafana-agent-operator -``` - -## Uninstalling the Chart - -To uninstall/delete the my-release deployment: - -```console -helm delete my-release -``` - -The command removes all the Kubernetes components associated with the chart and deletes the release. - -## Upgrading an existing Release to a new major version - -A major chart version change (like v1.2.3 -> v2.0.0) indicates that there is an incompatible breaking change needing manual actions. Until this chart's version reaches `v1.0`, there are no promises of backwards compatibility. - -## Values - -| Key | Type | Default | Description | -|-----|------|---------|-------------| -| affinity | object | `{}` | Pod affinity configuration | -| annotations | object | `{}` | Annotations for the Deployment | -| containerSecurityContext | object | `{}` | Container security context (allowPrivilegeEscalation, etc.) | -| extraArgs | list | `[]` | List of additional cli arguments to configure agent-operator (example: `--log.level`) | -| fullnameOverride | string | `""` | Overrides the chart's computed fullname | -| global.commonLabels | object | `{}` | Common labels for all object directly managed by this chart. | -| hostAliases | list | `[]` | hostAliases to add | -| image.pullPolicy | string | `"IfNotPresent"` | Image pull policy | -| image.pullSecrets | list | `[]` | Image pull secrets | -| image.registry | string | `"docker.io"` | Image registry | -| image.repository | string | `"grafana/agent-operator"` | Image repo | -| image.tag | string | `"v0.44.2"` | Image tag | -| kubeletService | object | `{"namespace":"default","serviceName":"kubelet"}` | If both are set, Agent Operator will create and maintain a service for scraping kubelets https://grafana.com/docs/agent/latest/operator/getting-started/#monitor-kubelets | -| nameOverride | string | `""` | Overrides the chart's name | -| nodeSelector | object | `{}` | nodeSelector configuration | -| podAnnotations | object | `{}` | Annotations for the Deployment Pods | -| podLabels | object | `{}` | Annotations for the Deployment Pods | -| podSecurityContext | object | `{}` | Pod security context (runAsUser, etc.) | -| rbac.create | bool | `true` | Toggle to create ClusterRole and ClusterRoleBinding | -| rbac.podSecurityPolicyName | string | `""` | Name of a PodSecurityPolicy to use in the ClusterRole. If unset, no PodSecurityPolicy is used. | -| resources | object | `{}` | Resource limits and requests config | -| serviceAccount.create | bool | `true` | Toggle to create ServiceAccount | -| serviceAccount.name | string | `nil` | Service account name | -| test.image.registry | string | `"docker.io"` | Test image registry | -| test.image.repository | string | `"library/busybox"` | Test image repo | -| test.image.tag | string | `"latest"` | Test image tag | -| tolerations | list | `[]` | Tolerations applied to Pods | diff --git a/charts/loki/charts/grafana-agent-operator/README.md.gotmpl b/charts/loki/charts/grafana-agent-operator/README.md.gotmpl deleted file mode 100644 index 3dce97a..0000000 --- a/charts/loki/charts/grafana-agent-operator/README.md.gotmpl +++ /dev/null @@ -1,52 +0,0 @@ -{{ template "chart.header" . }} - -{{ template "chart.versionBadge" . }}{{ template "chart.typeBadge" . }}{{ template "chart.appVersionBadge" . }} - -{{ template "chart.description" . }} - -⚠️ **Please create issues relating to this Helm chart in the [Agent](https://github.com/grafana/agent/issues) repo.** - -{{ template "chart.sourcesSection" . }} - -{{ template "chart.requirementsSection" . }} - -Note that this chart does not provision custom resources like `GrafanaAgent` and `MetricsInstance` (formerly `PrometheusInstance`) or any `*Monitor` resources. - -To learn how to deploy these resources, please see Grafana's [Agent Operator getting started guide](https://grafana.com/docs/agent/latest/operator/getting-started/). - -## CRDs - -The CRDs are synced into this chart manually (for now) from the Grafana Agent [GitHub repo](https://github.com/grafana/agent/tree/main/operations/agent-static-operator/crds). To learn more about how Helm manages CRDs, please see [Custom Resource Definitions](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/) from the Helm docs. - -## Get Repo Info - -```console -helm repo add grafana https://grafana.github.io/helm-charts -helm repo update -``` - -_See [helm repo](https://helm.sh/docs/helm/helm_repo/) for command documentation._ - -## Installing the Chart - -To install the chart with the release name `my-release`: - -```console -helm install my-release grafana/grafana-agent-operator -``` - -## Uninstalling the Chart - -To uninstall/delete the my-release deployment: - -```console -helm delete my-release -``` - -The command removes all the Kubernetes components associated with the chart and deletes the release. - -## Upgrading an existing Release to a new major version - -A major chart version change (like v1.2.3 -> v2.0.0) indicates that there is an incompatible breaking change needing manual actions. Until this chart's version reaches `v1.0`, there are no promises of backwards compatibility. - -{{ template "chart.valuesSection" . }} diff --git a/charts/loki/charts/grafana-agent-operator/crds/monitoring.coreos.com_podmonitors.yaml b/charts/loki/charts/grafana-agent-operator/crds/monitoring.coreos.com_podmonitors.yaml deleted file mode 100644 index 153677b..0000000 --- a/charts/loki/charts/grafana-agent-operator/crds/monitoring.coreos.com_podmonitors.yaml +++ /dev/null @@ -1,424 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.9.2 - creationTimestamp: null - name: podmonitors.monitoring.coreos.com -spec: - group: monitoring.coreos.com - names: - categories: - - prometheus-operator - kind: PodMonitor - listKind: PodMonitorList - plural: podmonitors - shortNames: - - pmon - singular: podmonitor - scope: Namespaced - versions: - - name: v1 - schema: - openAPIV3Schema: - properties: - apiVersion: - type: string - kind: - type: string - metadata: - type: object - spec: - properties: - attachMetadata: - properties: - node: - type: boolean - type: object - jobLabel: - type: string - labelLimit: - format: int64 - type: integer - labelNameLengthLimit: - format: int64 - type: integer - labelValueLengthLimit: - format: int64 - type: integer - namespaceSelector: - properties: - any: - type: boolean - matchNames: - items: - type: string - type: array - type: object - podMetricsEndpoints: - items: - properties: - authorization: - properties: - credentials: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: - type: string - type: object - basicAuth: - properties: - password: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - username: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - bearerTokenSecret: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - enableHttp2: - type: boolean - filterRunning: - type: boolean - followRedirects: - type: boolean - honorLabels: - type: boolean - honorTimestamps: - type: boolean - interval: - pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$ - type: string - metricRelabelings: - items: - properties: - action: - default: replace - enum: - - replace - - Replace - - keep - - Keep - - drop - - Drop - - hashmod - - HashMod - - labelmap - - LabelMap - - labeldrop - - LabelDrop - - labelkeep - - LabelKeep - - lowercase - - Lowercase - - uppercase - - Uppercase - - keepequal - - KeepEqual - - dropequal - - DropEqual - type: string - modulus: - format: int64 - type: integer - regex: - type: string - replacement: - type: string - separator: - type: string - sourceLabels: - items: - pattern: ^[a-zA-Z_][a-zA-Z0-9_]*$ - type: string - type: array - targetLabel: - type: string - type: object - type: array - oauth2: - properties: - clientId: - properties: - configMap: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - secret: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - clientSecret: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - endpointParams: - additionalProperties: - type: string - type: object - scopes: - items: - type: string - type: array - tokenUrl: - minLength: 1 - type: string - required: - - clientId - - clientSecret - - tokenUrl - type: object - params: - additionalProperties: - items: - type: string - type: array - type: object - path: - type: string - port: - type: string - proxyUrl: - type: string - relabelings: - items: - properties: - action: - default: replace - enum: - - replace - - Replace - - keep - - Keep - - drop - - Drop - - hashmod - - HashMod - - labelmap - - LabelMap - - labeldrop - - LabelDrop - - labelkeep - - LabelKeep - - lowercase - - Lowercase - - uppercase - - Uppercase - - keepequal - - KeepEqual - - dropequal - - DropEqual - type: string - modulus: - format: int64 - type: integer - regex: - type: string - replacement: - type: string - separator: - type: string - sourceLabels: - items: - pattern: ^[a-zA-Z_][a-zA-Z0-9_]*$ - type: string - type: array - targetLabel: - type: string - type: object - type: array - scheme: - enum: - - http - - https - type: string - scrapeTimeout: - pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$ - type: string - targetPort: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - tlsConfig: - properties: - ca: - properties: - configMap: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - secret: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - cert: - properties: - configMap: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - secret: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - insecureSkipVerify: - type: boolean - keySecret: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - serverName: - type: string - type: object - type: object - type: array - podTargetLabels: - items: - type: string - type: array - sampleLimit: - format: int64 - type: integer - selector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - x-kubernetes-map-type: atomic - targetLimit: - format: int64 - type: integer - required: - - podMetricsEndpoints - - selector - type: object - required: - - spec - type: object - served: true - storage: true diff --git a/charts/loki/charts/grafana-agent-operator/crds/monitoring.coreos.com_probes.yaml b/charts/loki/charts/grafana-agent-operator/crds/monitoring.coreos.com_probes.yaml deleted file mode 100644 index 13fc36f..0000000 --- a/charts/loki/charts/grafana-agent-operator/crds/monitoring.coreos.com_probes.yaml +++ /dev/null @@ -1,458 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.9.2 - creationTimestamp: null - name: probes.monitoring.coreos.com -spec: - group: monitoring.coreos.com - names: - categories: - - prometheus-operator - kind: Probe - listKind: ProbeList - plural: probes - shortNames: - - prb - singular: probe - scope: Namespaced - versions: - - name: v1 - schema: - openAPIV3Schema: - properties: - apiVersion: - type: string - kind: - type: string - metadata: - type: object - spec: - properties: - authorization: - properties: - credentials: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: - type: string - type: object - basicAuth: - properties: - password: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - username: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - bearerTokenSecret: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - interval: - pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$ - type: string - jobName: - type: string - labelLimit: - format: int64 - type: integer - labelNameLengthLimit: - format: int64 - type: integer - labelValueLengthLimit: - format: int64 - type: integer - metricRelabelings: - items: - properties: - action: - default: replace - enum: - - replace - - Replace - - keep - - Keep - - drop - - Drop - - hashmod - - HashMod - - labelmap - - LabelMap - - labeldrop - - LabelDrop - - labelkeep - - LabelKeep - - lowercase - - Lowercase - - uppercase - - Uppercase - - keepequal - - KeepEqual - - dropequal - - DropEqual - type: string - modulus: - format: int64 - type: integer - regex: - type: string - replacement: - type: string - separator: - type: string - sourceLabels: - items: - pattern: ^[a-zA-Z_][a-zA-Z0-9_]*$ - type: string - type: array - targetLabel: - type: string - type: object - type: array - module: - type: string - oauth2: - properties: - clientId: - properties: - configMap: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - secret: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - clientSecret: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - endpointParams: - additionalProperties: - type: string - type: object - scopes: - items: - type: string - type: array - tokenUrl: - minLength: 1 - type: string - required: - - clientId - - clientSecret - - tokenUrl - type: object - prober: - properties: - path: - default: /probe - type: string - proxyUrl: - type: string - scheme: - enum: - - http - - https - type: string - url: - type: string - required: - - url - type: object - sampleLimit: - format: int64 - type: integer - scrapeTimeout: - pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$ - type: string - targetLimit: - format: int64 - type: integer - targets: - properties: - ingress: - properties: - namespaceSelector: - properties: - any: - type: boolean - matchNames: - items: - type: string - type: array - type: object - relabelingConfigs: - items: - properties: - action: - default: replace - enum: - - replace - - Replace - - keep - - Keep - - drop - - Drop - - hashmod - - HashMod - - labelmap - - LabelMap - - labeldrop - - LabelDrop - - labelkeep - - LabelKeep - - lowercase - - Lowercase - - uppercase - - Uppercase - - keepequal - - KeepEqual - - dropequal - - DropEqual - type: string - modulus: - format: int64 - type: integer - regex: - type: string - replacement: - type: string - separator: - type: string - sourceLabels: - items: - pattern: ^[a-zA-Z_][a-zA-Z0-9_]*$ - type: string - type: array - targetLabel: - type: string - type: object - type: array - selector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - x-kubernetes-map-type: atomic - type: object - staticConfig: - properties: - labels: - additionalProperties: - type: string - type: object - relabelingConfigs: - items: - properties: - action: - default: replace - enum: - - replace - - Replace - - keep - - Keep - - drop - - Drop - - hashmod - - HashMod - - labelmap - - LabelMap - - labeldrop - - LabelDrop - - labelkeep - - LabelKeep - - lowercase - - Lowercase - - uppercase - - Uppercase - - keepequal - - KeepEqual - - dropequal - - DropEqual - type: string - modulus: - format: int64 - type: integer - regex: - type: string - replacement: - type: string - separator: - type: string - sourceLabels: - items: - pattern: ^[a-zA-Z_][a-zA-Z0-9_]*$ - type: string - type: array - targetLabel: - type: string - type: object - type: array - static: - items: - type: string - type: array - type: object - type: object - tlsConfig: - properties: - ca: - properties: - configMap: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - secret: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - cert: - properties: - configMap: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - secret: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - insecureSkipVerify: - type: boolean - keySecret: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - serverName: - type: string - type: object - type: object - required: - - spec - type: object - served: true - storage: true diff --git a/charts/loki/charts/grafana-agent-operator/crds/monitoring.coreos.com_servicemonitors.yaml b/charts/loki/charts/grafana-agent-operator/crds/monitoring.coreos.com_servicemonitors.yaml deleted file mode 100644 index ff62f8f..0000000 --- a/charts/loki/charts/grafana-agent-operator/crds/monitoring.coreos.com_servicemonitors.yaml +++ /dev/null @@ -1,436 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.9.2 - creationTimestamp: null - name: servicemonitors.monitoring.coreos.com -spec: - group: monitoring.coreos.com - names: - categories: - - prometheus-operator - kind: ServiceMonitor - listKind: ServiceMonitorList - plural: servicemonitors - shortNames: - - smon - singular: servicemonitor - scope: Namespaced - versions: - - name: v1 - schema: - openAPIV3Schema: - properties: - apiVersion: - type: string - kind: - type: string - metadata: - type: object - spec: - properties: - attachMetadata: - properties: - node: - type: boolean - type: object - endpoints: - items: - properties: - authorization: - properties: - credentials: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: - type: string - type: object - basicAuth: - properties: - password: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - username: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - bearerTokenFile: - type: string - bearerTokenSecret: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - enableHttp2: - type: boolean - filterRunning: - type: boolean - followRedirects: - type: boolean - honorLabels: - type: boolean - honorTimestamps: - type: boolean - interval: - pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$ - type: string - metricRelabelings: - items: - properties: - action: - default: replace - enum: - - replace - - Replace - - keep - - Keep - - drop - - Drop - - hashmod - - HashMod - - labelmap - - LabelMap - - labeldrop - - LabelDrop - - labelkeep - - LabelKeep - - lowercase - - Lowercase - - uppercase - - Uppercase - - keepequal - - KeepEqual - - dropequal - - DropEqual - type: string - modulus: - format: int64 - type: integer - regex: - type: string - replacement: - type: string - separator: - type: string - sourceLabels: - items: - pattern: ^[a-zA-Z_][a-zA-Z0-9_]*$ - type: string - type: array - targetLabel: - type: string - type: object - type: array - oauth2: - properties: - clientId: - properties: - configMap: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - secret: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - clientSecret: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - endpointParams: - additionalProperties: - type: string - type: object - scopes: - items: - type: string - type: array - tokenUrl: - minLength: 1 - type: string - required: - - clientId - - clientSecret - - tokenUrl - type: object - params: - additionalProperties: - items: - type: string - type: array - type: object - path: - type: string - port: - type: string - proxyUrl: - type: string - relabelings: - items: - properties: - action: - default: replace - enum: - - replace - - Replace - - keep - - Keep - - drop - - Drop - - hashmod - - HashMod - - labelmap - - LabelMap - - labeldrop - - LabelDrop - - labelkeep - - LabelKeep - - lowercase - - Lowercase - - uppercase - - Uppercase - - keepequal - - KeepEqual - - dropequal - - DropEqual - type: string - modulus: - format: int64 - type: integer - regex: - type: string - replacement: - type: string - separator: - type: string - sourceLabels: - items: - pattern: ^[a-zA-Z_][a-zA-Z0-9_]*$ - type: string - type: array - targetLabel: - type: string - type: object - type: array - scheme: - enum: - - http - - https - type: string - scrapeTimeout: - pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$ - type: string - targetPort: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - tlsConfig: - properties: - ca: - properties: - configMap: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - secret: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - caFile: - type: string - cert: - properties: - configMap: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - secret: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - certFile: - type: string - insecureSkipVerify: - type: boolean - keyFile: - type: string - keySecret: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - serverName: - type: string - type: object - type: object - type: array - jobLabel: - type: string - labelLimit: - format: int64 - type: integer - labelNameLengthLimit: - format: int64 - type: integer - labelValueLengthLimit: - format: int64 - type: integer - namespaceSelector: - properties: - any: - type: boolean - matchNames: - items: - type: string - type: array - type: object - podTargetLabels: - items: - type: string - type: array - sampleLimit: - format: int64 - type: integer - selector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - x-kubernetes-map-type: atomic - targetLabels: - items: - type: string - type: array - targetLimit: - format: int64 - type: integer - required: - - endpoints - - selector - type: object - required: - - spec - type: object - served: true - storage: true diff --git a/charts/loki/charts/grafana-agent-operator/crds/monitoring.grafana.com_grafanaagents.yaml b/charts/loki/charts/grafana-agent-operator/crds/monitoring.grafana.com_grafanaagents.yaml deleted file mode 100644 index 4ec31d6..0000000 --- a/charts/loki/charts/grafana-agent-operator/crds/monitoring.grafana.com_grafanaagents.yaml +++ /dev/null @@ -1,3711 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.9.2 - creationTimestamp: null - name: grafanaagents.monitoring.grafana.com -spec: - group: monitoring.grafana.com - names: - categories: - - agent-operator - kind: GrafanaAgent - listKind: GrafanaAgentList - plural: grafanaagents - singular: grafanaagent - scope: Namespaced - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - properties: - apiVersion: - type: string - kind: - type: string - metadata: - type: object - spec: - properties: - affinity: - properties: - nodeAffinity: - properties: - preferredDuringSchedulingIgnoredDuringExecution: - items: - properties: - preference: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - x-kubernetes-map-type: atomic - weight: - format: int32 - type: integer - required: - - preference - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - properties: - nodeSelectorTerms: - items: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - x-kubernetes-map-type: atomic - type: array - required: - - nodeSelectorTerms - type: object - x-kubernetes-map-type: atomic - type: object - podAffinity: - properties: - preferredDuringSchedulingIgnoredDuringExecution: - items: - properties: - podAffinityTerm: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - x-kubernetes-map-type: atomic - namespaceSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - items: - type: string - type: array - topologyKey: - type: string - required: - - topologyKey - type: object - weight: - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - items: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - x-kubernetes-map-type: atomic - namespaceSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - items: - type: string - type: array - topologyKey: - type: string - required: - - topologyKey - type: object - type: array - type: object - podAntiAffinity: - properties: - preferredDuringSchedulingIgnoredDuringExecution: - items: - properties: - podAffinityTerm: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - x-kubernetes-map-type: atomic - namespaceSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - items: - type: string - type: array - topologyKey: - type: string - required: - - topologyKey - type: object - weight: - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - items: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - x-kubernetes-map-type: atomic - namespaceSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - items: - type: string - type: array - topologyKey: - type: string - required: - - topologyKey - type: object - type: array - type: object - type: object - apiServer: - properties: - authorization: - properties: - credentials: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - credentialsFile: - type: string - type: - type: string - type: object - basicAuth: - properties: - password: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - username: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - bearerToken: - type: string - bearerTokenFile: - type: string - host: - type: string - tlsConfig: - properties: - ca: - properties: - configMap: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - secret: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - caFile: - type: string - cert: - properties: - configMap: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - secret: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - certFile: - type: string - insecureSkipVerify: - type: boolean - keyFile: - type: string - keySecret: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - serverName: - type: string - type: object - required: - - host - type: object - configMaps: - items: - type: string - type: array - configReloaderImage: - type: string - configReloaderVersion: - type: string - containers: - items: - properties: - args: - items: - type: string - type: array - command: - items: - type: string - type: array - env: - items: - properties: - name: - type: string - value: - type: string - valueFrom: - properties: - configMapKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - properties: - containerName: - type: string - divisor: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array - envFrom: - items: - properties: - configMapRef: - properties: - name: - type: string - optional: - type: boolean - type: object - x-kubernetes-map-type: atomic - prefix: - type: string - secretRef: - properties: - name: - type: string - optional: - type: boolean - type: object - x-kubernetes-map-type: atomic - type: object - type: array - image: - type: string - imagePullPolicy: - type: string - lifecycle: - properties: - postStart: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - preStop: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - type: object - livenessProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - grpc: - properties: - port: - format: int32 - type: integer - service: - type: string - required: - - port - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - format: int64 - type: integer - timeoutSeconds: - format: int32 - type: integer - type: object - name: - type: string - ports: - items: - properties: - containerPort: - format: int32 - type: integer - hostIP: - type: string - hostPort: - format: int32 - type: integer - name: - type: string - protocol: - default: TCP - type: string - required: - - containerPort - type: object - type: array - x-kubernetes-list-map-keys: - - containerPort - - protocol - x-kubernetes-list-type: map - readinessProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - grpc: - properties: - port: - format: int32 - type: integer - service: - type: string - required: - - port - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - format: int64 - type: integer - timeoutSeconds: - format: int32 - type: integer - type: object - resizePolicy: - items: - properties: - resourceName: - type: string - restartPolicy: - type: string - required: - - resourceName - - restartPolicy - type: object - type: array - x-kubernetes-list-type: atomic - resources: - properties: - claims: - items: - properties: - name: - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object - restartPolicy: - type: string - securityContext: - properties: - allowPrivilegeEscalation: - type: boolean - capabilities: - properties: - add: - items: - type: string - type: array - drop: - items: - type: string - type: array - type: object - privileged: - type: boolean - procMount: - type: string - readOnlyRootFilesystem: - type: boolean - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: - properties: - level: - type: string - role: - type: string - type: - type: string - user: - type: string - type: object - seccompProfile: - properties: - localhostProfile: - type: string - type: - type: string - required: - - type - type: object - windowsOptions: - properties: - gmsaCredentialSpec: - type: string - gmsaCredentialSpecName: - type: string - hostProcess: - type: boolean - runAsUserName: - type: string - type: object - type: object - startupProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - grpc: - properties: - port: - format: int32 - type: integer - service: - type: string - required: - - port - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - format: int64 - type: integer - timeoutSeconds: - format: int32 - type: integer - type: object - stdin: - type: boolean - stdinOnce: - type: boolean - terminationMessagePath: - type: string - terminationMessagePolicy: - type: string - tty: - type: boolean - volumeDevices: - items: - properties: - devicePath: - type: string - name: - type: string - required: - - devicePath - - name - type: object - type: array - volumeMounts: - items: - properties: - mountPath: - type: string - mountPropagation: - type: string - name: - type: string - readOnly: - type: boolean - subPath: - type: string - subPathExpr: - type: string - required: - - mountPath - - name - type: object - type: array - workingDir: - type: string - required: - - name - type: object - type: array - disableReporting: - default: false - type: boolean - disableSupportBundle: - default: false - type: boolean - enableConfigReadAPI: - default: false - type: boolean - image: - type: string - imagePullSecrets: - items: - properties: - name: - type: string - type: object - x-kubernetes-map-type: atomic - type: array - initContainers: - items: - properties: - args: - items: - type: string - type: array - command: - items: - type: string - type: array - env: - items: - properties: - name: - type: string - value: - type: string - valueFrom: - properties: - configMapKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - properties: - containerName: - type: string - divisor: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array - envFrom: - items: - properties: - configMapRef: - properties: - name: - type: string - optional: - type: boolean - type: object - x-kubernetes-map-type: atomic - prefix: - type: string - secretRef: - properties: - name: - type: string - optional: - type: boolean - type: object - x-kubernetes-map-type: atomic - type: object - type: array - image: - type: string - imagePullPolicy: - type: string - lifecycle: - properties: - postStart: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - preStop: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - type: object - livenessProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - grpc: - properties: - port: - format: int32 - type: integer - service: - type: string - required: - - port - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - format: int64 - type: integer - timeoutSeconds: - format: int32 - type: integer - type: object - name: - type: string - ports: - items: - properties: - containerPort: - format: int32 - type: integer - hostIP: - type: string - hostPort: - format: int32 - type: integer - name: - type: string - protocol: - default: TCP - type: string - required: - - containerPort - type: object - type: array - x-kubernetes-list-map-keys: - - containerPort - - protocol - x-kubernetes-list-type: map - readinessProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - grpc: - properties: - port: - format: int32 - type: integer - service: - type: string - required: - - port - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - format: int64 - type: integer - timeoutSeconds: - format: int32 - type: integer - type: object - resizePolicy: - items: - properties: - resourceName: - type: string - restartPolicy: - type: string - required: - - resourceName - - restartPolicy - type: object - type: array - x-kubernetes-list-type: atomic - resources: - properties: - claims: - items: - properties: - name: - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object - restartPolicy: - type: string - securityContext: - properties: - allowPrivilegeEscalation: - type: boolean - capabilities: - properties: - add: - items: - type: string - type: array - drop: - items: - type: string - type: array - type: object - privileged: - type: boolean - procMount: - type: string - readOnlyRootFilesystem: - type: boolean - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: - properties: - level: - type: string - role: - type: string - type: - type: string - user: - type: string - type: object - seccompProfile: - properties: - localhostProfile: - type: string - type: - type: string - required: - - type - type: object - windowsOptions: - properties: - gmsaCredentialSpec: - type: string - gmsaCredentialSpecName: - type: string - hostProcess: - type: boolean - runAsUserName: - type: string - type: object - type: object - startupProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - grpc: - properties: - port: - format: int32 - type: integer - service: - type: string - required: - - port - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - format: int64 - type: integer - timeoutSeconds: - format: int32 - type: integer - type: object - stdin: - type: boolean - stdinOnce: - type: boolean - terminationMessagePath: - type: string - terminationMessagePolicy: - type: string - tty: - type: boolean - volumeDevices: - items: - properties: - devicePath: - type: string - name: - type: string - required: - - devicePath - - name - type: object - type: array - volumeMounts: - items: - properties: - mountPath: - type: string - mountPropagation: - type: string - name: - type: string - readOnly: - type: boolean - subPath: - type: string - subPathExpr: - type: string - required: - - mountPath - - name - type: object - type: array - workingDir: - type: string - required: - - name - type: object - type: array - integrations: - properties: - namespaceSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - x-kubernetes-map-type: atomic - selector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - x-kubernetes-map-type: atomic - type: object - logFormat: - type: string - logLevel: - type: string - logs: - properties: - clients: - items: - properties: - backoffConfig: - properties: - maxPeriod: - type: string - maxRetries: - type: integer - minPeriod: - type: string - type: object - basicAuth: - properties: - password: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - username: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - batchSize: - type: integer - batchWait: - type: string - bearerToken: - type: string - bearerTokenFile: - type: string - externalLabels: - additionalProperties: - type: string - type: object - oauth2: - properties: - clientId: - properties: - configMap: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - secret: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - clientSecret: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - endpointParams: - additionalProperties: - type: string - type: object - scopes: - items: - type: string - type: array - tokenUrl: - minLength: 1 - type: string - required: - - clientId - - clientSecret - - tokenUrl - type: object - proxyUrl: - type: string - tenantId: - type: string - timeout: - type: string - tlsConfig: - properties: - ca: - properties: - configMap: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - secret: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - caFile: - type: string - cert: - properties: - configMap: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - secret: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - certFile: - type: string - insecureSkipVerify: - type: boolean - keyFile: - type: string - keySecret: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - serverName: - type: string - type: object - url: - type: string - required: - - url - type: object - type: array - enforcedNamespaceLabel: - type: string - ignoreNamespaceSelectors: - type: boolean - instanceNamespaceSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - x-kubernetes-map-type: atomic - instanceSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - x-kubernetes-map-type: atomic - logsExternalLabelName: - type: string - type: object - metrics: - properties: - arbitraryFSAccessThroughSMs: - properties: - deny: - type: boolean - type: object - enforcedNamespaceLabel: - type: string - enforcedSampleLimit: - format: int64 - type: integer - enforcedTargetLimit: - format: int64 - type: integer - externalLabels: - additionalProperties: - type: string - type: object - ignoreNamespaceSelectors: - type: boolean - instanceNamespaceSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - x-kubernetes-map-type: atomic - instanceSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - x-kubernetes-map-type: atomic - metricsExternalLabelName: - type: string - overrideHonorLabels: - type: boolean - overrideHonorTimestamps: - type: boolean - remoteWrite: - items: - properties: - basicAuth: - properties: - password: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - username: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - bearerToken: - type: string - bearerTokenFile: - type: string - headers: - additionalProperties: - type: string - type: object - metadataConfig: - properties: - send: - type: boolean - sendInterval: - type: string - type: object - name: - type: string - oauth2: - properties: - clientId: - properties: - configMap: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - secret: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - clientSecret: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - endpointParams: - additionalProperties: - type: string - type: object - scopes: - items: - type: string - type: array - tokenUrl: - minLength: 1 - type: string - required: - - clientId - - clientSecret - - tokenUrl - type: object - proxyUrl: - type: string - queueConfig: - properties: - batchSendDeadline: - type: string - capacity: - type: integer - maxBackoff: - type: string - maxRetries: - type: integer - maxSamplesPerSend: - type: integer - maxShards: - type: integer - minBackoff: - type: string - minShards: - type: integer - retryOnRateLimit: - type: boolean - type: object - remoteTimeout: - type: string - sigv4: - properties: - accessKey: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - profile: - type: string - region: - type: string - roleARN: - type: string - secretKey: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - tlsConfig: - properties: - ca: - properties: - configMap: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - secret: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - caFile: - type: string - cert: - properties: - configMap: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - secret: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - certFile: - type: string - insecureSkipVerify: - type: boolean - keyFile: - type: string - keySecret: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - serverName: - type: string - type: object - url: - type: string - writeRelabelConfigs: - items: - properties: - action: - default: replace - enum: - - replace - - Replace - - keep - - Keep - - drop - - Drop - - hashmod - - HashMod - - labelmap - - LabelMap - - labeldrop - - LabelDrop - - labelkeep - - LabelKeep - - lowercase - - Lowercase - - uppercase - - Uppercase - - keepequal - - KeepEqual - - dropequal - - DropEqual - type: string - modulus: - format: int64 - type: integer - regex: - type: string - replacement: - type: string - separator: - type: string - sourceLabels: - items: - pattern: ^[a-zA-Z_][a-zA-Z0-9_]*$ - type: string - type: array - targetLabel: - type: string - type: object - type: array - required: - - url - type: object - type: array - replicaExternalLabelName: - type: string - replicas: - format: int32 - type: integer - scrapeInterval: - type: string - scrapeTimeout: - type: string - shards: - format: int32 - type: integer - type: object - nodeSelector: - additionalProperties: - type: string - type: object - paused: - type: boolean - podMetadata: - properties: - annotations: - additionalProperties: - type: string - type: object - labels: - additionalProperties: - type: string - type: object - name: - type: string - type: object - portName: - type: string - priorityClassName: - type: string - resources: - properties: - claims: - items: - properties: - name: - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object - runtimeClassName: - type: string - secrets: - items: - type: string - type: array - securityContext: - properties: - fsGroup: - format: int64 - type: integer - fsGroupChangePolicy: - type: string - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: - properties: - level: - type: string - role: - type: string - type: - type: string - user: - type: string - type: object - seccompProfile: - properties: - localhostProfile: - type: string - type: - type: string - required: - - type - type: object - supplementalGroups: - items: - format: int64 - type: integer - type: array - sysctls: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - windowsOptions: - properties: - gmsaCredentialSpec: - type: string - gmsaCredentialSpecName: - type: string - hostProcess: - type: boolean - runAsUserName: - type: string - type: object - type: object - serviceAccountName: - type: string - storage: - properties: - disableMountSubPath: - type: boolean - emptyDir: - properties: - medium: - type: string - sizeLimit: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - ephemeral: - properties: - volumeClaimTemplate: - properties: - metadata: - type: object - spec: - properties: - accessModes: - items: - type: string - type: array - dataSource: - properties: - apiGroup: - type: string - kind: - type: string - name: - type: string - required: - - kind - - name - type: object - x-kubernetes-map-type: atomic - dataSourceRef: - properties: - apiGroup: - type: string - kind: - type: string - name: - type: string - namespace: - type: string - required: - - kind - - name - type: object - resources: - properties: - claims: - items: - properties: - name: - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object - selector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - x-kubernetes-map-type: atomic - storageClassName: - type: string - volumeMode: - type: string - volumeName: - type: string - type: object - required: - - spec - type: object - type: object - volumeClaimTemplate: - properties: - apiVersion: - type: string - kind: - type: string - metadata: - properties: - annotations: - additionalProperties: - type: string - type: object - labels: - additionalProperties: - type: string - type: object - name: - type: string - type: object - spec: - properties: - accessModes: - items: - type: string - type: array - dataSource: - properties: - apiGroup: - type: string - kind: - type: string - name: - type: string - required: - - kind - - name - type: object - x-kubernetes-map-type: atomic - dataSourceRef: - properties: - apiGroup: - type: string - kind: - type: string - name: - type: string - namespace: - type: string - required: - - kind - - name - type: object - resources: - properties: - claims: - items: - properties: - name: - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object - selector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - x-kubernetes-map-type: atomic - storageClassName: - type: string - volumeMode: - type: string - volumeName: - type: string - type: object - status: - properties: - accessModes: - items: - type: string - type: array - allocatedResourceStatuses: - additionalProperties: - type: string - type: object - x-kubernetes-map-type: granular - allocatedResources: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - capacity: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - conditions: - items: - properties: - lastProbeTime: - format: date-time - type: string - lastTransitionTime: - format: date-time - type: string - message: - type: string - reason: - type: string - status: - type: string - type: - type: string - required: - - status - - type - type: object - type: array - phase: - type: string - type: object - type: object - type: object - tolerations: - items: - properties: - effect: - type: string - key: - type: string - operator: - type: string - tolerationSeconds: - format: int64 - type: integer - value: - type: string - type: object - type: array - topologySpreadConstraints: - items: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - items: - type: string - type: array - x-kubernetes-list-type: atomic - maxSkew: - format: int32 - type: integer - minDomains: - format: int32 - type: integer - nodeAffinityPolicy: - type: string - nodeTaintsPolicy: - type: string - topologyKey: - type: string - whenUnsatisfiable: - type: string - required: - - maxSkew - - topologyKey - - whenUnsatisfiable - type: object - type: array - version: - type: string - volumeMounts: - items: - properties: - mountPath: - type: string - mountPropagation: - type: string - name: - type: string - readOnly: - type: boolean - subPath: - type: string - subPathExpr: - type: string - required: - - mountPath - - name - type: object - type: array - volumes: - items: - properties: - awsElasticBlockStore: - properties: - fsType: - type: string - partition: - format: int32 - type: integer - readOnly: - type: boolean - volumeID: - type: string - required: - - volumeID - type: object - azureDisk: - properties: - cachingMode: - type: string - diskName: - type: string - diskURI: - type: string - fsType: - type: string - kind: - type: string - readOnly: - type: boolean - required: - - diskName - - diskURI - type: object - azureFile: - properties: - readOnly: - type: boolean - secretName: - type: string - shareName: - type: string - required: - - secretName - - shareName - type: object - cephfs: - properties: - monitors: - items: - type: string - type: array - path: - type: string - readOnly: - type: boolean - secretFile: - type: string - secretRef: - properties: - name: - type: string - type: object - x-kubernetes-map-type: atomic - user: - type: string - required: - - monitors - type: object - cinder: - properties: - fsType: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - x-kubernetes-map-type: atomic - volumeID: - type: string - required: - - volumeID - type: object - configMap: - properties: - defaultMode: - format: int32 - type: integer - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - name: - type: string - optional: - type: boolean - type: object - x-kubernetes-map-type: atomic - csi: - properties: - driver: - type: string - fsType: - type: string - nodePublishSecretRef: - properties: - name: - type: string - type: object - x-kubernetes-map-type: atomic - readOnly: - type: boolean - volumeAttributes: - additionalProperties: - type: string - type: object - required: - - driver - type: object - downwardAPI: - properties: - defaultMode: - format: int32 - type: integer - items: - items: - properties: - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - mode: - format: int32 - type: integer - path: - type: string - resourceFieldRef: - properties: - containerName: - type: string - divisor: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - required: - - path - type: object - type: array - type: object - emptyDir: - properties: - medium: - type: string - sizeLimit: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - ephemeral: - properties: - volumeClaimTemplate: - properties: - metadata: - type: object - spec: - properties: - accessModes: - items: - type: string - type: array - dataSource: - properties: - apiGroup: - type: string - kind: - type: string - name: - type: string - required: - - kind - - name - type: object - x-kubernetes-map-type: atomic - dataSourceRef: - properties: - apiGroup: - type: string - kind: - type: string - name: - type: string - namespace: - type: string - required: - - kind - - name - type: object - resources: - properties: - claims: - items: - properties: - name: - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object - selector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - x-kubernetes-map-type: atomic - storageClassName: - type: string - volumeMode: - type: string - volumeName: - type: string - type: object - required: - - spec - type: object - type: object - fc: - properties: - fsType: - type: string - lun: - format: int32 - type: integer - readOnly: - type: boolean - targetWWNs: - items: - type: string - type: array - wwids: - items: - type: string - type: array - type: object - flexVolume: - properties: - driver: - type: string - fsType: - type: string - options: - additionalProperties: - type: string - type: object - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - x-kubernetes-map-type: atomic - required: - - driver - type: object - flocker: - properties: - datasetName: - type: string - datasetUUID: - type: string - type: object - gcePersistentDisk: - properties: - fsType: - type: string - partition: - format: int32 - type: integer - pdName: - type: string - readOnly: - type: boolean - required: - - pdName - type: object - gitRepo: - properties: - directory: - type: string - repository: - type: string - revision: - type: string - required: - - repository - type: object - glusterfs: - properties: - endpoints: - type: string - path: - type: string - readOnly: - type: boolean - required: - - endpoints - - path - type: object - hostPath: - properties: - path: - type: string - type: - type: string - required: - - path - type: object - iscsi: - properties: - chapAuthDiscovery: - type: boolean - chapAuthSession: - type: boolean - fsType: - type: string - initiatorName: - type: string - iqn: - type: string - iscsiInterface: - type: string - lun: - format: int32 - type: integer - portals: - items: - type: string - type: array - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - x-kubernetes-map-type: atomic - targetPortal: - type: string - required: - - iqn - - lun - - targetPortal - type: object - name: - type: string - nfs: - properties: - path: - type: string - readOnly: - type: boolean - server: - type: string - required: - - path - - server - type: object - persistentVolumeClaim: - properties: - claimName: - type: string - readOnly: - type: boolean - required: - - claimName - type: object - photonPersistentDisk: - properties: - fsType: - type: string - pdID: - type: string - required: - - pdID - type: object - portworxVolume: - properties: - fsType: - type: string - readOnly: - type: boolean - volumeID: - type: string - required: - - volumeID - type: object - projected: - properties: - defaultMode: - format: int32 - type: integer - sources: - items: - properties: - configMap: - properties: - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - name: - type: string - optional: - type: boolean - type: object - x-kubernetes-map-type: atomic - downwardAPI: - properties: - items: - items: - properties: - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - mode: - format: int32 - type: integer - path: - type: string - resourceFieldRef: - properties: - containerName: - type: string - divisor: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - required: - - path - type: object - type: array - type: object - secret: - properties: - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - name: - type: string - optional: - type: boolean - type: object - x-kubernetes-map-type: atomic - serviceAccountToken: - properties: - audience: - type: string - expirationSeconds: - format: int64 - type: integer - path: - type: string - required: - - path - type: object - type: object - type: array - type: object - quobyte: - properties: - group: - type: string - readOnly: - type: boolean - registry: - type: string - tenant: - type: string - user: - type: string - volume: - type: string - required: - - registry - - volume - type: object - rbd: - properties: - fsType: - type: string - image: - type: string - keyring: - type: string - monitors: - items: - type: string - type: array - pool: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - x-kubernetes-map-type: atomic - user: - type: string - required: - - image - - monitors - type: object - scaleIO: - properties: - fsType: - type: string - gateway: - type: string - protectionDomain: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - x-kubernetes-map-type: atomic - sslEnabled: - type: boolean - storageMode: - type: string - storagePool: - type: string - system: - type: string - volumeName: - type: string - required: - - gateway - - secretRef - - system - type: object - secret: - properties: - defaultMode: - format: int32 - type: integer - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - optional: - type: boolean - secretName: - type: string - type: object - storageos: - properties: - fsType: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - x-kubernetes-map-type: atomic - volumeName: - type: string - volumeNamespace: - type: string - type: object - vsphereVolume: - properties: - fsType: - type: string - storagePolicyID: - type: string - storagePolicyName: - type: string - volumePath: - type: string - required: - - volumePath - type: object - required: - - name - type: object - type: array - type: object - type: object - served: true - storage: true diff --git a/charts/loki/charts/grafana-agent-operator/crds/monitoring.grafana.com_integrations.yaml b/charts/loki/charts/grafana-agent-operator/crds/monitoring.grafana.com_integrations.yaml deleted file mode 100644 index 960b2f7..0000000 --- a/charts/loki/charts/grafana-agent-operator/crds/monitoring.grafana.com_integrations.yaml +++ /dev/null @@ -1,810 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.9.2 - creationTimestamp: null - name: integrations.monitoring.grafana.com -spec: - group: monitoring.grafana.com - names: - categories: - - agent-operator - kind: Integration - listKind: IntegrationList - plural: integrations - singular: integration - scope: Namespaced - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - properties: - apiVersion: - type: string - kind: - type: string - metadata: - type: object - spec: - properties: - config: - type: object - x-kubernetes-preserve-unknown-fields: true - configMaps: - items: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: array - name: - type: string - secrets: - items: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: array - type: - properties: - allNodes: - type: boolean - unique: - type: boolean - type: object - volumeMounts: - items: - properties: - mountPath: - type: string - mountPropagation: - type: string - name: - type: string - readOnly: - type: boolean - subPath: - type: string - subPathExpr: - type: string - required: - - mountPath - - name - type: object - type: array - volumes: - items: - properties: - awsElasticBlockStore: - properties: - fsType: - type: string - partition: - format: int32 - type: integer - readOnly: - type: boolean - volumeID: - type: string - required: - - volumeID - type: object - azureDisk: - properties: - cachingMode: - type: string - diskName: - type: string - diskURI: - type: string - fsType: - type: string - kind: - type: string - readOnly: - type: boolean - required: - - diskName - - diskURI - type: object - azureFile: - properties: - readOnly: - type: boolean - secretName: - type: string - shareName: - type: string - required: - - secretName - - shareName - type: object - cephfs: - properties: - monitors: - items: - type: string - type: array - path: - type: string - readOnly: - type: boolean - secretFile: - type: string - secretRef: - properties: - name: - type: string - type: object - x-kubernetes-map-type: atomic - user: - type: string - required: - - monitors - type: object - cinder: - properties: - fsType: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - x-kubernetes-map-type: atomic - volumeID: - type: string - required: - - volumeID - type: object - configMap: - properties: - defaultMode: - format: int32 - type: integer - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - name: - type: string - optional: - type: boolean - type: object - x-kubernetes-map-type: atomic - csi: - properties: - driver: - type: string - fsType: - type: string - nodePublishSecretRef: - properties: - name: - type: string - type: object - x-kubernetes-map-type: atomic - readOnly: - type: boolean - volumeAttributes: - additionalProperties: - type: string - type: object - required: - - driver - type: object - downwardAPI: - properties: - defaultMode: - format: int32 - type: integer - items: - items: - properties: - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - mode: - format: int32 - type: integer - path: - type: string - resourceFieldRef: - properties: - containerName: - type: string - divisor: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - required: - - path - type: object - type: array - type: object - emptyDir: - properties: - medium: - type: string - sizeLimit: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - ephemeral: - properties: - volumeClaimTemplate: - properties: - metadata: - type: object - spec: - properties: - accessModes: - items: - type: string - type: array - dataSource: - properties: - apiGroup: - type: string - kind: - type: string - name: - type: string - required: - - kind - - name - type: object - x-kubernetes-map-type: atomic - dataSourceRef: - properties: - apiGroup: - type: string - kind: - type: string - name: - type: string - namespace: - type: string - required: - - kind - - name - type: object - resources: - properties: - claims: - items: - properties: - name: - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object - selector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - x-kubernetes-map-type: atomic - storageClassName: - type: string - volumeMode: - type: string - volumeName: - type: string - type: object - required: - - spec - type: object - type: object - fc: - properties: - fsType: - type: string - lun: - format: int32 - type: integer - readOnly: - type: boolean - targetWWNs: - items: - type: string - type: array - wwids: - items: - type: string - type: array - type: object - flexVolume: - properties: - driver: - type: string - fsType: - type: string - options: - additionalProperties: - type: string - type: object - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - x-kubernetes-map-type: atomic - required: - - driver - type: object - flocker: - properties: - datasetName: - type: string - datasetUUID: - type: string - type: object - gcePersistentDisk: - properties: - fsType: - type: string - partition: - format: int32 - type: integer - pdName: - type: string - readOnly: - type: boolean - required: - - pdName - type: object - gitRepo: - properties: - directory: - type: string - repository: - type: string - revision: - type: string - required: - - repository - type: object - glusterfs: - properties: - endpoints: - type: string - path: - type: string - readOnly: - type: boolean - required: - - endpoints - - path - type: object - hostPath: - properties: - path: - type: string - type: - type: string - required: - - path - type: object - iscsi: - properties: - chapAuthDiscovery: - type: boolean - chapAuthSession: - type: boolean - fsType: - type: string - initiatorName: - type: string - iqn: - type: string - iscsiInterface: - type: string - lun: - format: int32 - type: integer - portals: - items: - type: string - type: array - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - x-kubernetes-map-type: atomic - targetPortal: - type: string - required: - - iqn - - lun - - targetPortal - type: object - name: - type: string - nfs: - properties: - path: - type: string - readOnly: - type: boolean - server: - type: string - required: - - path - - server - type: object - persistentVolumeClaim: - properties: - claimName: - type: string - readOnly: - type: boolean - required: - - claimName - type: object - photonPersistentDisk: - properties: - fsType: - type: string - pdID: - type: string - required: - - pdID - type: object - portworxVolume: - properties: - fsType: - type: string - readOnly: - type: boolean - volumeID: - type: string - required: - - volumeID - type: object - projected: - properties: - defaultMode: - format: int32 - type: integer - sources: - items: - properties: - configMap: - properties: - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - name: - type: string - optional: - type: boolean - type: object - x-kubernetes-map-type: atomic - downwardAPI: - properties: - items: - items: - properties: - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - mode: - format: int32 - type: integer - path: - type: string - resourceFieldRef: - properties: - containerName: - type: string - divisor: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - required: - - path - type: object - type: array - type: object - secret: - properties: - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - name: - type: string - optional: - type: boolean - type: object - x-kubernetes-map-type: atomic - serviceAccountToken: - properties: - audience: - type: string - expirationSeconds: - format: int64 - type: integer - path: - type: string - required: - - path - type: object - type: object - type: array - type: object - quobyte: - properties: - group: - type: string - readOnly: - type: boolean - registry: - type: string - tenant: - type: string - user: - type: string - volume: - type: string - required: - - registry - - volume - type: object - rbd: - properties: - fsType: - type: string - image: - type: string - keyring: - type: string - monitors: - items: - type: string - type: array - pool: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - x-kubernetes-map-type: atomic - user: - type: string - required: - - image - - monitors - type: object - scaleIO: - properties: - fsType: - type: string - gateway: - type: string - protectionDomain: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - x-kubernetes-map-type: atomic - sslEnabled: - type: boolean - storageMode: - type: string - storagePool: - type: string - system: - type: string - volumeName: - type: string - required: - - gateway - - secretRef - - system - type: object - secret: - properties: - defaultMode: - format: int32 - type: integer - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - optional: - type: boolean - secretName: - type: string - type: object - storageos: - properties: - fsType: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - x-kubernetes-map-type: atomic - volumeName: - type: string - volumeNamespace: - type: string - type: object - vsphereVolume: - properties: - fsType: - type: string - storagePolicyID: - type: string - storagePolicyName: - type: string - volumePath: - type: string - required: - - volumePath - type: object - required: - - name - type: object - type: array - required: - - config - - name - - type - type: object - type: object - served: true - storage: true diff --git a/charts/loki/charts/grafana-agent-operator/crds/monitoring.grafana.com_logsinstances.yaml b/charts/loki/charts/grafana-agent-operator/crds/monitoring.grafana.com_logsinstances.yaml deleted file mode 100644 index 517bb30..0000000 --- a/charts/loki/charts/grafana-agent-operator/crds/monitoring.grafana.com_logsinstances.yaml +++ /dev/null @@ -1,299 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.9.2 - creationTimestamp: null - name: logsinstances.monitoring.grafana.com -spec: - group: monitoring.grafana.com - names: - categories: - - agent-operator - kind: LogsInstance - listKind: LogsInstanceList - plural: logsinstances - singular: logsinstance - scope: Namespaced - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - properties: - apiVersion: - type: string - kind: - type: string - metadata: - type: object - spec: - properties: - additionalScrapeConfigs: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - clients: - items: - properties: - backoffConfig: - properties: - maxPeriod: - type: string - maxRetries: - type: integer - minPeriod: - type: string - type: object - basicAuth: - properties: - password: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - username: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - batchSize: - type: integer - batchWait: - type: string - bearerToken: - type: string - bearerTokenFile: - type: string - externalLabels: - additionalProperties: - type: string - type: object - oauth2: - properties: - clientId: - properties: - configMap: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - secret: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - clientSecret: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - endpointParams: - additionalProperties: - type: string - type: object - scopes: - items: - type: string - type: array - tokenUrl: - minLength: 1 - type: string - required: - - clientId - - clientSecret - - tokenUrl - type: object - proxyUrl: - type: string - tenantId: - type: string - timeout: - type: string - tlsConfig: - properties: - ca: - properties: - configMap: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - secret: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - caFile: - type: string - cert: - properties: - configMap: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - secret: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - certFile: - type: string - insecureSkipVerify: - type: boolean - keyFile: - type: string - keySecret: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - serverName: - type: string - type: object - url: - type: string - required: - - url - type: object - type: array - podLogsNamespaceSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - x-kubernetes-map-type: atomic - podLogsSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - x-kubernetes-map-type: atomic - targetConfig: - properties: - syncPeriod: - type: string - type: object - type: object - type: object - served: true - storage: true diff --git a/charts/loki/charts/grafana-agent-operator/crds/monitoring.grafana.com_metricsinstances.yaml b/charts/loki/charts/grafana-agent-operator/crds/monitoring.grafana.com_metricsinstances.yaml deleted file mode 100644 index 610193f..0000000 --- a/charts/loki/charts/grafana-agent-operator/crds/monitoring.grafana.com_metricsinstances.yaml +++ /dev/null @@ -1,495 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.9.2 - creationTimestamp: null - name: metricsinstances.monitoring.grafana.com -spec: - group: monitoring.grafana.com - names: - categories: - - agent-operator - kind: MetricsInstance - listKind: MetricsInstanceList - plural: metricsinstances - singular: metricsinstance - scope: Namespaced - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - properties: - apiVersion: - type: string - kind: - type: string - metadata: - type: object - spec: - properties: - additionalScrapeConfigs: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - maxWALTime: - type: string - minWALTime: - type: string - podMonitorNamespaceSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - x-kubernetes-map-type: atomic - podMonitorSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - x-kubernetes-map-type: atomic - probeNamespaceSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - x-kubernetes-map-type: atomic - probeSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - x-kubernetes-map-type: atomic - remoteFlushDeadline: - type: string - remoteWrite: - items: - properties: - basicAuth: - properties: - password: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - username: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - bearerToken: - type: string - bearerTokenFile: - type: string - headers: - additionalProperties: - type: string - type: object - metadataConfig: - properties: - send: - type: boolean - sendInterval: - type: string - type: object - name: - type: string - oauth2: - properties: - clientId: - properties: - configMap: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - secret: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - clientSecret: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - endpointParams: - additionalProperties: - type: string - type: object - scopes: - items: - type: string - type: array - tokenUrl: - minLength: 1 - type: string - required: - - clientId - - clientSecret - - tokenUrl - type: object - proxyUrl: - type: string - queueConfig: - properties: - batchSendDeadline: - type: string - capacity: - type: integer - maxBackoff: - type: string - maxRetries: - type: integer - maxSamplesPerSend: - type: integer - maxShards: - type: integer - minBackoff: - type: string - minShards: - type: integer - retryOnRateLimit: - type: boolean - type: object - remoteTimeout: - type: string - sigv4: - properties: - accessKey: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - profile: - type: string - region: - type: string - roleARN: - type: string - secretKey: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - tlsConfig: - properties: - ca: - properties: - configMap: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - secret: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - caFile: - type: string - cert: - properties: - configMap: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - secret: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - certFile: - type: string - insecureSkipVerify: - type: boolean - keyFile: - type: string - keySecret: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - serverName: - type: string - type: object - url: - type: string - writeRelabelConfigs: - items: - properties: - action: - default: replace - enum: - - replace - - Replace - - keep - - Keep - - drop - - Drop - - hashmod - - HashMod - - labelmap - - LabelMap - - labeldrop - - LabelDrop - - labelkeep - - LabelKeep - - lowercase - - Lowercase - - uppercase - - Uppercase - - keepequal - - KeepEqual - - dropequal - - DropEqual - type: string - modulus: - format: int64 - type: integer - regex: - type: string - replacement: - type: string - separator: - type: string - sourceLabels: - items: - pattern: ^[a-zA-Z_][a-zA-Z0-9_]*$ - type: string - type: array - targetLabel: - type: string - type: object - type: array - required: - - url - type: object - type: array - serviceMonitorNamespaceSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - x-kubernetes-map-type: atomic - serviceMonitorSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - x-kubernetes-map-type: atomic - walTruncateFrequency: - type: string - writeStaleOnShutdown: - type: boolean - type: object - type: object - served: true - storage: true diff --git a/charts/loki/charts/grafana-agent-operator/crds/monitoring.grafana.com_podlogs.yaml b/charts/loki/charts/grafana-agent-operator/crds/monitoring.grafana.com_podlogs.yaml deleted file mode 100644 index f22d051..0000000 --- a/charts/loki/charts/grafana-agent-operator/crds/monitoring.grafana.com_podlogs.yaml +++ /dev/null @@ -1,308 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.9.2 - creationTimestamp: null - name: podlogs.monitoring.grafana.com -spec: - group: monitoring.grafana.com - names: - categories: - - agent-operator - kind: PodLogs - listKind: PodLogsList - plural: podlogs - singular: podlogs - scope: Namespaced - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - properties: - apiVersion: - type: string - kind: - type: string - metadata: - type: object - spec: - properties: - jobLabel: - type: string - namespaceSelector: - properties: - any: - type: boolean - matchNames: - items: - type: string - type: array - type: object - pipelineStages: - items: - properties: - cri: - type: object - docker: - type: object - drop: - properties: - dropCounterReason: - type: string - expression: - type: string - longerThan: - type: string - olderThan: - type: string - source: - type: string - value: - type: string - type: object - json: - properties: - expressions: - additionalProperties: - type: string - type: object - source: - type: string - type: object - labelAllow: - items: - type: string - type: array - labelDrop: - items: - type: string - type: array - labels: - additionalProperties: - type: string - type: object - limit: - properties: - burst: - type: integer - drop: - type: boolean - rate: - type: integer - type: object - match: - properties: - action: - type: string - dropCounterReason: - type: string - pipelineName: - type: string - selector: - type: string - stages: - type: string - required: - - selector - type: object - metrics: - additionalProperties: - properties: - action: - type: string - buckets: - items: - type: string - type: array - countEntryBytes: - type: boolean - description: - type: string - matchAll: - type: boolean - maxIdleDuration: - type: string - prefix: - type: string - source: - type: string - type: - type: string - value: - type: string - required: - - action - - type - type: object - type: object - multiline: - properties: - firstLine: - type: string - maxLines: - type: integer - maxWaitTime: - type: string - required: - - firstLine - type: object - output: - properties: - source: - type: string - required: - - source - type: object - pack: - properties: - ingestTimestamp: - type: boolean - labels: - items: - type: string - type: array - required: - - labels - type: object - regex: - properties: - expression: - type: string - source: - type: string - required: - - expression - type: object - replace: - properties: - expression: - type: string - replace: - type: string - source: - type: string - required: - - expression - type: object - template: - properties: - source: - type: string - template: - type: string - required: - - source - - template - type: object - tenant: - properties: - label: - type: string - source: - type: string - value: - type: string - type: object - timestamp: - properties: - actionOnFailure: - type: string - fallbackFormats: - items: - type: string - type: array - format: - type: string - location: - type: string - source: - type: string - required: - - format - - source - type: object - type: object - type: array - podTargetLabels: - items: - type: string - type: array - relabelings: - items: - properties: - action: - default: replace - enum: - - replace - - Replace - - keep - - Keep - - drop - - Drop - - hashmod - - HashMod - - labelmap - - LabelMap - - labeldrop - - LabelDrop - - labelkeep - - LabelKeep - - lowercase - - Lowercase - - uppercase - - Uppercase - - keepequal - - KeepEqual - - dropequal - - DropEqual - type: string - modulus: - format: int64 - type: integer - regex: - type: string - replacement: - type: string - separator: - type: string - sourceLabels: - items: - pattern: ^[a-zA-Z_][a-zA-Z0-9_]*$ - type: string - type: array - targetLabel: - type: string - type: object - type: array - selector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - x-kubernetes-map-type: atomic - required: - - selector - type: object - type: object - served: true - storage: true diff --git a/charts/loki/charts/grafana-agent-operator/templates/_helpers.tpl b/charts/loki/charts/grafana-agent-operator/templates/_helpers.tpl deleted file mode 100644 index e374499..0000000 --- a/charts/loki/charts/grafana-agent-operator/templates/_helpers.tpl +++ /dev/null @@ -1,70 +0,0 @@ -{{/* -Expand the name of the chart. -*/}} -{{- define "ga-operator.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 "ga-operator.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 "ga-operator.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Common labels -*/}} -{{- define "ga-operator.labels" -}} -{{ include "ga-operator.selectorLabels" . }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -app.kubernetes.io/component: operator -helm.sh/chart: {{ include "ga-operator.chart" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -{{- if .Values.customLabels }} -{{ toYaml .Values.customLabels }} -{{- end }} -{{- with .Values.global.commonLabels }} -{{ toYaml . }} -{{- end }} -{{- end }} - -{{/* -Selector labels -*/}} -{{- define "ga-operator.selectorLabels" -}} -app.kubernetes.io/name: {{ include "ga-operator.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end }} - -{{/* -Create the name of the service account to use -*/}} -{{- define "ga-operator.serviceAccountName" -}} -{{- if .Values.serviceAccount.create }} -{{- default (include "ga-operator.fullname" .) .Values.serviceAccount.name }} -{{- else }} -{{- default "default" .Values.serviceAccount.name }} -{{- end }} -{{- end }} - diff --git a/charts/loki/charts/grafana-agent-operator/templates/operator-clusterrole.yaml b/charts/loki/charts/grafana-agent-operator/templates/operator-clusterrole.yaml deleted file mode 100644 index 08ad58c..0000000 --- a/charts/loki/charts/grafana-agent-operator/templates/operator-clusterrole.yaml +++ /dev/null @@ -1,62 +0,0 @@ -{{- if .Values.rbac.create -}} -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: {{ include "ga-operator.fullname" . }} - labels: -{{ include "ga-operator.labels" . | indent 4 }} -rules: -- apiGroups: [monitoring.grafana.com] - resources: - - grafanaagents - - metricsinstances - - logsinstances - - podlogs - - integrations - verbs: [get, list, watch] -- apiGroups: [monitoring.grafana.com] - resources: - - grafanaagents/finalizers - - metricsinstances/finalizers - - logsinstances/finalizers - - podlogs/finalizers - - integrations/finalizers - verbs: [get, list, watch, update] -- apiGroups: [monitoring.coreos.com] - resources: - - podmonitors - - probes - - servicemonitors - verbs: [get, list, watch] -- apiGroups: [monitoring.coreos.com] - resources: - - podmonitors/finalizers - - probes/finalizers - - servicemonitors/finalizers - verbs: [get, list, watch, update] -- apiGroups: [""] - resources: - - namespaces - - nodes - verbs: [get, list, watch] -- apiGroups: [""] - resources: - - secrets - - services - - configmaps - - endpoints - verbs: [get, list, watch, create, update, patch, delete] -- apiGroups: ["apps"] - resources: - - statefulsets - - daemonsets - - deployments - verbs: [get, list, watch, create, update, patch, delete] -{{- with .Values.rbac.podSecurityPolicyName }} -- apiGroups: [policy] - resources: - - podsecuritypolicies - verbs: [use] - resourceNames: [ {{ . }} ] -{{- end -}} -{{- end -}} diff --git a/charts/loki/charts/grafana-agent-operator/templates/operator-clusterrolebinding.yaml b/charts/loki/charts/grafana-agent-operator/templates/operator-clusterrolebinding.yaml deleted file mode 100644 index 372d310..0000000 --- a/charts/loki/charts/grafana-agent-operator/templates/operator-clusterrolebinding.yaml +++ /dev/null @@ -1,17 +0,0 @@ -{{- if .Values.rbac.create -}} -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: {{ include "ga-operator.fullname" . }} - labels: -{{ include "ga-operator.labels" . | indent 4 }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: {{ include "ga-operator.fullname" . }} -subjects: -- kind: ServiceAccount - name: {{ template "ga-operator.serviceAccountName" . }} - namespace: {{ .Release.Namespace }} -{{- end -}} - diff --git a/charts/loki/charts/grafana-agent-operator/templates/operator-deployment.yaml b/charts/loki/charts/grafana-agent-operator/templates/operator-deployment.yaml deleted file mode 100644 index 3367db1..0000000 --- a/charts/loki/charts/grafana-agent-operator/templates/operator-deployment.yaml +++ /dev/null @@ -1,79 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "ga-operator.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: -{{ include "ga-operator.labels" . | indent 4 }} - {{- with .Values.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - replicas: 1 - selector: - matchLabels: -{{ include "ga-operator.selectorLabels" . | indent 6 }} - template: - metadata: - labels: -{{ include "ga-operator.selectorLabels" . | indent 8 }} -{{- with .Values.podLabels }} -{{- toYaml . | nindent 8 }} -{{- end }} -{{- with .Values.podAnnotations }} - annotations: -{{ toYaml . | indent 8 }} -{{- end }} - spec: - {{- with .Values.priorityClassName }} - priorityClassName: {{ . }} - {{- end }} - serviceAccountName: {{ template "ga-operator.serviceAccountName" . }} - {{- with .Values.podSecurityContext }} - securityContext: - {{- toYaml . | nindent 8 }} - {{- end }} - containers: - - name: {{ include "ga-operator.name" . }} - image: "{{ .Values.image.registry }}/{{ .Values.image.repository }}:{{ .Values.image.tag }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - {{- with .Values.containerSecurityContext }} - securityContext: - {{- toYaml . | nindent 10 }} - {{- end }} - {{- with .Values.resources }} - resources: - {{- toYaml . | nindent 10 }} - {{- end }} - {{- if or (and .Values.kubeletService.namespace .Values.kubeletService.serviceName) (.Values.extraArgs) }} - args: - {{- if and .Values.kubeletService.namespace .Values.kubeletService.serviceName }} - - --kubelet-service={{ .Values.kubeletService.namespace }}/{{ .Values.kubeletService.serviceName }} - {{- end }} - {{- if .Values.extraArgs }} - {{- range .Values.extraArgs }} - - {{ . }} - {{- end }} - {{- end }} - {{- end }} - {{- with .Values.image.pullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.hostAliases }} - hostAliases: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} diff --git a/charts/loki/charts/grafana-agent-operator/templates/operator-serviceaccount.yaml b/charts/loki/charts/grafana-agent-operator/templates/operator-serviceaccount.yaml deleted file mode 100644 index 1f9b207..0000000 --- a/charts/loki/charts/grafana-agent-operator/templates/operator-serviceaccount.yaml +++ /dev/null @@ -1,10 +0,0 @@ -{{- if .Values.serviceAccount.create -}} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ template "ga-operator.serviceAccountName" . }} - namespace: {{ .Release.Namespace }} - labels: -{{ include "ga-operator.labels" . | indent 4 }} -{{- end -}} - diff --git a/charts/loki/charts/grafana-agent-operator/templates/tests/test-grafanaagent.yaml b/charts/loki/charts/grafana-agent-operator/templates/tests/test-grafanaagent.yaml deleted file mode 100644 index 4001da4..0000000 --- a/charts/loki/charts/grafana-agent-operator/templates/tests/test-grafanaagent.yaml +++ /dev/null @@ -1,118 +0,0 @@ -apiVersion: monitoring.grafana.com/v1alpha1 -kind: GrafanaAgent -metadata: - name: grafana-agent-test - labels: - app: grafana-agent-test - annotations: - "helm.sh/hook": test - "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded,hook-failed -spec: - image: "{{ .Values.image.registry }}/grafana/agent:{{ .Values.image.tag }}" - logLevel: info - serviceAccountName: grafana-agent-test-sa - metrics: - instanceSelector: - matchLabels: - agent: grafana-agent-test - ---- - -apiVersion: v1 -kind: ServiceAccount -metadata: - name: grafana-agent-test-sa - annotations: - "helm.sh/hook": test - "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded,hook-failed - ---- - -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: grafana-agent-test-cr - annotations: - "helm.sh/hook": test - "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded,hook-failed -rules: -- apiGroups: - - "" - resources: - - nodes - - nodes/proxy - - nodes/metrics - - services - - endpoints - - pods - verbs: - - get - - list - - watch -- apiGroups: - - networking.k8s.io - resources: - - ingresses - verbs: - - get - - list - - watch -- nonResourceURLs: - - /metrics - - /metrics/cadvisor - verbs: - - get - ---- - -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: grafana-agent-test-crb - annotations: - "helm.sh/hook": test - "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded,hook-failed -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: grafana-agent-test-cr -subjects: -- kind: ServiceAccount - name: grafana-agent-test-sa - namespace: {{ .Release.Namespace }} - ---- - -apiVersion: monitoring.grafana.com/v1alpha1 -kind: MetricsInstance -metadata: - name: primary-test - annotations: - "helm.sh/hook": test - "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded,hook-failed - labels: - agent: grafana-agent-test -spec: {} - ---- - -apiVersion: v1 -kind: Pod -metadata: - name: grafana-agent-test-probe - annotations: - "helm.sh/hook": test - "helm.sh/hook-weight": "1" - "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded,hook-failed -spec: - containers: - - name: busybox - image: "{{ .Values.test.image.registry }}/{{ .Values.test.image.repository }}:{{ .Values.test.image.tag }}" - command: ['wget'] - args: ['grafana-agent-test-operated:8080/-/healthy'] - # Wait for GrafanaAgent CR - initContainers: - - name: sleep - image: "{{ .Values.test.image.registry }}/{{ .Values.test.image.repository }}:{{ .Values.test.image.tag }}" - command: ['sleep', '60'] - restartPolicy: Never diff --git a/charts/loki/charts/grafana-agent-operator/values.yaml b/charts/loki/charts/grafana-agent-operator/values.yaml deleted file mode 100644 index 0fb0fc9..0000000 --- a/charts/loki/charts/grafana-agent-operator/values.yaml +++ /dev/null @@ -1,84 +0,0 @@ -global: - # -- Common labels for all object directly managed by this chart. - commonLabels: {} - -# -- Overrides the chart's name -nameOverride: "" - -# -- Overrides the chart's computed fullname -fullnameOverride: "" - -# -- Annotations for the Deployment -annotations: {} - -# -- Annotations for the Deployment Pods -podAnnotations: {} - -# -- Annotations for the Deployment Pods -podLabels: {} - -# -- Pod security context (runAsUser, etc.) -podSecurityContext: {} - -# -- Container security context (allowPrivilegeEscalation, etc.) -containerSecurityContext: {} - -rbac: - # -- Toggle to create ClusterRole and ClusterRoleBinding - create: true - # -- Name of a PodSecurityPolicy to use in the ClusterRole. If unset, no PodSecurityPolicy is used. - podSecurityPolicyName: '' - -serviceAccount: - # -- Toggle to create ServiceAccount - create: true - # -- Service account name - name: - -image: - # -- Image registry - registry: docker.io - # -- Image repo - repository: grafana/agent-operator - # -- Image tag - tag: v0.44.2 - # -- Image pull policy - pullPolicy: IfNotPresent - # -- Image pull secrets - pullSecrets: [] - -test: - image: - # -- Test image registry - registry: docker.io - # -- Test image repo - repository: library/busybox - # -- Test image tag - tag: latest - -# -- hostAliases to add -hostAliases: [] -# - ip: 1.2.3.4 -# hostnames: -# - domain.tld - -# -- If both are set, Agent Operator will create and maintain a service for scraping kubelets -# https://grafana.com/docs/agent/latest/operator/getting-started/#monitor-kubelets -kubeletService: - namespace: default - serviceName: kubelet - -# -- List of additional cli arguments to configure agent-operator (example: `--log.level`) -extraArgs: [] - -# -- Resource limits and requests config -resources: {} - -# -- nodeSelector configuration -nodeSelector: {} - -# -- Tolerations applied to Pods -tolerations: [] - -# -- Pod affinity configuration -affinity: {} diff --git a/charts/loki/charts/minio/.helmignore b/charts/loki/charts/minio/.helmignore deleted file mode 100644 index a9fe727..0000000 --- a/charts/loki/charts/minio/.helmignore +++ /dev/null @@ -1,23 +0,0 @@ -# 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/charts/loki/charts/minio/Chart.yaml b/charts/loki/charts/minio/Chart.yaml deleted file mode 100644 index 827787e..0000000 --- a/charts/loki/charts/minio/Chart.yaml +++ /dev/null @@ -1,18 +0,0 @@ -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/charts/loki/charts/minio/README.md b/charts/loki/charts/minio/README.md deleted file mode 100644 index a1d5c99..0000000 --- a/charts/loki/charts/minio/README.md +++ /dev/null @@ -1,264 +0,0 @@ -# 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/charts/loki/charts/minio/templates/NOTES.txt b/charts/loki/charts/minio/templates/NOTES.txt deleted file mode 100644 index ba51b4c..0000000 --- a/charts/loki/charts/minio/templates/NOTES.txt +++ /dev/null @@ -1,43 +0,0 @@ -{{- 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/charts/loki/charts/minio/templates/_helper_create_bucket.txt b/charts/loki/charts/minio/templates/_helper_create_bucket.txt deleted file mode 100644 index 83b8dcb..0000000 --- a/charts/loki/charts/minio/templates/_helper_create_bucket.txt +++ /dev/null @@ -1,122 +0,0 @@ -#!/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/charts/loki/charts/minio/templates/_helper_create_policy.txt b/charts/loki/charts/minio/templates/_helper_create_policy.txt deleted file mode 100644 index aa58495..0000000 --- a/charts/loki/charts/minio/templates/_helper_create_policy.txt +++ /dev/null @@ -1,75 +0,0 @@ -#!/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/charts/loki/charts/minio/templates/_helper_create_svcacct.txt b/charts/loki/charts/minio/templates/_helper_create_svcacct.txt deleted file mode 100644 index 5c8aec4..0000000 --- a/charts/loki/charts/minio/templates/_helper_create_svcacct.txt +++ /dev/null @@ -1,106 +0,0 @@ -#!/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/charts/loki/charts/minio/templates/_helper_create_user.txt b/charts/loki/charts/minio/templates/_helper_create_user.txt deleted file mode 100644 index bfb79be..0000000 --- a/charts/loki/charts/minio/templates/_helper_create_user.txt +++ /dev/null @@ -1,107 +0,0 @@ -#!/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/charts/loki/charts/minio/templates/_helper_custom_command.txt b/charts/loki/charts/minio/templates/_helper_custom_command.txt deleted file mode 100644 index b583a77..0000000 --- a/charts/loki/charts/minio/templates/_helper_custom_command.txt +++ /dev/null @@ -1,58 +0,0 @@ -#!/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/charts/loki/charts/minio/templates/_helper_policy.tpl b/charts/loki/charts/minio/templates/_helper_policy.tpl deleted file mode 100644 index 8be998e..0000000 --- a/charts/loki/charts/minio/templates/_helper_policy.tpl +++ /dev/null @@ -1,28 +0,0 @@ -{{- $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/charts/loki/charts/minio/templates/_helpers.tpl b/charts/loki/charts/minio/templates/_helpers.tpl deleted file mode 100644 index 1cb209e..0000000 --- a/charts/loki/charts/minio/templates/_helpers.tpl +++ /dev/null @@ -1,218 +0,0 @@ -{{/* 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/charts/loki/charts/minio/templates/ciliumnetworkpolicy.yaml b/charts/loki/charts/minio/templates/ciliumnetworkpolicy.yaml deleted file mode 100644 index 1dc91bc..0000000 --- a/charts/loki/charts/minio/templates/ciliumnetworkpolicy.yaml +++ /dev/null @@ -1,33 +0,0 @@ -{{- 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/charts/loki/charts/minio/templates/configmap.yaml b/charts/loki/charts/minio/templates/configmap.yaml deleted file mode 100644 index 47f64cc..0000000 --- a/charts/loki/charts/minio/templates/configmap.yaml +++ /dev/null @@ -1,32 +0,0 @@ -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/charts/loki/charts/minio/templates/console-ingress.yaml b/charts/loki/charts/minio/templates/console-ingress.yaml deleted file mode 100644 index 79a2b1b..0000000 --- a/charts/loki/charts/minio/templates/console-ingress.yaml +++ /dev/null @@ -1,55 +0,0 @@ -{{- 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/charts/loki/charts/minio/templates/console-service.yaml b/charts/loki/charts/minio/templates/console-service.yaml deleted file mode 100644 index f09e3f3..0000000 --- a/charts/loki/charts/minio/templates/console-service.yaml +++ /dev/null @@ -1,45 +0,0 @@ -{{ $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/charts/loki/charts/minio/templates/deployment.yaml b/charts/loki/charts/minio/templates/deployment.yaml deleted file mode 100644 index 4c57010..0000000 --- a/charts/loki/charts/minio/templates/deployment.yaml +++ /dev/null @@ -1,213 +0,0 @@ -{{- 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/charts/loki/charts/minio/templates/ingress.yaml b/charts/loki/charts/minio/templates/ingress.yaml deleted file mode 100644 index 1a564c6..0000000 --- a/charts/loki/charts/minio/templates/ingress.yaml +++ /dev/null @@ -1,55 +0,0 @@ -{{- 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/charts/loki/charts/minio/templates/networkpolicy.yaml b/charts/loki/charts/minio/templates/networkpolicy.yaml deleted file mode 100644 index b9c0771..0000000 --- a/charts/loki/charts/minio/templates/networkpolicy.yaml +++ /dev/null @@ -1,26 +0,0 @@ -{{- 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/charts/loki/charts/minio/templates/poddisruptionbudget.yaml b/charts/loki/charts/minio/templates/poddisruptionbudget.yaml deleted file mode 100644 index a5f90a0..0000000 --- a/charts/loki/charts/minio/templates/poddisruptionbudget.yaml +++ /dev/null @@ -1,17 +0,0 @@ -{{- 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/charts/loki/charts/minio/templates/post-job.yaml b/charts/loki/charts/minio/templates/post-job.yaml deleted file mode 100644 index 955d655..0000000 --- a/charts/loki/charts/minio/templates/post-job.yaml +++ /dev/null @@ -1,258 +0,0 @@ -{{- 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/charts/loki/charts/minio/templates/pvc.yaml b/charts/loki/charts/minio/templates/pvc.yaml deleted file mode 100644 index 60f5267..0000000 --- a/charts/loki/charts/minio/templates/pvc.yaml +++ /dev/null @@ -1,32 +0,0 @@ -{{- 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/charts/loki/charts/minio/templates/secrets.yaml b/charts/loki/charts/minio/templates/secrets.yaml deleted file mode 100644 index 476c3da..0000000 --- a/charts/loki/charts/minio/templates/secrets.yaml +++ /dev/null @@ -1,21 +0,0 @@ -{{- 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/charts/loki/charts/minio/templates/securitycontextconstraints.yaml b/charts/loki/charts/minio/templates/securitycontextconstraints.yaml deleted file mode 100644 index 4bac7e3..0000000 --- a/charts/loki/charts/minio/templates/securitycontextconstraints.yaml +++ /dev/null @@ -1,45 +0,0 @@ -{{- 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/charts/loki/charts/minio/templates/service.yaml b/charts/loki/charts/minio/templates/service.yaml deleted file mode 100644 index d872cd0..0000000 --- a/charts/loki/charts/minio/templates/service.yaml +++ /dev/null @@ -1,46 +0,0 @@ -{{ $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/charts/loki/charts/minio/templates/serviceaccount.yaml b/charts/loki/charts/minio/templates/serviceaccount.yaml deleted file mode 100644 index 0784015..0000000 --- a/charts/loki/charts/minio/templates/serviceaccount.yaml +++ /dev/null @@ -1,6 +0,0 @@ -{{- if .Values.serviceAccount.create }} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ .Values.serviceAccount.name | quote }} -{{- end }} diff --git a/charts/loki/charts/minio/templates/servicemonitor.yaml b/charts/loki/charts/minio/templates/servicemonitor.yaml deleted file mode 100644 index f875a85..0000000 --- a/charts/loki/charts/minio/templates/servicemonitor.yaml +++ /dev/null @@ -1,112 +0,0 @@ -{{- 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/charts/loki/charts/minio/templates/statefulset.yaml b/charts/loki/charts/minio/templates/statefulset.yaml deleted file mode 100644 index d671eaa..0000000 --- a/charts/loki/charts/minio/templates/statefulset.yaml +++ /dev/null @@ -1,267 +0,0 @@ -{{- 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/charts/loki/charts/minio/values.yaml b/charts/loki/charts/minio/values.yaml deleted file mode 100644 index 4c9714e..0000000 --- a/charts/loki/charts/minio/values.yaml +++ /dev/null @@ -1,593 +0,0 @@ -## 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/charts/loki/charts/rollout-operator/.helmignore b/charts/loki/charts/rollout-operator/.helmignore deleted file mode 100644 index 0e8a0eb..0000000 --- a/charts/loki/charts/rollout-operator/.helmignore +++ /dev/null @@ -1,23 +0,0 @@ -# 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/charts/loki/charts/rollout-operator/Chart.yaml b/charts/loki/charts/rollout-operator/Chart.yaml deleted file mode 100644 index ce1ba6d..0000000 --- a/charts/loki/charts/rollout-operator/Chart.yaml +++ /dev/null @@ -1,8 +0,0 @@ -apiVersion: v2 -appVersion: v0.26.0 -description: Grafana rollout-operator -home: https://github.com/grafana/rollout-operator -kubeVersion: ^1.10.0-0 -name: rollout-operator -type: application -version: 0.28.0 diff --git a/charts/loki/charts/rollout-operator/README.md b/charts/loki/charts/rollout-operator/README.md deleted file mode 100644 index 484c27d..0000000 --- a/charts/loki/charts/rollout-operator/README.md +++ /dev/null @@ -1,73 +0,0 @@ -# Grafana rollout-operator Helm Chart - -Helm chart for deploying [Grafana rollout-operator](https://github.com/grafana/rollout-operator) to Kubernetes. - -# rollout-operator - -![Version: 0.28.0](https://img.shields.io/badge/Version-0.28.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.26.0](https://img.shields.io/badge/AppVersion-v0.26.0-informational?style=flat-square) - -Grafana rollout-operator - -## Requirements - -Kubernetes: `^1.10.0-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. - -## Values - -| Key | Type | Default | Description | -|-----|------|---------|-------------| -| affinity | object | `{}` | | -| extraArgs | list | `[]` | List of additional CLI arguments to configure rollout-operator (example: `--log.level=info`) | -| fullnameOverride | string | `""` | | -| global.commonLabels | object | `{}` | Common labels for all object directly managed by this chart. | -| hostAliases | list | `[]` | hostAliases to add | -| image.pullPolicy | string | `"IfNotPresent"` | | -| 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 | `""` | | -| 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"` | | -| 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 | `[]` | | diff --git a/charts/loki/charts/rollout-operator/README.md.gotmpl b/charts/loki/charts/rollout-operator/README.md.gotmpl deleted file mode 100644 index 0ac2d47..0000000 --- a/charts/loki/charts/rollout-operator/README.md.gotmpl +++ /dev/null @@ -1,38 +0,0 @@ -# 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. - -{{ template "chart.valuesSection" . }} diff --git a/charts/loki/charts/rollout-operator/templates/NOTES.txt b/charts/loki/charts/rollout-operator/templates/NOTES.txt deleted file mode 100644 index a76e5ba..0000000 --- a/charts/loki/charts/rollout-operator/templates/NOTES.txt +++ /dev/null @@ -1,10 +0,0 @@ -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/charts/loki/charts/rollout-operator/templates/_helpers.tpl b/charts/loki/charts/rollout-operator/templates/_helpers.tpl deleted file mode 100644 index 68ae702..0000000 --- a/charts/loki/charts/rollout-operator/templates/_helpers.tpl +++ /dev/null @@ -1,82 +0,0 @@ -{{/* -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 -}} diff --git a/charts/loki/charts/rollout-operator/templates/deployment.yaml b/charts/loki/charts/rollout-operator/templates/deployment.yaml deleted file mode 100644 index cee8d0c..0000000 --- a/charts/loki/charts/rollout-operator/templates/deployment.yaml +++ /dev/null @@ -1,79 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "rollout-operator.fullname" . }} - namespace: {{ .Release.Namespace | quote }} - labels: - {{- include "rollout-operator.labels" . | nindent 4 }} -spec: - replicas: 1 - 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.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: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - args: - - -kubernetes.namespace={{ .Release.Namespace }} - {{- range .Values.extraArgs }} - - {{ . }} - {{- end }} - ports: - - name: http-metrics - containerPort: 8001 - protocol: TCP - 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/charts/loki/charts/rollout-operator/templates/role.yaml b/charts/loki/charts/rollout-operator/templates/role.yaml deleted file mode 100644 index 33723f5..0000000 --- a/charts/loki/charts/rollout-operator/templates/role.yaml +++ /dev/null @@ -1,32 +0,0 @@ -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 -- apiGroups: - - apps - resources: - - statefulsets - verbs: - - list - - get - - watch - - patch -- apiGroups: - - apps - resources: - - statefulsets/status - verbs: - - update diff --git a/charts/loki/charts/rollout-operator/templates/rolebinding.yaml b/charts/loki/charts/rollout-operator/templates/rolebinding.yaml deleted file mode 100644 index cd86bd1..0000000 --- a/charts/loki/charts/rollout-operator/templates/rolebinding.yaml +++ /dev/null @@ -1,14 +0,0 @@ -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/charts/loki/charts/rollout-operator/templates/service.yaml b/charts/loki/charts/rollout-operator/templates/service.yaml deleted file mode 100644 index 9d3f465..0000000 --- a/charts/loki/charts/rollout-operator/templates/service.yaml +++ /dev/null @@ -1,19 +0,0 @@ -{{- if .Values.serviceMonitor.enabled }} -apiVersion: v1 -kind: Service -metadata: - name: {{ include "rollout-operator.fullname" . }} - namespace: {{ .Release.Namespace | quote }} - labels: - {{- include "rollout-operator.labels" . | nindent 4 }} -spec: - type: ClusterIP - clusterIP: None - ports: - - port: 8001 - targetPort: http-metrics - protocol: TCP - name: http-metrics - selector: - {{- include "rollout-operator.selectorLabels" . | nindent 4 }} -{{- end -}} diff --git a/charts/loki/charts/rollout-operator/templates/serviceaccount.yaml b/charts/loki/charts/rollout-operator/templates/serviceaccount.yaml deleted file mode 100644 index 90a06cb..0000000 --- a/charts/loki/charts/rollout-operator/templates/serviceaccount.yaml +++ /dev/null @@ -1,13 +0,0 @@ -{{- 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/charts/loki/charts/rollout-operator/templates/servicemonitor.yaml b/charts/loki/charts/rollout-operator/templates/servicemonitor.yaml deleted file mode 100644 index 5bb1d2a..0000000 --- a/charts/loki/charts/rollout-operator/templates/servicemonitor.yaml +++ /dev/null @@ -1,36 +0,0 @@ -{{- 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/charts/loki/charts/rollout-operator/values.yaml b/charts/loki/charts/rollout-operator/values.yaml deleted file mode 100644 index 80854cd..0000000 --- a/charts/loki/charts/rollout-operator/values.yaml +++ /dev/null @@ -1,92 +0,0 @@ -# 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: {} - - -image: - repository: grafana/rollout-operator - 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 - -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: "" - -# -- 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: [] - -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: [] diff --git a/charts/loki/distributed-values.yaml b/charts/loki/distributed-values.yaml deleted file mode 100644 index 78a1f11..0000000 --- a/charts/loki/distributed-values.yaml +++ /dev/null @@ -1,71 +0,0 @@ ---- -loki: - schemaConfig: - configs: - - from: 2024-04-01 - store: tsdb - object_store: s3 - schema: v13 - index: - prefix: loki_index_ - period: 24h - ingester: - chunk_encoding: snappy - tracing: - enabled: true - querier: - # Default is 4, if you have enough memory and CPU you can increase, reduce if OOMing - max_concurrent: 4 - -#gateway: -# ingress: -# enabled: true -# hosts: -# - host: FIXME -# paths: -# - path: / -# pathType: Prefix - -deploymentMode: Distributed - -ingester: - replicas: 3 -querier: - replicas: 3 - maxUnavailable: 2 -queryFrontend: - replicas: 2 - maxUnavailable: 1 -queryScheduler: - replicas: 2 -distributor: - replicas: 3 - maxUnavailable: 2 -compactor: - replicas: 1 -indexGateway: - replicas: 2 - maxUnavailable: 1 - -# optional experimental components -bloomPlanner: - replicas: 0 -bloomBuilder: - replicas: 0 -bloomGateway: - replicas: 0 - -# Enable minio for storage -minio: - enabled: true - -# Zero out replica counts of other deployment modes -backend: - replicas: 0 -read: - replicas: 0 -write: - replicas: 0 - -singleBinary: - replicas: 0 diff --git a/charts/loki/docs/examples/README.md b/charts/loki/docs/examples/README.md deleted file mode 100644 index 84cbae3..0000000 --- a/charts/loki/docs/examples/README.md +++ /dev/null @@ -1,4 +0,0 @@ -## Introduction -The Helm Charts found under the examples directory are getting started examples which you can use to deploy Loki using the Simple Scalable architecture quickly. Currently, the examples include: -- [Deploying Grafana Enterprise Logs (Loki in Enterprise mode)](https://github.com/grafana/loki/tree/main/production/helm/loki/docs/examples/enterprise) -- [Deploying Loki OSS](https://github.com/grafana/loki/tree/main/production/helm/loki/docs/examples/oss) diff --git a/charts/loki/docs/examples/enterprise/README.md b/charts/loki/docs/examples/enterprise/README.md deleted file mode 100644 index 82c0d28..0000000 --- a/charts/loki/docs/examples/enterprise/README.md +++ /dev/null @@ -1,28 +0,0 @@ -## Introduction -This example gives you an example or getting started overrides value file for deploying Loki (Enterprise Licensed) using the Simple Scalable architecture in GKE and using GCS. - -## Installation of Helm Chart -These instructions assume you already have access to a Kubernetes cluster, GCS Bucket and GCP Service Account which has read/write permissions to that GCS Bucket. - -### Populate Secret Values -Populate the [enterprise-secrets.yaml](./enterprise-secrets.yaml) so that: -- The `gcp_service_account.json` secret has the contents of your GCP Service Account JSON key. -- The `license.jwt` secret has the contents of your Grafana Enterprise Logs license key given to your by Grafana Labs. - -Deploy the secrets file to your k8s cluster with the command: - -`kubectl apply -f enterprise-secrets.yaml` - -### Configure the Helm Chart -Open [overrides-enterprise-gcs.yaml](./overrides-enterprise-gcs.yaml) and replace `{YOUR_GCS_BUCKET}` with the name of your GCS bucket. If there are other things you'd like to configure, view the core [Values.yaml file](https://github.com/grafana/loki/blob/main/production/helm/loki/values.yaml) and override anything else you need to within the overrides-enterprise-gcs.yaml file. - -### Install the Helm chart - -`helm upgrade --install --values {PATH_TO_YOUR_OVERRIDES_YAML_FILE} {YOUR_RELEASE_NAME} grafana/loki-simple-scalable --namespace {KUBERNETES_NAMESPACE}` - -### Get the Token for Grafana to connect -`export POD_NAME=$(kubectl get pods --namespace {KUBERNETES_NAMESPACE} -l "job-name=enterprise-logs-tokengen" -o jsonpath="{.items[0].metadata.name}")` - -`kubectl --namespace {KUBERNETES_NAMESPACE} logs $POD_NAME loki | grep Token` - -Take note of this token, you will need it when connecting Grafana Enterprise Logs to Grafana. diff --git a/charts/loki/docs/examples/enterprise/enterprise-secrets.yaml b/charts/loki/docs/examples/enterprise/enterprise-secrets.yaml deleted file mode 100644 index 698e94b..0000000 --- a/charts/loki/docs/examples/enterprise/enterprise-secrets.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: v1 -kind: Secret -metadata: - name: gel-secrets -type: Opaque -stringData: - gcp_service_account.json: | - { - GCP_SERVICE_ACCOUNT_JSON_HERE - } - - license.jwt: LICENSE_HERE diff --git a/charts/loki/docs/examples/enterprise/overrides-enterprise-gcs.yaml b/charts/loki/docs/examples/enterprise/overrides-enterprise-gcs.yaml deleted file mode 100644 index 01210d3..0000000 --- a/charts/loki/docs/examples/enterprise/overrides-enterprise-gcs.yaml +++ /dev/null @@ -1,83 +0,0 @@ -enterprise: - enabled: true - useExternalLicense: true - externalLicenseName: gel-secrets - tokengen: - env: - - name: GOOGLE_APPLICATION_CREDENTIALS - value: "/etc/gel_secrets/gcp_service_account.json" - extraVolumeMounts: - - name: gel-secrets - mountPath: "/etc/gel_secrets" - extraVolumes: - - name: gel-secrets - secret: - secretName: gel-secrets - items: - - key: license.jwt - path: license.jwt - - key: gcp_service_account.json - path: gcp_service_account.json -loki: - auth_enabled: true - - storage: - type: gcs - bucketNames: - chunks: {YOUR_GCS_BUCKET} - ruler: {YOUR_GCS_BUCKET} - admin: {YOUR_GCS_BUCKET} - -minio: - enabled: false - -write: - extraEnv: - - name: GOOGLE_APPLICATION_CREDENTIALS - value: "/etc/gel_secrets/gcp_service_account.json" - extraVolumeMounts: - - name: gel-secrets - mountPath: "/etc/gel_secrets" - extraVolumes: - - name: gel-secrets - secret: - secretName: gel-secrets - items: - - key: license.jwt - path: license.jwt - - key: gcp_service_account.json - path: gcp_service_account.json - -read: - extraEnv: - - name: GOOGLE_APPLICATION_CREDENTIALS - value: "/etc/gel_secrets/gcp_service_account.json" - extraVolumeMounts: - - name: gel-secrets - mountPath: "/etc/gel_secrets" - extraVolumes: - - name: gel-secrets - secret: - secretName: gel-secrets - items: - - key: license.jwt - path: license.jwt - - key: gcp_service_account.json - path: gcp_service_account.json - -gateway: - extraEnv: - - name: GOOGLE_APPLICATION_CREDENTIALS - value: "/etc/gel_secrets/gcp_service_account.json" - extraVolumeMounts: - - name: gel-secrets - mountPath: "/etc/gel_secrets" - extraVolumes: - - name: gel-secrets - secret: - secretName: gel-secrets - items: - - key: license.jwt - path: license.jwt - - key: gcp_service_account.json - path: gcp_service_account.json diff --git a/charts/loki/docs/examples/oss/README.md b/charts/loki/docs/examples/oss/README.md deleted file mode 100644 index 9a0a410..0000000 --- a/charts/loki/docs/examples/oss/README.md +++ /dev/null @@ -1,20 +0,0 @@ -## Introduction -This example gives you an example or getting started overrides value file for deploying Loki (OSS) using the Simple Scalable architecture in GKE and using GCS - -## Installation of Helm Chart -These instructions assume you have already have access to a Kubernetes cluster, GCS Bucket and GCP Service Account which has read/write permissions to that GCS Bucket. - -### Populate Secret Values -Populate the examples/enterprise/enterprise-secrets.yaml so that: -- The gcp_service_account.json secret has the contents of your GCP Service Account JSON key - -Deploy the secrets file to your k8s cluster. - -`kubectl apply -f loki-secrets.yaml` - -### Configure the Helm Chart -Open examples/enterprise/overides-oss-gcs.yaml and replace `{YOUR_GCS_BUCKET}` with the name of your GCS bucket. If there are other things you'd like to configure, view the core [Values.yaml file](https://github.com/grafana/loki/blob/main/production/helm/loki/values.yaml) and override anything else you need to within the overrides-enterprise-gcs.yaml file. - -### Install the Helm chart - -`helm upgrade --install --values {PATH_TO_YOUR_OVERRIDES_YAML_FILE} {YOUR_RELEASE_NAME} grafana/loki-simple-scalable --namespace {KUBERNETES_NAMESPACE}` diff --git a/charts/loki/docs/examples/oss/oss-secrets.yaml b/charts/loki/docs/examples/oss/oss-secrets.yaml deleted file mode 100644 index 4fbf5e7..0000000 --- a/charts/loki/docs/examples/oss/oss-secrets.yaml +++ /dev/null @@ -1,10 +0,0 @@ -apiVersion: v1 -kind: Secret -metadata: - name: loki-secrets -type: Opaque -stringData: - gcp_service_account.json: | - { - GCP_SERVICE_ACCOUNT_JSON_HERE - } \ No newline at end of file diff --git a/charts/loki/docs/examples/oss/overrides-oss-gcs.yaml b/charts/loki/docs/examples/oss/overrides-oss-gcs.yaml deleted file mode 100644 index 3e94f84..0000000 --- a/charts/loki/docs/examples/oss/overrides-oss-gcs.yaml +++ /dev/null @@ -1,77 +0,0 @@ -enterprise: - enabled: false - adminApi: - enabled: false - useExternalLicense: false - - config: | - admin_client: - storage: - gcs: - bucket_name: {YOUR_GCS_BUCKET} - auth: - type: trust - auth_enabled: false - cluster_name: loki-logs - -loki: - auth_enabled: false - - commonConfig: - path_prefix: /var/loki - replication_factor: 3 - - storage: - type: gcs - bucketNames: - chunks: {YOUR_GCS_BUCKET} - ruler: {YOUR_GCS_BUCKET} - admin: {YOUR_GCS_BUCKET} - -minio: - enabled: false - -write: - extraEnv: - - name: GOOGLE_APPLICATION_CREDENTIALS - value: "/etc/loki_secrets/gcp_service_account.json" - extraVolumeMounts: - - name: loki-secrets - mountPath: "/etc/loki_secrets" - extraVolumes: - - name: loki-secrets - secret: - secretName: loki-secrets - items: - - key: gcp_service_account.json - path: gcp_service_account.json - -read: - extraEnv: - - name: GOOGLE_APPLICATION_CREDENTIALS - value: "/etc/loki_secrets/gcp_service_account.json" - extraVolumeMounts: - - name: loki-secrets - mountPath: "/etc/loki_secrets" - extraVolumes: - - name: loki-secrets - secret: - secretName: loki-secrets - items: - - key: gcp_service_account.json - path: gcp_service_account.json - -gateway: - extraEnv: - - name: GOOGLE_APPLICATION_CREDENTIALS - value: "/etc/loki_secrets/gcp_service_account.json" - extraVolumeMounts: - - name: loki-secrets - mountPath: "/etc/loki_secrets" - extraVolumes: - - name: loki-secrets - secret: - secretName: loki-secrets - items: - - key: gcp_service_account.json - path: gcp_service_account.json diff --git a/charts/loki/my-values/values-prod.yaml b/charts/loki/my-values/values-prod.yaml deleted file mode 100644 index 5ce9d98..0000000 --- a/charts/loki/my-values/values-prod.yaml +++ /dev/null @@ -1,15 +0,0 @@ -enabled: true -env: prod -host: logs.dvirlabs.com - -ingress: - enabled: true - className: traefik - annotations: - traefik.ingress.kubernetes.io/router.entrypoints: websecure - traefik.ingress.kubernetes.io/router.tls: "true" - hosts: - - host: logs.dvirlabs.com - paths: - - path: / - pathType: Prefix diff --git a/charts/loki/reference.md.gotmpl b/charts/loki/reference.md.gotmpl deleted file mode 100644 index e7cc2d6..0000000 --- a/charts/loki/reference.md.gotmpl +++ /dev/null @@ -1,52 +0,0 @@ ---- -title: Helm chart values -menuTitle: Helm chart values -description: Reference for Helm Chart values. -aliases: - - ../../../installation/helm/reference/ -weight: 500 -keywords: [] ---- - - - -# Helm chart values - - - - -This is the generated reference for the Loki Helm Chart values. - -> **Note:** This reference is for the Loki Helm chart version 3.0 or greater. -> If you are using the `grafana/loki-stack` Helm chart from the community repo, -> please refer to the `values.yaml` of the respective Github repository -> [grafana/helm-charts](https://github.com/grafana/helm-charts/tree/main/charts/loki-stack). - - - -{{ define "chart.valuesTableHtml" }} -{{ `{{< responsive-table >}}` }} - - - - - - - - - {{- range .Values }} - - - - - - - {{- end }} - -
KeyTypeDescriptionDefault
{{ .Key }}{{ .Type }}{{ if .Description }}{{ .Description }}{{ else }}{{ .AutoDescription }}{{ end }}{{ template "chart.valueDefaultColumnRender" . }}
-{{ `{{< /responsive-table >}}` }} -{{ end }} - -{{ template "chart.valuesTableHtml" . }} - - diff --git a/charts/loki/scenarios/README.md b/charts/loki/scenarios/README.md deleted file mode 100644 index a69d8b2..0000000 --- a/charts/loki/scenarios/README.md +++ /dev/null @@ -1,82 +0,0 @@ -# Loki Helm Scenarios - -These scenarios are used by Github Workflow: [Publish Rendered Helm Chart Diff](../../../../.github/workflows/helm-diff-ci.yml). - -Each scenario is used in a different job execution that will be used to deploy loki inside a K3D cluster in our github action workflow. - -We deploy the scenario with the latest release and then we execute a helm diff with the current version in the workspace, the diff between the release deployed will be posted in the pull request inside a comment like [this](https://github.com/grafana/loki/pull/15734#issuecomment-2592439539) making clear to review. - ->*NOTE*: the helm diff output file will be available for each scenario inside github action to download for 2 days, after this you may need to re-run the job if you would like to download the output files. - -## Add new scenario to the CI - -To add a new scenario in the CI, you would just add a new entry to the matrix configuration: - -``` -strategy: - matrix: - scenario: - - name: New Scenario - values_file: new-scenario-values.yaml - use_k3d: true # or false depending on requirements -``` - -## Run scenarios locally - -All this process that we run in the CI can be done locally, the following steps would explain how. - -## Requirements - -To run locally you will need the following tools in your local environment - -* k3d or any kubernetes cluster -* helm -* [helm-diff plugin](https://github.com/databus23/helm-diff) - -## Run - -Make sure that you are pointing to the kubernetes cluster that you want to apply the chart and validate. - -Create a `${scenario}-values.yaml` file with the configuration that you would like to validate. - -Deploy in your kubernetes cluster the latest released version of the helm chart with your config file: - -```shell - helm install --create-namespace loki-release grafana/loki -f ${scenario}-values.yaml -``` - - Then run the helm diff plugin to compare the local helm chart to see the upgrade changes that will happen: - -```shell - HELM_DIFF_USE_UPGRADE_DRY_RUN: true helm diff upgrade loki-release -f ${scenario}-values.yaml production/helm/loki -``` - -The helm diff plugin will compare all manifests that are created in your local development kubernetes cluster and the generated by helm upgrade operation, the output will be printed in your terminal. - -### Configs for CSP specific - -To compare the changes specifically for a cloud provider the process is similar, the main difference that you will need to have access to the kubernetes cluster with the right permissions inside the cloud provider. - -In case that is not possible, the quick validation can be done in a different way, instead of deploy to the kubernetes cluster, we generate the manifests with helm like this: - -```shell - helm template loki-release grafana/loki -f ${scenario}-values.yaml > release-manifest.yaml -``` - -Then we make the same process with local chart version - -```shell - helm template loki-release production/helm/loki -f ${scenario}-values.yaml > current-manifest.yaml -``` - -As the last step you need to run a diff between both files: - -```shell - diff current-manifest.yaml release-manifest.yaml -``` - -### Known Issues - -* The Github Action won't be able to post the diff comment if the PR is coming from a fork, because of permissions the workflow run from a fork is not able to write in the PR content. - - In this case, to review the output we recommend to download the artifacts in the workflow run and check the outputs. diff --git a/charts/loki/scenarios/default-distributed-values.yaml b/charts/loki/scenarios/default-distributed-values.yaml deleted file mode 100644 index 78a1f11..0000000 --- a/charts/loki/scenarios/default-distributed-values.yaml +++ /dev/null @@ -1,71 +0,0 @@ ---- -loki: - schemaConfig: - configs: - - from: 2024-04-01 - store: tsdb - object_store: s3 - schema: v13 - index: - prefix: loki_index_ - period: 24h - ingester: - chunk_encoding: snappy - tracing: - enabled: true - querier: - # Default is 4, if you have enough memory and CPU you can increase, reduce if OOMing - max_concurrent: 4 - -#gateway: -# ingress: -# enabled: true -# hosts: -# - host: FIXME -# paths: -# - path: / -# pathType: Prefix - -deploymentMode: Distributed - -ingester: - replicas: 3 -querier: - replicas: 3 - maxUnavailable: 2 -queryFrontend: - replicas: 2 - maxUnavailable: 1 -queryScheduler: - replicas: 2 -distributor: - replicas: 3 - maxUnavailable: 2 -compactor: - replicas: 1 -indexGateway: - replicas: 2 - maxUnavailable: 1 - -# optional experimental components -bloomPlanner: - replicas: 0 -bloomBuilder: - replicas: 0 -bloomGateway: - replicas: 0 - -# Enable minio for storage -minio: - enabled: true - -# Zero out replica counts of other deployment modes -backend: - replicas: 0 -read: - replicas: 0 -write: - replicas: 0 - -singleBinary: - replicas: 0 diff --git a/charts/loki/scenarios/default-values.yaml b/charts/loki/scenarios/default-values.yaml deleted file mode 100644 index a79baee..0000000 --- a/charts/loki/scenarios/default-values.yaml +++ /dev/null @@ -1,16 +0,0 @@ ---- -loki: - commonConfig: - replication_factor: 1 - useTestSchema: true - storage: - bucketNames: - chunks: chunks - ruler: ruler - admin: admin -read: - replicas: 1 -write: - replicas: 1 -backend: - replicas: 1 diff --git a/charts/loki/scenarios/ingress-values.yaml b/charts/loki/scenarios/ingress-values.yaml deleted file mode 100644 index cc135af..0000000 --- a/charts/loki/scenarios/ingress-values.yaml +++ /dev/null @@ -1,33 +0,0 @@ ---- -gateway: - ingress: - enabled: true - annotations: {} - hosts: - - host: gateway.loki.example.com - paths: - - path: / - pathType: Prefix -loki: - commonConfig: - replication_factor: 1 - useTestSchema: true - podAnnotations: - prometheus.io/scrape: "true" - prometheus.io/port: "3100" - storage: - bucketNames: - chunks: chunks - ruler: ruler - admin: admin -read: - replicas: 1 -write: - replicas: 1 -backend: - replicas: 1 -monitoring: - lokiCanary: - enabled: false -test: - enabled: false diff --git a/charts/loki/scenarios/legacy-monitoring-values.yaml b/charts/loki/scenarios/legacy-monitoring-values.yaml deleted file mode 100644 index d501e65..0000000 --- a/charts/loki/scenarios/legacy-monitoring-values.yaml +++ /dev/null @@ -1,30 +0,0 @@ ---- -loki: - commonConfig: - replication_factor: 1 - useTestSchema: true - storage: - bucketNames: - chunks: chunks - ruler: ruler - admin: admin - podAnnotations: - prometheus.io/scrape: "true" - prometheus.io/port: "3100" -read: - replicas: 1 -write: - replicas: 1 -backend: - replicas: 1 -monitoring: - enabled: true - selfMonitoring: - enabled: true - grafanaAgent: - installOperator: true - serviceMonitor: - labels: - release: "prometheus" -test: - prometheusAddress: "http://prometheus-kube-prometheus-prometheus.prometheus.svc.cluster.local.:9090" diff --git a/charts/loki/scenarios/simple-scalable-aws-kube-irsa-values.yaml b/charts/loki/scenarios/simple-scalable-aws-kube-irsa-values.yaml deleted file mode 100644 index e7fabea..0000000 --- a/charts/loki/scenarios/simple-scalable-aws-kube-irsa-values.yaml +++ /dev/null @@ -1,67 +0,0 @@ -loki: - # -- Storage config. Providing this will automatically populate all necessary storage configs in the templated config. - storage: - # Loki requires a bucket for chunks and the ruler. GEL requires a third bucket for the admin API. - # Please provide these values if you are using object storage. - bucketNames: - chunks: aws-s3-chunks-bucket - ruler: aws-s3-ruler-bucket - admin: aws-s3-admin-bucket - type: s3 - s3: - region: eu-central-1 - # -- Check https://grafana.com/docs/loki/latest/configuration/#schema_config for more info on how to configure schemas - schemaConfig: - configs: - - from: "2023-09-19" - index: - period: 1d - prefix: tsdb_index_ - object_store: s3 - schema: v13 - store: tsdb -###################################################################################################################### -# -# Enterprise Loki Configs -# -###################################################################################################################### - -# -- Configuration for running Enterprise Loki -enterprise: - # Enable enterprise features, license must be provided - enabled: true - # -- Grafana Enterprise Logs license - license: - contents: "content of licence" - tokengen: - annotations: { - eks.amazonaws.com/role-arn: arn:aws:iam::2222222:role/test-role - } - # -- Configuration for `provisioner` target - provisioner: - # -- Additional annotations for the `provisioner` Job - annotations: { - eks.amazonaws.com/role-arn: arn:aws:iam::2222222:role/test-role - } -###################################################################################################################### -# -# Service Accounts and Kubernetes RBAC -# -###################################################################################################################### -serviceAccount: - # -- Annotations for the service account - annotations: - eks.amazonaws.com/role-arn: arn:aws:iam::2222222:role/test-role - -# Configuration for the write pod(s) -write: - persistence: - storageClass: gp2 -# -- Configuration for the read pod(s) -read: - persistence: - storageClass: gp2 -# -- Configuration for the backend pod(s) -backend: - persistence: - storageClass: gp2 diff --git a/charts/loki/scenarios/simple-thanos-values.yaml b/charts/loki/scenarios/simple-thanos-values.yaml deleted file mode 100644 index 814b1e4..0000000 --- a/charts/loki/scenarios/simple-thanos-values.yaml +++ /dev/null @@ -1,53 +0,0 @@ ---- -loki: - commonConfig: - replication_factor: 1 - useTestSchema: true - - storage: - type: s3 - - use_thanos_objstore: true - - object_store: - type: s3 - - s3: - access_key_id: thanos-minio - secret_access_key: thanos-minio123 - region: us-east-1 - insecure: true - endpoint: http://minio.minio.svc.cluster.local:9000 - http: - tls_config: - insecure_skip_verify: true - - # GCS configuration (when type is "GCS") - gcs: - bucket_name: test-gcs # Name of the bucket - service_account: service-account-test.json # Optional service account JSON - - # Azure configuration (when type is "AZURE") - azure: - account_name: azure-test # Storage account name - account_key: 1234567890 # Optional storage account key - - bucketNames: - chunks: chunks_thanos - ruler: ruler_thanos - admin: admin_thanos - -enterprise: - enabled: true - adminApi: - enabled: true - -minio: - enabled: true - -read: - replicas: 1 -write: - replicas: 1 -backend: - replicas: 1 diff --git a/charts/loki/simple-scalable-values.yaml b/charts/loki/simple-scalable-values.yaml deleted file mode 100644 index 78132b6..0000000 --- a/charts/loki/simple-scalable-values.yaml +++ /dev/null @@ -1,63 +0,0 @@ ---- -loki: - schemaConfig: - configs: - - from: 2024-04-01 - store: tsdb - object_store: s3 - schema: v13 - index: - prefix: loki_index_ - period: 24h - ingester: - chunk_encoding: snappy - tracing: - enabled: true - querier: - # Default is 4, if you have enough memory and CPU you can increase, reduce if OOMing - max_concurrent: 4 - -#gateway: -# ingress: -# enabled: true -# hosts: -# - host: FIXME -# paths: -# - path: / -# pathType: Prefix - -deploymentMode: SimpleScalable - -backend: - replicas: 3 -read: - replicas: 3 -write: - replicas: 3 - -# Enable minio for storage -minio: - enabled: true - -# Zero out replica counts of other deployment modes -singleBinary: - 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 diff --git a/charts/loki/single-binary-values.yaml b/charts/loki/single-binary-values.yaml deleted file mode 100644 index 584f0fb..0000000 --- a/charts/loki/single-binary-values.yaml +++ /dev/null @@ -1,79 +0,0 @@ ---- -loki: - commonConfig: - replication_factor: 1 - schemaConfig: - configs: - - from: 2024-04-01 - store: tsdb - object_store: s3 - schema: v13 - index: - prefix: loki_index_ - period: 24h - ingester: - chunk_encoding: snappy - tracing: - enabled: true - querier: - # Default is 4, if you have enough memory and CPU you can increase, reduce if OOMing - max_concurrent: 2 - -#gateway: -# ingress: -# enabled: true -# hosts: -# - host: FIXME -# paths: -# - path: / -# pathType: Prefix - -deploymentMode: SingleBinary -singleBinary: - replicas: 1 - resources: - limits: - cpu: 3 - memory: 4Gi - requests: - cpu: 2 - memory: 2Gi - extraEnv: - # Keep a little bit lower than memory limits - - name: GOMEMLIMIT - value: 3750MiB - -chunksCache: - # default is 500MB, with limited memory keep this smaller - writebackSizeLimit: 10MB - -# Enable minio for storage -minio: - enabled: true - -# Zero out replica counts of other deployment modes -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 diff --git a/charts/loki/src/.yamllint.yaml b/charts/loki/src/.yamllint.yaml deleted file mode 100644 index 19e5933..0000000 --- a/charts/loki/src/.yamllint.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -rules: - quoted-strings: - required: true diff --git a/charts/loki/src/alerts.yaml.tpl b/charts/loki/src/alerts.yaml.tpl deleted file mode 100644 index 0aa37b7..0000000 --- a/charts/loki/src/alerts.yaml.tpl +++ /dev/null @@ -1,78 +0,0 @@ ---- -groups: - - name: "loki_alerts" - rules: -{{- if not (.Values.monitoring.rules.disabled.LokiRequestErrors | default false) }} - - alert: "LokiRequestErrors" - annotations: - message: | - {{`{{`}} $labels.job {{`}}`}} {{`{{`}} $labels.route {{`}}`}} is experiencing {{`{{`}} printf "%.2f" $value {{`}}`}}% errors. - expr: | - 100 * sum(rate(loki_request_duration_seconds_count{status_code=~"5.."}[2m])) by (namespace, job, route) - / - sum(rate(loki_request_duration_seconds_count[2m])) by (namespace, job, route) - > 10 - for: "15m" - labels: - severity: "critical" -{{- if .Values.monitoring.rules.additionalRuleLabels }} -{{ toYaml .Values.monitoring.rules.additionalRuleLabels | indent 10 }} -{{- end }} -{{- end }} -{{- if not (.Values.monitoring.rules.disabled.LokiRequestPanics | default false) }} - - alert: "LokiRequestPanics" - annotations: - message: | - {{`{{`}} $labels.job {{`}}`}} is experiencing {{`{{`}} printf "%.2f" $value {{`}}`}}% increase of panics. - expr: | - sum(increase(loki_panic_total[10m])) by (namespace, job) > 0 - labels: - severity: "critical" -{{- if .Values.monitoring.rules.additionalRuleLabels }} -{{ toYaml .Values.monitoring.rules.additionalRuleLabels | indent 10 }} -{{- end }} -{{- end }} -{{- if not (.Values.monitoring.rules.disabled.LokiRequestLatency | default false) }} - - alert: "LokiRequestLatency" - annotations: - message: | - {{`{{`}} $labels.job {{`}}`}} {{`{{`}} $labels.route {{`}}`}} is experiencing {{`{{`}} printf "%.2f" $value {{`}}`}}s 99th percentile latency. - expr: | - namespace_job_route:loki_request_duration_seconds:99quantile{route!~"(?i).*tail.*"} > 1 - for: "15m" - labels: - severity: "critical" -{{- if .Values.monitoring.rules.additionalRuleLabels }} -{{ toYaml .Values.monitoring.rules.additionalRuleLabels | indent 10 }} -{{- end }} -{{- end }} -{{- if not (.Values.monitoring.rules.disabled.LokiTooManyCompactorsRunning | default false) }} - - alert: "LokiTooManyCompactorsRunning" - annotations: - message: | - {{`{{`}} $labels.cluster {{`}}`}} {{`{{`}} $labels.namespace {{`}}`}} has had {{`{{`}} printf "%.0f" $value {{`}}`}} compactors running for more than 5m. Only one compactor should run at a time. - expr: | - sum(loki_boltdb_shipper_compactor_running) by (cluster, namespace) > 1 - for: "5m" - labels: - severity: "warning" -{{- if .Values.monitoring.rules.additionalRuleLabels }} -{{ toYaml .Values.monitoring.rules.additionalRuleLabels | indent 10 }} -{{- end }} -{{- end }} -{{- if not (.Values.monitoring.rules.disabled.LokiCanaryLatency | default false) }} - - name: "loki_canaries_alerts" - rules: - - alert: "LokiCanaryLatency" - annotations: - message: | - {{`{{`}} $labels.job {{`}}`}} is experiencing {{`{{`}} printf "%.2f" $value {{`}}`}}s 99th percentile latency. - expr: | - histogram_quantile(0.99, sum(rate(loki_canary_response_latency_seconds_bucket[5m])) by (le, namespace, job)) > 5 - for: "15m" - labels: - severity: "warning" -{{- if .Values.monitoring.rules.additionalRuleLabels }} -{{ toYaml .Values.monitoring.rules.additionalRuleLabels | indent 10 }} -{{- end }} -{{- end }} diff --git a/charts/loki/src/dashboards/loki-chunks.json b/charts/loki/src/dashboards/loki-chunks.json deleted file mode 100644 index bec1997..0000000 --- a/charts/loki/src/dashboards/loki-chunks.json +++ /dev/null @@ -1,1336 +0,0 @@ -{ - "annotations": { - "list": [ ] - }, - "editable": true, - "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": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "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_ingester_memory_chunks{cluster=\"$cluster\", job=~\"$namespace/(loki|enterprise-logs)-write\"})", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "series", - "legendLink": null, - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Series", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "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, - "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": "sum(loki_ingester_memory_chunks{cluster=\"$cluster\", job=~\"$namespace/(loki|enterprise-logs)-write\"}) / sum(loki_ingester_memory_streams{cluster=\"$cluster\", job=~\"$namespace/(loki|enterprise-logs)-write\"})", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "chunks", - "legendLink": null, - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Chunks per series", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "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": true, - "title": "Active Series / Chunks", - "titleSize": "h6" - }, - { - "collapse": false, - "height": "250px", - "panels": [ - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "id": 3, - "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": "histogram_quantile(0.99, sum(rate(loki_ingester_chunk_utilization_bucket{cluster=\"$cluster\", job=~\"$namespace/(loki|enterprise-logs)-write\"}[$__rate_interval])) by (le)) * 1", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "99th Percentile", - "refId": "A", - "step": 10 - }, - { - "expr": "histogram_quantile(0.50, sum(rate(loki_ingester_chunk_utilization_bucket{cluster=\"$cluster\", job=~\"$namespace/(loki|enterprise-logs)-write\"}[$__rate_interval])) by (le)) * 1", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "50th Percentile", - "refId": "B", - "step": 10 - }, - { - "expr": "sum(rate(loki_ingester_chunk_utilization_sum{cluster=\"$cluster\", job=~\"$namespace/(loki|enterprise-logs)-write\"}[$__rate_interval])) * 1 / sum(rate(loki_ingester_chunk_utilization_count{cluster=\"$cluster\", job=~\"$namespace/(loki|enterprise-logs)-write\"}[$__rate_interval]))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "Average", - "refId": "C", - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Utilization", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "percentunit", - "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, - "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", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "span": 6, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "histogram_quantile(0.99, sum(rate(loki_ingester_chunk_age_seconds_bucket{cluster=\"$cluster\", job=~\"$namespace/(loki|enterprise-logs)-write\"}[$__rate_interval])) by (le)) * 1e3", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "99th Percentile", - "refId": "A", - "step": 10 - }, - { - "expr": "histogram_quantile(0.50, sum(rate(loki_ingester_chunk_age_seconds_bucket{cluster=\"$cluster\", job=~\"$namespace/(loki|enterprise-logs)-write\"}[$__rate_interval])) by (le)) * 1e3", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "50th Percentile", - "refId": "B", - "step": 10 - }, - { - "expr": "sum(rate(loki_ingester_chunk_age_seconds_sum{cluster=\"$cluster\", job=~\"$namespace/(loki|enterprise-logs)-write\"}[$__rate_interval])) * 1e3 / sum(rate(loki_ingester_chunk_age_seconds_count{cluster=\"$cluster\", job=~\"$namespace/(loki|enterprise-logs)-write\"}[$__rate_interval]))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "Average", - "refId": "C", - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Age", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "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": [ - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "id": 5, - "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": "histogram_quantile(0.99, sum(rate(loki_ingester_chunk_entries_bucket{cluster=\"$cluster\", job=~\"$namespace/(loki|enterprise-logs)-write\"}[$__rate_interval])) by (le)) * 1", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "99th Percentile", - "refId": "A", - "step": 10 - }, - { - "expr": "histogram_quantile(0.50, sum(rate(loki_ingester_chunk_entries_bucket{cluster=\"$cluster\", job=~\"$namespace/(loki|enterprise-logs)-write\"}[$__rate_interval])) by (le)) * 1", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "50th Percentile", - "refId": "B", - "step": 10 - }, - { - "expr": "sum(rate(loki_ingester_chunk_entries_sum{cluster=\"$cluster\", job=~\"$namespace/(loki|enterprise-logs)-write\"}[$__rate_interval])) * 1 / sum(rate(loki_ingester_chunk_entries_count{cluster=\"$cluster\", job=~\"$namespace/(loki|enterprise-logs)-write\"}[$__rate_interval]))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "Average", - "refId": "C", - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Log Entries Per Chunk", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "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, - "id": 6, - "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(rate(loki_chunk_store_index_entries_per_chunk_sum{cluster=\"$cluster\", job=~\"$namespace/(loki|enterprise-logs)-write\"}[5m])) / sum(rate(loki_chunk_store_index_entries_per_chunk_count{cluster=\"$cluster\", job=~\"$namespace/(loki|enterprise-logs)-write\"}[5m]))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "Index Entries", - "legendLink": null, - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Index Entries Per Chunk", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "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": true, - "title": "Flush Stats", - "titleSize": "h6" - }, - { - "collapse": false, - "height": "250px", - "panels": [ - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "id": 7, - "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": "loki_ingester_flush_queue_length{cluster=\"$cluster\", job=~\"$namespace/(loki|enterprise-logs)-write\"} or cortex_ingester_flush_queue_length{cluster=\"$cluster\", job=~\"$namespace/(loki|enterprise-logs)-write\"}", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{pod}}", - "legendLink": null, - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Queue Length", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "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": { - "1xx": "#EAB839", - "2xx": "#7EB26D", - "3xx": "#6ED0E0", - "4xx": "#EF843C", - "5xx": "#E24D42", - "error": "#E24D42", - "success": "#7EB26D" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 10, - "id": 8, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 0, - "links": [ ], - "nullPointMode": "null as zero", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "span": 6, - "stack": true, - "steppedLine": false, - "targets": [ - { - "expr": "sum by (status) (\n label_replace(label_replace(rate(loki_ingester_chunk_age_seconds_count{cluster=\"$cluster\", job=~\"$namespace/(loki|enterprise-logs)-write\"}[$__rate_interval]),\n \"status\", \"${1}xx\", \"status_code\", \"([0-9])..\"),\n \"status\", \"${1}\", \"status_code\", \"([a-z]+)\"))\n", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{status}}", - "refId": "A", - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Flush Rate", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "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": true, - "title": "Flush Stats", - "titleSize": "h6" - }, - { - "collapse": false, - "height": "250px", - "panels": [ - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "id": 9, - "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(rate(loki_ingester_chunks_flushed_total{cluster=\"$cluster\", job=~\"$namespace/(loki|enterprise-logs)-write\"}[$__rate_interval]))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{pod}}", - "legendLink": null, - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Chunks Flushed/Second", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "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, - "id": 10, - "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": true, - "steppedLine": false, - "targets": [ - { - "expr": "sum by (reason) (rate(loki_ingester_chunks_flushed_total{cluster=\"$cluster\", job=~\"$namespace/(loki|enterprise-logs)-write\"}[$__rate_interval])) / ignoring(reason) group_left sum(rate(loki_ingester_chunks_flushed_total{cluster=\"$cluster\", job=~\"$namespace/(loki|enterprise-logs)-write\"}[$__rate_interval]))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{reason}}", - "legendLink": null, - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Chunk Flush Reason", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "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{cluster=\"$cluster\", job=~\"$namespace/(loki|enterprise-logs)-write\"}[$__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{cluster=\"$cluster\", job=~\"$namespace/(loki|enterprise-logs)-write\"}[$__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": [ - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "id": 13, - "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": 12, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "histogram_quantile(0.99, sum(rate(loki_ingester_chunk_size_bytes_bucket{cluster=\"$cluster\", job=~\"$namespace/(loki|enterprise-logs)-write\"}[1m])) by (le))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "p99", - "legendLink": null, - "step": 10 - }, - { - "expr": "histogram_quantile(0.90, sum(rate(loki_ingester_chunk_size_bytes_bucket{cluster=\"$cluster\", job=~\"$namespace/(loki|enterprise-logs)-write\"}[1m])) by (le))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "p90", - "legendLink": null, - "step": 10 - }, - { - "expr": "histogram_quantile(0.50, sum(rate(loki_ingester_chunk_size_bytes_bucket{cluster=\"$cluster\", job=~\"$namespace/(loki|enterprise-logs)-write\"}[1m])) by (le))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "p50", - "legendLink": null, - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Chunk Size Quantiles", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "bytes", - "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": "Utilization", - "titleSize": "h6" - }, - { - "collapse": false, - "height": "250px", - "panels": [ - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "id": 14, - "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": 12, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "histogram_quantile(0.5, sum(rate(loki_ingester_chunk_bounds_hours_bucket{cluster=\"$cluster\", job=~\"$namespace/(loki|enterprise-logs)-write\"}[5m])) by (le))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "p50", - "legendLink": null, - "step": 10 - }, - { - "expr": "histogram_quantile(0.99, sum(rate(loki_ingester_chunk_bounds_hours_bucket{cluster=\"$cluster\", job=~\"$namespace/(loki|enterprise-logs)-write\"}[5m])) by (le))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "p99", - "legendLink": null, - "step": 10 - }, - { - "expr": "sum(rate(loki_ingester_chunk_bounds_hours_sum{cluster=\"$cluster\", job=~\"$namespace/(loki|enterprise-logs)-write\"}[5m])) / sum(rate(loki_ingester_chunk_bounds_hours_count{cluster=\"$cluster\", job=~\"$namespace/(loki|enterprise-logs)-write\"}[5m]))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "avg", - "legendLink": null, - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Chunk Duration hours (end-start)", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "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": 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" - }, - { - "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 - }, - { - "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{cluster=~\"$cluster\"}, 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": "utc", - "title": "Loki / Chunks", - "uid": "chunks", - "version": 0 - } \ No newline at end of file diff --git a/charts/loki/src/dashboards/loki-deletion.json b/charts/loki/src/dashboards/loki-deletion.json deleted file mode 100644 index 84bfee6..0000000 --- a/charts/loki/src/dashboards/loki-deletion.json +++ /dev/null @@ -1,632 +0,0 @@ -{ - "annotations": { - "list": [ ] - }, - "editable": true, - "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{cluster=~\"$cluster\", namespace=~\"$namespace\"})", - "format": "time_series", - "instant": true, - "intervalFactor": 2, - "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{cluster=~\"$cluster\", namespace=~\"$namespace\"})", - "format": "time_series", - "instant": true, - "intervalFactor": 2, - "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": [ - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "id": 3, - "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(increase(loki_compactor_delete_requests_received_total{cluster=~\"$cluster\", namespace=~\"$namespace\"}[1d]))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "received", - "legendLink": null, - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Delete Requests Received / Day", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "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, - "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", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "span": 6, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(increase(loki_compactor_delete_requests_processed_total{cluster=~\"$cluster\", namespace=~\"$namespace\"}[1d]))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "processed", - "legendLink": null, - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Delete Requests Processed / Day", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "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": true, - "title": "Churn", - "titleSize": "h6" - }, - { - "collapse": false, - "height": "250px", - "panels": [ - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "id": 5, - "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": 12, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(increase(loki_compactor_load_pending_requests_attempts_total{status=\"fail\", cluster=~\"$cluster\", namespace=~\"$namespace\"}[1h]))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "failures", - "legendLink": null, - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Failures in Loading Delete Requests / Hour", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "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": true, - "title": "Failures", - "titleSize": "h6" - }, - { - "collapse": false, - "height": "250px", - "panels": [ - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "id": 6, - "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": 12, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(rate(loki_compactor_deleted_lines{cluster=~\"$cluster\",job=~\"$namespace/(loki|enterprise-logs)-read\"}[$__rate_interval])) by (user)", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{user}}", - "legendLink": null, - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Lines Deleted / Sec", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "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": true, - "title": "Deleted lines", - "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" - }, - { - "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 - }, - { - "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{cluster=~\"$cluster\"}, 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": "utc", - "title": "Loki / Deletion", - "uid": "deletion", - "version": 0 - } \ No newline at end of file diff --git a/charts/loki/src/dashboards/loki-logs.json b/charts/loki/src/dashboards/loki-logs.json deleted file mode 100644 index 0f113cf..0000000 --- a/charts/loki/src/dashboards/loki-logs.json +++ /dev/null @@ -1,1073 +0,0 @@ -{ - "annotations": { - "list": [ ] - }, - "editable": true, - "gnetId": null, - "graphTooltip": 0, - "hideControls": false, - "id": 8, - "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(go_goroutines{cluster=\"$cluster\", namespace=\"$namespace\", pod=~\"$deployment.*\", pod=~\"$pod\"})", - "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", - "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{cluster=\"$cluster\", namespace=\"$namespace\", pod=~\"$deployment.*\", pod=~\"$pod\"}) 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(rate(container_cpu_usage_seconds_total{cluster=\"$cluster\", namespace=\"$namespace\", pod=~\"$deployment.*\", pod=~\"$pod\", container=~\"$container\"}[5m]))", - "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", - "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(container_memory_working_set_bytes{cluster=\"$cluster\", namespace=\"$namespace\", pod=~\"$deployment.*\", pod=~\"$pod\", 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", - "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(rate(container_network_transmit_bytes_total{cluster=\"$cluster\", namespace=\"$namespace\", pod=~\"$deployment.*\", pod=~\"$pod\"}[5m]))", - "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", - "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(rate(container_network_receive_bytes_total{cluster=\"$cluster\", namespace=\"$namespace\", pod=~\"$deployment.*\", pod=~\"$pod\"}[5m]))", - "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{cluster=\"$cluster\", namespace=\"$namespace\", pod=~\"$deployment.*\", pod=~\"$pod\", 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", - "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{cluster=\"$cluster\", exported_namespace=\"$namespace\", exported_pod=~\"$deployment.*\", exported_pod=~\"$pod\", container=~\"$container\"}[5m])) 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": "$logs", - "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({cluster=\"$cluster\", namespace=\"$namespace\", pod=~\"$deployment.*\", pod=~\"$pod\", container=~\"$container\" } |logfmt| level=~\"$level\" |= \"$filter\" [5m])) 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": "$logs", - "gridPos": { - "h": 19, - "w": 24, - "x": 0, - "y": 6 - }, - "id": 29, - "maxDataPoints": "", - "options": { - "showLabels": false, - "showTime": true, - "sortOrder": "Descending", - "wrapLogMessage": true - }, - "targets": [ - { - "expr": "{cluster=\"$cluster\", namespace=\"$namespace\", pod=~\"$deployment.*\", pod=~\"$pod\", 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" - }, - { - "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 - }, - { - "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{cluster=~\"$cluster\"}, namespace)", - "refresh": 1, - "regex": "", - "sort": 2, - "tagValuesQuery": "", - "tags": [ ], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "hide": 0, - "label": null, - "name": "logs", - "options": [ ], - "query": "loki", - "refresh": 1, - "regex": "", - "type": "datasource" - }, - { - "allValue": null, - "current": { }, - "datasource": "$datasource", - "hide": 0, - "includeAll": false, - "label": null, - "multi": false, - "name": "deployment", - "options": [ ], - "query": "label_values(kube_deployment_created{cluster=\"$cluster\", namespace=\"$namespace\"}, deployment)", - "refresh": 0, - "regex": "", - "sort": 1, - "tagValuesQuery": "", - "tags": [ ], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": { }, - "datasource": "$datasource", - "hide": 0, - "includeAll": false, - "label": null, - "multi": false, - "name": "pod", - "options": [ ], - "query": "label_values(kube_pod_container_info{cluster=\"$cluster\", namespace=\"$namespace\", pod=~\"$deployment.*\"}, pod)", - "refresh": 0, - "regex": "", - "sort": 1, - "tagValuesQuery": "", - "tags": [ ], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": { }, - "datasource": "$datasource", - "hide": 0, - "includeAll": false, - "label": null, - "multi": false, - "name": "container", - "options": [ ], - "query": "label_values(kube_pod_container_info{cluster=\"$cluster\", namespace=\"$namespace\", pod=~\"$pod\", pod=~\"$deployment.*\"}, 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": "utc", - "title": "Loki / Logs", - "uid": "logs", - "version": 0 - } \ No newline at end of file diff --git a/charts/loki/src/dashboards/loki-mixin-recording-rules.json b/charts/loki/src/dashboards/loki-mixin-recording-rules.json deleted file mode 100644 index fe49ec7..0000000 --- a/charts/loki/src/dashboards/loki-mixin-recording-rules.json +++ /dev/null @@ -1,657 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [ ], - "type": "dashboard" - }, - "type": "dashboard" - }, - { - "datasource": "${datasource}", - "enable": false, - "expr": "sum by (tenant) (changes(loki_ruler_wal_prometheus_tsdb_wal_truncations_total{tenant=~\"${tenant}\"}[$__rate_interval]))", - "iconColor": "red", - "name": "WAL Truncations", - "target": { - "queryType": "Azure Monitor", - "refId": "Anno" - }, - "titleFormat": "{{tenant}}" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "gnetId": null, - "graphTooltip": 0, - "iteration": 1635347545534, - "links": [ ], - "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": "", - "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": "", - "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": "", - "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 - } - ] - } - }, - "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": "", - "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": "", - "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": "", - "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": "", - "legendFormat": "{{tenant}}", - "refId": "A" - } - ], - "title": "Pending Samples", - "type": "timeseries" - } - ], - "schemaVersion": 31, - "style": "dark", - "tags": [ ], - "templating": { - "list": [ - { - "description": null, - "error": null, - "hide": 0, - "includeAll": false, - "label": "Datasource", - "multi": false, - "name": "datasource", - "options": [ ], - "query": "prometheus", - "queryValue": "", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "type": "datasource" - }, - { - "allValue": null, - "datasource": "${datasource}", - "definition": "label_values(loki_ruler_wal_samples_appended_total, tenant)", - "description": null, - "error": null, - "hide": 0, - "includeAll": true, - "label": "Tenant", - "multi": true, - "name": "tenant", - "options": [ ], - "query": { - "query": "label_values(loki_ruler_wal_samples_appended_total, tenant)", - "refId": "StandardVariableQuery" - }, - "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - } - ] - }, - "time": { - "from": "now-6h", - "to": "now" - }, - "timepicker": { }, - "timezone": "", - "title": "Recording Rules", - "uid": "2xKA_ZK7k", - "version": 9, - "weekStart": "" - } \ No newline at end of file diff --git a/charts/loki/src/dashboards/loki-operational.json b/charts/loki/src/dashboards/loki-operational.json deleted file mode 100644 index b69db23..0000000 --- a/charts/loki/src/dashboards/loki-operational.json +++ /dev/null @@ -1,6173 +0,0 @@ -{ - "annotations": { - "list": [ ] - }, - "editable": true, - "gnetId": null, - "graphTooltip": 0, - "hideControls": false, - "id": 68, - "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{cluster=\"$cluster\", job=~\"($namespace)/(loki|enterprise-logs)-read\", 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\"}[5m]),\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": "graph", - "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{cluster=\"$cluster\", job=~\"($namespace)/(loki|enterprise-logs)-write\", route=~\"api_prom_push|loki_api_v1_push\"}[5m]),\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": "graph", - "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": "", - "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{cluster=\"$cluster\", namespace=\"$namespace\"}[5m])) 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": "graph", - "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": 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{cluster=\"$cluster\", namespace=\"$namespace\"}[5m])) 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": "graph", - "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{cluster=\"$cluster\", namespace=\"$namespace\"}[10m]) > 0", - "hide": false, - "interval": "", - "legendFormat": "{{container}}-{{pod}}", - "refId": "B" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "Container Restarts", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "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": 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) (job_route:loki_request_duration_seconds_bucket:sum_rate{job=~\"($namespace)/(loki|enterprise-logs)-write\", route=~\"api_prom_push|loki_api_v1_push\", cluster=~\"$cluster\"})) * 1e3", - "legendFormat": ".99", - "refId": "A" - }, - { - "expr": "histogram_quantile(0.75, sum by (le) (job_route:loki_request_duration_seconds_bucket:sum_rate{job=~\"($namespace)/(loki|enterprise-logs)-write\", route=~\"api_prom_push|loki_api_v1_push\", cluster=~\"$cluster\"})) * 1e3", - "legendFormat": ".9", - "refId": "B" - }, - { - "expr": "histogram_quantile(0.5, sum by (le) (job_route:loki_request_duration_seconds_bucket:sum_rate{job=~\"($namespace)/(loki|enterprise-logs)-write\", route=~\"api_prom_push|loki_api_v1_push\", cluster=~\"$cluster\"})) * 1e3", - "legendFormat": ".5", - "refId": "C" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "Push Latency", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "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": 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) (job:loki_request_duration_seconds_bucket:sum_rate{job=~\"($namespace)/(loki|enterprise-logs)-write\", cluster=~\"$cluster\"})) * 1e3", - "legendFormat": ".99", - "refId": "A" - }, - { - "expr": "histogram_quantile(0.9, sum by (le) (job:loki_request_duration_seconds_bucket:sum_rate{job=~\"($namespace)/(loki|enterprise-logs)-write\", cluster=~\"$cluster\"})) * 1e3", - "legendFormat": ".9", - "refId": "B" - }, - { - "expr": "histogram_quantile(0.5, sum by (le) (job:loki_request_duration_seconds_bucket:sum_rate{job=~\"($namespace)/(loki|enterprise-logs)-write\", cluster=~\"$cluster\"})) * 1e3", - "legendFormat": ".5", - "refId": "C" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "Distributor Latency", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "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{cluster=\"$cluster\", namespace=\"$namespace\", job=~\"($namespace)/(loki|enterprise-logs)-write\", status_code!~\"5[0-9]{2}\"}[5m])) by (route)\n/\nsum(rate(loki_request_duration_seconds_count{cluster=\"$cluster\", namespace=\"$namespace\", job=~\"($namespace)/(loki|enterprise-logs)-write\"}[5m])) by (route)", - "interval": "", - "legendFormat": "{{route}}", - "refId": "A" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "Distributor Success Rate", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "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": { } - }, - "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) (job_route:loki_request_duration_seconds_bucket:sum_rate{job=~\"($namespace)/(loki|enterprise-logs)-write\", route=\"/logproto.Pusher/Push\", cluster=~\"$cluster\"})) * 1e3", - "legendFormat": ".99", - "refId": "A" - }, - { - "expr": "histogram_quantile(0.9, sum by (le) (job_route:loki_request_duration_seconds_bucket:sum_rate{job=~\"($namespace)/(loki|enterprise-logs)-write\", route=\"/logproto.Pusher/Push\", cluster=~\"$cluster\"})) * 1e3", - "hide": false, - "legendFormat": ".9", - "refId": "B" - }, - { - "expr": "histogram_quantile(0.5, sum by (le) (job_route:loki_request_duration_seconds_bucket:sum_rate{job=~\"($namespace)/(loki|enterprise-logs)-write\", route=\"/logproto.Pusher/Push\", cluster=~\"$cluster\"})) * 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": "graph", - "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{cluster=\"$cluster\", namespace=\"$namespace\", job=~\"($namespace)/(loki|enterprise-logs)-write\", status_code!~\"5[0-9]{2}\", route=\"/logproto.Pusher/Push\"}[5m])) by (route)\n/\nsum(rate(loki_request_duration_seconds_count{cluster=\"$cluster\", namespace=\"$namespace\", job=~\"($namespace)/(loki|enterprise-logs)-write\", route=\"/logproto.Pusher/Push\"}[5m])) by (route)", - "interval": "", - "legendFormat": "{{route}}", - "refId": "A" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "Ingester Success Rate Write", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "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": { } - }, - "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) (job_route:loki_request_duration_seconds_bucket:sum_rate{job=~\"($namespace)/(loki|enterprise-logs)-read\", 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\", cluster=\"$cluster\"}))", - "legendFormat": "{{route}}-.99", - "refId": "A" - }, - { - "expr": "histogram_quantile(0.9, sum by (le,route) (job_route:loki_request_duration_seconds_bucket:sum_rate{job=~\"($namespace)/(loki|enterprise-logs)-read\", 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\", cluster=\"$cluster\"}))", - "legendFormat": "{{route}}-.9", - "refId": "B" - }, - { - "expr": "histogram_quantile(0.5, sum by (le,route) (job_route:loki_request_duration_seconds_bucket:sum_rate{job=~\"($namespace)/(loki|enterprise-logs)-read\", 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\", cluster=\"$cluster\"}))", - "legendFormat": "{{route}}-.5", - "refId": "C" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "Query Latency", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "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": 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) (job_route:loki_request_duration_seconds_bucket:sum_rate{job=~\"($namespace)/(loki|enterprise-logs)-read\", 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\", cluster=\"$cluster\"})) * 1e3", - "legendFormat": ".99-{{route}}", - "refId": "A" - }, - { - "expr": "histogram_quantile(0.9, sum by (le,route) (job_route:loki_request_duration_seconds_bucket:sum_rate{job=~\"($namespace)/(loki|enterprise-logs)-read\", 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\", cluster=\"$cluster\"})) * 1e3", - "legendFormat": ".9-{{route}}", - "refId": "B" - }, - { - "expr": "histogram_quantile(0.5, sum by (le,route) (job_route:loki_request_duration_seconds_bucket:sum_rate{job=~\"($namespace)/(loki|enterprise-logs)-read\", 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\", cluster=\"$cluster\"})) * 1e3", - "legendFormat": ".5-{{route}}", - "refId": "C" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "Querier Latency", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "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{cluster=\"$cluster\", namespace=\"$namespace\", job=~\"($namespace)/(loki|enterprise-logs)-read\", status_code!~\"5[0-9]{2}\"}[5m])) by (route)\n/\nsum(rate(loki_request_duration_seconds_count{cluster=\"$cluster\", namespace=\"$namespace\", job=~\"($namespace)/(loki|enterprise-logs)-read\"}[5m])) by (route)", - "interval": "", - "legendFormat": "{{route}}", - "refId": "A" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "Querier Success Rate", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "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": { } - }, - "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) (job_route:loki_request_duration_seconds_bucket:sum_rate{job=~\"($namespace)/(loki|enterprise-logs)-write\", route=~\"/logproto.Querier/Query|/logproto.Querier/Label|/logproto.Querier/Series|/logproto.Querier/QuerySample|/logproto.Querier/GetChunkIDs\", cluster=\"$cluster\"})) * 1e3", - "legendFormat": ".99-{{route}}", - "refId": "A" - }, - { - "expr": "histogram_quantile(0.9, sum by (le,route) (job_route:loki_request_duration_seconds_bucket:sum_rate{job=~\"($namespace)/(loki|enterprise-logs)-write\", route=~\"/logproto.Querier/Query|/logproto.Querier/Label|/logproto.Querier/Series|/logproto.Querier/QuerySample|/logproto.Querier/GetChunkIDs\", cluster=\"$cluster\"})) * 1e3", - "legendFormat": ".9-{{route}}", - "refId": "B" - }, - { - "expr": "histogram_quantile(0.5, sum by (le,route) (job_route:loki_request_duration_seconds_bucket:sum_rate{job=~\"($namespace)/(loki|enterprise-logs)-write\", route=~\"/logproto.Querier/Query|/logproto.Querier/Label|/logproto.Querier/Series|/logproto.Querier/QuerySample|/logproto.Querier/GetChunkIDs\", cluster=\"$cluster\"})) * 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": "graph", - "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{cluster=\"$cluster\", namespace=\"$namespace\", job=~\"($namespace)/(loki|enterprise-logs)-write\", status_code!~\"5[0-9]{2}\", route=~\"/logproto.Querier/Query|/logproto.Querier/Label|/logproto.Querier/Series|/logproto.Querier/QuerySample|/logproto.Querier/GetChunkIDs\"}[5m])) by (route)\n/\nsum(rate(loki_request_duration_seconds_count{cluster=\"$cluster\", namespace=\"$namespace\", job=~\"($namespace)/(loki|enterprise-logs)-write\", route=~\"/logproto.Querier/Query|/logproto.Querier/Label|/logproto.Querier/Series|/logproto.Querier/QuerySample|/logproto.Querier/GetChunkIDs\"}[5m])) by (route)", - "interval": "", - "legendFormat": "{{route}}", - "refId": "A" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "Ingester Success Rate Read", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "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{cluster=\"$cluster\",namespace=\"$namespace\"}[1m])))", - "interval": "", - "legendFormat": "{{ tenant }} - {{ reason }}", - "refId": "A" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "Discarded Lines", - "tooltip": { - "shared": false, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "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 - } - }, - { - "columns": [ ], - "datasource": "$datasource", - "fontSize": "100%", - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 27 - }, - "id": 113, - "pageSize": null, - "panels": [ ], - "showHeader": true, - "sort": { - "col": 3, - "desc": true - }, - "styles": [ - { - "alias": "Time", - "align": "auto", - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "pattern": "Time", - "type": "hidden" - }, - { - "alias": "", - "align": "auto", - "colorMode": null, - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "mappingType": 1, - "pattern": "tenant", - "thresholds": [ ], - "type": "string", - "unit": "short" - }, - { - "alias": "", - "align": "auto", - "colorMode": null, - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "mappingType": 1, - "pattern": "reason", - "thresholds": [ ], - "type": "number", - "unit": "short" - }, - { - "alias": "", - "align": "right", - "colorMode": null, - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "decimals": 2, - "pattern": "/.*/", - "thresholds": [ ], - "type": "number", - "unit": "short" - } - ], - "targets": [ - { - "expr": "topk(10, sum by (tenant, reason) (sum_over_time(increase(loki_discarded_samples_total{cluster=\"$cluster\",namespace=\"$namespace\"}[1m])[$__range:1m])))", - "format": "table", - "instant": true, - "interval": "", - "legendFormat": "{{ tenant }} - {{ reason }}", - "refId": "A" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Discarded Lines Per Interval", - "transform": "table", - "type": "table-old" - } - ], - "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": "node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{cluster=\"$cluster\", namespace=\"$namespace\", pod=~\"(loki|enterprise-logs)-write.*\"}", - "intervalFactor": 3, - "legendFormat": "{{pod}}-{{container}}", - "refId": "A" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "CPU Usage", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "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": 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{cluster=\"$cluster\", namespace=\"$namespace\", pod=~\"(loki|enterprise-logs)-write.*\"}", - "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": "graph", - "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": "$logs", - "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({cluster=\"$cluster\", namespace=\"$namespace\", job=~\"($namespace)/(loki|enterprise-logs)-write\"} | logfmt | level=\"error\"[1m]))", - "refId": "A" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "Error Log Rate", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "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": "$logs", - "gridPos": { - "h": 18, - "w": 12, - "x": 12, - "y": 32 - }, - "id": 29, - "options": { - "showLabels": false, - "showTime": false, - "sortOrder": "Descending", - "wrapLogMessage": true - }, - "panels": [ ], - "targets": [ - { - "expr": "{cluster=\"$cluster\", namespace=\"$namespace\", job=~\"($namespace)/(loki|enterprise-logs)-write\"} | logfmt | 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{cluster=\"$cluster\", namespace=\"$namespace\", job=~\"($namespace)/(loki|enterprise-logs)-write\", status_code!~\"5[0-9]{2}\"}[5m])) by (route)\n/\nsum(rate(loki_request_duration_seconds_count{cluster=\"$cluster\", namespace=\"$namespace\", job=~\"($namespace)/(loki|enterprise-logs)-write\"}[5m])) by (route)", - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{route}}", - "refId": "A" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "Success Rate", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "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": 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{cluster=\"$cluster\", namespace=\"$namespace\"}[5m])) by (ingester)", - "intervalFactor": 1, - "legendFormat": "{{ingester}}", - "refId": "A" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "Append Failures By Ingester", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "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": 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{cluster=\"$cluster\", namespace=\"$namespace\"}[5m])) 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": "graph", - "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": 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{cluster=\"$cluster\", namespace=\"$namespace\"}[5m])) 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": "graph", - "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": "Write Path", - "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{cluster=\"$cluster\",job=~\"($namespace)/(loki|enterprise-logs)-write\"}))", - "interval": "", - "legendFormat": "{{ tenant }}", - "refId": "A" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "Active Streams", - "tooltip": { - "shared": false, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "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{cluster=\"$cluster\",job=~\"($namespace)/(loki|enterprise-logs)-write\"}[1m]) > 0))", - "interval": "", - "legendFormat": "{{ tenant }}", - "refId": "A" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "Streams Created/Sec", - "tooltip": { - "shared": false, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "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{cluster=\"$cluster\",job=~\"($namespace)/(loki|enterprise-logs)-write\"}[1m]))", - "interval": "", - "legendFormat": "Chunks", - "refId": "A" - }, - { - "expr": "sum(increase(loki_chunk_store_deduped_chunks_total{cluster=\"$cluster\", job=~\"($namespace)/(loki|enterprise-logs)-write\"}[1m]))/sum(increase(loki_ingester_chunks_flushed_total{cluster=\"$cluster\", job=~\"($namespace)/(loki|enterprise-logs)-write\"}[1m])) < 1", - "interval": "", - "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": "graph", - "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{cluster=\"$cluster\",job=~\"($namespace)/(loki|enterprise-logs)-write\"}[1m])) by (le)", - "format": "heatmap", - "instant": false, - "interval": "", - "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{cluster=~\"$cluster\",job=~\"$namespace/ingester\", namespace=~\"$namespace\"}[$__rate_interval])) / ignoring(reason) group_left sum(rate(loki_ingester_chunks_flushed_total{cluster=~\"$cluster\",job=~\"$namespace/ingester\", namespace=~\"$namespace\"}[$__rate_interval]))", - "interval": "", - "legendFormat": "{{ reason }}" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "Chunk Flush Reason %", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "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{cluster=\"$cluster\", job=~\"($namespace)/(loki|enterprise-logs)-write\"}[1m]))", - "format": "heatmap", - "instant": false, - "interval": "", - "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": "node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{cluster=\"$cluster\", namespace=\"$namespace\", pod=~\"(loki|enterprise-logs)-read.*\"}", - "intervalFactor": 3, - "legendFormat": "{{pod}}-{{container}}", - "refId": "A" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "CPU Usage", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "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": 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{cluster=\"$cluster\", namespace=\"$namespace\", pod=~\"(loki|enterprise-logs)-read.*\"}", - "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": "graph", - "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": "$logs", - "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({cluster=\"$cluster\", namespace=\"$namespace\", job=~\"($namespace)/(loki|enterprise-logs)-read\"} | logfmt | level=\"error\"[1m]))", - "refId": "A" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "Error Log Rate", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "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": "$logs", - "gridPos": { - "h": 18, - "w": 18, - "x": 12, - "y": 35 - }, - "id": 66, - "options": { - "showLabels": false, - "showTime": false, - "sortOrder": "Descending", - "wrapLogMessage": true - }, - "panels": [ ], - "targets": [ - { - "expr": "{cluster=\"$cluster\", namespace=\"$namespace\", job=~\"($namespace)/(loki|enterprise-logs)-read\"} | logfmt | 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{cluster=\"$cluster\", namespace=\"$namespace\", job=~\"($namespace)/(loki|enterprise-logs)-read\", status_code!~\"5[0-9]{2}\"}[1m])) by (route)\n/\nsum(rate(loki_request_duration_seconds_count{cluster=\"$cluster\", namespace=\"$namespace\", job=~\"($namespace)/(loki|enterprise-logs)-read\"}[1m])) by (route)", - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{route}}", - "refId": "A" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "Success Rate", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "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": "Read Path", - "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", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 30 - }, - "hiddenSeries": false, - "id": 53, - "interval": "", - "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{cluster=\"$cluster\", namespace=\"$namespace\"}[5m])) 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{cluster=\"$cluster\", namespace=\"$namespace\"}[5m])) 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{cluster=\"$cluster\", namespace=\"$namespace\"}[5m])) 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": "graph", - "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": "", - "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{cluster=\"$cluster\", namespace=\"$namespace\"}[5m])) 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": "graph", - "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", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 31 - }, - "hiddenSeries": false, - "id": 55, - "interval": "", - "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{cluster=\"$cluster\", namespace=\"$namespace\"}[5m])) by (operation, le))", - "intervalFactor": 1, - "legendFormat": ".99-{{operation}}", - "refId": "A" - }, - { - "expr": "histogram_quantile(.9, sum(rate(loki_consul_request_duration_seconds_bucket{cluster=\"$cluster\", namespace=\"$namespace\"}[5m])) by (operation, le))", - "hide": false, - "legendFormat": ".9-{{operation}}", - "refId": "B" - }, - { - "expr": "histogram_quantile(.5, sum(rate(loki_consul_request_duration_seconds_bucket{cluster=\"$cluster\", namespace=\"$namespace\"}[5m])) 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": "graph", - "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": 39 - }, - "hiddenSeries": false, - "id": 58, - "interval": "", - "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{cluster=\"$cluster\", namespace=\"$namespace\"}[5m])) 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": "graph", - "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", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 6, - "x": 0, - "y": 9 - }, - "hiddenSeries": false, - "id": 41, - "interval": "", - "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{cluster=\"$cluster\", namespace=\"$namespace\", operation=\"/google.bigtable.v2.Bigtable/MutateRows\"}[5m])) by (operation, le))", - "intervalFactor": 1, - "legendFormat": ".9", - "refId": "A" - }, - { - "expr": "histogram_quantile(.9, sum(rate(loki_bigtable_request_duration_seconds_bucket{cluster=\"$cluster\", namespace=\"$namespace\", operation=\"/google.bigtable.v2.Bigtable/MutateRows\"}[5m])) by (operation, le))", - "refId": "B" - }, - { - "expr": "histogram_quantile(.5, sum(rate(loki_bigtable_request_duration_seconds_bucket{cluster=\"$cluster\", namespace=\"$namespace\", operation=\"/google.bigtable.v2.Bigtable/MutateRows\"}[5m])) by (operation, le))", - "refId": "C" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "MutateRows Latency", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "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": 7, - "w": 6, - "x": 6, - "y": 9 - }, - "hiddenSeries": false, - "id": 46, - "interval": "", - "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{cluster=\"$cluster\", namespace=\"$namespace\", operation=\"/google.bigtable.v2.Bigtable/ReadRows\"}[5m])) by (operation, le))", - "interval": "", - "intervalFactor": 1, - "legendFormat": "99%", - "refId": "A" - }, - { - "expr": "histogram_quantile(.9, sum(rate(loki_bigtable_request_duration_seconds_bucket{cluster=\"$cluster\", namespace=\"$namespace\", operation=\"/google.bigtable.v2.Bigtable/ReadRows\"}[5m])) by (operation, le))", - "interval": "", - "legendFormat": "90%", - "refId": "B" - }, - { - "expr": "histogram_quantile(.5, sum(rate(loki_bigtable_request_duration_seconds_bucket{cluster=\"$cluster\", namespace=\"$namespace\", operation=\"/google.bigtable.v2.Bigtable/ReadRows\"}[5m])) by (operation, le))", - "interval": "", - "legendFormat": "50%", - "refId": "C" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "ReadRows Latency", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "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": 7, - "w": 6, - "x": 12, - "y": 9 - }, - "hiddenSeries": false, - "id": 44, - "interval": "", - "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{cluster=\"$cluster\", namespace=\"$namespace\", operation=\"/google.bigtable.admin.v2.BigtableTableAdmin/GetTable\"}[5m])) by (operation, le))", - "interval": "", - "intervalFactor": 1, - "legendFormat": "99%", - "refId": "A" - }, - { - "expr": "histogram_quantile(.9, sum(rate(loki_bigtable_request_duration_seconds_bucket{cluster=\"$cluster\", namespace=\"$namespace\", operation=\"/google.bigtable.admin.v2.BigtableTableAdmin/GetTable\"}[5m])) by (operation, le))", - "interval": "", - "legendFormat": "90%", - "refId": "B" - }, - { - "expr": "histogram_quantile(.5, sum(rate(loki_bigtable_request_duration_seconds_bucket{cluster=\"$cluster\", namespace=\"$namespace\", operation=\"/google.bigtable.admin.v2.BigtableTableAdmin/GetTable\"}[5m])) by (operation, le))", - "interval": "", - "legendFormat": "50%", - "refId": "C" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "GetTable Latency", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "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": 7, - "w": 6, - "x": 18, - "y": 9 - }, - "hiddenSeries": false, - "id": 45, - "interval": "", - "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{cluster=\"$cluster\", namespace=\"$namespace\", operation=\"/google.bigtable.admin.v2.BigtableTableAdmin/ListTables\"}[5m])) by (operation, le))", - "intervalFactor": 1, - "legendFormat": ".9", - "refId": "A" - }, - { - "expr": "histogram_quantile(.9, sum(rate(loki_bigtable_request_duration_seconds_bucket{cluster=\"$cluster\", namespace=\"$namespace\", operation=\"/google.bigtable.admin.v2.BigtableTableAdmin/ListTables\"}[5m])) by (operation, le))", - "refId": "B" - }, - { - "expr": "histogram_quantile(.5, sum(rate(loki_bigtable_request_duration_seconds_bucket{cluster=\"$cluster\", namespace=\"$namespace\", operation=\"/google.bigtable.admin.v2.BigtableTableAdmin/ListTables\"}[5m])) by (operation, le))", - "refId": "C" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "ListTables Latency", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "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": 7, - "w": 6, - "x": 0, - "y": 16 - }, - "hiddenSeries": false, - "id": 47, - "interval": "", - "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{cluster=\"$cluster\", namespace=\"$namespace\", operation=\"/google.bigtable.v2.Bigtable/MutateRows\"}[5m])) 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": "graph", - "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": 7, - "w": 6, - "x": 6, - "y": 16 - }, - "hiddenSeries": false, - "id": 50, - "interval": "", - "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{cluster=\"$cluster\", namespace=\"$namespace\", operation=\"/google.bigtable.v2.Bigtable/ReadRows\"}[5m])) 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": "graph", - "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": 7, - "w": 6, - "x": 12, - "y": 16 - }, - "hiddenSeries": false, - "id": 48, - "interval": "", - "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{cluster=\"$cluster\", namespace=\"$namespace\", operation=\"/google.bigtable.admin.v2.BigtableTableAdmin/GetTable\"}[5m])) 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": "graph", - "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": 7, - "w": 6, - "x": 18, - "y": 16 - }, - "hiddenSeries": false, - "id": 49, - "interval": "", - "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{cluster=\"$cluster\", namespace=\"$namespace\", operation=\"/google.bigtable.admin.v2.BigtableTableAdmin/ListTables\"}[5m])) 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": "graph", - "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", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 33 - }, - "hiddenSeries": false, - "id": 61, - "interval": "", - "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{cluster=\"$cluster\", namespace=\"$namespace\"}[5m])) by (operation, le))", - "intervalFactor": 1, - "legendFormat": ".99-{{operation}}", - "refId": "A" - }, - { - "expr": "histogram_quantile(.9, sum(rate(loki_gcs_request_duration_seconds_bucket{cluster=\"$cluster\", namespace=\"$namespace\"}[5m])) by (operation, le))", - "hide": false, - "legendFormat": ".9-{{operation}}", - "refId": "B" - }, - { - "expr": "histogram_quantile(.5, sum(rate(loki_gcs_request_duration_seconds_bucket{cluster=\"$cluster\", namespace=\"$namespace\"}[5m])) 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": "graph", - "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": "", - "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{cluster=\"$cluster\", namespace=\"$namespace\"}[5m])) 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": "graph", - "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(cortex_dynamo_failures_total{cluster=\"$cluster\", namespace=\"$namespace\"}[5m]))", - "refId": "A" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "Failure Rate", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "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(cortex_dynamo_consumed_capacity_total{cluster=\"$cluster\", namespace=\"$namespace\"}[5m]))", - "refId": "A" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "Consumed Capacity Rate", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "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(cortex_dynamo_throttled_total{cluster=\"$cluster\", namespace=\"$namespace\"}[5m]))", - "refId": "A" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "Throttled Rate", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "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(cortex_dynamo_dropped_requests_total{cluster=\"$cluster\", namespace=\"$namespace\"}[5m]))", - "refId": "A" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "Dropped Rate", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "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(cortex_dynamo_query_pages_count{cluster=\"$cluster\", namespace=\"$namespace\"}[5m])))", - "legendFormat": ".99", - "refId": "A" - }, - { - "expr": "histogram_quantile(.9, sum(rate(cortex_dynamo_query_pages_count{cluster=\"$cluster\", namespace=\"$namespace\"}[5m])))", - "legendFormat": ".9", - "refId": "B" - }, - { - "expr": "histogram_quantile(.5, sum(rate(cortex_dynamo_query_pages_count{cluster=\"$cluster\", namespace=\"$namespace\"}[5m])))", - "legendFormat": ".5", - "refId": "C" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "Query Pages", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "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": 6, - "y": 15 - }, - "id": 87, - "interval": "", - "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(cortex_dynamo_request_duration_seconds_bucket{cluster=\"$cluster\", namespace=\"$namespace\"}[5m])) by (operation, le))", - "intervalFactor": 1, - "legendFormat": ".99-{{operation}}", - "refId": "A" - }, - { - "expr": "histogram_quantile(.9, sum(rate(cortex_dynamo_request_duration_seconds_bucket{cluster=\"$cluster\", namespace=\"$namespace\"}[5m])) by (operation, le))", - "hide": false, - "legendFormat": ".9-{{operation}}", - "refId": "B" - }, - { - "expr": "histogram_quantile(.5, sum(rate(cortex_dynamo_request_duration_seconds_bucket{cluster=\"$cluster\", namespace=\"$namespace\"}[5m])) 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": "graph", - "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": "", - "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(cortex_dynamo_request_duration_seconds_count{cluster=\"$cluster\", namespace=\"$namespace\"}[5m])) 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": "graph", - "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", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 10 - }, - "id": 79, - "interval": "", - "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{cluster=\"$cluster\", namespace=\"$namespace\"}[5m])) by (operation, le))", - "intervalFactor": 1, - "legendFormat": ".99-{{operation}}", - "refId": "A" - }, - { - "expr": "histogram_quantile(.9, sum(rate(loki_s3_request_duration_seconds_bucket{cluster=\"$cluster\", namespace=\"$namespace\"}[5m])) by (operation, le))", - "hide": false, - "legendFormat": ".9-{{operation}}", - "refId": "B" - }, - { - "expr": "histogram_quantile(.5, sum(rate(loki_s3_request_duration_seconds_bucket{cluster=\"$cluster\", namespace=\"$namespace\"}[5m])) 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": "graph", - "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": "", - "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{cluster=\"$cluster\", namespace=\"$namespace\"}[5m])) 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": "graph", - "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", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 10 - }, - "id": 79, - "interval": "", - "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{cluster=\"$cluster\", namespace=\"$namespace\"}[5m])) by (operation, le))", - "intervalFactor": 1, - "legendFormat": ".99-{{operation}}", - "refId": "A" - }, - { - "expr": "histogram_quantile(.9, sum(rate(loki_azure_blob_request_duration_seconds_bucket{cluster=\"$cluster\", namespace=\"$namespace\"}[5m])) by (operation, le))", - "hide": false, - "legendFormat": ".9-{{operation}}", - "refId": "B" - }, - { - "expr": "histogram_quantile(.5, sum(rate(loki_azure_blob_request_duration_seconds_bucket{cluster=\"$cluster\", namespace=\"$namespace\"}[5m])) 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": "graph", - "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": "", - "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{cluster=\"$cluster\", namespace=\"$namespace\"}[5m])) 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": "graph", - "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", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 10 - }, - "id": 115, - "interval": "", - "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{cluster=\"$cluster\", namespace=\"$namespace\"}[5m])) by (operation, le))", - "intervalFactor": 1, - "legendFormat": ".99-{{operation}}", - "refId": "A" - }, - { - "expr": "histogram_quantile(.9, sum(rate(loki_boltdb_shipper_request_duration_seconds_bucket{cluster=\"$cluster\", namespace=\"$namespace\"}[5m])) by (operation, le))", - "hide": false, - "legendFormat": ".9-{{operation}}", - "refId": "B" - }, - { - "expr": "histogram_quantile(.5, sum(rate(loki_boltdb_shipper_request_duration_seconds_bucket{cluster=\"$cluster\", namespace=\"$namespace\"}[5m])) 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": "graph", - "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": "", - "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{cluster=\"$cluster\", namespace=\"$namespace\"}[5m])) 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": "graph", - "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": "logs", - "options": [ ], - "query": "loki", - "refresh": 1, - "regex": "", - "type": "datasource" - }, - { - "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 - }, - { - "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{cluster=~\"$cluster\"}, 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": "utc", - "title": "Loki / Operational", - "uid": "operational", - "version": 0 - } diff --git a/charts/loki/src/dashboards/loki-reads-resources.json b/charts/loki/src/dashboards/loki-reads-resources.json deleted file mode 100644 index 6fa166f..0000000 --- a/charts/loki/src/dashboards/loki-reads-resources.json +++ /dev/null @@ -1,964 +0,0 @@ -{ - "annotations": { - "list": [ ] - }, - "editable": true, - "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": [ - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "gridPos": { }, - "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": [ - { - "alias": "limit", - "color": "#E02F44", - "fill": 0 - } - ], - "spaceLength": 10, - "span": 6, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum by(pod) (rate(container_cpu_usage_seconds_total{cluster=~\"$cluster\", namespace=~\"$namespace\", container=\"loki\", pod=~\"(loki|enterprise-logs)-read.*\"}[$__rate_interval]))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{pod}}", - "legendLink": null, - "step": 10 - }, - { - "expr": "min(container_spec_cpu_quota{cluster=~\"$cluster\", namespace=~\"$namespace\", container=\"loki\", pod=~\"(loki|enterprise-logs)-read.*\"} / container_spec_cpu_period{cluster=~\"$cluster\", namespace=~\"$namespace\", container=\"loki\", pod=~\"(loki|enterprise-logs)-read.*\"})", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "limit", - "legendLink": null, - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "CPU", - "tooltip": { - "sort": 2 - }, - "type": "graph", - "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, - "gridPos": { }, - "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": [ - { - "alias": "limit", - "color": "#E02F44", - "fill": 0 - } - ], - "spaceLength": 10, - "span": 6, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "max by(pod) (container_memory_working_set_bytes{cluster=~\"$cluster\", namespace=~\"$namespace\", container=\"loki\", pod=~\"(loki|enterprise-logs)-read.*\"})", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{pod}}", - "legendLink": null, - "step": 10 - }, - { - "expr": "min(container_spec_memory_limit_bytes{cluster=~\"$cluster\", namespace=~\"$namespace\", container=\"loki\", pod=~\"(loki|enterprise-logs)-read.*\"} > 0)", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "limit", - "legendLink": null, - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Memory (workingset)", - "tooltip": { - "sort": 2 - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "bytes", - "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, - "gridPos": { }, - "id": 3, - "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 by(pod) (go_memstats_heap_inuse_bytes{cluster=~\"$cluster\", job=~\"($namespace)/(loki|enterprise-logs)-read\"})", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{pod}}", - "legendLink": null, - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Memory (go heap inuse)", - "tooltip": { - "sort": 2 - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "bytes", - "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": 10, - "gridPos": { }, - "id": 4, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 0, - "links": [ ], - "nullPointMode": "null as zero", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "span": 6, - "stack": true, - "steppedLine": false, - "targets": [ - { - "expr": "sum by(instance, pod, 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{cluster=~\"$cluster\", namespace=~\"$namespace\", container=\"loki\", pod=~\"(loki|enterprise-logs)-read.*\", device!~\".*sda.*\"}), \"device\", \"$1\", \"device\", \"/dev/(.*)\") * 0)\n", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{pod}} - {{device}}", - "legendLink": null, - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Disk Writes", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "Bps", - "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": 10, - "gridPos": { }, - "id": 5, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 0, - "links": [ ], - "nullPointMode": "null as zero", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "span": 6, - "stack": true, - "steppedLine": false, - "targets": [ - { - "expr": "sum by(instance, pod, 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{cluster=~\"$cluster\", namespace=~\"$namespace\", container=\"loki\", pod=~\"(loki|enterprise-logs)-read.*\", device!~\".*sda.*\"}), \"device\", \"$1\", \"device\", \"/dev/(.*)\") * 0)\n", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{pod}} - {{device}}", - "legendLink": null, - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Disk Reads", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "Bps", - "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, - "gridPos": { }, - "id": 6, - "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 by(persistentvolumeclaim) (kubelet_volume_stats_used_bytes{cluster=~\"$cluster\", namespace=~\"$namespace\"} / kubelet_volume_stats_capacity_bytes{cluster=~\"$cluster\", namespace=~\"$namespace\"}) and count by(persistentvolumeclaim) (kube_persistentvolumeclaim_labels{cluster=~\"$cluster\", namespace=~\"$namespace\",label_name=~\"(loki|enterprise-logs)-read.*\"})", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{persistentvolumeclaim}}", - "legendLink": null, - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Disk Space Utilization", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "percentunit", - "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, - "gridPos": { }, - "id": 7, - "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": "loki_boltdb_shipper_query_readiness_duration_seconds{cluster=~\"$cluster\", namespace=~\"$namespace\"}", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "duration", - "legendLink": null, - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Query Readiness Duration", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "s", - "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": "Read path", - "titleSize": "h6", - "type": "row" - }, - { - "collapse": false, - "height": "250px", - "panels": [ - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "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", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "limit", - "color": "#E02F44", - "fill": 0 - } - ], - "spaceLength": 10, - "span": 4, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum by(pod) (rate(container_cpu_usage_seconds_total{cluster=~\"$cluster\", namespace=~\"$namespace\", container=\"loki\", pod=~\"(loki|enterprise-logs)-write.*\"}[$__rate_interval]))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{pod}}", - "legendLink": null, - "step": 10 - }, - { - "expr": "min(container_spec_cpu_quota{cluster=~\"$cluster\", namespace=~\"$namespace\", container=\"loki\", pod=~\"(loki|enterprise-logs)-write.*\"} / container_spec_cpu_period{cluster=~\"$cluster\", namespace=~\"$namespace\", container=\"loki\", pod=~\"(loki|enterprise-logs)-write.*\"})", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "limit", - "legendLink": null, - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "CPU", - "tooltip": { - "sort": 2 - }, - "type": "graph", - "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, - "id": 9, - "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": [ - { - "alias": "limit", - "color": "#E02F44", - "fill": 0 - } - ], - "spaceLength": 10, - "span": 4, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "max by(pod) (container_memory_working_set_bytes{cluster=~\"$cluster\", namespace=~\"$namespace\", container=\"loki\", pod=~\"(loki|enterprise-logs)-write.*\"})", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{pod}}", - "legendLink": null, - "step": 10 - }, - { - "expr": "min(container_spec_memory_limit_bytes{cluster=~\"$cluster\", namespace=~\"$namespace\", container=\"loki\", pod=~\"(loki|enterprise-logs)-write.*\"} > 0)", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "limit", - "legendLink": null, - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Memory (workingset)", - "tooltip": { - "sort": 2 - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "bytes", - "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, - "id": 10, - "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": 4, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum by(pod) (go_memstats_heap_inuse_bytes{cluster=~\"$cluster\", job=~\"($namespace)/(loki|enterprise-logs)-write\"})", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{pod}}", - "legendLink": null, - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Memory (go heap inuse)", - "tooltip": { - "sort": 2 - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "bytes", - "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": "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" - }, - { - "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 - }, - { - "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{cluster=~\"$cluster\"}, 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": "utc", - "title": "Loki / Reads Resources", - "uid": "reads-resources", - "version": 0 - } \ No newline at end of file diff --git a/charts/loki/src/dashboards/loki-reads.json b/charts/loki/src/dashboards/loki-reads.json deleted file mode 100644 index 6cae30f..0000000 --- a/charts/loki/src/dashboards/loki-reads.json +++ /dev/null @@ -1,504 +0,0 @@ -{ - "annotations": { - "list": [ ] - }, - "editable": true, - "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", - "error": "#E24D42", - "success": "#7EB26D" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 10, - "id": 1, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 0, - "links": [ ], - "nullPointMode": "null as zero", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "span": 6, - "stack": true, - "steppedLine": false, - "targets": [ - { - "expr": "sum by (status) (\n label_replace(label_replace(rate(loki_request_duration_seconds_count{cluster=~\"$cluster\",job=~\"($namespace)/(loki|enterprise-logs)-read\", route=~\"loki_api_v1_series|api_prom_series|api_prom_query|api_prom_label|api_prom_label_name_values|loki_api_v1_query|loki_api_v1_query_range|loki_api_v1_labels|loki_api_v1_label_name_values\"}[$__rate_interval]),\n \"status\", \"${1}xx\", \"status_code\", \"([0-9])..\"),\n \"status\", \"${1}\", \"status_code\", \"([a-z]+)\"))\n", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{status}}", - "refId": "A", - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "QPS", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "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, - "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": "histogram_quantile(0.99, sum by (le,route) (job_route:loki_request_duration_seconds_bucket:sum_rate{job=~\"($namespace)/(loki|enterprise-logs)-read\", route=~\"loki_api_v1_series|api_prom_series|api_prom_query|api_prom_label|api_prom_label_name_values|loki_api_v1_query|loki_api_v1_query_range|loki_api_v1_labels|loki_api_v1_label_name_values\", cluster=~\"$cluster\"})) * 1e3", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{ route }} 99th Percentile", - "refId": "A", - "step": 10 - }, - { - "expr": "histogram_quantile(0.50, sum by (le,route) (job_route:loki_request_duration_seconds_bucket:sum_rate{job=~\"($namespace)/(loki|enterprise-logs)-read\", route=~\"loki_api_v1_series|api_prom_series|api_prom_query|api_prom_label|api_prom_label_name_values|loki_api_v1_query|loki_api_v1_query_range|loki_api_v1_labels|loki_api_v1_label_name_values\", cluster=~\"$cluster\"})) * 1e3", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{ route }} 50th Percentile", - "refId": "B", - "step": 10 - }, - { - "expr": "1e3 * sum(job_route:loki_request_duration_seconds_sum:sum_rate{job=~\"($namespace)/(loki|enterprise-logs)-read\", route=~\"loki_api_v1_series|api_prom_series|api_prom_query|api_prom_label|api_prom_label_name_values|loki_api_v1_query|loki_api_v1_query_range|loki_api_v1_labels|loki_api_v1_label_name_values\", cluster=~\"$cluster\"}) by (route) / sum(job_route:loki_request_duration_seconds_count:sum_rate{job=~\"($namespace)/(loki|enterprise-logs)-read\", route=~\"loki_api_v1_series|api_prom_series|api_prom_query|api_prom_label|api_prom_label_name_values|loki_api_v1_query|loki_api_v1_query_range|loki_api_v1_labels|loki_api_v1_label_name_values\", cluster=~\"$cluster\"}) by (route) ", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{ route }} Average", - "refId": "C", - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Latency", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "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": "Read Path", - "titleSize": "h6" - }, - { - "collapse": false, - "height": "250px", - "panels": [ - { - "aliasColors": { - "1xx": "#EAB839", - "2xx": "#7EB26D", - "3xx": "#6ED0E0", - "4xx": "#EF843C", - "5xx": "#E24D42", - "error": "#E24D42", - "success": "#7EB26D" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 10, - "id": 3, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 0, - "links": [ ], - "nullPointMode": "null as zero", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "span": 6, - "stack": true, - "steppedLine": false, - "targets": [ - { - "expr": "sum by (status) (\n label_replace(label_replace(rate(loki_boltdb_shipper_request_duration_seconds_count{cluster=~\"$cluster\",job=~\"($namespace)/(loki|enterprise-logs)-read\", operation=\"Shipper.Query\"}[$__rate_interval]),\n \"status\", \"${1}xx\", \"status_code\", \"([0-9])..\"),\n \"status\", \"${1}\", \"status_code\", \"([a-z]+)\"))\n", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{status}}", - "refId": "A", - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "QPS", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "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, - "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", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "span": 6, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "histogram_quantile(0.99, sum(rate(loki_boltdb_shipper_request_duration_seconds_bucket{cluster=~\"$cluster\",job=~\"($namespace)/(loki|enterprise-logs)-read\", operation=\"Shipper.Query\"}[$__rate_interval])) by (le)) * 1e3", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "99th Percentile", - "refId": "A", - "step": 10 - }, - { - "expr": "histogram_quantile(0.50, sum(rate(loki_boltdb_shipper_request_duration_seconds_bucket{cluster=~\"$cluster\",job=~\"($namespace)/(loki|enterprise-logs)-read\", operation=\"Shipper.Query\"}[$__rate_interval])) by (le)) * 1e3", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "50th Percentile", - "refId": "B", - "step": 10 - }, - { - "expr": "sum(rate(loki_boltdb_shipper_request_duration_seconds_sum{cluster=~\"$cluster\",job=~\"($namespace)/(loki|enterprise-logs)-read\", operation=\"Shipper.Query\"}[$__rate_interval])) * 1e3 / sum(rate(loki_boltdb_shipper_request_duration_seconds_count{cluster=~\"$cluster\",job=~\"($namespace)/(loki|enterprise-logs)-read\", operation=\"Shipper.Query\"}[$__rate_interval]))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "Average", - "refId": "C", - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Latency", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "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": "BoltDB Shipper", - "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" - }, - { - "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 - }, - { - "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{cluster=~\"$cluster\"}, 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": "utc", - "title": "Loki / Reads", - "uid": "reads", - "version": 0 - } \ No newline at end of file diff --git a/charts/loki/src/dashboards/loki-retention.json b/charts/loki/src/dashboards/loki-retention.json deleted file mode 100644 index 7fc99ec..0000000 --- a/charts/loki/src/dashboards/loki-retention.json +++ /dev/null @@ -1,1537 +0,0 @@ -{ - "annotations": { - "list": [ ] - }, - "editable": true, - "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": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "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": [ - { - "alias": "limit", - "color": "#E02F44", - "fill": 0 - } - ], - "spaceLength": 10, - "span": 4, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum by(pod) (rate(container_cpu_usage_seconds_total{cluster=~\"$cluster\", namespace=~\"$namespace\", container=\"loki\", pod=~\"(loki|enterprise-logs)-read.*\"}[$__rate_interval]))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{pod}}", - "legendLink": null, - "step": 10 - }, - { - "expr": "min(container_spec_cpu_quota{cluster=~\"$cluster\", namespace=~\"$namespace\", container=\"loki\", pod=~\"(loki|enterprise-logs)-read.*\"} / container_spec_cpu_period{cluster=~\"$cluster\", namespace=~\"$namespace\", container=\"loki\", pod=~\"(loki|enterprise-logs)-read.*\"})", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "limit", - "legendLink": null, - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "CPU", - "tooltip": { - "sort": 2 - }, - "type": "graph", - "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, - "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": [ - { - "alias": "limit", - "color": "#E02F44", - "fill": 0 - } - ], - "spaceLength": 10, - "span": 4, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "max by(pod) (container_memory_working_set_bytes{cluster=~\"$cluster\", namespace=~\"$namespace\", container=\"loki\", pod=~\"(loki|enterprise-logs)-read.*\"})", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{pod}}", - "legendLink": null, - "step": 10 - }, - { - "expr": "min(container_spec_memory_limit_bytes{cluster=~\"$cluster\", namespace=~\"$namespace\", container=\"loki\", pod=~\"(loki|enterprise-logs)-read.*\"} > 0)", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "limit", - "legendLink": null, - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Memory (workingset)", - "tooltip": { - "sort": 2 - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "bytes", - "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, - "id": 3, - "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": 4, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum by(pod) (go_memstats_heap_inuse_bytes{cluster=~\"$cluster\", job=~\"($namespace)/(loki|enterprise-logs)-read\"})", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{pod}}", - "legendLink": null, - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Memory (go heap inuse)", - "tooltip": { - "sort": 2 - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "bytes", - "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": "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": 4, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "loki_boltdb_shipper_compact_tables_operation_last_successful_run_timestamp_seconds{cluster=~\"$cluster\", namespace=~\"$namespace\"} * 1e3", - "format": "time_series", - "instant": true, - "refId": "A" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Last Compact and 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 - } - ] - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "id": 5, - "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": 4, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "loki_boltdb_shipper_compact_tables_operation_duration_seconds{cluster=~\"$cluster\", namespace=~\"$namespace\"}", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "duration", - "legendLink": null, - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Compact and Mark Operations Duration", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "s", - "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, - "id": 6, - "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": 4, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum by (status)(rate(loki_boltdb_shipper_compact_tables_operation_total{cluster=~\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval]))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{success}}", - "legendLink": null, - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Compact and Mark Operations Per Status", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "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": true, - "title": "Compact and Mark", - "titleSize": "h6" - }, - { - "collapse": false, - "height": "250px", - "panels": [ - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 10, - "id": 7, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 0, - "links": [ ], - "nullPointMode": "null as zero", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "span": 4, - "stack": true, - "steppedLine": false, - "targets": [ - { - "expr": "count by(action)(loki_boltdb_shipper_retention_marker_table_processed_total{cluster=~\"$cluster\", namespace=~\"$namespace\"})", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{action}}", - "legendLink": null, - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Processed Tables Per Action", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "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": 10, - "id": 8, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 0, - "links": [ ], - "nullPointMode": "null as zero", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "span": 4, - "stack": true, - "steppedLine": false, - "targets": [ - { - "expr": "count by(table,action)(loki_boltdb_shipper_retention_marker_table_processed_total{cluster=~\"$cluster\", namespace=~\"$namespace\" , action=~\"modified|deleted\"})", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{table}}-{{action}}", - "legendLink": null, - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Modified Tables", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "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": 10, - "id": 9, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 0, - "links": [ ], - "nullPointMode": "null as zero", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "span": 4, - "stack": true, - "steppedLine": false, - "targets": [ - { - "expr": "sum by (table)(rate(loki_boltdb_shipper_retention_marker_count_total{cluster=~\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])) >0", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{table}}", - "legendLink": null, - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Marks Creation Rate Per Table", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "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": true, - "title": "Per Table Marker", - "titleSize": "h6" - }, - { - "collapse": false, - "height": "250px", - "panels": [ - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "format": "short", - "id": 10, - "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 (increase(loki_boltdb_shipper_retention_marker_count_total{cluster=~\"$cluster\", namespace=~\"$namespace\"}[24h]))", - "format": "time_series", - "instant": true, - "intervalFactor": 2, - "refId": "A" - } - ], - "thresholds": "70,80", - "timeFrom": null, - "timeShift": null, - "title": "Marked Chunks (24h)", - "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, - "id": 11, - "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": "histogram_quantile(0.99, sum(rate(loki_boltdb_shipper_retention_marker_table_processed_duration_seconds_bucket{cluster=~\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])) by (le)) * 1e3", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "99th Percentile", - "refId": "A", - "step": 10 - }, - { - "expr": "histogram_quantile(0.50, sum(rate(loki_boltdb_shipper_retention_marker_table_processed_duration_seconds_bucket{cluster=~\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])) by (le)) * 1e3", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "50th Percentile", - "refId": "B", - "step": 10 - }, - { - "expr": "sum(rate(loki_boltdb_shipper_retention_marker_table_processed_duration_seconds_sum{cluster=~\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])) * 1e3 / sum(rate(loki_boltdb_shipper_retention_marker_table_processed_duration_seconds_count{cluster=~\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval]))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "Average", - "refId": "C", - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Mark Table Latency", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "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": [ - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "format": "short", - "id": 12, - "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 (increase(loki_boltdb_shipper_retention_sweeper_chunk_deleted_duration_seconds_count{cluster=~\"$cluster\", namespace=~\"$namespace\"}[24h]))", - "format": "time_series", - "instant": true, - "intervalFactor": 2, - "refId": "A" - } - ], - "thresholds": "70,80", - "timeFrom": null, - "timeShift": null, - "title": "Delete Chunks (24h)", - "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, - "id": 13, - "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": "histogram_quantile(0.99, sum(rate(loki_boltdb_shipper_retention_sweeper_chunk_deleted_duration_seconds_bucket{cluster=~\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])) by (le)) * 1e3", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "99th Percentile", - "refId": "A", - "step": 10 - }, - { - "expr": "histogram_quantile(0.50, sum(rate(loki_boltdb_shipper_retention_sweeper_chunk_deleted_duration_seconds_bucket{cluster=~\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])) by (le)) * 1e3", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "50th Percentile", - "refId": "B", - "step": 10 - }, - { - "expr": "sum(rate(loki_boltdb_shipper_retention_sweeper_chunk_deleted_duration_seconds_sum{cluster=~\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])) * 1e3 / sum(rate(loki_boltdb_shipper_retention_sweeper_chunk_deleted_duration_seconds_count{cluster=~\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval]))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "Average", - "refId": "C", - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Delete Latency", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "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": [ - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "id": 14, - "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": 4, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "time() - (loki_boltdb_shipper_retention_sweeper_marker_file_processing_current_time{cluster=~\"$cluster\", namespace=~\"$namespace\"} > 0)", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "lag", - "legendLink": null, - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Sweeper Lag", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "s", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "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, - "id": 15, - "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": 4, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(loki_boltdb_shipper_retention_sweeper_marker_files_current{cluster=~\"$cluster\", namespace=~\"$namespace\"})", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "count", - "legendLink": null, - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Marks Files to Process", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "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, - "id": 16, - "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": 4, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum by (status)(rate(loki_boltdb_shipper_retention_sweeper_chunk_deleted_duration_seconds_count{cluster=~\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval]))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{status}}", - "legendLink": null, - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Delete Rate Per Status", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "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": true, - "title": "", - "titleSize": "h6" - }, - { - "collapse": false, - "height": "250px", - "panels": [ - { - "datasource": "$logs", - "id": 17, - "span": 12, - "targets": [ - { - "expr": "{cluster=~\"$cluster\", job=~\"($namespace)/(loki|enterprise-logs)-read\"}", - "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" - }, - { - "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 - }, - { - "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{cluster=~\"$cluster\"}, namespace)", - "refresh": 1, - "regex": "", - "sort": 2, - "tagValuesQuery": "", - "tags": [ ], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "hide": 0, - "label": null, - "name": "logs", - "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": "utc", - "title": "Loki / Retention", - "uid": "retention", - "version": 0 - } \ No newline at end of file diff --git a/charts/loki/src/dashboards/loki-writes-resources.json b/charts/loki/src/dashboards/loki-writes-resources.json deleted file mode 100644 index 1b68bd3..0000000 --- a/charts/loki/src/dashboards/loki-writes-resources.json +++ /dev/null @@ -1,700 +0,0 @@ -{ - "annotations": { - "list": [ ] - }, - "editable": true, - "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": [ - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "gridPos": { }, - "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 by(pod) (loki_ingester_memory_streams{cluster=~\"$cluster\", job=~\"($namespace)/(loki|enterprise-logs)-write\"})", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{pod}}", - "legendLink": null, - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "In-memory streams", - "tooltip": { - "sort": 2 - }, - "type": "graph", - "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, - "gridPos": { }, - "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": [ - { - "alias": "limit", - "color": "#E02F44", - "fill": 0 - } - ], - "spaceLength": 10, - "span": 6, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum by(pod) (rate(container_cpu_usage_seconds_total{cluster=~\"$cluster\", namespace=~\"$namespace\", container=\"loki\", pod=~\"(loki|enterprise-logs)-write.*\"}[$__rate_interval]))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{pod}}", - "legendLink": null, - "step": 10 - }, - { - "expr": "min(container_spec_cpu_quota{cluster=~\"$cluster\", namespace=~\"$namespace\", container=\"loki\", pod=~\"(loki|enterprise-logs)-write.*\"} / container_spec_cpu_period{cluster=~\"$cluster\", namespace=~\"$namespace\", container=\"loki\", pod=~\"(loki|enterprise-logs)-write.*\"})", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "limit", - "legendLink": null, - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "CPU", - "tooltip": { - "sort": 2 - }, - "type": "graph", - "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, - "gridPos": { }, - "id": 3, - "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": [ - { - "alias": "limit", - "color": "#E02F44", - "fill": 0 - } - ], - "spaceLength": 10, - "span": 6, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "max by(pod) (container_memory_working_set_bytes{cluster=~\"$cluster\", namespace=~\"$namespace\", container=\"loki\", pod=~\"(loki|enterprise-logs)-write.*\"})", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{pod}}", - "legendLink": null, - "step": 10 - }, - { - "expr": "min(container_spec_memory_limit_bytes{cluster=~\"$cluster\", namespace=~\"$namespace\", container=\"loki\", pod=~\"(loki|enterprise-logs)-write.*\"} > 0)", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "limit", - "legendLink": null, - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Memory (workingset)", - "tooltip": { - "sort": 2 - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "bytes", - "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, - "gridPos": { }, - "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", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "span": 6, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum by(pod) (go_memstats_heap_inuse_bytes{cluster=~\"$cluster\", job=~\"($namespace)/(loki|enterprise-logs)-write\"})", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{pod}}", - "legendLink": null, - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Memory (go heap inuse)", - "tooltip": { - "sort": 2 - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "bytes", - "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": 10, - "gridPos": { }, - "id": 5, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 0, - "links": [ ], - "nullPointMode": "null as zero", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "span": 6, - "stack": true, - "steppedLine": false, - "targets": [ - { - "expr": "sum by(instance, pod, 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{cluster=~\"$cluster\", namespace=~\"$namespace\", container=\"loki\", pod=~\"(loki|enterprise-logs)-write.*\", device!~\".*sda.*\"}), \"device\", \"$1\", \"device\", \"/dev/(.*)\") * 0)\n", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{pod}} - {{device}}", - "legendLink": null, - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Disk Writes", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "Bps", - "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": 10, - "gridPos": { }, - "id": 6, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 0, - "links": [ ], - "nullPointMode": "null as zero", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "span": 6, - "stack": true, - "steppedLine": false, - "targets": [ - { - "expr": "sum by(instance, pod, 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{cluster=~\"$cluster\", namespace=~\"$namespace\", container=\"loki\", pod=~\"(loki|enterprise-logs)-write.*\", device!~\".*sda.*\"}), \"device\", \"$1\", \"device\", \"/dev/(.*)\") * 0)\n", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{pod}} - {{device}}", - "legendLink": null, - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Disk Reads", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "Bps", - "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, - "gridPos": { }, - "id": 7, - "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 by(persistentvolumeclaim) (kubelet_volume_stats_used_bytes{cluster=~\"$cluster\", namespace=~\"$namespace\"} / kubelet_volume_stats_capacity_bytes{cluster=~\"$cluster\", namespace=~\"$namespace\"}) and count by(persistentvolumeclaim) (kube_persistentvolumeclaim_labels{cluster=~\"$cluster\", namespace=~\"$namespace\",label_name=~\"(loki|enterprise-logs)-write.*\"})", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{persistentvolumeclaim}}", - "legendLink": null, - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Disk Space Utilization", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "percentunit", - "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": "Write path", - "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" - }, - { - "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 - }, - { - "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{cluster=~\"$cluster\"}, 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": "utc", - "title": "Loki / Writes Resources", - "uid": "writes-resources", - "version": 0 - } \ No newline at end of file diff --git a/charts/loki/src/dashboards/loki-writes.json b/charts/loki/src/dashboards/loki-writes.json deleted file mode 100644 index ebaf33e..0000000 --- a/charts/loki/src/dashboards/loki-writes.json +++ /dev/null @@ -1,504 +0,0 @@ -{ - "annotations": { - "list": [ ] - }, - "editable": true, - "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", - "error": "#E24D42", - "success": "#7EB26D" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 10, - "id": 1, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 0, - "links": [ ], - "nullPointMode": "null as zero", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "span": 6, - "stack": true, - "steppedLine": false, - "targets": [ - { - "expr": "sum by (status) (\n label_replace(label_replace(rate(loki_request_duration_seconds_count{cluster=~\"$cluster\",job=~\"($namespace)/(loki|enterprise-logs)-write\", route=~\"api_prom_push|loki_api_v1_push|/httpgrpc.HTTP/Handle\"}[$__rate_interval]),\n \"status\", \"${1}xx\", \"status_code\", \"([0-9])..\"),\n \"status\", \"${1}\", \"status_code\", \"([a-z]+)\"))\n", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{status}}", - "refId": "A", - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "QPS", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "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, - "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": "histogram_quantile(0.99, sum by (le) (job:loki_request_duration_seconds_bucket:sum_rate{job=~\"($namespace)/(loki|enterprise-logs)-write\", cluster=~\"$cluster\"})) * 1e3", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "99th Percentile", - "refId": "A", - "step": 10 - }, - { - "expr": "histogram_quantile(0.50, sum by (le) (job:loki_request_duration_seconds_bucket:sum_rate{job=~\"($namespace)/(loki|enterprise-logs)-write\", cluster=~\"$cluster\"})) * 1e3", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "50th Percentile", - "refId": "B", - "step": 10 - }, - { - "expr": "1e3 * sum(job:loki_request_duration_seconds_sum:sum_rate{job=~\"($namespace)/(loki|enterprise-logs)-write\", cluster=~\"$cluster\"}) / sum(job:loki_request_duration_seconds_count:sum_rate{job=~\"($namespace)/(loki|enterprise-logs)-write\", cluster=~\"$cluster\"})", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "Average", - "refId": "C", - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Latency", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "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": "Write Path", - "titleSize": "h6" - }, - { - "collapse": false, - "height": "250px", - "panels": [ - { - "aliasColors": { - "1xx": "#EAB839", - "2xx": "#7EB26D", - "3xx": "#6ED0E0", - "4xx": "#EF843C", - "5xx": "#E24D42", - "error": "#E24D42", - "success": "#7EB26D" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 10, - "id": 3, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 0, - "links": [ ], - "nullPointMode": "null as zero", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "span": 6, - "stack": true, - "steppedLine": false, - "targets": [ - { - "expr": "sum by (status) (\n label_replace(label_replace(rate(loki_boltdb_shipper_request_duration_seconds_count{cluster=~\"$cluster\",job=~\"($namespace)/(loki|enterprise-logs)-write\", operation=\"WRITE\"}[$__rate_interval]),\n \"status\", \"${1}xx\", \"status_code\", \"([0-9])..\"),\n \"status\", \"${1}\", \"status_code\", \"([a-z]+)\"))\n", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{status}}", - "refId": "A", - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "QPS", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "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, - "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", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "span": 6, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "histogram_quantile(0.99, sum(rate(loki_boltdb_shipper_request_duration_seconds_bucket{cluster=~\"$cluster\",job=~\"($namespace)/(loki|enterprise-logs)-write\", operation=\"WRITE\"}[$__rate_interval])) by (le)) * 1e3", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "99th Percentile", - "refId": "A", - "step": 10 - }, - { - "expr": "histogram_quantile(0.50, sum(rate(loki_boltdb_shipper_request_duration_seconds_bucket{cluster=~\"$cluster\",job=~\"($namespace)/(loki|enterprise-logs)-write\", operation=\"WRITE\"}[$__rate_interval])) by (le)) * 1e3", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "50th Percentile", - "refId": "B", - "step": 10 - }, - { - "expr": "sum(rate(loki_boltdb_shipper_request_duration_seconds_sum{cluster=~\"$cluster\",job=~\"($namespace)/(loki|enterprise-logs)-write\", operation=\"WRITE\"}[$__rate_interval])) * 1e3 / sum(rate(loki_boltdb_shipper_request_duration_seconds_count{cluster=~\"$cluster\",job=~\"($namespace)/(loki|enterprise-logs)-write\", operation=\"WRITE\"}[$__rate_interval]))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "Average", - "refId": "C", - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Latency", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "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": "BoltDB Shipper", - "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" - }, - { - "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 - }, - { - "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{cluster=~\"$cluster\"}, 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": "utc", - "title": "Loki / Writes", - "uid": "writes", - "version": 0 - } \ No newline at end of file diff --git a/charts/loki/src/helm-test/Dockerfile b/charts/loki/src/helm-test/Dockerfile deleted file mode 100644 index c831329..0000000 --- a/charts/loki/src/helm-test/Dockerfile +++ /dev/null @@ -1,13 +0,0 @@ -ARG GO_VERSION=1.24 -FROM golang:${GO_VERSION} as build - -# build via Makefile target helm-test-image in root -# Makefile. Building from this directory will not be -# able to access source needed in rest of repo. -COPY . /src/loki -WORKDIR /src/loki -RUN make clean && make BUILD_IN_CONTAINER=false helm-test - -FROM gcr.io/distroless/static:debug -COPY --from=build /src/loki/production/helm/loki/src/helm-test/helm-test /usr/bin/helm-test -ENTRYPOINT [ "/usr/bin/helm-test" ] diff --git a/charts/loki/src/helm-test/README.md b/charts/loki/src/helm-test/README.md deleted file mode 100644 index 68c9bfd..0000000 --- a/charts/loki/src/helm-test/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# Loki Helm Test - -This folder contains a collection of go tests that test if a Loki canary is running correctly. It's primary use it to test that the helm chart is working correctly by using metrics from the Loki canary. In the helm chart, the template for this test is only available if you are running both the Loki canary and have self monitoring enabled (as the Loki canary's logs need to be in Loki for it to work). However, the tests in this folder can be run against any running Loki canary using `go test`. - -## Instructions - -Run `go test .` from this directory, or use the Docker image published at `grafana/loki-helm-test`. diff --git a/charts/loki/src/helm-test/canary_test.go b/charts/loki/src/helm-test/canary_test.go deleted file mode 100644 index 002cae4..0000000 --- a/charts/loki/src/helm-test/canary_test.go +++ /dev/null @@ -1,178 +0,0 @@ -//go:build helm_test -// +build helm_test - -package test - -import ( - "context" - "errors" - "fmt" - "io" - "net/http" - "os" - "testing" - "time" - - "github.com/prometheus/client_golang/api" - v1 "github.com/prometheus/client_golang/api/prometheus/v1" - promConfig "github.com/prometheus/common/config" - "github.com/prometheus/common/model" - "github.com/prometheus/prometheus/model/labels" - "github.com/prometheus/prometheus/model/textparse" - "github.com/stretchr/testify/require" -) - -type testResultFunc func(t *testing.T, ctx context.Context, metric string, test func(model.SampleValue) bool, msg string) error - -func TestCanary(t *testing.T) { - - var testResult testResultFunc - - // Default to directly querying a canary and looking for specific metrics. - testResult = testResultCanary - totalEntries := "loki_canary_entries_total" - totalEntriesMissing := "loki_canary_missing_entries_total" - - // For backwards compatibility and also for anyone who wants to validate with prometheus instead of querying - // a canary directly, if the CANARY_PROMETHEUS_ADDRESS is specified we will use prometheus to validate. - address := os.Getenv("CANARY_PROMETHEUS_ADDRESS") - if address != "" { - testResult = testResultPrometheus - // Use the sum function to aggregate the results from multiple canaries. - totalEntries = "sum(loki_canary_entries_total)" - totalEntriesMissing = "sum(loki_canary_missing_entries_total)" - } - - timeout := getEnv("CANARY_TEST_TIMEOUT", "1m") - timeoutDuration, err := time.ParseDuration(timeout) - require.NoError(t, err, "Failed to parse timeout. Please set CANARY_TEST_TIMEOUT to a valid duration.") - - ctx, cancel := context.WithTimeout(context.Background(), timeoutDuration) - - t.Cleanup(func() { - cancel() - }) - - t.Run("Canary should have entries", func(t *testing.T) { - eventually(t, func() error { - return testResult(t, ctx, totalEntries, func(v model.SampleValue) bool { - return v > 0 - }, fmt.Sprintf("Expected %s to be greater than 0", totalEntries)) - }, timeoutDuration, "Expected Loki Canary to have entries") - }) - - t.Run("Canary should not have missed any entries", func(t *testing.T) { - eventually(t, func() error { - return testResult(t, ctx, totalEntriesMissing, func(v model.SampleValue) bool { - return v == 0 - }, fmt.Sprintf("Expected %s to equal 0", totalEntriesMissing)) - }, timeoutDuration, "Expected Loki Canary to not have any missing entries") - }) -} - -func getEnv(key, fallback string) string { - if value, ok := os.LookupEnv(key); ok { - return value - } - return fallback -} - -func testResultPrometheus(t *testing.T, ctx context.Context, query string, test func(model.SampleValue) bool, msg string) error { - // TODO (ewelch): if we did a lot of these, we'd want to reuse the client but right now we only run a couple tests - client := newClient(t) - result, _, err := client.Query(ctx, query, time.Now()) - if err != nil { - return err - } - if v, ok := result.(model.Vector); ok { - for _, s := range v { - t.Logf("%s => %v\n", query, s.Value) - if !test(s.Value) { - return errors.New(msg) - } - } - return nil - } - - return fmt.Errorf("unexpected Prometheus result type: %v ", result.Type()) -} - -func newClient(t *testing.T) v1.API { - address := os.Getenv("CANARY_PROMETHEUS_ADDRESS") - require.NotEmpty(t, address, "CANARY_PROMETHEUS_ADDRESS must be set to a valid prometheus address") - - client, err := api.NewClient(api.Config{ - Address: address, - }) - require.NoError(t, err, "Failed to create Loki Canary client") - - return v1.NewAPI(client) -} - -func testResultCanary(t *testing.T, ctx context.Context, metric string, test func(model.SampleValue) bool, msg string) error { - address := os.Getenv("CANARY_SERVICE_ADDRESS") - require.NotEmpty(t, address, "CANARY_SERVICE_ADDRESS must be set to a valid kubernetes service for the Loki canaries") - - // TODO (ewelch): if we did a lot of these, we'd want to reuse the client but right now we only run a couple tests - client, err := promConfig.NewClientFromConfig(promConfig.HTTPClientConfig{}, "canary-test") - require.NoError(t, err, "Failed to create Prometheus client") - - req, err := http.NewRequestWithContext(ctx, http.MethodGet, address, nil) - require.NoError(t, err, "Failed to create request") - - rsp, err := client.Do(req) - if rsp != nil { - defer rsp.Body.Close() - } - require.NoError(t, err, "Failed to scrape metrics") - - body, err := io.ReadAll(rsp.Body) - require.NoError(t, err, "Failed to read response body") - - p, err := textparse.New(body, rsp.Header.Get("Content-Type"), true, nil) - require.NoError(t, err, "Failed to create Prometheus parser") - - for { - e, err := p.Next() - if err == io.EOF { - return errors.New("metric not found") - } - - if e != textparse.EntrySeries { - continue - } - - l := labels.Labels{} - p.Metric(&l) - - // Currently we aren't validating any labels, just the metric name, however this could be extended to do so. - name := l.Get(model.MetricNameLabel) - if name != metric { - continue - } - - _, _, val := p.Series() - t.Logf("%s => %v\n", metric, val) - - // Note: SampleValue has functions for comparing the equality of two floats which is - // why we convert this back to a SampleValue here for easier use intests. - if !test(model.SampleValue(val)) { - return errors.New(msg) - } - - // Returning here will only validate that one series was found matching the label name that met the condition - // it could be possible since we don't validate the rest of the labels that there is mulitple series - // but currently this meets the spirit of the test. - return nil - } -} - -func eventually(t *testing.T, test func() error, timeoutDuration time.Duration, msg string) { - require.Eventually(t, func() bool { - queryError := test() - if queryError != nil { - t.Logf("Query failed\n%+v\n", queryError) - } - return queryError == nil - }, timeoutDuration, 1*time.Second, msg) -} diff --git a/charts/loki/src/helm-test/default.nix b/charts/loki/src/helm-test/default.nix deleted file mode 100644 index a129b23..0000000 --- a/charts/loki/src/helm-test/default.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ pkgs, lib, buildGoModule, dockerTools, rev }: -rec { - loki-helm-test = buildGoModule rec { - pname = "loki-helm-test"; - version = "0.1.0"; - - src = ./../../../../..; - vendorHash = null; - - buildPhase = '' - runHook preBuild - go test --tags=helm_test -c -o $out/bin/helm-test ./production/helm/loki/src/helm-test - runHook postBuild - ''; - - doCheck = false; - }; - - # by default, uses the nix hash as the tag, which can be retrieved with: - # basename "$(readlink result)" | cut -d - -f 1 - loki-helm-test-docker = dockerTools.buildImage { - name = "grafana/loki-helm-test"; - config = { - Entrypoint = [ "${loki-helm-test}/bin/helm-test" ]; - }; - }; -} diff --git a/charts/loki/src/rules.yaml.tpl b/charts/loki/src/rules.yaml.tpl deleted file mode 100644 index 840401d..0000000 --- a/charts/loki/src/rules.yaml.tpl +++ /dev/null @@ -1,86 +0,0 @@ ---- -groups: - - name: "loki_rules" - rules: - - expr: histogram_quantile(0.99, sum(rate(loki_request_duration_seconds_bucket[1m])) - by (le, job)) - record: job:loki_request_duration_seconds:99quantile - labels: - cluster: "{{ include "loki.clusterLabel" $ }}" - - expr: histogram_quantile(0.50, sum(rate(loki_request_duration_seconds_bucket[1m])) - by (le, job)) - record: job:loki_request_duration_seconds:50quantile - labels: - cluster: "{{ include "loki.clusterLabel" $ }}" - - expr: sum(rate(loki_request_duration_seconds_sum[1m])) by (job) / sum(rate(loki_request_duration_seconds_count[1m])) - by (job) - record: job:loki_request_duration_seconds:avg - labels: - cluster: "{{ include "loki.clusterLabel" $ }}" - - expr: sum(rate(loki_request_duration_seconds_bucket[1m])) by (le, job) - record: job:loki_request_duration_seconds_bucket:sum_rate - labels: - cluster: "{{ include "loki.clusterLabel" $ }}" - - expr: sum(rate(loki_request_duration_seconds_sum[1m])) by (job) - record: job:loki_request_duration_seconds_sum:sum_rate - labels: - cluster: "{{ include "loki.clusterLabel" $ }}" - - expr: sum(rate(loki_request_duration_seconds_count[1m])) by (job) - record: job:loki_request_duration_seconds_count:sum_rate - labels: - cluster: "{{ include "loki.clusterLabel" $ }}" - - expr: histogram_quantile(0.99, sum(rate(loki_request_duration_seconds_bucket[1m])) - by (le, job, route)) - record: job_route:loki_request_duration_seconds:99quantile - labels: - cluster: "{{ include "loki.clusterLabel" $ }}" - - expr: histogram_quantile(0.50, sum(rate(loki_request_duration_seconds_bucket[1m])) - by (le, job, route)) - record: job_route:loki_request_duration_seconds:50quantile - labels: - cluster: "{{ include "loki.clusterLabel" $ }}" - - expr: sum(rate(loki_request_duration_seconds_sum[1m])) by (job, route) / sum(rate(loki_request_duration_seconds_count[1m])) - by (job, route) - record: job_route:loki_request_duration_seconds:avg - labels: - cluster: "{{ include "loki.clusterLabel" $ }}" - - expr: sum(rate(loki_request_duration_seconds_bucket[1m])) by (le, job, route) - record: job_route:loki_request_duration_seconds_bucket:sum_rate - labels: - cluster: "{{ include "loki.clusterLabel" $ }}" - - expr: sum(rate(loki_request_duration_seconds_sum[1m])) by (job, route) - record: job_route:loki_request_duration_seconds_sum:sum_rate - labels: - cluster: "{{ include "loki.clusterLabel" $ }}" - - expr: sum(rate(loki_request_duration_seconds_count[1m])) by (job, route) - record: job_route:loki_request_duration_seconds_count:sum_rate - labels: - cluster: "{{ include "loki.clusterLabel" $ }}" - - expr: histogram_quantile(0.99, sum(rate(loki_request_duration_seconds_bucket[1m])) - by (le, namespace, job, route)) - record: namespace_job_route:loki_request_duration_seconds:99quantile - labels: - cluster: "{{ include "loki.clusterLabel" $ }}" - - expr: histogram_quantile(0.50, sum(rate(loki_request_duration_seconds_bucket[1m])) - by (le, namespace, job, route)) - record: namespace_job_route:loki_request_duration_seconds:50quantile - labels: - cluster: "{{ include "loki.clusterLabel" $ }}" - - expr: sum(rate(loki_request_duration_seconds_sum[1m])) by (namespace, job, route) - / sum(rate(loki_request_duration_seconds_count[1m])) by (namespace, job, route) - record: namespace_job_route:loki_request_duration_seconds:avg - labels: - cluster: "{{ include "loki.clusterLabel" $ }}" - - expr: sum(rate(loki_request_duration_seconds_bucket[1m])) by (le, namespace, job, - route) - record: namespace_job_route:loki_request_duration_seconds_bucket:sum_rate - labels: - cluster: "{{ include "loki.clusterLabel" $ }}" - - expr: sum(rate(loki_request_duration_seconds_sum[1m])) by (namespace, job, route) - record: namespace_job_route:loki_request_duration_seconds_sum:sum_rate - labels: - cluster: "{{ include "loki.clusterLabel" $ }}" - - expr: sum(rate(loki_request_duration_seconds_count[1m])) by (namespace, job, route) - record: namespace_job_route:loki_request_duration_seconds_count:sum_rate - labels: - cluster: "{{ include "loki.clusterLabel" $ }}" diff --git a/charts/loki/templates/NOTES.txt b/charts/loki/templates/NOTES.txt deleted file mode 100644 index 336a354..0000000 --- a/charts/loki/templates/NOTES.txt +++ /dev/null @@ -1,184 +0,0 @@ -*********************************************************************** - 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 {{ $.Release.Namespace }} - -If pods are taking too long to schedule make sure pod affinity can be fulfilled in the current cluster. - -*********************************************************************** -Installed components: -*********************************************************************** - -{{- if .Values.monitoring.selfMonitoring.enabled }} -* grafana-agent-operator -{{- end }} -{{- if eq (include "loki.deployment.isSingleBinary" .) "true" }} -* loki -{{- else -}} -{{- if .Values.gateway.enabled }} -* gateway -{{- end }} -{{- if .Values.minio.enabled }} -* minio -{{- end }} -{{- if eq (include "loki.deployment.isScalable" .) "true" }} -* read -* write -{{- if not .Values.read.legacyReadTarget }} -* backend -{{- end }} -{{- else }} -* compactor -* index gateway -* query scheduler -* ruler -* distributor -* ingester -* querier -* query frontend -{{- end }} -{{- end }} - - -{{- if eq (include "loki.deployment.isSingleBinary" .) "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.gatewayFullname" . }}.{{ $.Release.Namespace }}.svc.{{ .Values.global.clusterDomain }}/loki/api/v1/push - -{{- else }} -{{- if eq (include "loki.deployment.isSingleBinary" .) "true" }} - -http://{{ include "loki.singleBinaryFullname" . }}.{{ $.Release.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.writeFullname" . }}.{{ $.Release.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.distributorFullname" . }}.{{ $.Release.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 {{ $.Release.Namespace }} svc/{{ include "loki.gatewayFullname" . }} 3100:{{ .Values.gateway.service.port }} & - -{{- else }} -{{- if eq (include "loki.deployment.isSingleBinary" .) "true" }} - - kubectl port-forward --namespace {{ $.Release.Namespace }} svc/{{ include "loki.singleBinaryFullname" . }} 3100:{{ .Values.loki.server.http_listen_port }} & - -{{- end}} -{{- if eq (include "loki.deployment.isScalable" .) "true" }} - - kubectl port-forward --namespace {{ $.Release.Namespace }} svc/{{ include "loki.writeFullname" . }} 3100:{{ .Values.loki.server.http_listen_port }} & - -{{- end }} -{{- if eq (include "loki.deployment.isDistributed" .) "true" }} - - kubectl port-forward --namespace {{ $.Release.Namespace }} svc/{{ include "loki.distributorFullname" . }} 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.gatewayFullname" . }}.{{ $.Release.Namespace }}.svc.{{ .Values.global.clusterDomain }}/ - -{{- else }} -{{- if eq (include "loki.deployment.isSingleBinary" .) "true" }} - -http://{{ include "loki.singleBinaryFullname" . }}.{{ $.Release.Namespace }}.svc.{{ .Values.global.clusterDomain }}:{{ .Values.loki.server.http_listen_port }}/ - -{{- end}} -{{- if eq (include "loki.deployment.isScalable" .) "true" }} - -http://{{ include "loki.readFullname" . }}.{{ $.Release.Namespace }}.svc.{{ .Values.global.clusterDomain }}:{{ .Values.loki.server.http_listen_port }}/ - -{{- end }} -{{- if eq (include "loki.deployment.isDistributed" .) "true" }} - -http://{{ include "loki.queryFrontendFullname" . }}.{{ $.Release.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/charts/loki/templates/_helpers.tpl b/charts/loki/templates/_helpers.tpl deleted file mode 100644 index 083d035..0000000 --- a/charts/loki/templates/_helpers.tpl +++ /dev/null @@ -1,1197 +0,0 @@ -{{/* -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 }} - -{{/* -Expand the name of the chart. -*/}} -{{- define "loki.name" -}} -{{- $default := ternary "enterprise-logs" "loki" .Values.enterprise.enabled }} -{{- coalesce .Values.nameOverride $default | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -singleBinary fullname -*/}} -{{- define "loki.singleBinaryFullname" -}} -{{- 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 -}} - -{{/* -Resource name template -Params: - ctx = . context - component = component name (optional) - rolloutZoneName = rollout zone name (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 gt (len $resourceName) 253 -}}{{- printf "Resource name (%s) exceeds kubernetes limit of 253 character. To fix: shorten release name if this will be a fresh install or shorten zone names (e.g. \"a\" instead of \"zone-a\") if using zone-awareness." $resourceName | fail -}}{{- end -}} -{{- $resourceName -}} -{{- 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 "SimpleScalable") (eq .Values.deploymentMode "SimpleScalable<->Distributed")) }} -{{- end -}} - -{{/* -Return if deployment mode is single binary -*/}} -{{- define "loki.deployment.isSingleBinary" -}} - {{- or (eq .Values.deploymentMode "SingleBinary") (eq .Values.deploymentMode "SingleBinary<->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 }} - -{{/* -Cluster label for rules and alerts. -*/}} -{{- define "loki.clusterLabel" -}} -{{- if .Values.clusterLabelOverride }} -{{- .Values.clusterLabelOverride | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- 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 }} -{{- end }} - -{{/* Create a default storage config that uses filesystem storage -This is required for CI, but Loki will not be queryable with this default -applied, thus it is encouraged that users override this. -*/}} -{{- define "loki.storageConfig" -}} -{{- if .Values.loki.storageConfig -}} -{{- .Values.loki.storageConfig | toYaml | nindent 4 -}} -{{- else }} -{{- .Values.loki.defaultStorageConfig | toYaml | nindent 4 }} -{{- 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 }} -{{- 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 -*/}} -{{- define "loki.serviceAccountName" -}} -{{- if .Values.serviceAccount.create -}} - {{ default (include "loki.name" .) .Values.serviceAccount.name }} -{{- else -}} - {{ default "default" .Values.serviceAccount.name }} -{{- end -}} -{{- end -}} - -{{/* -Base template for building docker image reference -*/}} -{{- define "loki.baseImage" }} -{{- $registry := .global.registry | default .service.registry | default "" -}} -{{- $repository := .service.repository | default "" -}} -{{- $ref := ternary (printf ":%s" (.service.tag | default .defaultVersion | toString)) (printf "@%s" .service.digest) (empty .service.digest) -}} -{{- if and $registry $repository -}} - {{- printf "%s/%s%s" $registry $repository $ref -}} -{{- else -}} - {{- printf "%s%s%s" $registry $repository $ref -}} -{{- end -}} -{{- end -}} - -{{/* -Docker image name for Loki -*/}} -{{- define "loki.lokiImage" -}} -{{- $dict := dict "service" .Values.loki.image "global" .Values.global.image "defaultVersion" .Chart.AppVersion -}} -{{- include "loki.baseImage" $dict -}} -{{- end -}} - -{{/* -Docker image name for enterprise logs -*/}} -{{- define "loki.enterpriseImage" -}} -{{- $dict := dict "service" .Values.enterprise.image "global" .Values.global.image "defaultVersion" .Values.enterprise.version -}} -{{- include "loki.baseImage" $dict -}} -{{- end -}} - -{{/* -Docker image name -*/}} -{{- define "loki.image" -}} -{{- if .Values.enterprise.enabled -}}{{- include "loki.enterpriseImage" . -}}{{- else -}}{{- include "loki.lokiImage" . -}}{{- end -}} -{{- end -}} - -{{/* -Docker image name for kubectl container -*/}} -{{- define "loki.kubectlImage" -}} -{{- $dict := dict "service" .Values.kubectlImage "global" .Values.global.image "defaultVersion" "latest" -}} -{{- include "loki.baseImage" $dict -}} -{{- end -}} - -{{/* -Generated storage config for loki common config -*/}} -{{- define "loki.commonStorageConfig" -}} -{{- if .Values.loki.storage.use_thanos_objstore -}} -object_store: - {{- include "loki.thanosStorageConfig" (dict "ctx" . "bucketName" .Values.loki.storage.bucketNames.chunks) | 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 .Values.loki.storage.type "s3" -}} -{{- with .Values.loki.storage.s3 }} -s3: - {{- with .s3 }} - s3: {{ . }} - {{- end }} - {{- with .endpoint }} - endpoint: {{ . }} - {{- end }} - {{- with .region }} - region: {{ . }} - {{- end}} - bucketnames: {{ $.Values.loki.storage.bucketNames.chunks }} - {{- with .secretAccessKey }} - secret_access_key: {{ . }} - {{- end }} - {{- with .accessKeyId }} - access_key_id: {{ . }} - {{- end }} - {{- with .signatureVersion }} - signature_version: {{ . }} - {{- end }} - s3forcepathstyle: {{ .s3ForcePathStyle }} - insecure: {{ .insecure }} - {{- with .disable_dualstack }} - disable_dualstack: {{ . }} - {{- end }} - {{- with .http_config}} - http_config: -{{ toYaml . | indent 4 }} - {{- end }} - {{- with .backoff_config}} - backoff_config: -{{ toYaml . | indent 4 }} - {{- end }} - {{- with .sse }} - sse: -{{ toYaml . | indent 4 }} - {{- end }} -{{- end -}} - -{{- else if eq .Values.loki.storage.type "gcs" -}} -{{- with .Values.loki.storage.gcs }} -gcs: - bucket_name: {{ $.Values.loki.storage.bucketNames.chunks }} - chunk_buffer_size: {{ .chunkBufferSize }} - request_timeout: {{ .requestTimeout }} - enable_http2: {{ .enableHttp2 }} -{{- end -}} -{{- else if eq .Values.loki.storage.type "azure" -}} -{{- with .Values.loki.storage.azure }} -azure: - account_name: {{ .accountName }} - {{- with .accountKey }} - account_key: {{ . }} - {{- end }} - {{- with .connectionString }} - connection_string: {{ . }} - {{- end }} - container_name: {{ $.Values.loki.storage.bucketNames.chunks }} - use_managed_identity: {{ .useManagedIdentity }} - use_federated_token: {{ .useFederatedToken }} - {{- with .userAssignedId }} - user_assigned_id: {{ . }} - {{- end }} - {{- with .requestTimeout }} - request_timeout: {{ . }} - {{- end }} - {{- with .endpointSuffix }} - endpoint_suffix: {{ . }} - {{- end }} - {{- with .chunkDelimiter }} - chunk_delimiter: {{ . }} - {{- end }} -{{- end -}} -{{- else if eq .Values.loki.storage.type "alibabacloud" -}} -{{- with .Values.loki.storage.alibabacloud }} -alibabacloud: - bucket: {{ $.Values.loki.storage.bucketNames.chunks }} - endpoint: {{ .endpoint }} - access_key_id: {{ .accessKeyId }} - secret_access_key: {{ .secretAccessKey }} -{{- end -}} -{{- else if eq .Values.loki.storage.type "swift" -}} -{{- with .Values.loki.storage.swift }} -swift: -{{ toYaml . | indent 2 }} -{{- end -}} -{{- else -}} -{{- with .Values.loki.storage.filesystem }} -filesystem: - chunks_directory: {{ .chunks_directory }} - rules_directory: {{ .rules_directory }} -{{- end -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Storage config for ruler -*/}} -{{- define "loki.rulerStorageConfig" -}} -{{- if .Values.minio.enabled -}} -type: "s3" -s3: - bucketnames: ruler -{{- else if eq .Values.loki.storage.type "s3" -}} -{{- with .Values.loki.storage.s3 }} -type: "s3" -s3: - {{- with .s3 }} - s3: {{ . }} - {{- end }} - {{- with .endpoint }} - endpoint: {{ . }} - {{- end }} - {{- with .region }} - region: {{ . }} - {{- end}} - bucketnames: {{ $.Values.loki.storage.bucketNames.ruler }} - {{- with .secretAccessKey }} - secret_access_key: {{ . }} - {{- end }} - {{- with .accessKeyId }} - access_key_id: {{ . }} - {{- end }} - s3forcepathstyle: {{ .s3ForcePathStyle }} - insecure: {{ .insecure }} - {{- with .http_config }} - http_config: {{ toYaml . | nindent 6 }} - {{- end }} -{{- end -}} -{{- else if eq .Values.loki.storage.type "gcs" -}} -{{- with .Values.loki.storage.gcs }} -type: "gcs" -gcs: - bucket_name: {{ $.Values.loki.storage.bucketNames.ruler }} - chunk_buffer_size: {{ .chunkBufferSize }} - request_timeout: {{ .requestTimeout }} - enable_http2: {{ .enableHttp2 }} -{{- end -}} -{{- else if eq .Values.loki.storage.type "azure" -}} -{{- with .Values.loki.storage.azure }} -type: "azure" -azure: - account_name: {{ .accountName }} - {{- with .accountKey }} - account_key: {{ . }} - {{- end }} - {{- with .connectionString }} - connection_string: {{ . }} - {{- end }} - container_name: {{ $.Values.loki.storage.bucketNames.ruler }} - use_managed_identity: {{ .useManagedIdentity }} - use_federated_token: {{ .useFederatedToken }} - {{- with .userAssignedId }} - user_assigned_id: {{ . }} - {{- end }} - {{- with .requestTimeout }} - request_timeout: {{ . }} - {{- end }} - {{- with .endpointSuffix }} - endpoint_suffix: {{ . }} - {{- end }} -{{- end -}} -{{- else if eq .Values.loki.storage.type "swift" -}} -{{- with .Values.loki.storage.swift }} -swift: - {{- with .auth_version }} - auth_version: {{ . }} - {{- end }} - auth_url: {{ .auth_url }} - {{- with .internal }} - internal: {{ . }} - {{- end }} - username: {{ .username }} - user_domain_name: {{ .user_domain_name }} - {{- with .user_domain_id }} - user_domain_id: {{ . }} - {{- end }} - {{- with .user_id }} - user_id: {{ . }} - {{- end }} - password: {{ .password }} - {{- with .domain_id }} - domain_id: {{ . }} - {{- end }} - domain_name: {{ .domain_name }} - project_id: {{ .project_id }} - project_name: {{ .project_name }} - project_domain_id: {{ .project_domain_id }} - project_domain_name: {{ .project_domain_name }} - region_name: {{ .region_name }} - container_name: {{ .container_name }} - max_retries: {{ .max_retries | default 3 }} - connect_timeout: {{ .connect_timeout | default "10s" }} - request_timeout: {{ .request_timeout | default "5s" }} -{{- end -}} -{{- else }} -type: "local" -{{- end -}} -{{- end -}} - -{{/* Loki ruler config */}} -{{- define "loki.rulerConfig" }} -ruler: - storage: - {{- include "loki.rulerStorageConfig" . | nindent 4}} -{{- if (not (empty .Values.loki.rulerConfig)) }} -{{- toYaml .Values.loki.rulerConfig | nindent 2}} -{{- end }} -{{- 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 }} - {{- include "loki.thanosStorageConfig" (dict "ctx" . "bucketName" .Values.loki.storage.bucketNames.ruler) | nindent 2 }} -{{- end }} -{{- end }} - -{{/* Enterprise Logs Admin API storage config */}} -{{- define "enterprise-logs.adminAPIStorageConfig" }} -storage: - {{- if .Values.loki.storage.use_thanos_objstore }} - backend: {{ .Values.loki.storage.object_store.type }} - {{- include "loki.thanosStorageConfig" (dict "ctx" . "bucketName" .Values.loki.storage.bucketNames.admin) | nindent 2 }} - {{- else if .Values.minio.enabled }} - backend: "s3" - s3: - bucket_name: admin - {{- else if eq .Values.loki.storage.type "s3" -}} - {{- with .Values.loki.storage.s3 }} - backend: "s3" - s3: - bucket_name: {{ $.Values.loki.storage.bucketNames.admin }} - {{- end -}} - {{- else if eq .Values.loki.storage.type "gcs" -}} - {{- with .Values.loki.storage.gcs }} - backend: "gcs" - gcs: - bucket_name: {{ $.Values.loki.storage.bucketNames.admin }} - {{- end -}} - {{- else if eq .Values.loki.storage.type "azure" -}} - {{- with .Values.loki.storage.azure }} - backend: "azure" - azure: - account_name: {{ .accountName }} - {{- with .accountKey }} - account_key: {{ . }} - {{- end }} - {{- with .connectionString }} - connection_string: {{ . }} - {{- end }} - container_name: {{ $.Values.loki.storage.bucketNames.admin }} - {{- with .endpointSuffix }} - endpoint_suffix: {{ . }} - {{- end }} - {{- end -}} - {{- else if eq .Values.loki.storage.type "swift" -}} - {{- with .Values.loki.storage.swift }} - backend: "swift" - swift: - {{- with .auth_version }} - auth_version: {{ . }} - {{- end }} - auth_url: {{ .auth_url }} - {{- with .internal }} - internal: {{ . }} - {{- end }} - username: {{ .username }} - user_domain_name: {{ .user_domain_name }} - {{- with .user_domain_id }} - user_domain_id: {{ . }} - {{- end }} - {{- with .user_id }} - user_id: {{ . }} - {{- end }} - password: {{ .password }} - {{- with .domain_id }} - domain_id: {{ . }} - {{- end }} - domain_name: {{ .domain_name }} - project_id: {{ .project_id }} - project_name: {{ .project_name }} - project_domain_id: {{ .project_domain_id }} - project_domain_name: {{ .project_domain_name }} - region_name: {{ .region_name }} - container_name: {{ .container_name }} - max_retries: {{ .max_retries | default 3 }} - connect_timeout: {{ .connect_timeout | default "10s" }} - request_timeout: {{ .request_timeout | default "5s" }} - {{- end -}} - {{- else }} - backend: "filesystem" - filesystem: - dir: {{ .Values.loki.storage.filesystem.admin_api_directory }} - {{- 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 -}} - -{{/* -Memcached Docker image -*/}} -{{- define "loki.memcachedImage" -}} -{{- $dict := dict "service" .Values.memcached.image "global" .Values.global.image -}} -{{- include "loki.image" $dict -}} -{{- end }} - -{{/* -Memcached Exporter Docker image -*/}} -{{- define "loki.memcachedExporterImage" -}} -{{- $dict := dict "service" .Values.memcachedExporter.image "global" .Values.global.image -}} -{{- include "loki.image" $dict -}} -{{- end }} - -{{/* Allow KubeVersion to be overridden. */}} -{{- define "loki.kubeVersion" -}} - {{- default .Capabilities.KubeVersion.Version .Values.kubeVersionOverride -}} -{{- end -}} - -{{/* -Return the appropriate apiVersion for ingress. -*/}} -{{- define "loki.ingress.apiVersion" -}} - {{- if and (.Capabilities.APIVersions.Has "networking.k8s.io/v1") (semverCompare ">= 1.19-0" (include "loki.kubeVersion" .)) -}} - {{- print "networking.k8s.io/v1" -}} - {{- else if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" -}} - {{- print "networking.k8s.io/v1beta1" -}} - {{- else -}} - {{- print "extensions/v1beta1" -}} - {{- end -}} -{{- end -}} - -{{/* -Return if ingress is stable. -*/}} -{{- define "loki.ingress.isStable" -}} - {{- eq (include "loki.ingress.apiVersion" .) "networking.k8s.io/v1" -}} -{{- end -}} - -{{/* -Return if ingress supports ingressClassName. -*/}} -{{- define "loki.ingress.supportsIngressClassName" -}} - {{- or (eq (include "loki.ingress.isStable" .) "true") (and (eq (include "loki.ingress.apiVersion" .) "networking.k8s.io/v1beta1") (semverCompare ">= 1.18-0" (include "loki.kubeVersion" .))) -}} -{{- end -}} - -{{/* -Return if ingress supports pathType. -*/}} -{{- define "loki.ingress.supportsPathType" -}} - {{- or (eq (include "loki.ingress.isStable" .) "true") (and (eq (include "loki.ingress.apiVersion" .) "networking.k8s.io/v1beta1") (semverCompare ">= 1.18-0" (include "loki.kubeVersion" .))) -}} -{{- end -}} - -{{/* -Generate list of ingress service paths based on deployment type -*/}} -{{- define "loki.ingress.servicePaths" -}} -{{- if (eq (include "loki.deployment.isSingleBinary" .) "true") -}} -{{- include "loki.ingress.singleBinaryServicePaths" . }} -{{- else if (eq (include "loki.deployment.isDistributed" .) "true") -}} -{{- include "loki.ingress.distributedServicePaths" . }} -{{- else if and (eq (include "loki.deployment.isScalable" .) "true") (not .Values.read.legacyReadTarget ) -}} -{{- include "loki.ingress.scalableServicePaths" . }} -{{- else -}} -{{- include "loki.ingress.legacyScalableServicePaths" . }} -{{- end -}} -{{- end -}} - -{{/* -Ingress service paths for distributed deployment -*/}} -{{- define "loki.ingress.distributedServicePaths" -}} -{{- $distributorServiceName := include "loki.distributorFullname" . }} -{{- include "loki.ingress.servicePath" (dict "ctx" . "serviceName" $distributorServiceName "paths" .Values.ingress.paths.distributor )}} -{{- $queryFrontendServiceName := include "loki.queryFrontendFullname" . }} -{{- include "loki.ingress.servicePath" (dict "ctx" . "serviceName" $queryFrontendServiceName "paths" .Values.ingress.paths.queryFrontend )}} -{{- $rulerServiceName := include "loki.rulerFullname" . }} -{{- include "loki.ingress.servicePath" (dict "ctx" . "serviceName" $rulerServiceName "paths" .Values.ingress.paths.ruler)}} -{{- end -}} - -{{/* -Ingress service paths for legacy simple scalable deployment when backend components were part of read component. -*/}} -{{- define "loki.ingress.scalableServicePaths" -}} -{{- $readServiceName := include "loki.readFullname" . }} -{{- include "loki.ingress.servicePath" (dict "ctx" . "serviceName" $readServiceName "paths" .Values.ingress.paths.queryFrontend )}} -{{- $writeServiceName := include "loki.writeFullname" . }} -{{- include "loki.ingress.servicePath" (dict "ctx" . "serviceName" $writeServiceName "paths" .Values.ingress.paths.distributor )}} -{{- $backendServiceName := include "loki.backendFullname" . }} -{{- include "loki.ingress.servicePath" (dict "ctx" . "serviceName" $backendServiceName "paths" .Values.ingress.paths.ruler )}} -{{- end -}} - -{{/* -Ingress service paths for legacy simple scalable deployment -*/}} -{{- define "loki.ingress.legacyScalableServicePaths" -}} -{{- $readServiceName := include "loki.readFullname" . }} -{{- include "loki.ingress.servicePath" (dict "ctx" . "serviceName" $readServiceName "paths" .Values.ingress.paths.queryFrontend )}} -{{- include "loki.ingress.servicePath" (dict "ctx" . "serviceName" $readServiceName "paths" .Values.ingress.paths.ruler )}} -{{- $writeServiceName := include "loki.writeFullname" . }} -{{- include "loki.ingress.servicePath" (dict "ctx" . "serviceName" $writeServiceName "paths" .Values.ingress.paths.distributor )}} -{{- end -}} - -{{/* -Ingress service paths for single binary deployment -*/}} -{{- define "loki.ingress.singleBinaryServicePaths" -}} -{{- $serviceName := include "loki.singleBinaryFullname" . }} -{{- 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 )}} -{{- 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" -}} -{{- $ingressApiIsStable := eq (include "loki.ingress.isStable" .ctx) "true" -}} -{{- $ingressSupportsPathType := eq (include "loki.ingress.supportsPathType" .ctx) "true" -}} -{{- range .paths }} -- path: {{ . }} - {{- if $ingressSupportsPathType }} - pathType: Prefix - {{- end }} - backend: - {{- if $ingressApiIsStable }} - service: - name: {{ $.serviceName }} - port: - number: {{ $.ctx.Values.loki.server.http_listen_port }} - {{- else }} - serviceName: {{ $.serviceName }} - servicePort: {{ $.ctx.Values.loki.server.http_listen_port }} - {{- end -}} -{{- 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" .Release.Namespace (.Values.minio.service.port | toString)) -}} -{{- end -}} -{{- end -}} - -{{/* Determine if deployment is using object storage */}} -{{- define "loki.isUsingObjectStorage" -}} -{{- or (eq .Values.loki.storage.type "gcs") (eq .Values.loki.storage.type "s3") (eq .Values.loki.storage.type "azure") (eq .Values.loki.storage.type "swift") (eq .Values.loki.storage.type "alibabacloud") -}} -{{- end -}} - -{{/* Configure the correct name for the memberlist service */}} -{{- define "loki.memberlist" -}} -{{ include "loki.name" . }}-memberlist -{{- end -}} - -{{/* Determine the public host for the Loki cluster */}} -{{- define "loki.host" -}} -{{- $isSingleBinary := eq (include "loki.deployment.isSingleBinary" .) "true" -}} -{{- $url := printf "%s.%s.svc.%s.:%s" (include "loki.gatewayFullname" .) .Release.Namespace .Values.global.clusterDomain (.Values.gateway.service.port | toString) }} -{{- if and $isSingleBinary (not .Values.gateway.enabled) }} - {{- $url = printf "%s.%s.svc.%s.:%s" (include "loki.singleBinaryFullname" .) .Release.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 -}} - -{{/* Name of the cluster */}} -{{- define "loki.clusterName" -}} -{{- $name := .Values.enterprise.cluster_name | default .Release.Name }} -{{- printf "%s" $name -}} -{{- end -}} - -{{/* Name of kubernetes secret to persist GEL admin token to */}} -{{- define "enterprise-logs.adminTokenSecret" }} -{{- .Values.enterprise.adminToken.secret | default (printf "%s-admin-token" (include "loki.name" . )) -}} -{{- end -}} - -{{/* Prefix for provisioned secrets created for each provisioned tenant */}} -{{- define "enterprise-logs.provisionedSecretPrefix" }} -{{- .Values.enterprise.provisioner.provisionedSecretPrefix | default (printf "%s-provisioned" (include "loki.name" . )) -}} -{{- end -}} - -{{/* Name of kubernetes secret to persist canary credentials in */}} -{{- define "enterprise-logs.selfMonitoringTenantSecret" }} -{{- .Values.enterprise.canarySecret | default (printf "%s-%s" (include "enterprise-logs.provisionedSecretPrefix" . ) .Values.monitoring.selfMonitoring.tenant.name) -}} -{{- 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.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 }} - - server { - {{- if (.Values.gateway.nginxConfig.ssl) }} - listen 8080 ssl; - {{- if .Values.gateway.nginxConfig.enableIPv6 }} - listen [::]:8080 ssl; - {{- end }} - {{- else }} - listen 8080; - {{- if .Values.gateway.nginxConfig.enableIPv6 }} - listen [::]:8080; - {{- end }} - {{- end }} - - {{- if .Values.gateway.basicAuth.enabled }} - auth_basic "Loki"; - auth_basic_user_file /etc/nginx/secrets/.htpasswd; - {{- end }} - - location = / { - return 200 'OK'; - auth_basic off; - } - - ######################################################## - # Configure backend targets - - {{- $backendHost := include "loki.backendFullname" .}} - {{- $readHost := include "loki.readFullname" .}} - {{- $writeHost := include "loki.writeFullname" .}} - - {{- if .Values.read.legacyReadTarget }} - {{- $backendHost = include "loki.readFullname" . }} - {{- end }} - - {{- $httpSchema := .Values.gateway.nginxConfig.schema }} - - {{- $writeUrl := printf "%s://%s.%s.svc.%s:%s" $httpSchema $writeHost .Release.Namespace .Values.global.clusterDomain (.Values.loki.server.http_listen_port | toString) }} - {{- $readUrl := printf "%s://%s.%s.svc.%s:%s" $httpSchema $readHost .Release.Namespace .Values.global.clusterDomain (.Values.loki.server.http_listen_port | toString) }} - {{- $backendUrl := printf "%s://%s.%s.svc.%s:%s" $httpSchema $backendHost .Release.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 }} - - {{- $singleBinaryHost := include "loki.singleBinaryFullname" . }} - {{- $singleBinaryUrl := printf "%s://%s.%s.svc.%s:%s" $httpSchema $singleBinaryHost .Release.Namespace .Values.global.clusterDomain (.Values.loki.server.http_listen_port | toString) }} - - {{- $distributorHost := include "loki.distributorFullname" .}} - {{- $ingesterHost := include "loki.ingesterFullname" .}} - {{- $queryFrontendHost := include "loki.queryFrontendFullname" .}} - {{- $indexGatewayHost := include "loki.indexGatewayFullname" .}} - {{- $rulerHost := include "loki.rulerFullname" .}} - {{- $compactorHost := include "loki.compactorFullname" .}} - {{- $schedulerHost := include "loki.querySchedulerFullname" .}} - - - {{- $distributorUrl := printf "%s://%s.%s.svc.%s:%s" $httpSchema $distributorHost .Release.Namespace .Values.global.clusterDomain (.Values.loki.server.http_listen_port | toString) -}} - {{- $ingesterUrl := printf "%s://%s.%s.svc.%s:%s" $httpSchema $ingesterHost .Release.Namespace .Values.global.clusterDomain (.Values.loki.server.http_listen_port | toString) }} - {{- $queryFrontendUrl := printf "%s://%s.%s.svc.%s:%s" $httpSchema $queryFrontendHost .Release.Namespace .Values.global.clusterDomain (.Values.loki.server.http_listen_port | toString) }} - {{- $indexGatewayUrl := printf "%s://%s.%s.svc.%s:%s" $httpSchema $indexGatewayHost .Release.Namespace .Values.global.clusterDomain (.Values.loki.server.http_listen_port | toString) }} - {{- $rulerUrl := printf "%s://%s.%s.svc.%s:%s" $httpSchema $rulerHost .Release.Namespace .Values.global.clusterDomain (.Values.loki.server.http_listen_port | toString) }} - {{- $compactorUrl := printf "%s://%s.%s.svc.%s:%s" $httpSchema $compactorHost .Release.Namespace .Values.global.clusterDomain (.Values.loki.server.http_listen_port | toString) }} - {{- $schedulerUrl := printf "%s://%s.%s.svc.%s:%s" $httpSchema $schedulerHost .Release.Namespace .Values.global.clusterDomain (.Values.loki.server.http_listen_port | toString) }} - - {{- if eq (include "loki.deployment.isSingleBinary" .) "true"}} - {{- $distributorUrl = $singleBinaryUrl }} - {{- $ingesterUrl = $singleBinaryUrl }} - {{- $queryFrontendUrl = $singleBinaryUrl }} - {{- $indexGatewayUrl = $singleBinaryUrl }} - {{- $rulerUrl = $singleBinaryUrl }} - {{- $compactorUrl = $singleBinaryUrl }} - {{- $schedulerUrl = $singleBinaryUrl }} - {{- else if eq (include "loki.deployment.isScalable" .) "true"}} - {{- $distributorUrl = $writeUrl }} - {{- $ingesterUrl = $writeUrl }} - {{- $queryFrontendUrl = $readUrl }} - {{- $indexGatewayUrl = $backendUrl }} - {{- $rulerUrl = $backendUrl }} - {{- $compactorUrl = $backendUrl }} - {{- $schedulerUrl = $backendUrl }} - {{- end -}} - - {{- if .Values.loki.ui.gateway.enabled }} - location ^~ /ui { - proxy_pass {{ $distributorUrl }}$request_uri; - } - {{- end }} - - # Distributor - location = /api/prom/push { - proxy_pass {{ $distributorUrl }}$request_uri; - } - location = /loki/api/v1/push { - proxy_pass {{ $distributorUrl }}$request_uri; - } - location = /distributor/ring { - proxy_pass {{ $distributorUrl }}$request_uri; - } - location = /otlp/v1/logs { - proxy_pass {{ $distributorUrl }}$request_uri; - } - - # Ingester - location = /flush { - proxy_pass {{ $ingesterUrl }}$request_uri; - } - location ^~ /ingester/ { - proxy_pass {{ $ingesterUrl }}$request_uri; - } - location = /ingester { - internal; # to suppress 301 - } - - # Ring - location = /ring { - proxy_pass {{ $ingesterUrl }}$request_uri; - } - - # MemberListKV - location = /memberlist { - proxy_pass {{ $ingesterUrl }}$request_uri; - } - - # Ruler - location = /ruler/ring { - proxy_pass {{ $rulerUrl }}$request_uri; - } - location = /api/prom/rules { - proxy_pass {{ $rulerUrl }}$request_uri; - } - location ^~ /api/prom/rules/ { - proxy_pass {{ $rulerUrl }}$request_uri; - } - location = /loki/api/v1/rules { - proxy_pass {{ $rulerUrl }}$request_uri; - } - location ^~ /loki/api/v1/rules/ { - proxy_pass {{ $rulerUrl }}$request_uri; - } - location = /prometheus/api/v1/alerts { - proxy_pass {{ $rulerUrl }}$request_uri; - } - location = /prometheus/api/v1/rules { - proxy_pass {{ $rulerUrl }}$request_uri; - } - - # Compactor - location = /compactor/ring { - proxy_pass {{ $compactorUrl }}$request_uri; - } - location = /loki/api/v1/delete { - proxy_pass {{ $compactorUrl }}$request_uri; - } - location = /loki/api/v1/cache/generation_numbers { - proxy_pass {{ $compactorUrl }}$request_uri; - } - - # IndexGateway - location = /indexgateway/ring { - proxy_pass {{ $indexGatewayUrl }}$request_uri; - } - - # QueryScheduler - location = /scheduler/ring { - proxy_pass {{ $schedulerUrl }}$request_uri; - } - - # Config - location = /config { - proxy_pass {{ $ingesterUrl }}$request_uri; - } - - {{- if and .Values.enterprise.enabled .Values.enterprise.adminApi.enabled }} - # Admin API - location ^~ /admin/api/ { - proxy_pass {{ $backendUrl }}$request_uri; - } - location = /admin/api { - internal; # to suppress 301 - } - {{- end }} - - - # QueryFrontend, Querier - location = /api/prom/tail { - proxy_pass {{ $queryFrontendUrl }}$request_uri; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; - } - location = /loki/api/v1/tail { - proxy_pass {{ $queryFrontendUrl }}$request_uri; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; - } - location ^~ /api/prom/ { - proxy_pass {{ $queryFrontendUrl }}$request_uri; - } - location = /api/prom { - internal; # to suppress 301 - } - # if the X-Query-Tags header is empty, set a noop= without a value as empty values are not logged - set $query_tags $http_x_query_tags; - if ($query_tags !~* '') { - set $query_tags "noop="; - } - 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}"; - proxy_pass {{ $queryFrontendUrl }}$request_uri; - } - location = /loki/api/v1 { - internal; # to suppress 301 - } - - {{- with .Values.gateway.nginxConfig.serverSnippet }} - {{ . | nindent 4 }} - {{- end }} - } -} -{{- end }} - -{{/* Configure enableServiceLinks in pod */}} -{{- define "loki.enableServiceLinks" -}} -{{- if semverCompare ">=1.13-0" (include "loki.kubeVersion" .) -}} -{{- if or (.Values.loki.enableServiceLinks) (ne .Values.loki.enableServiceLinks false) -}} -enableServiceLinks: true -{{- else -}} -enableServiceLinks: false -{{- end -}} -{{- 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" -}} -{{- $isSingleBinary := eq (include "loki.deployment.isSingleBinary" .) "true" -}} -{{- $compactorAddress := include "loki.backendFullname" . -}} -{{- if and $isSimpleScalable .Values.read.legacyReadTarget -}} -{{/* 2 target configuration */}} -{{- $compactorAddress = include "loki.readFullname" . -}} -{{- else if $isSingleBinary -}} -{{/* single binary */}} -{{- $compactorAddress = include "loki.singleBinaryFullname" . -}} -{{/* distributed */}} -{{- else if $isDistributed -}} -{{- $compactorAddress = include "loki.compactorFullname" . -}} -{{- end -}} -{{- printf "http://%s:%s" $compactorAddress (.Values.loki.server.http_listen_port | toString) }} -{{- end }} - -{{/* Determine query-scheduler address */}} -{{- define "loki.querySchedulerAddress" -}} -{{- $schedulerAddress := ""}} -{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} -{{- if $isDistributed -}} -{{- $schedulerAddress = printf "%s.%s.svc.%s:%s" (include "loki.querySchedulerFullname" .) .Release.Namespace .Values.global.clusterDomain (.Values.loki.server.grpc_listen_port | toString) -}} -{{- end -}} -{{- printf "%s" $schedulerAddress }} -{{- end }} - -{{/* Determine querier address */}} -{{- define "loki.querierAddress" -}} -{{- $querierAddress := "" }} -{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} -{{- if $isDistributed -}} -{{- $querierHost := include "loki.querierFullname" .}} -{{- $querierUrl := printf "http://%s.%s.svc.%s:3100" $querierHost .Release.Namespace .Values.global.clusterDomain }} -{{- $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.indexGatewayFullname" .) .Release.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.backendFullname" .) .Release.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.bloomPlannerFullname" .) .Release.Namespace .Values.global.clusterDomain (.Values.loki.server.grpc_listen_port | toString) -}} -{{- end -}} -{{- if $isScalable -}} -{{- $bloomPlannerAddress = printf "%s-headless.%s.svc.%s:%s" (include "loki.backendFullname" .) .Release.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.bloomGatewayFullname" .) .Release.Namespace .Values.global.clusterDomain -}} -{{- end -}} -{{- if $isScalable -}} -{{- $bloomGatewayAddresses = printf "dnssrvnoa+_grpc._tcp.%s-headless.%s.svc.%s" (include "loki.backendFullname" .) .Release.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 appropriate apiVersion for PodDisruptionBudget. -*/}} -{{- define "loki.pdb.apiVersion" -}} - {{- if and (.Capabilities.APIVersions.Has "policy/v1") (semverCompare ">=1.21-0" (include "loki.kubeVersion" .)) -}} - {{- print "policy/v1" -}} - {{- else -}} - {{- print "policy/v1beta1" -}} - {{- end -}} -{{- end -}} - -{{/* -Return the object store type for use with the test schema. -*/}} -{{- define "loki.testSchemaObjectStore" -}} - {{- if .Values.minio.enabled -}} - s3 - {{- else -}} - filesystem - {{- end -}} -{{- end -}} - -{{/* -Return the appropriate apiVersion for HorizontalPodAutoscaler. -*/}} -{{- define "loki.hpa.apiVersion" -}} - {{- if and (.Capabilities.APIVersions.Has "autoscaling/v2") (semverCompare ">= 1.19-0" (include "loki.kubeVersion" .)) -}} - {{- print "autoscaling/v2" -}} - {{- else if .Capabilities.APIVersions.Has "autoscaling/v2beta2" -}} - {{- print "autoscaling/v2beta2" -}} - {{- else -}} - {{- print "autoscaling/v2beta1" -}} - {{- 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: - {{- with .s3 }} - bucket_name: {{ $bucketName }} - endpoint: {{ .endpoint }} - access_key_id: {{ .access_key_id }} - secret_access_key: {{ .secret_access_key }} - region: {{ .region }} - insecure: {{ .insecure }} - http: - {{ toYaml .http | nindent 4 }} - sse: - {{ toYaml .sse | nindent 4 }} - {{- end }} -{{- else if eq .type "gcs" }} -gcs: - {{- with .gcs }} - bucket_name: {{ $bucketName }} - service_account: {{ .service_account }} - {{- end }} -{{- else if eq .type "azure" }} -azure: - {{- with .azure }} - container_name: {{ $bucketName }} - account_name: {{ .account_name }} - account_key: {{ .account_key }} - {{- end }} -{{- end }} -storage_prefix: {{ .storage_prefix }} -{{- end }} -{{- end }} diff --git a/charts/loki/templates/admin-api/_helpers.yaml b/charts/loki/templates/admin-api/_helpers.yaml deleted file mode 100644 index e13ff8a..0000000 --- a/charts/loki/templates/admin-api/_helpers.yaml +++ /dev/null @@ -1,24 +0,0 @@ -{{/* -adminApi fullname -*/}} -{{- define "enterprise-logs.adminApiFullname" -}} -{{ include "loki.fullname" . }}-admin-api -{{- end }} - -{{/* -adminApi common labels -*/}} -{{- define "enterprise-logs.adminApiLabels" -}} -{{ include "loki.labels" . }} -app.kubernetes.io/component: admin-api -target: admin-api -{{- end }} - -{{/* -adminApi selector labels -*/}} -{{- define "enterprise-logs.adminApiSelectorLabels" -}} -{{ include "loki.selectorLabels" . }} -app.kubernetes.io/component: admin-api -target: admin-api -{{- end }} \ No newline at end of file diff --git a/charts/loki/templates/admin-api/deployment-admin-api.yaml b/charts/loki/templates/admin-api/deployment-admin-api.yaml deleted file mode 100644 index ef39059..0000000 --- a/charts/loki/templates/admin-api/deployment-admin-api.yaml +++ /dev/null @@ -1,155 +0,0 @@ -{{- if and .Values.enterprise.enabled .Values.enterprise.adminApi.enabled }} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "enterprise-logs.adminApiFullname" . }} - labels: - {{- include "enterprise-logs.adminApiLabels" . | nindent 4 }} - {{- with .Values.adminApi.labels }} - {{- toYaml . | nindent 4 }} - {{- end }} - app.kubernetes.io/part-of: memberlist - annotations: - {{- with .Values.adminApi.annotations }} - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - replicas: {{ .Values.adminApi.replicas }} - selector: - matchLabels: - {{- include "enterprise-logs.adminApiSelectorLabels" . | nindent 6 }} - strategy: - {{- toYaml .Values.adminApi.strategy | nindent 4 }} - template: - metadata: - labels: - {{- include "enterprise-logs.adminApiLabels" . | nindent 8 }} - {{- with merge (dict) .Values.loki.podLabels .Values.adminApi.labels }} - {{- tpl (toYaml .) $ | nindent 8 }} - {{- end }} - app.kubernetes.io/part-of: memberlist - annotations: - {{- if .Values.useExternalConfig }} - checksum/config: {{ .Values.externalConfigVersion }} - {{- else }} - checksum/config: {{ include "loki.configMapOrSecretContentHash" (dict "ctx" . "name" "/config.yaml") }} - {{- end}} - {{- with .Values.adminApi.annotations }} - {{- toYaml . | nindent 8 }} - {{- end }} - spec: - {{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.Version }} - {{- with .Values.adminApi.topologySpreadConstraints }} - topologySpreadConstraints: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- end }} - serviceAccountName: {{ template "loki.serviceAccountName" . }} - {{- if .Values.adminApi.priorityClassName }} - priorityClassName: {{ .Values.adminApi.priorityClassName }} - {{- end }} - securityContext: - {{- toYaml .Values.adminApi.podSecurityContext | nindent 8 }} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.adminApi.hostAliases }} - hostAliases: - {{- toYaml . | nindent 8 }} - {{- end }} - containers: - - name: admin-api - image: "{{ template "loki.image" . }}" - imagePullPolicy: {{ .Values.enterprise.image.pullPolicy }} - args: - - -target=admin-api - - -config.file=/etc/loki/config/config.yaml - {{- if .Values.minio.enabled }} - - -admin.client.backend-type=s3 - - -admin.client.s3.endpoint={{ template "loki.minio" . }} - - -admin.client.s3.bucket-name={{ .Values.loki.storage.bucketNames.admin }} - - -admin.client.s3.access-key-id={{ (index .Values.minio.users 0).accessKey }} - - -admin.client.s3.secret-access-key={{ (index .Values.minio.users 0).secretKey }} - - -admin.client.s3.insecure={{ .Values.loki.storage.s3.insecure }} - {{- end }} - {{- range $key, $value := .Values.adminApi.extraArgs }} - - "-{{ $key }}={{ $value }}" - {{- end }} - volumeMounts: - - name: config - mountPath: /etc/loki/config - - name: license - mountPath: /etc/loki/license - - name: storage - mountPath: /data - {{- if .Values.adminApi.extraVolumeMounts }} - {{ toYaml .Values.adminApi.extraVolumeMounts | nindent 12 }} - {{- end }} - ports: - - name: http-metrics - containerPort: 3100 - protocol: TCP - - name: grpc - containerPort: 9095 - protocol: TCP - - name: http-memberlist - containerPort: 7946 - protocol: TCP - readinessProbe: - {{- toYaml .Values.adminApi.readinessProbe | nindent 12 }} - resources: - {{- toYaml .Values.adminApi.resources | nindent 12 }} - securityContext: - {{- toYaml .Values.adminApi.containerSecurityContext | nindent 12 }} - {{- with (concat .Values.global.extraEnv .Values.adminApi.extraEnv) | uniq }} - env: - {{- toYaml . | nindent 12 }} - {{- end }} - {{- with (concat .Values.global.extraEnvFrom .Values.adminApi.extraEnvFrom) | uniq }} - envFrom: - {{- toYaml . | nindent 12 }} - {{- end }} - {{- with .Values.adminApi.extraContainers }} - {{ toYaml . | nindent 8 }} - {{- end }} - nodeSelector: - {{- toYaml .Values.adminApi.nodeSelector | nindent 8 }} - affinity: - {{- toYaml .Values.adminApi.affinity | nindent 8 }} - tolerations: - {{- toYaml .Values.adminApi.tolerations | nindent 8 }} - terminationGracePeriodSeconds: {{ .Values.adminApi.terminationGracePeriodSeconds }} - volumes: - - name: config - {{- include "loki.configVolume" . | nindent 10 }} - - name: license - secret: - {{- if .Values.enterprise.useExternalLicense }} - secretName: {{ .Values.enterprise.externalLicenseName }} - {{- else }} - secretName: enterprise-logs-license - {{- end }} - - name: storage - emptyDir: {} - {{- if .Values.adminApi.extraVolumes }} - {{ toYaml .Values.adminApi.extraVolumes | nindent 8 }} - {{- end }} - {{- if .Values.minio.enabled }} - - name: minio-configuration - projected: - sources: - - configMap: - name: {{ .Release.Name }}-minio - - secret: - name: {{ .Release.Name }}-minio - {{- if .Values.minio.tls.enabled }} - - name: cert-secret-volume-mc - secret: - secretName: {{ .Values.minio.tls.certSecret }} - items: - - key: {{ .Values.minio.tls.publicCrt }} - path: CAs/public.crt - {{- end }} - {{- end }} -{{- end }} diff --git a/charts/loki/templates/admin-api/service-admin-api.yaml b/charts/loki/templates/admin-api/service-admin-api.yaml deleted file mode 100644 index 8f81723..0000000 --- a/charts/loki/templates/admin-api/service-admin-api.yaml +++ /dev/null @@ -1,28 +0,0 @@ -{{- if and .Values.enterprise.enabled .Values.enterprise.adminApi.enabled }} -apiVersion: v1 -kind: Service -metadata: - name: {{ template "enterprise-logs.adminApiFullname" . }} - labels: - {{- include "enterprise-logs.adminApiLabels" . | nindent 4 }} - {{- with .Values.adminApi.service.labels }} - {{- toYaml . | nindent 4 }} - {{- end }} - annotations: - {{- with .Values.adminApi.service.annotations }} - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - type: ClusterIP - ports: - - name: http-metrics - port: 3100 - protocol: TCP - targetPort: http-metrics - - name: grpc - port: 9095 - protocol: TCP - targetPort: grpc - selector: - {{- include "enterprise-logs.adminApiSelectorLabels" . | nindent 4 }} -{{- end }} diff --git a/charts/loki/templates/backend/_helpers-backend.tpl b/charts/loki/templates/backend/_helpers-backend.tpl deleted file mode 100644 index 08f5f8f..0000000 --- a/charts/loki/templates/backend/_helpers-backend.tpl +++ /dev/null @@ -1,32 +0,0 @@ -{{/* -backend fullname -*/}} -{{- define "loki.backendFullname" -}} -{{ include "loki.name" . }}-backend -{{- end }} - -{{/* -backend common labels -*/}} -{{- define "loki.backendLabels" -}} -{{ include "loki.labels" . }} -app.kubernetes.io/component: backend -{{- end }} - -{{/* -backend selector labels -*/}} -{{- define "loki.backendSelectorLabels" -}} -{{ include "loki.selectorLabels" . }} -app.kubernetes.io/component: backend -{{- end }} - -{{/* -backend priority class name -*/}} -{{- define "loki.backendPriorityClassName" -}} -{{- $pcn := coalesce .Values.global.priorityClassName .Values.backend.priorityClassName -}} -{{- if $pcn }} -priorityClassName: {{ $pcn }} -{{- end }} -{{- end }} diff --git a/charts/loki/templates/backend/clusterrole.yaml b/charts/loki/templates/backend/clusterrole.yaml deleted file mode 100644 index 36c8a0f..0000000 --- a/charts/loki/templates/backend/clusterrole.yaml +++ /dev/null @@ -1,20 +0,0 @@ -{{- 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/charts/loki/templates/backend/clusterrolebinding.yaml b/charts/loki/templates/backend/clusterrolebinding.yaml deleted file mode 100644 index 92f86a4..0000000 --- a/charts/loki/templates/backend/clusterrolebinding.yaml +++ /dev/null @@ -1,25 +0,0 @@ -{{- $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: {{ template "loki.serviceAccountName" . }} - namespace: {{ .Release.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/charts/loki/templates/backend/hpa.yaml b/charts/loki/templates/backend/hpa.yaml deleted file mode 100644 index ea834d6..0000000 --- a/charts/loki/templates/backend/hpa.yaml +++ /dev/null @@ -1,50 +0,0 @@ -{{- $isSimpleScalable := eq (include "loki.deployment.isScalable" .) "true" -}} -{{- $autoscalingv2 := .Capabilities.APIVersions.Has "autoscaling/v2" -}} -{{- if and $isSimpleScalable (not .Values.read.legacyReadTarget ) ( .Values.backend.autoscaling.enabled ) }} -{{- if $autoscalingv2 }} -apiVersion: autoscaling/v2 -{{- else }} -apiVersion: autoscaling/v2beta1 -{{- end }} -kind: HorizontalPodAutoscaler -metadata: - name: {{ include "loki.backendFullname" . }} - labels: - {{- include "loki.backendLabels" . | nindent 4 }} -spec: - scaleTargetRef: - apiVersion: apps/v1 - kind: StatefulSet - name: {{ include "loki.backendFullname" . }} - minReplicas: {{ .Values.backend.autoscaling.minReplicas }} - maxReplicas: {{ .Values.backend.autoscaling.maxReplicas }} - {{- with .Values.backend.autoscaling.behavior }} - behavior: - {{- toYaml . | nindent 4 }} - {{- end }} - metrics: - {{- with .Values.backend.autoscaling.targetMemoryUtilizationPercentage }} - - type: Resource - resource: - name: memory - {{- if $autoscalingv2 }} - target: - type: Utilization - averageUtilization: {{ . }} - {{- else }} - targetAverageUtilization: {{ . }} - {{- end }} - {{- end }} - {{- with .Values.backend.autoscaling.targetCPUUtilizationPercentage }} - - type: Resource - resource: - name: cpu - {{- if $autoscalingv2 }} - target: - type: Utilization - averageUtilization: {{ . }} - {{- else }} - targetAverageUtilization: {{ . }} - {{- end }} - {{- end }} -{{- end }} diff --git a/charts/loki/templates/backend/poddisruptionbudget-backend.yaml b/charts/loki/templates/backend/poddisruptionbudget-backend.yaml deleted file mode 100644 index d8ce5b0..0000000 --- a/charts/loki/templates/backend/poddisruptionbudget-backend.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- $isSimpleScalable := eq (include "loki.deployment.isScalable" .) "true" -}} -{{- if and $isSimpleScalable (gt (int .Values.backend.replicas) 1) (not .Values.read.legacyReadTarget ) }} -apiVersion: policy/v1 -kind: PodDisruptionBudget -metadata: - name: {{ include "loki.backendFullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "loki.backendLabels" . | nindent 4 }} -spec: - selector: - matchLabels: - {{- include "loki.backendSelectorLabels" . | nindent 6 }} - maxUnavailable: 1 -{{- end }} diff --git a/charts/loki/templates/backend/query-scheduler-discovery.yaml b/charts/loki/templates/backend/query-scheduler-discovery.yaml deleted file mode 100644 index 4c357e5..0000000 --- a/charts/loki/templates/backend/query-scheduler-discovery.yaml +++ /dev/null @@ -1,34 +0,0 @@ -{{- $isSimpleScalable := eq (include "loki.deployment.isScalable" .) "true" -}} -{{- if and $isSimpleScalable (not .Values.read.legacyReadTarget ) }} ---- -apiVersion: v1 -kind: Service -metadata: - name: {{ include "loki.querySchedulerFullname" . }}-discovery - namespace: {{ $.Release.Namespace }} - labels: - {{- include "loki.backendSelectorLabels" . | nindent 4 }} - 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.backendSelectorLabels" . | nindent 4 }} -{{- end }} diff --git a/charts/loki/templates/backend/service-backend-headless.yaml b/charts/loki/templates/backend/service-backend-headless.yaml deleted file mode 100644 index fd90fdd..0000000 --- a/charts/loki/templates/backend/service-backend-headless.yaml +++ /dev/null @@ -1,41 +0,0 @@ -{{- $isSimpleScalable := eq (include "loki.deployment.isScalable" .) "true" -}} -{{- if and $isSimpleScalable (not .Values.read.legacyReadTarget ) }} ---- -apiVersion: v1 -kind: Service -metadata: - name: {{ include "loki.backendFullname" . }}-headless - namespace: {{ $.Release.Namespace }} - labels: - {{- include "loki.backendSelectorLabels" . | nindent 4 }} - {{- with .Values.loki.serviceLabels }} - {{- toYaml . | nindent 4}} - {{- end }} - {{- with .Values.backend.service.labels }} - {{- toYaml . | nindent 4}} - {{- end }} - variant: headless - 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 - 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 - appProtocol: tcp - selector: - {{- include "loki.backendSelectorLabels" . | nindent 4 }} -{{- end }} diff --git a/charts/loki/templates/backend/service-backend.yaml b/charts/loki/templates/backend/service-backend.yaml deleted file mode 100644 index cd1bd3b..0000000 --- a/charts/loki/templates/backend/service-backend.yaml +++ /dev/null @@ -1,37 +0,0 @@ -{{- $isSimpleScalable := eq (include "loki.deployment.isScalable" .) "true" -}} -{{- if and $isSimpleScalable (not .Values.read.legacyReadTarget ) }} ---- -apiVersion: v1 -kind: Service -metadata: - name: {{ include "loki.backendFullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "loki.backendLabels" . | nindent 4 }} - {{- with .Values.loki.serviceLabels }} - {{- toYaml . | nindent 4}} - {{- end }} - {{- with .Values.backend.service.labels }} - {{- toYaml . | nindent 4}} - {{- end }} - annotations: - {{- with .Values.loki.serviceAnnotations }} - {{- toYaml . | nindent 4}} - {{- end }} - {{- with .Values.backend.service.annotations }} - {{- toYaml . | nindent 4}} - {{- end }} -spec: - type: ClusterIP - 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.backendSelectorLabels" . | nindent 4 }} -{{- end }} diff --git a/charts/loki/templates/backend/statefulset-backend.yaml b/charts/loki/templates/backend/statefulset-backend.yaml deleted file mode 100644 index 540e58f..0000000 --- a/charts/loki/templates/backend/statefulset-backend.yaml +++ /dev/null @@ -1,281 +0,0 @@ -{{- $isSimpleScalable := eq (include "loki.deployment.isScalable" .) "true" -}} -{{- if and $isSimpleScalable (not .Values.read.legacyReadTarget ) }} ---- -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: {{ include "loki.backendFullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "loki.backendLabels" . | nindent 4 }} - app.kubernetes.io/part-of: memberlist - {{- if or (not (empty .Values.loki.annotations)) (not (empty .Values.backend.annotations))}} - annotations: - {{- with merge (dict) .Values.loki.annotations .Values.backend.annotations }} - {{- toYaml . | nindent 4 }} - {{- end }} - {{- end }} -spec: -{{- if not .Values.backend.autoscaling.enabled }} - {{- if eq .Values.deploymentMode "SingleBinary" }} - replicas: 0 - {{- else }} - replicas: {{ .Values.backend.replicas }} - {{- end }} -{{- end }} - podManagementPolicy: {{ .Values.backend.podManagementPolicy }} - updateStrategy: - rollingUpdate: - partition: 0 - serviceName: {{ include "loki.backendFullname" . }}-headless - revisionHistoryLimit: {{ .Values.loki.revisionHistoryLimit }} - {{- if and (semverCompare ">= 1.23-0" (include "loki.kubeVersion" .)) (.Values.backend.persistence.enableStatefulSetAutoDeletePVC) (.Values.backend.persistence.volumeClaimsEnabled) }} - {{/* - Data on the backend nodes is easy to replace, so we want to always delete PVCs to make - operation easier, and will rely on re-fetching data when needed. - */}} - persistentVolumeClaimRetentionPolicy: - whenDeleted: Delete - whenScaled: Delete - {{- end }} - selector: - matchLabels: - {{- include "loki.backendSelectorLabels" . | nindent 6 }} - template: - metadata: - annotations: - checksum/config: {{ include "loki.configMapOrSecretContentHash" (dict "ctx" . "name" "/config.yaml") }} - {{- with .Values.loki.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.backend.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - {{- include "loki.backendLabels" . | nindent 8 }} - {{- with merge (dict) .Values.loki.podLabels .Values.backend.podLabels }} - {{- tpl (toYaml .) $ | nindent 8 }} - {{- end }} - app.kubernetes.io/part-of: memberlist - spec: - serviceAccountName: {{ include "loki.serviceAccountName" . }} - automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- include "loki.backendPriorityClassName" . | nindent 6 }} - securityContext: - {{- toYaml .Values.loki.podSecurityContext | nindent 8 }} - terminationGracePeriodSeconds: {{ .Values.backend.terminationGracePeriodSeconds }} - {{- if .Values.backend.initContainers }} - initContainers: - {{- with .Values.backend.initContainers }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- end }} - containers: - {{- if .Values.sidecar.rules.enabled }} - - name: loki-sc-rules - {{- if .Values.sidecar.image.sha }} - image: "{{ .Values.sidecar.image.repository }}:{{ .Values.sidecar.image.tag }}@sha256:{{ .Values.sidecar.image.sha }}" - {{- else }} - image: "{{ .Values.sidecar.image.repository }}:{{ .Values.sidecar.image.tag }}" - {{- end }} - imagePullPolicy: {{ .Values.sidecar.image.pullPolicy }} - 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 }}" - - 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.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.livenessProbe }} - livenessProbe: - {{- toYaml .Values.sidecar.livenessProbe | nindent 12 }} - {{- end }} - {{- if .Values.sidecar.readinessProbe }} - readinessProbe: - {{- toYaml .Values.sidecar.readinessProbe | nindent 12 }} - {{- end }} - {{- if .Values.sidecar.resources }} - resources: - {{- toYaml .Values.sidecar.resources | nindent 12 }} - {{- end }} - {{- if .Values.sidecar.securityContext }} - securityContext: - {{- toYaml .Values.sidecar.securityContext | nindent 12 }} - {{- end }} - volumeMounts: - - name: sc-rules-volume - mountPath: {{ .Values.sidecar.rules.folder | quote }} - {{- end}} - - name: loki - image: {{ include "loki.image" . }} - imagePullPolicy: {{ .Values.loki.image.pullPolicy }} - args: - - -config.file=/etc/loki/config/config.yaml - - -target={{ .Values.backend.targetModule }} - - -legacy-read-mode=false - {{- with (concat .Values.global.extraArgs .Values.backend.extraArgs) | uniq }} - {{- toYaml . | nindent 12 }} - {{- end }} - ports: - - 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 - {{- with (concat .Values.global.extraEnv .Values.backend.extraEnv) | uniq }} - env: - {{- toYaml . | nindent 12 }} - {{- end }} - {{- with (concat .Values.global.extraEnvFrom .Values.backend.extraEnvFrom) | uniq }} - envFrom: - {{- toYaml . | nindent 12 }} - {{- end }} - securityContext: - {{- toYaml .Values.loki.containerSecurityContext | nindent 12 }} - readinessProbe: - {{- toYaml .Values.loki.readinessProbe | nindent 12 }} - volumeMounts: - - name: config - mountPath: /etc/loki/config - - name: runtime-config - mountPath: /etc/loki/runtime-config - - name: tmp - mountPath: /tmp - - name: data - mountPath: /var/loki - {{- if .Values.enterprise.enabled }} - - name: license - mountPath: /etc/loki/license - {{- end}} - {{- if .Values.sidecar.rules.enabled }} - - name: sc-rules-volume - mountPath: {{ .Values.sidecar.rules.folder | quote }} - {{- end}} - {{- with (concat .Values.global.extraVolumeMounts .Values.backend.extraVolumeMounts) | uniq }} - {{- toYaml . | nindent 12 }} - {{- end }} - resources: - {{- toYaml .Values.backend.resources | nindent 12 }} - {{- with .Values.backend.extraContainers }} - {{- toYaml . | nindent 8}} - {{- end }} - {{- with .Values.backend.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.backend.dnsConfig }} - dnsConfig: - {{- tpl . $ | nindent 8 }} - {{- end }} - {{- with .Values.backend.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.backend.topologySpreadConstraints }} - topologySpreadConstraints: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.backend.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} - volumes: - - name: tmp - emptyDir: {} - {{- if not .Values.backend.persistence.volumeClaimsEnabled }} - - name: data - {{- toYaml .Values.backend.persistence.dataVolumeParameters | nindent 10 }} - {{- end}} - - name: config - {{- include "loki.configVolume" . | nindent 10 }} - - name: runtime-config - configMap: - name: {{ template "loki.name" . }}-runtime - {{- if .Values.enterprise.enabled }} - - name: license - secret: - {{- if .Values.enterprise.useExternalLicense }} - secretName: {{ .Values.enterprise.externalLicenseName }} - {{- else }} - secretName: enterprise-logs-license - {{- end }} - {{- end }} - {{- if .Values.sidecar.rules.enabled }} - - name: sc-rules-volume - {{- if .Values.sidecar.rules.sizeLimit }} - emptyDir: - sizeLimit: {{ .Values.sidecar.rules.sizeLimit }} - {{- else }} - emptyDir: {} - {{- end -}} - {{- end -}} - {{- with (concat .Values.global.extraVolumes .Values.backend.extraVolumes) | uniq }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- if .Values.backend.persistence.volumeClaimsEnabled }} - volumeClaimTemplates: - - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: data - {{- with .Values.backend.persistence.annotations }} - annotations: - {{- toYaml . | nindent 10 }} - {{- end }} - spec: - accessModes: - - ReadWriteOnce - {{- with .Values.backend.persistence.storageClass }} - storageClassName: {{ if (eq "-" .) }}""{{ else }}{{ . }}{{ end }} - {{- end }} - resources: - requests: - storage: {{ .Values.backend.persistence.size | quote }} - {{- with .Values.backend.persistence.selector }} - selector: - {{- toYaml . | nindent 10 }} - {{- end }} - {{- end }} -{{- end }} diff --git a/charts/loki/templates/bloom-builder/_helpers-bloom-builder.tpl b/charts/loki/templates/bloom-builder/_helpers-bloom-builder.tpl deleted file mode 100644 index 46359df..0000000 --- a/charts/loki/templates/bloom-builder/_helpers-bloom-builder.tpl +++ /dev/null @@ -1,32 +0,0 @@ -{{/* -bloom-builder fullname -*/}} -{{- define "loki.bloomBuilderFullname" -}} -{{ include "loki.fullname" . }}-bloom-builder -{{- end }} - -{{/* -bloom-builder common labels -*/}} -{{- define "loki.bloomBuilderLabels" -}} -{{ include "loki.labels" . }} -app.kubernetes.io/component: bloom-builder -{{- end }} - -{{/* -bloom-builder selector labels -*/}} -{{- define "loki.bloomBuilderSelectorLabels" -}} -{{ include "loki.selectorLabels" . }} -app.kubernetes.io/component: bloom-builder -{{- end }} - -{{/* -bloom-builder priority class name -*/}} -{{- define "loki.bloomBuilderPriorityClassName" -}} -{{- $pcn := coalesce .Values.global.priorityClassName .Values.bloomBuilder.priorityClassName -}} -{{- if $pcn }} -priorityClassName: {{ $pcn }} -{{- end }} -{{- end }} diff --git a/charts/loki/templates/bloom-builder/deployment-bloom-builder.yaml b/charts/loki/templates/bloom-builder/deployment-bloom-builder.yaml deleted file mode 100644 index c7f4513..0000000 --- a/charts/loki/templates/bloom-builder/deployment-bloom-builder.yaml +++ /dev/null @@ -1,147 +0,0 @@ -{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} -{{- if (and $isDistributed (gt (int .Values.bloomPlanner.replicas) 0)) -}} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "loki.bloomBuilderFullname" . }} - namespace: {{ .Release.Namespace }} - labels: - {{- include "loki.bloomBuilderLabels" . | nindent 4 }} - {{- with .Values.loki.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -spec: -{{- if not .Values.bloomBuilder.autoscaling.enabled }} - replicas: {{ .Values.bloomBuilder.replicas }} -{{- end }} - strategy: - rollingUpdate: - maxSurge: 0 - maxUnavailable: 1 - revisionHistoryLimit: {{ .Values.loki.revisionHistoryLimit }} - selector: - matchLabels: - {{- include "loki.bloomBuilderSelectorLabels" . | nindent 6 }} - template: - metadata: - annotations: - {{- include "loki.config.checksum" . | nindent 8 }} - {{- with .Values.loki.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.bloomBuilder.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - {{- include "loki.bloomBuilderLabels" . | nindent 8 }} - app.kubernetes.io/part-of: memberlist - {{- with merge (dict) .Values.loki.podLabels .Values.bloomBuilder.podLabels }} - {{- toYaml . | nindent 8 }} - {{- end }} - spec: - serviceAccountName: {{ include "loki.serviceAccountName" . }} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.bloomBuilder.hostAliases }} - hostAliases: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- include "loki.bloomBuilderPriorityClassName" . | nindent 6 }} - securityContext: - {{- toYaml .Values.loki.podSecurityContext | nindent 8 }} - terminationGracePeriodSeconds: {{ .Values.bloomBuilder.terminationGracePeriodSeconds }} - containers: - - name: bloom-builder - image: {{ include "loki.image" . }} - imagePullPolicy: {{ .Values.loki.image.pullPolicy }} - {{- if or .Values.loki.command .Values.bloomBuilder.command }} - command: - - {{ coalesce .Values.bloomBuilder.command .Values.loki.command | quote }} - {{- end }} - args: - - -config.file=/etc/loki/config/config.yaml - - -target=bloom-builder - {{- with (concat .Values.global.extraArgs .Values.bloomBuilder.extraArgs) | uniq }} - {{- toYaml . | nindent 12 }} - {{- end }} - ports: - - name: http-metrics - containerPort: 3100 - protocol: TCP - - name: grpc - containerPort: 9095 - protocol: TCP - - name: http-memberlist - containerPort: 7946 - protocol: TCP - {{- with (concat .Values.global.extraEnv .Values.bloomBuilder.extraEnv) | uniq }} - env: - {{- toYaml . | nindent 12 }} - {{- end }} - {{- with (concat .Values.global.extraEnvFrom .Values.bloomBuilder.extraEnvFrom) | uniq }} - envFrom: - {{- toYaml . | nindent 12 }} - {{- end }} - securityContext: - {{- toYaml .Values.loki.containerSecurityContext | nindent 12 }} - readinessProbe: - {{- toYaml .Values.loki.readinessProbe | nindent 12 }} - volumeMounts: - - name: config - mountPath: /etc/loki/config - - name: runtime-config - mountPath: /etc/loki/runtime-config - {{- if .Values.enterprise.enabled }} - - name: license - mountPath: /etc/loki/license - {{- end }} - - name: temp - mountPath: /tmp - - name: data - mountPath: /var/loki - {{- with (concat .Values.global.extraVolumeMounts .Values.bloomBuilder.extraVolumeMounts) | uniq }} - {{- toYaml . | nindent 12 }} - {{- end }} - resources: - {{- toYaml .Values.bloomBuilder.resources | nindent 12 }} - {{- if .Values.bloomBuilder.extraContainers }} - {{- toYaml .Values.bloomBuilder.extraContainers | nindent 8}} - {{- end }} - {{- with .Values.bloomBuilder.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.bloomBuilder.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.bloomBuilder.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} - volumes: - - name: config - {{- include "loki.configVolume" . | nindent 10 }} - - name: runtime-config - configMap: - name: {{ template "loki.name" . }}-runtime - {{- if .Values.enterprise.enabled }} - - name: license - secret: - {{- if .Values.enterprise.useExternalLicense }} - secretName: {{ .Values.enterprise.externalLicenseName }} - {{- else }} - secretName: enterprise-logs-license - {{- end }} - {{- end }} - - name: temp - emptyDir: {} - - name: data - emptyDir: {} - {{- with (concat .Values.global.extraVolumes .Values.bloomBuilder.extraVolumes) | uniq }} - {{- toYaml . | nindent 8 }} - {{- end }} -{{- end -}} diff --git a/charts/loki/templates/bloom-builder/hpa.yaml b/charts/loki/templates/bloom-builder/hpa.yaml deleted file mode 100644 index 2b04647..0000000 --- a/charts/loki/templates/bloom-builder/hpa.yaml +++ /dev/null @@ -1,55 +0,0 @@ -{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} -{{- if and $isDistributed .Values.bloomBuilder.autoscaling.enabled }} -{{- $apiVersion := include "loki.hpa.apiVersion" . -}} -apiVersion: {{ $apiVersion }} -kind: HorizontalPodAutoscaler -metadata: - name: {{ include "loki.bloomBuilderFullname" . }} - namespace: {{ .Release.Namespace }} - labels: - {{- include "loki.bloomBuilderLabels" . | nindent 4 }} -spec: - scaleTargetRef: - apiVersion: apps/v1 - kind: Deployment - name: {{ include "loki.bloomBuilderFullname" . }} - minReplicas: {{ .Values.bloomBuilder.autoscaling.minReplicas }} - maxReplicas: {{ .Values.bloomBuilder.autoscaling.maxReplicas }} - metrics: - {{- with .Values.bloomBuilder.autoscaling.targetMemoryUtilizationPercentage }} - - type: Resource - resource: - name: memory - {{- if (eq $apiVersion "autoscaling/v2") }} - target: - type: Utilization - averageUtilization: {{ . }} - {{- else }} - targetAverageUtilization: {{ . }} - {{- end }} - {{- end }} - {{- with .Values.bloomBuilder.autoscaling.targetCPUUtilizationPercentage }} - - type: Resource - resource: - name: cpu - {{- if (eq $apiVersion "autoscaling/v2") }} - target: - type: Utilization - averageUtilization: {{ . }} - {{- else }} - targetAverageUtilization: {{ . }} - {{- end }} - {{- end }} - {{- with .Values.bloomBuilder.autoscaling.customMetrics }} - {{- toYaml . | nindent 4 }} - {{- end }} - {{- if .Values.bloomBuilder.autoscaling.behavior.enabled }} - behavior: - {{- with .Values.bloomBuilder.autoscaling.behavior.scaleDown }} - scaleDown: {{ toYaml . | nindent 6 }} - {{- end }} - {{- with .Values.bloomBuilder.autoscaling.behavior.scaleUp }} - scaleUp: {{ toYaml . | nindent 6 }} - {{- end }} - {{- end }} -{{- end }} diff --git a/charts/loki/templates/bloom-builder/poddisruptionbudget-bloom-builder.yaml b/charts/loki/templates/bloom-builder/poddisruptionbudget-bloom-builder.yaml deleted file mode 100644 index e66d762..0000000 --- a/charts/loki/templates/bloom-builder/poddisruptionbudget-bloom-builder.yaml +++ /dev/null @@ -1,21 +0,0 @@ -{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} -{{- if and $isDistributed (gt (int .Values.bloomBuilder.replicas) 1) }} -{{- if kindIs "invalid" .Values.bloomBuilder.maxUnavailable }} -{{- fail "`.Values.bloomBuilder.maxUnavailable` must be set when `.Values.bloomBuilder.replicas` is greater than 1." }} -{{- else }} -apiVersion: {{ include "loki.pdb.apiVersion" . }} -kind: PodDisruptionBudget -metadata: - name: {{ include "loki.bloomBuilderFullname" . }} - namespace: {{ .Release.Namespace }} - labels: - {{- include "loki.bloomBuilderLabels" . | nindent 4 }} -spec: - selector: - matchLabels: - {{- include "loki.bloomBuilderSelectorLabels" . | nindent 6 }} - {{- with .Values.bloomBuilder.maxUnavailable }} - maxUnavailable: {{ . }} - {{- end }} -{{- end }} -{{- end }} diff --git a/charts/loki/templates/bloom-builder/service-bloom-builder-headless.yaml b/charts/loki/templates/bloom-builder/service-bloom-builder-headless.yaml deleted file mode 100644 index 9389252..0000000 --- a/charts/loki/templates/bloom-builder/service-bloom-builder-headless.yaml +++ /dev/null @@ -1,46 +0,0 @@ -{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} -{{- if (and $isDistributed (or (gt (int .Values.bloomBuilder.replicas) 0)) .Values.bloomBuilder.autoscaling.enabled) -}} -apiVersion: v1 -kind: Service -metadata: - name: {{ include "loki.bloomBuilderFullname" . }}-headless - namespace: {{ .Release.Namespace }} - labels: - {{- include "loki.bloomBuilderLabels" . | nindent 4 }} - {{- with .Values.bloomBuilder.serviceLabels }} - {{- toYaml . | nindent 4 }} - {{- end }} - prometheus.io/service-monitor: "false" - annotations: - {{- with .Values.loki.serviceAnnotations }} - {{- toYaml . | nindent 4}} - {{- end }} - {{- with .Values.bloomBuilder.serviceAnnotations }} - {{- toYaml . | nindent 4}} - {{- end }} -spec: - clusterIP: None - type: ClusterIP - publishNotReadyAddresses: true - ports: - - name: http-metrics - port: 3100 - targetPort: http-metrics - protocol: TCP - - name: grpc - port: 9095 - targetPort: grpc - protocol: TCP - {{- if .Values.bloomBuilder.appProtocol.grpc }} - appProtocol: {{ .Values.bloomBuilder.appProtocol.grpc }} - {{- end }} - - name: grpclb - port: 9096 - targetPort: grpc - protocol: TCP - {{- if .Values.bloomBuilder.appProtocol.grpc }} - appProtocol: {{ .Values.bloomBuilder.appProtocol.grpc }} - {{- end }} - selector: - {{- include "loki.bloomBuilderSelectorLabels" . | nindent 4 }} -{{- end -}} diff --git a/charts/loki/templates/bloom-builder/service-bloom-builder.yaml b/charts/loki/templates/bloom-builder/service-bloom-builder.yaml deleted file mode 100644 index b3debb0..0000000 --- a/charts/loki/templates/bloom-builder/service-bloom-builder.yaml +++ /dev/null @@ -1,44 +0,0 @@ -{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} -{{- if (and $isDistributed (gt (int .Values.bloomBuilder.replicas) 0)) -}} -apiVersion: v1 -kind: Service -metadata: - name: {{ include "loki.bloomBuilderFullname" . }} - namespace: {{ .Release.Namespace }} - labels: - {{- include "loki.bloomBuilderLabels" . | nindent 4 }} - {{- with .Values.bloomBuilder.serviceLabels }} - {{- toYaml . | nindent 4 }} - {{- end }} - annotations: - {{- with .Values.loki.serviceAnnotations }} - {{- toYaml . | nindent 4}} - {{- end }} - {{- with .Values.bloomBuilder.serviceAnnotations }} - {{- toYaml . | nindent 4}} - {{- end }} -spec: - type: ClusterIP - publishNotReadyAddresses: true - ports: - - name: http-metrics - port: 3100 - targetPort: http-metrics - protocol: TCP - - name: grpc - port: 9095 - targetPort: grpc - protocol: TCP - {{- if .Values.bloomBuilder.appProtocol.grpc }} - appProtocol: {{ .Values.bloomBuilder.appProtocol.grpc }} - {{- end }} - - name: grpclb - port: 9096 - targetPort: grpc - protocol: TCP - {{- if .Values.bloomBuilder.appProtocol.grpc }} - appProtocol: {{ .Values.bloomBuilder.appProtocol.grpc }} - {{- end }} - selector: - {{- include "loki.bloomBuilderSelectorLabels" . | nindent 4 }} -{{- end -}} diff --git a/charts/loki/templates/bloom-gateway/_helpers-bloom-gateway.tpl b/charts/loki/templates/bloom-gateway/_helpers-bloom-gateway.tpl deleted file mode 100644 index f0cef4f..0000000 --- a/charts/loki/templates/bloom-gateway/_helpers-bloom-gateway.tpl +++ /dev/null @@ -1,58 +0,0 @@ -{{/* -bloom gateway fullname -*/}} -{{- define "loki.bloomGatewayFullname" -}} -{{ include "loki.fullname" . }}-bloom-gateway -{{- end }} - -{{/* -bloom gateway common labels -*/}} -{{- define "loki.bloomGatewayLabels" -}} -{{ include "loki.labels" . }} -app.kubernetes.io/component: bloom-gateway -{{- end }} - -{{/* -bloom gateway selector labels -*/}} -{{- define "loki.bloomGatewaySelectorLabels" -}} -{{ include "loki.selectorLabels" . }} -app.kubernetes.io/component: bloom-gateway -{{- end }} - -{{/* -bloom gateway readinessProbe -*/}} -{{- define "loki.bloomGateway.readinessProbe" -}} -{{- with .Values.bloomGateway.readinessProbe }} -readinessProbe: - {{- toYaml . | nindent 2 }} -{{- else }} -{{- with .Values.loki.readinessProbe }} -readinessProbe: - {{- toYaml . | nindent 2 }} -{{- end }} -{{- end }} -{{- end -}} - -{{/* -bloom gateway priority class name -*/}} -{{- define "loki.bloomGatewayPriorityClassName" }} -{{- $pcn := coalesce .Values.global.priorityClassName .Values.bloomGateway.priorityClassName -}} -{{- if $pcn }} -priorityClassName: {{ $pcn }} -{{- end }} -{{- end }} - -{{/* -Create the name of the bloom gateway service account -*/}} -{{- define "loki.bloomGatewayServiceAccountName" -}} -{{- if .Values.bloomGateway.serviceAccount.create -}} - {{ default (print (include "loki.serviceAccountName" .) "-bloom-gateway") .Values.bloomGateway.serviceAccount.name }} -{{- else -}} - {{ default (include "loki.serviceAccountName" .) .Values.bloomGateway.serviceAccount.name }} -{{- end -}} -{{- end -}} diff --git a/charts/loki/templates/bloom-gateway/service-bloom-gateway-headless.yaml b/charts/loki/templates/bloom-gateway/service-bloom-gateway-headless.yaml deleted file mode 100644 index 852e4cb..0000000 --- a/charts/loki/templates/bloom-gateway/service-bloom-gateway-headless.yaml +++ /dev/null @@ -1,39 +0,0 @@ -{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} -{{- if $isDistributed -}} -{{- if (gt (int .Values.bloomGateway.replicas) 0) -}} -apiVersion: v1 -kind: Service -metadata: - name: {{ include "loki.bloomGatewayFullname" . }}-headless - namespace: {{ .Release.Namespace }} - labels: - {{- include "loki.bloomGatewaySelectorLabels" . | nindent 4 }} - {{- with .Values.bloomGateway.serviceLabels }} - {{- toYaml . | nindent 4 }} - {{- end }} - annotations: - {{- with .Values.loki.serviceAnnotations }} - {{- toYaml . | nindent 4}} - {{- end }} - {{- with .Values.bloomGateway.serviceAnnotations }} - {{- toYaml . | nindent 4}} - {{- end }} -spec: - type: ClusterIP - clusterIP: None - ports: - - name: http-metrics - port: 3100 - targetPort: http-metrics - protocol: TCP - - name: grpc - port: 9095 - targetPort: grpc - protocol: TCP - {{- if .Values.bloomGateway.appProtocol.grpc }} - appProtocol: {{ .Values.bloomGateway.appProtocol.grpc }} - {{- end }} - selector: - {{- include "loki.bloomGatewaySelectorLabels" . | nindent 4 }} -{{- end -}} -{{- end -}} diff --git a/charts/loki/templates/bloom-gateway/statefulset-bloom-gateway.yaml b/charts/loki/templates/bloom-gateway/statefulset-bloom-gateway.yaml deleted file mode 100644 index 9da0f9f..0000000 --- a/charts/loki/templates/bloom-gateway/statefulset-bloom-gateway.yaml +++ /dev/null @@ -1,180 +0,0 @@ -{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} -{{- if (and $isDistributed (gt (int .Values.bloomGateway.replicas) 0)) -}} -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: {{ include "loki.bloomGatewayFullname" . }} - namespace: {{ .Release.Namespace }} - labels: - {{- include "loki.bloomGatewayLabels" . | nindent 4 }} - {{- with .Values.loki.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - replicas: {{ .Values.bloomGateway.replicas }} - podManagementPolicy: Parallel - updateStrategy: - rollingUpdate: - partition: 0 - serviceName: {{ include "loki.bloomGatewayFullname" . }}-headless - revisionHistoryLimit: {{ .Values.loki.revisionHistoryLimit }} - {{- if and (semverCompare ">= 1.23-0" (include "loki.kubeVersion" .)) (.Values.bloomGateway.persistence.enableStatefulSetAutoDeletePVC) }} - persistentVolumeClaimRetentionPolicy: - whenDeleted: {{ .Values.bloomGateway.persistence.whenDeleted }} - whenScaled: {{ .Values.bloomGateway.persistence.whenScaled }} - {{- end }} - selector: - matchLabels: - {{- include "loki.bloomGatewaySelectorLabels" . | nindent 6 }} - template: - metadata: - annotations: - {{- include "loki.config.checksum" . | nindent 8 }} - {{- with .Values.loki.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.bloomGateway.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - {{- include "loki.bloomGatewayLabels" . | nindent 8 }} - app.kubernetes.io/part-of: memberlist - {{- with merge (dict) .Values.loki.podLabels .Values.bloomGateway.podLabels }} - {{- toYaml . | nindent 8 }} - {{- end }} - spec: - serviceAccountName: {{ include "loki.serviceAccountName" . }} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.bloomGateway.hostAliases }} - hostAliases: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- include "loki.bloomGatewayPriorityClassName" . | nindent 6 }} - securityContext: - {{- toYaml .Values.loki.podSecurityContext | nindent 8 }} - terminationGracePeriodSeconds: {{ .Values.bloomGateway.terminationGracePeriodSeconds }} - {{- with .Values.bloomGateway.initContainers }} - initContainers: - {{- toYaml . | nindent 8 }} - {{- end }} - containers: - - name: bloom-gateway - image: {{ include "loki.image" . }} - imagePullPolicy: {{ .Values.loki.image.pullPolicy }} - {{- if or .Values.loki.command .Values.bloomGateway.command }} - command: - - {{ coalesce .Values.bloomGateway.command .Values.loki.command | quote }} - {{- end }} - args: - - -config.file=/etc/loki/config/config.yaml - - -target=bloom-gateway - {{- with (concat .Values.global.extraArgs .Values.bloomGateway.extraArgs) | uniq }} - {{- toYaml . | nindent 12 }} - {{- end }} - ports: - - name: http-metrics - containerPort: 3100 - protocol: TCP - - name: grpc - containerPort: 9095 - protocol: TCP - - name: http-memberlist - containerPort: 7946 - protocol: TCP - {{- with (concat .Values.global.extraEnv .Values.bloomGateway.extraEnv) | uniq }} - env: - {{- toYaml . | nindent 12 }} - {{- end }} - {{- with (concat .Values.global.extraEnvFrom .Values.bloomGateway.extraEnvFrom) | uniq }} - envFrom: - {{- toYaml . | nindent 12 }} - {{- end }} - securityContext: - {{- toYaml .Values.loki.containerSecurityContext | nindent 12 }} - {{- include "loki.bloomGateway.readinessProbe" . | nindent 10 }} - volumeMounts: - - name: temp - mountPath: /tmp - - name: config - mountPath: /etc/loki/config - - name: runtime-config - mountPath: /etc/loki/runtime-config - - name: data - mountPath: /var/loki - {{- if .Values.enterprise.enabled }} - - name: license - mountPath: /etc/loki/license - {{- end }} - {{- with (concat .Values.global.extraVolumeMounts .Values.bloomGateway.extraVolumeMounts) | uniq }} - {{- toYaml . | nindent 12 }} - {{- end }} - {{- with .Values.bloomGateway.resources }} - resources: - {{- toYaml . | nindent 12 }} - {{- end }} - {{- if .Values.bloomGateway.extraContainers }} - {{- toYaml .Values.bloomGateway.extraContainers | nindent 8}} - {{- end }} - {{- with .Values.bloomGateway.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.bloomGateway.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.bloomGateway.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} - volumes: - - name: temp - emptyDir: {} - - name: config - {{- include "loki.configVolume" . | nindent 10 }} - - name: runtime-config - configMap: - name: {{ template "loki.name" . }}-runtime - {{- if .Values.enterprise.enabled }} - - name: license - secret: - {{- if .Values.enterprise.useExternalLicense }} - secretName: {{ .Values.enterprise.externalLicenseName }} - {{- else }} - secretName: enterprise-logs-license - {{- end }} - {{- end }} - {{- if not .Values.bloomGateway.persistence.enabled }} - - name: data - emptyDir: {} - {{- end }} - {{- with (concat .Values.global.extraVolumes .Values.bloomGateway.extraVolumes) | uniq }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- if .Values.bloomGateway.persistence.enabled }} - volumeClaimTemplates: - {{- range .Values.bloomGateway.persistence.claims }} - - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: {{ .name }} - {{- with .annotations }} - annotations: - {{- . | toYaml | nindent 10 }} - {{- end }} - spec: - accessModes: - - ReadWriteOnce - {{- with .storageClass }} - storageClassName: {{ if (eq "-" .) }}""{{ else }}{{ . }}{{ end }} - {{- end }} - resources: - requests: - storage: {{ .size | quote }} - {{- end }} - {{- end }} -{{- end -}} diff --git a/charts/loki/templates/bloom-planner/_helpers-bloom-planner.tpl b/charts/loki/templates/bloom-planner/_helpers-bloom-planner.tpl deleted file mode 100644 index a4a8c6e..0000000 --- a/charts/loki/templates/bloom-planner/_helpers-bloom-planner.tpl +++ /dev/null @@ -1,58 +0,0 @@ -{{/* -bloom planner fullname -*/}} -{{- define "loki.bloomPlannerFullname" -}} -{{ include "loki.fullname" . }}-bloom-planner -{{- end }} - -{{/* -bloom planner common labels -*/}} -{{- define "loki.bloomPlannerLabels" -}} -{{ include "loki.labels" . }} -app.kubernetes.io/component: bloom-planner -{{- end }} - -{{/* -bloom planner selector labels -*/}} -{{- define "loki.bloomPlannerSelectorLabels" -}} -{{ include "loki.selectorLabels" . }} -app.kubernetes.io/component: bloom-planner -{{- end }} - -{{/* -bloom planner readinessProbe -*/}} -{{- define "loki.bloomPlanner.readinessProbe" -}} -{{- with .Values.bloomPlanner.readinessProbe }} -readinessProbe: - {{- toYaml . | nindent 2 }} -{{- else }} -{{- with .Values.loki.readinessProbe }} -readinessProbe: - {{- toYaml . | nindent 2 }} -{{- end }} -{{- end }} -{{- end -}} - -{{/* -bloom planner priority class name -*/}} -{{- define "loki.bloomPlannerPriorityClassName" }} -{{- $pcn := coalesce .Values.global.priorityClassName .Values.bloomPlanner.priorityClassName -}} -{{- if $pcn }} -priorityClassName: {{ $pcn }} -{{- end }} -{{- end }} - -{{/* -Create the name of the bloom planner service account -*/}} -{{- define "loki.bloomPlannerServiceAccountName" -}} -{{- if .Values.bloomPlanner.serviceAccount.create -}} - {{ default (print (include "loki.serviceAccountName" .) "-bloom-planner") .Values.bloomPlanner.serviceAccount.name }} -{{- else -}} - {{ default (include "loki.serviceAccountName" .) .Values.bloomPlanner.serviceAccount.name }} -{{- end -}} -{{- end -}} diff --git a/charts/loki/templates/bloom-planner/service-bloom-planner-headless.yaml b/charts/loki/templates/bloom-planner/service-bloom-planner-headless.yaml deleted file mode 100644 index 78e2633..0000000 --- a/charts/loki/templates/bloom-planner/service-bloom-planner-headless.yaml +++ /dev/null @@ -1,37 +0,0 @@ -{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} -{{- if (and $isDistributed (gt (int .Values.bloomPlanner.replicas) 0)) -}} -apiVersion: v1 -kind: Service -metadata: - name: {{ include "loki.bloomPlannerFullname" . }}-headless - namespace: {{ .Release.Namespace }} - labels: - {{- include "loki.bloomPlannerSelectorLabels" . | nindent 4 }} - {{- with .Values.bloomPlanner.serviceLabels }} - {{- toYaml . | nindent 4 }} - {{- end }} - annotations: - {{- with .Values.loki.serviceAnnotations }} - {{- toYaml . | nindent 4}} - {{- end }} - {{- with .Values.bloomPlanner.serviceAnnotations }} - {{- toYaml . | nindent 4}} - {{- end }} -spec: - type: ClusterIP - clusterIP: None - ports: - - name: http-metrics - port: 3100 - targetPort: http-metrics - protocol: TCP - - name: grpc - port: 9095 - targetPort: grpc - protocol: TCP - {{- if .Values.bloomPlanner.appProtocol.grpc }} - appProtocol: {{ .Values.bloomPlanner.appProtocol.grpc }} - {{- end }} - selector: - {{- include "loki.bloomPlannerSelectorLabels" . | nindent 4 }} -{{- end -}} diff --git a/charts/loki/templates/bloom-planner/statefulset-bloom-planner.yaml b/charts/loki/templates/bloom-planner/statefulset-bloom-planner.yaml deleted file mode 100644 index 815d68f..0000000 --- a/charts/loki/templates/bloom-planner/statefulset-bloom-planner.yaml +++ /dev/null @@ -1,180 +0,0 @@ -{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} -{{- if (and $isDistributed (gt (int .Values.bloomPlanner.replicas) 0)) -}} -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: {{ include "loki.bloomPlannerFullname" . }} - namespace: {{ .Release.Namespace }} - labels: - {{- include "loki.bloomPlannerLabels" . | nindent 4 }} - {{- with .Values.loki.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - replicas: {{ .Values.bloomPlanner.replicas }} - podManagementPolicy: Parallel - updateStrategy: - rollingUpdate: - partition: 0 - serviceName: {{ include "loki.bloomPlannerFullname" . }}-headless - revisionHistoryLimit: {{ .Values.loki.revisionHistoryLimit }} - {{- if and (semverCompare ">= 1.23-0" (include "loki.kubeVersion" .)) (.Values.bloomPlanner.persistence.enableStatefulSetAutoDeletePVC) }} - persistentVolumeClaimRetentionPolicy: - whenDeleted: {{ .Values.bloomPlanner.persistence.whenDeleted }} - whenScaled: {{ .Values.bloomPlanner.persistence.whenScaled }} - {{- end }} - selector: - matchLabels: - {{- include "loki.bloomPlannerSelectorLabels" . | nindent 6 }} - template: - metadata: - annotations: - {{- include "loki.config.checksum" . | nindent 8 }} - {{- with .Values.loki.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.bloomPlanner.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - {{- include "loki.bloomPlannerLabels" . | nindent 8 }} - app.kubernetes.io/part-of: memberlist - {{- with merge (dict) .Values.loki.podLabels .Values.bloomPlanner.podLabels }} - {{- toYaml . | nindent 8 }} - {{- end }} - spec: - serviceAccountName: {{ include "loki.serviceAccountName" . }} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.bloomPlanner.hostAliases }} - hostAliases: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- include "loki.bloomPlannerPriorityClassName" . | nindent 6 }} - securityContext: - {{- toYaml .Values.loki.podSecurityContext | nindent 8 }} - terminationGracePeriodSeconds: {{ .Values.bloomPlanner.terminationGracePeriodSeconds }} - {{- with .Values.bloomPlanner.initContainers }} - initContainers: - {{- toYaml . | nindent 8 }} - {{- end }} - containers: - - name: bloom-planner - image: {{ include "loki.image" . }} - imagePullPolicy: {{ .Values.loki.image.pullPolicy }} - {{- if or .Values.loki.command .Values.bloomPlanner.command }} - command: - - {{ coalesce .Values.bloomPlanner.command .Values.loki.command | quote }} - {{- end }} - args: - - -config.file=/etc/loki/config/config.yaml - - -target=bloom-planner - {{- with (concat .Values.global.extraArgs .Values.bloomPlanner.extraArgs) | uniq }} - {{- toYaml . | nindent 12 }} - {{- end }} - ports: - - name: http-metrics - containerPort: 3100 - protocol: TCP - - name: grpc - containerPort: 9095 - protocol: TCP - - name: http-memberlist - containerPort: 7946 - protocol: TCP - {{- with (concat .Values.global.extraEnv .Values.bloomPlanner.extraEnv) | uniq }} - env: - {{- toYaml . | nindent 12 }} - {{- end }} - {{- with (concat .Values.global.extraEnvFrom .Values.bloomPlanner.extraEnvFrom) | uniq }} - envFrom: - {{- toYaml . | nindent 12 }} - {{- end }} - securityContext: - {{- toYaml .Values.loki.containerSecurityContext | nindent 12 }} - {{- include "loki.bloomPlanner.readinessProbe" . | nindent 10 }} - volumeMounts: - - name: temp - mountPath: /tmp - - name: config - mountPath: /etc/loki/config - - name: runtime-config - mountPath: /etc/loki/runtime-config - - name: data - mountPath: /var/loki - {{- if .Values.enterprise.enabled }} - - name: license - mountPath: /etc/loki/license - {{- end }} - {{- with (concat .Values.global.extraVolumeMounts .Values.bloomPlanner.extraVolumeMounts) | uniq }} - {{- toYaml . | nindent 12 }} - {{- end }} - {{- with .Values.bloomPlanner.resources }} - resources: - {{- toYaml . | nindent 12 }} - {{- end }} - {{- if .Values.bloomPlanner.extraContainers }} - {{- toYaml .Values.bloomPlanner.extraContainers | nindent 8}} - {{- end }} - {{- with .Values.bloomPlanner.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.bloomPlanner.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.bloomPlanner.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} - volumes: - - name: temp - emptyDir: {} - - name: config - {{- include "loki.configVolume" . | nindent 10 }} - - name: runtime-config - configMap: - name: {{ template "loki.name" . }}-runtime - {{- if .Values.enterprise.enabled }} - - name: license - secret: - {{- if .Values.enterprise.useExternalLicense }} - secretName: {{ .Values.enterprise.externalLicenseName }} - {{- else }} - secretName: enterprise-logs-license - {{- end }} - {{- end }} - {{- if not .Values.bloomPlanner.persistence.enabled }} - - name: data - emptyDir: {} - {{- end }} - {{- with (concat .Values.global.extraVolumes .Values.bloomPlanner.extraVolumes) | uniq }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- if .Values.bloomPlanner.persistence.enabled }} - volumeClaimTemplates: - {{- range .Values.bloomPlanner.persistence.claims }} - - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: {{ .name }} - {{- with .annotations }} - annotations: - {{- . | toYaml | nindent 10 }} - {{- end }} - spec: - accessModes: - - ReadWriteOnce - {{- with .storageClass }} - storageClassName: {{ if (eq "-" .) }}""{{ else }}{{ . }}{{ end }} - {{- end }} - resources: - requests: - storage: {{ .size | quote }} - {{- end }} - {{- end }} -{{- end -}} diff --git a/charts/loki/templates/chunks-cache/poddisruptionbudget-chunks-cache.yaml b/charts/loki/templates/chunks-cache/poddisruptionbudget-chunks-cache.yaml deleted file mode 100644 index da95adf..0000000 --- a/charts/loki/templates/chunks-cache/poddisruptionbudget-chunks-cache.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{- if .Values.chunksCache.enabled }} -apiVersion: {{ include "loki.pdb.apiVersion" . }} -kind: PodDisruptionBudget -metadata: - name: {{ include "loki.fullname" . }}-memcached-chunks-cache - namespace: {{ .Release.Namespace }} - labels: - {{- include "loki.selectorLabels" . | nindent 4 }} - app.kubernetes.io/component: memcached-chunks-cache -spec: - selector: - matchLabels: - {{- include "loki.selectorLabels" . | nindent 6 }} - app.kubernetes.io/component: memcached-chunks-cache - maxUnavailable: 1 -{{- end -}} diff --git a/charts/loki/templates/chunks-cache/service-chunks-cache-headless.yaml b/charts/loki/templates/chunks-cache/service-chunks-cache-headless.yaml deleted file mode 100644 index dc2ccd4..0000000 --- a/charts/loki/templates/chunks-cache/service-chunks-cache-headless.yaml +++ /dev/null @@ -1 +0,0 @@ -{{- include "loki.memcached.service" (dict "ctx" $ "valuesSection" "chunksCache" "component" "chunks-cache" ) }} diff --git a/charts/loki/templates/chunks-cache/statefulset-chunks-cache.yaml b/charts/loki/templates/chunks-cache/statefulset-chunks-cache.yaml deleted file mode 100644 index 6a54c57..0000000 --- a/charts/loki/templates/chunks-cache/statefulset-chunks-cache.yaml +++ /dev/null @@ -1 +0,0 @@ -{{- include "loki.memcached.statefulSet" (dict "ctx" $ "valuesSection" "chunksCache" "component" "chunks-cache" ) }} diff --git a/charts/loki/templates/ciliumnetworkpolicy.yaml b/charts/loki/templates/ciliumnetworkpolicy.yaml deleted file mode 100644 index fbd2619..0000000 --- a/charts/loki/templates/ciliumnetworkpolicy.yaml +++ /dev/null @@ -1,238 +0,0 @@ -{{- if and (.Values.networkPolicy.enabled) (eq .Values.networkPolicy.flavor "cilium") }} ---- -apiVersion: cilium.io/v2 -kind: CiliumNetworkPolicy -metadata: - name: {{ include "loki.name" . }}-namespace-only - namespace: {{ $.Release.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: {{ $.Release.Namespace }} - labels: - {{- include "loki.labels" . | nindent 4 }} -spec: - endpointSelector: - matchLabels: - {{- include "loki.selectorLabels" . | nindent 6 }} - egress: - - toPorts: - - ports: - - port: dns - protocol: UDP - toEndpoints: - - namespaceSelector: {} - ---- -apiVersion: cilium.io/v2 -kind: CiliumNetworkPolicy -metadata: - name: {{ include "loki.name" . }}-ingress - namespace: {{ $.Release.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: {{ $.Release.Namespace }} - labels: - {{- include "loki.labels" . | nindent 4 }} -spec: - endpointSelector: - matchLabels: - {{- include "loki.selectorLabels" . | nindent 6 }} - ingress: - - toPorts: - - ports: - - port: http-metrics - protocol: TCP - {{- if .Values.networkPolicy.metrics.cidrs }} - {{- 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: {{ $.Release.Namespace }} - labels: - {{- include "loki.labels" . | nindent 4 }} -spec: - endpointSelector: - matchLabels: - {{- include "loki.backendSelectorLabels" . | nindent 6 }} - 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: {{ $.Release.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: {{ .Release.Namespace }} -spec: - endpointSelector: - matchLabels: - {{- if eq $component "read" }} - {{- include "loki.readSelectorLabels" . | nindent 6 }} - {{- else if eq $component "write" }} - {{- include "loki.writeSelectorLabels" . | nindent 6 }} - {{- else if eq $component "table-manager" }} - {{- include "loki.tableManagerSelectorLabels" . | nindent 6 }} - {{- else }} - {{- include "loki.backendSelectorLabels" . | nindent 6 }} - {{- 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: {{ .Release.Namespace }} -spec: - endpointSelector: - matchLabels: - {{- include "loki.backendSelectorLabels" . | nindent 6 }} - 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: {{ $.Release.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/charts/loki/templates/compactor/_helpers-compactor.tpl b/charts/loki/templates/compactor/_helpers-compactor.tpl deleted file mode 100644 index 75c21db..0000000 --- a/charts/loki/templates/compactor/_helpers-compactor.tpl +++ /dev/null @@ -1,81 +0,0 @@ -{{/* -compactor fullname -*/}} -{{- define "loki.compactorFullname" -}} -{{ include "loki.fullname" . }}-compactor -{{- end }} - -{{/* -compactor common labels -*/}} -{{- define "loki.compactorLabels" -}} -{{ include "loki.labels" . }} -app.kubernetes.io/component: compactor -{{- end }} - -{{/* -compactor selector labels -*/}} -{{- define "loki.compactorSelectorLabels" -}} -{{ include "loki.selectorLabels" . }} -app.kubernetes.io/component: compactor -{{- end }} - -{{/* -compactor image -*/}} -{{- define "loki.compactorImage" -}} -{{- $dict := dict "loki" .Values.loki.image "service" .Values.compactor.image "global" .Values.global.image "defaultVersion" .Chart.AppVersion -}} -{{- include "loki.lokiImage" $dict -}} -{{- end }} - -{{/* -compactor readinessProbe -*/}} -{{- define "loki.compactor.readinessProbe" -}} -{{- with .Values.compactor.readinessProbe }} -readinessProbe: - {{- toYaml . | nindent 2 }} -{{- else }} -{{- with .Values.loki.readinessProbe }} -readinessProbe: - {{- toYaml . | nindent 2 }} -{{- end }} -{{- end }} -{{- end -}} - -{{/* -compactor livenessProbe -*/}} -{{- define "loki.compactor.livenessProbe" -}} -{{- with .Values.compactor.livenessProbe }} -livenessProbe: - {{- toYaml . | nindent 2 }} -{{- else }} -{{- with .Values.loki.livenessProbe }} -livenessProbe: - {{- toYaml . | nindent 2 }} -{{- end }} -{{- end }} -{{- end -}} - -{{/* -compactor priority class name -*/}} -{{- define "loki.compactorPriorityClassName" }} -{{- $pcn := coalesce .Values.global.priorityClassName .Values.compactor.priorityClassName -}} -{{- if $pcn }} -priorityClassName: {{ $pcn }} -{{- end }} -{{- end }} - -{{/* -Create the name of the compactor service account -*/}} -{{- define "loki.compactorServiceAccountName" -}} -{{- if .Values.compactor.serviceAccount.create -}} - {{ default (print (include "loki.serviceAccountName" .) "-compactor") .Values.compactor.serviceAccount.name }} -{{- else -}} - {{ default (include "loki.serviceAccountName" .) .Values.compactor.serviceAccount.name }} -{{- end -}} -{{- end -}} diff --git a/charts/loki/templates/compactor/service-compactor.yaml b/charts/loki/templates/compactor/service-compactor.yaml deleted file mode 100644 index f118b6c..0000000 --- a/charts/loki/templates/compactor/service-compactor.yaml +++ /dev/null @@ -1,38 +0,0 @@ -{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} -{{- if $isDistributed }} -apiVersion: v1 -kind: Service -metadata: - name: {{ include "loki.compactorFullname" . }} - namespace: {{ .Release.Namespace }} - labels: - {{- include "loki.labels" . | nindent 4 }} - {{- with .Values.compactor.serviceLabels }} - {{- toYaml . | nindent 4 }} - {{- end }} - app.kubernetes.io/component: compactor - annotations: - {{- with .Values.loki.serviceAnnotations }} - {{- toYaml . | nindent 4}} - {{- end }} - {{- with .Values.compactor.serviceAnnotations }} - {{- toYaml . | nindent 4}} - {{- end }} -spec: - type: ClusterIP - ports: - - name: http-metrics - port: 3100 - targetPort: http-metrics - protocol: TCP - - name: grpc - port: 9095 - targetPort: grpc - protocol: TCP - {{- if .Values.compactor.appProtocol.grpc }} - appProtocol: {{ .Values.compactor.appProtocol.grpc }} - {{- end }} - selector: - {{- include "loki.selectorLabels" . | nindent 4 }} - app.kubernetes.io/component: compactor -{{- end }} diff --git a/charts/loki/templates/compactor/statefulset-compactor.yaml b/charts/loki/templates/compactor/statefulset-compactor.yaml deleted file mode 100644 index b0a4969..0000000 --- a/charts/loki/templates/compactor/statefulset-compactor.yaml +++ /dev/null @@ -1,192 +0,0 @@ -{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} -{{- if $isDistributed }} -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: {{ include "loki.compactorFullname" . }} - namespace: {{ .Release.Namespace }} - labels: - {{- include "loki.compactorLabels" . | nindent 4 }} - app.kubernetes.io/part-of: memberlist - {{- with .Values.loki.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - replicas: {{ .Values.compactor.replicas }} - podManagementPolicy: Parallel - updateStrategy: - rollingUpdate: - partition: 0 - serviceName: {{ include "loki.compactorFullname" . }}-headless - revisionHistoryLimit: {{ .Values.loki.revisionHistoryLimit }} - {{- if and (semverCompare ">= 1.23-0" (include "loki.kubeVersion" .)) (.Values.compactor.persistence.enableStatefulSetAutoDeletePVC) }} - persistentVolumeClaimRetentionPolicy: - whenDeleted: {{ .Values.compactor.persistence.whenDeleted }} - whenScaled: {{ .Values.compactor.persistence.whenScaled }} - {{- end }} - selector: - matchLabels: - {{- include "loki.compactorSelectorLabels" . | nindent 6 }} - template: - metadata: - annotations: - {{- include "loki.config.checksum" . | nindent 8 }} - {{- with .Values.loki.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.compactor.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - {{- include "loki.compactorLabels" . | nindent 8 }} - app.kubernetes.io/part-of: memberlist - {{- with merge (dict) .Values.loki.podLabels .Values.compactor.podLabels }} - {{- toYaml . | nindent 8 }} - {{- end }} - spec: - {{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.Version }} - {{- with .Values.compactor.topologySpreadConstraints }} - topologySpreadConstraints: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- end }} - serviceAccountName: {{ include "loki.serviceAccountName" . }} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.compactor.hostAliases }} - hostAliases: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- include "loki.compactorPriorityClassName" . | nindent 6 }} - securityContext: - {{- toYaml .Values.loki.podSecurityContext | nindent 8 }} - terminationGracePeriodSeconds: {{ .Values.compactor.terminationGracePeriodSeconds }} - {{- with .Values.compactor.initContainers }} - initContainers: - {{- toYaml . | nindent 8 }} - {{- end }} - containers: - - name: compactor - image: {{ include "loki.image" . }} - imagePullPolicy: {{ .Values.loki.image.pullPolicy }} - {{- if or .Values.loki.command .Values.compactor.command }} - command: - - {{ coalesce .Values.compactor.command .Values.loki.command | quote }} - {{- end }} - args: - - -config.file=/etc/loki/config/config.yaml - - -target=compactor - {{- with (concat .Values.global.extraArgs .Values.compactor.extraArgs) | uniq }} - {{- toYaml . | nindent 12 }} - {{- end }} - ports: - - name: http-metrics - containerPort: 3100 - protocol: TCP - - name: grpc - containerPort: 9095 - protocol: TCP - - name: http-memberlist - containerPort: 7946 - protocol: TCP - {{- with (concat .Values.global.extraEnv .Values.compactor.extraEnv) | uniq }} - env: - {{- toYaml . | nindent 12 }} - {{- end }} - {{- with (concat .Values.global.extraEnvFrom .Values.compactor.extraEnvFrom) | uniq }} - envFrom: - {{- toYaml . | nindent 12 }} - {{- end }} - securityContext: - {{- toYaml .Values.loki.containerSecurityContext | nindent 12 }} - {{- include "loki.compactor.readinessProbe" . | nindent 10 }} - {{- include "loki.compactor.livenessProbe" . | nindent 10 }} - volumeMounts: - - name: temp - mountPath: /tmp - - name: config - mountPath: /etc/loki/config - - name: runtime-config - mountPath: /etc/loki/runtime-config - - name: data - mountPath: /var/loki - {{- if .Values.enterprise.enabled }} - - name: license - mountPath: /etc/loki/license - {{- end }} - {{- with (concat .Values.global.extraVolumeMounts .Values.compactor.extraVolumeMounts) | uniq }} - {{- toYaml . | nindent 12 }} - {{- end }} - {{- with .Values.compactor.resources }} - resources: - {{- toYaml . | nindent 12 }} - {{- end }} - {{- with .Values.compactor.lifecycle }} - lifecycle: - {{- toYaml . | nindent 12 }} - {{- end }} - {{- if .Values.compactor.extraContainers }} - {{- toYaml .Values.compactor.extraContainers | nindent 8}} - {{- end }} - {{- with .Values.compactor.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.compactor.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.compactor.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} - volumes: - - name: temp - emptyDir: {} - - name: config - {{- include "loki.configVolume" . | nindent 10 }} - - name: runtime-config - configMap: - name: {{ template "loki.name" . }}-runtime - {{- if .Values.enterprise.enabled }} - - name: license - secret: - {{- if .Values.enterprise.useExternalLicense }} - secretName: {{ .Values.enterprise.externalLicenseName }} - {{- else }} - secretName: enterprise-logs-license - {{- end }} - {{- end }} - {{- if not .Values.compactor.persistence.enabled }} - - name: data - emptyDir: {} - {{- end }} - {{- with (concat .Values.global.extraVolumes .Values.compactor.extraVolumes) | uniq }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- if .Values.compactor.persistence.enabled }} - volumeClaimTemplates: - {{- range .Values.compactor.persistence.claims }} - - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: {{ .name }} - {{- with .annotations }} - annotations: - {{- . | toYaml | nindent 10 }} - {{- end }} - spec: - accessModes: - - ReadWriteOnce - {{- with .storageClass }} - storageClassName: {{ if (eq "-" .) }}""{{ else }}{{ . }}{{ end }} - {{- end }} - resources: - requests: - storage: {{ .size | quote }} - {{- end }} - {{- end }} -{{- end }} diff --git a/charts/loki/templates/config.yaml b/charts/loki/templates/config.yaml deleted file mode 100644 index fe47590..0000000 --- a/charts/loki/templates/config.yaml +++ /dev/null @@ -1,21 +0,0 @@ -{{- 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: {{ $.Release.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/charts/loki/templates/distributor/_helpers-distributor.tpl b/charts/loki/templates/distributor/_helpers-distributor.tpl deleted file mode 100644 index c23179e..0000000 --- a/charts/loki/templates/distributor/_helpers-distributor.tpl +++ /dev/null @@ -1,32 +0,0 @@ -{{/* -distributor fullname -*/}} -{{- define "loki.distributorFullname" -}} -{{ include "loki.fullname" . }}-distributor -{{- end }} - -{{/* -distributor common labels -*/}} -{{- define "loki.distributorLabels" -}} -{{ include "loki.labels" . }} -app.kubernetes.io/component: distributor -{{- end }} - -{{/* -distributor selector labels -*/}} -{{- define "loki.distributorSelectorLabels" -}} -{{ include "loki.selectorLabels" . }} -app.kubernetes.io/component: distributor -{{- end }} - -{{/* -distributor priority class name -*/}} -{{- define "loki.distributorPriorityClassName" -}} -{{- $pcn := coalesce .Values.global.priorityClassName .Values.distributor.priorityClassName -}} -{{- if $pcn }} -priorityClassName: {{ $pcn }} -{{- end }} -{{- end }} diff --git a/charts/loki/templates/distributor/deployment-distributor.yaml b/charts/loki/templates/distributor/deployment-distributor.yaml deleted file mode 100644 index 8b6d6c9..0000000 --- a/charts/loki/templates/distributor/deployment-distributor.yaml +++ /dev/null @@ -1,155 +0,0 @@ -{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} -{{- if $isDistributed -}} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "loki.distributorFullname" . }} - namespace: {{ .Release.Namespace }} - labels: - {{- include "loki.distributorLabels" . | nindent 4 }} - app.kubernetes.io/part-of: memberlist - {{- with .Values.loki.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -spec: -{{- if not .Values.distributor.autoscaling.enabled }} - replicas: {{ .Values.distributor.replicas }} -{{- end }} - strategy: - rollingUpdate: - maxSurge: {{ .Values.distributor.maxSurge }} - maxUnavailable: 1 - revisionHistoryLimit: {{ .Values.loki.revisionHistoryLimit }} - selector: - matchLabels: - {{- include "loki.distributorSelectorLabels" . | nindent 6 }} - template: - metadata: - annotations: - {{- include "loki.config.checksum" . | nindent 8 }} - {{- with .Values.loki.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.distributor.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - {{- include "loki.distributorLabels" . | nindent 8 }} - app.kubernetes.io/part-of: memberlist - {{- with merge (dict) .Values.loki.podLabels .Values.distributor.podLabels }} - {{- toYaml . | nindent 8 }} - {{- end }} - spec: - {{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.Version }} - {{- with .Values.distributor.topologySpreadConstraints }} - topologySpreadConstraints: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- end }} - serviceAccountName: {{ include "loki.serviceAccountName" . }} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.distributor.hostAliases }} - hostAliases: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- include "loki.distributorPriorityClassName" . | nindent 6 }} - securityContext: - {{- toYaml .Values.loki.podSecurityContext | nindent 8 }} - terminationGracePeriodSeconds: {{ .Values.distributor.terminationGracePeriodSeconds }} - containers: - - name: distributor - image: {{ include "loki.image" . }} - imagePullPolicy: {{ .Values.loki.image.pullPolicy }} - {{- if or .Values.loki.command .Values.distributor.command }} - command: - - {{ coalesce .Values.distributor.command .Values.loki.command | quote }} - {{- end }} - args: - - -config.file=/etc/loki/config/config.yaml - - -target=distributor - {{- if .Values.ingester.zoneAwareReplication.enabled }} - {{- if and (.Values.ingester.zoneAwareReplication.migration.enabled) (not .Values.ingester.zoneAwareReplication.migration.writePath) }} - - -distributor.zone-awareness-enabled=false - {{- else }} - - -distributor.zone-awareness-enabled=true - {{- end }} - {{- end }} - {{- with (concat .Values.global.extraArgs .Values.distributor.extraArgs) | uniq }} - {{- toYaml . | nindent 12 }} - {{- end }} - ports: - - name: http-metrics - containerPort: 3100 - protocol: TCP - - name: grpc - containerPort: 9095 - protocol: TCP - - name: http-memberlist - containerPort: 7946 - protocol: TCP - {{- with (concat .Values.global.extraEnv .Values.distributor.extraEnv) | uniq }} - env: - {{- toYaml . | nindent 12 }} - {{- end }} - {{- with (concat .Values.global.extraEnvFrom .Values.distributor.extraEnvFrom) | uniq }} - envFrom: - {{- toYaml . | nindent 12 }} - {{- end }} - securityContext: - {{- toYaml .Values.loki.containerSecurityContext | nindent 12 }} - readinessProbe: - {{- toYaml .Values.loki.readinessProbe | nindent 12 }} - livenessProbe: - {{- toYaml .Values.loki.livenessProbe | nindent 12 }} - volumeMounts: - - name: config - mountPath: /etc/loki/config - - name: runtime-config - mountPath: /etc/loki/runtime-config - {{- if .Values.enterprise.enabled }} - - name: license - mountPath: /etc/loki/license - {{- end }} - {{- with (concat .Values.global.extraVolumeMounts .Values.distributor.extraVolumeMounts) | uniq }} - {{- toYaml . | nindent 12 }} - {{- end }} - resources: - {{- toYaml .Values.distributor.resources | nindent 12 }} - {{- if .Values.distributor.extraContainers }} - {{- toYaml .Values.distributor.extraContainers | nindent 8}} - {{- end }} - {{- with .Values.distributor.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.distributor.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.distributor.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} - volumes: - - name: config - {{- include "loki.configVolume" . | nindent 10 }} - - name: runtime-config - configMap: - name: {{ template "loki.name" . }}-runtime - {{- if .Values.enterprise.enabled }} - - name: license - secret: - {{- if .Values.enterprise.useExternalLicense }} - secretName: {{ .Values.enterprise.externalLicenseName }} - {{- else }} - secretName: enterprise-logs-license - {{- end }} - {{- end }} - {{- with (concat .Values.global.extraVolumes .Values.distributor.extraVolumes) | uniq }} - {{- toYaml . | nindent 8 }} - {{- end }} -{{- end -}} diff --git a/charts/loki/templates/distributor/hpa.yaml b/charts/loki/templates/distributor/hpa.yaml deleted file mode 100644 index 838a310..0000000 --- a/charts/loki/templates/distributor/hpa.yaml +++ /dev/null @@ -1,54 +0,0 @@ -{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} -{{- if and $isDistributed .Values.distributor.autoscaling.enabled }} -{{- $apiVersion := include "loki.hpa.apiVersion" . -}} -apiVersion: {{ $apiVersion }} -kind: HorizontalPodAutoscaler -metadata: - name: {{ include "loki.distributorFullname" . }} - labels: - {{- include "loki.distributorLabels" . | nindent 4 }} -spec: - scaleTargetRef: - apiVersion: apps/v1 - kind: Deployment - name: {{ include "loki.distributorFullname" . }} - minReplicas: {{ .Values.distributor.autoscaling.minReplicas }} - maxReplicas: {{ .Values.distributor.autoscaling.maxReplicas }} - metrics: - {{- with .Values.distributor.autoscaling.targetMemoryUtilizationPercentage }} - - type: Resource - resource: - name: memory - {{- if (eq $apiVersion "autoscaling/v2") }} - target: - type: Utilization - averageUtilization: {{ . }} - {{- else }} - targetAverageUtilization: {{ . }} - {{- end }} - {{- end }} - {{- with .Values.distributor.autoscaling.targetCPUUtilizationPercentage }} - - type: Resource - resource: - name: cpu - {{- if (eq $apiVersion "autoscaling/v2") }} - target: - type: Utilization - averageUtilization: {{ . }} - {{- else }} - targetAverageUtilization: {{ . }} - {{- end }} - {{- end }} - {{- with .Values.distributor.autoscaling.customMetrics }} - {{- toYaml . | nindent 4 }} - {{- end }} - {{- if .Values.distributor.autoscaling.behavior.enabled }} - behavior: - {{- with .Values.distributor.autoscaling.behavior.scaleDown }} - scaleDown: {{ toYaml . | nindent 6 }} - {{- end }} - {{- with .Values.distributor.autoscaling.behavior.scaleUp }} - scaleUp: {{ toYaml . | nindent 6 }} - {{- end }} - {{- end }} -{{- end }} diff --git a/charts/loki/templates/distributor/poddisruptionbudget-distributor.yaml b/charts/loki/templates/distributor/poddisruptionbudget-distributor.yaml deleted file mode 100644 index 806a447..0000000 --- a/charts/loki/templates/distributor/poddisruptionbudget-distributor.yaml +++ /dev/null @@ -1,21 +0,0 @@ -{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} -{{- if and $isDistributed (gt (int .Values.distributor.replicas) 1) }} -{{- if kindIs "invalid" .Values.distributor.maxUnavailable }} -{{- fail "`.Values.distributor.maxUnavailable` must be set when `.Values.distributor.replicas` is greater than 1." }} -{{- else }} -apiVersion: {{ include "loki.pdb.apiVersion" . }} -kind: PodDisruptionBudget -metadata: - name: {{ include "loki.distributorFullname" . }} - namespace: {{ .Release.Namespace }} - labels: - {{- include "loki.distributorLabels" . | nindent 4 }} -spec: - selector: - matchLabels: - {{- include "loki.distributorSelectorLabels" . | nindent 6 }} - {{- with .Values.distributor.maxUnavailable }} - maxUnavailable: {{ . }} - {{- end }} -{{- end }} -{{- end }} diff --git a/charts/loki/templates/distributor/service-distributor-headless.yaml b/charts/loki/templates/distributor/service-distributor-headless.yaml deleted file mode 100644 index 650b629..0000000 --- a/charts/loki/templates/distributor/service-distributor-headless.yaml +++ /dev/null @@ -1,39 +0,0 @@ -{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} -{{- if $isDistributed -}} -apiVersion: v1 -kind: Service -metadata: - name: {{ include "loki.distributorFullname" . }}-headless - namespace: {{ .Release.Namespace }} - labels: - {{- include "loki.distributorSelectorLabels" . | nindent 4 }} - {{- with .Values.distributor.serviceLabels }} - {{- toYaml . | nindent 4 }} - {{- end }} - variant: headless - prometheus.io/service-monitor: "false" - annotations: - {{- with .Values.loki.serviceAnnotations }} - {{- toYaml . | nindent 4}} - {{- end }} - {{- with .Values.distributor.serviceAnnotations }} - {{- toYaml . | nindent 4}} - {{- end }} -spec: - type: ClusterIP - clusterIP: None - ports: - - name: http-metrics - port: 3100 - targetPort: http-metrics - protocol: TCP - - name: grpc - port: 9095 - targetPort: grpc - protocol: TCP - {{- if .Values.distributor.appProtocol.grpc }} - appProtocol: {{ .Values.distributor.appProtocol.grpc }} - {{- end }} - selector: - {{- include "loki.distributorSelectorLabels" . | nindent 4 }} -{{- end -}} diff --git a/charts/loki/templates/distributor/service-distributor.yaml b/charts/loki/templates/distributor/service-distributor.yaml deleted file mode 100644 index 6a89956..0000000 --- a/charts/loki/templates/distributor/service-distributor.yaml +++ /dev/null @@ -1,36 +0,0 @@ -{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} -{{- if $isDistributed -}} -apiVersion: v1 -kind: Service -metadata: - name: {{ include "loki.distributorFullname" . }} - namespace: {{ .Release.Namespace }} - labels: - {{- include "loki.distributorLabels" . | nindent 4 }} - {{- with .Values.distributor.serviceLabels }} - {{- toYaml . | nindent 4 }} - {{- end }} - annotations: - {{- with .Values.loki.serviceAnnotations }} - {{- toYaml . | nindent 4}} - {{- end }} - {{- with .Values.distributor.serviceAnnotations }} - {{- toYaml . | nindent 4}} - {{- end }} -spec: - type: ClusterIP - ports: - - name: http-metrics - port: 3100 - targetPort: http-metrics - protocol: TCP - - name: grpc - port: 9095 - targetPort: grpc - protocol: TCP - {{- if .Values.distributor.appProtocol.grpc }} - appProtocol: {{ .Values.distributor.appProtocol.grpc }} - {{- end }} - selector: - {{- include "loki.distributorSelectorLabels" . | nindent 4 }} -{{- end -}} diff --git a/charts/loki/templates/extra-manifests.yaml b/charts/loki/templates/extra-manifests.yaml deleted file mode 100644 index 7b69423..0000000 --- a/charts/loki/templates/extra-manifests.yaml +++ /dev/null @@ -1,8 +0,0 @@ -{{- range .Values.extraObjects }} ---- -{{- if kindIs "map" . }} -{{ tpl (toYaml .) $ }} -{{- else }} -{{ tpl . $ }} -{{- end }} -{{- end }} diff --git a/charts/loki/templates/gateway/_helpers-gateway.tpl b/charts/loki/templates/gateway/_helpers-gateway.tpl deleted file mode 100644 index 39890b1..0000000 --- a/charts/loki/templates/gateway/_helpers-gateway.tpl +++ /dev/null @@ -1,47 +0,0 @@ -{{/* -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 Docker image -*/}} -{{- define "loki.gatewayImage" -}} -{{- $dict := dict "service" .Values.gateway.image "global" .Values.global.image -}} -{{- include "loki.baseImage" $dict -}} -{{- end }} - -{{/* -gateway priority class name -*/}} -{{- define "loki.gatewayPriorityClassName" -}} -{{- $pcn := coalesce .Values.global.priorityClassName .Values.gateway.priorityClassName -}} -{{- if $pcn }} -priorityClassName: {{ $pcn }} -{{- end }} -{{- end }} diff --git a/charts/loki/templates/gateway/configmap-gateway.yaml b/charts/loki/templates/gateway/configmap-gateway.yaml deleted file mode 100644 index 1c981a7..0000000 --- a/charts/loki/templates/gateway/configmap-gateway.yaml +++ /dev/null @@ -1,12 +0,0 @@ -{{- if and .Values.gateway.enabled (not (and .Values.enterprise.enabled .Values.enterprise.gelGateway)) }} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ include "loki.gatewayFullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "loki.gatewayLabels" . | nindent 4 }} -data: - nginx.conf: | - {{- tpl .Values.gateway.nginxConfig.file . | indent 2 }} -{{- end }} diff --git a/charts/loki/templates/gateway/deployment-gateway-enterprise.yaml b/charts/loki/templates/gateway/deployment-gateway-enterprise.yaml deleted file mode 100644 index 6e9bb15..0000000 --- a/charts/loki/templates/gateway/deployment-gateway-enterprise.yaml +++ /dev/null @@ -1,152 +0,0 @@ -{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} -{{- $isSimpleScalable := eq (include "loki.deployment.isScalable" .) "true" -}} -{{- if and .Values.gateway.enabled .Values.enterprise.enabled .Values.enterprise.gelGateway }} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "loki.gatewayFullname" . }} - labels: - {{- include "loki.gatewayLabels" . | nindent 4 }} - {{- with .Values.enterpriseGateway.labels }} - {{- toYaml . | nindent 4 }} - {{- end }} - annotations: - {{- with .Values.enterpriseGateway.annotations }} - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - replicas: {{ .Values.enterpriseGateway.replicas }} - selector: - matchLabels: - {{- include "loki.gatewaySelectorLabels" . | nindent 6 }} - strategy: - {{- toYaml .Values.enterpriseGateway.strategy | nindent 4 }} - template: - metadata: - labels: - {{- include "loki.gatewaySelectorLabels" . | nindent 8 }} - {{- with .Values.enterpriseGateway.labels }} - {{- toYaml . | nindent 8 }} - {{- end }} - annotations: - {{- if .Values.useExternalConfig }} - checksum/config: {{ .Values.externalConfigVersion }} - {{- else }} - checksum/config: {{ include "loki.configMapOrSecretContentHash" (dict "ctx" . "name" "/config.yaml") }} - {{- end}} - {{- with .Values.enterpriseGateway.annotations }} - {{- toYaml . | nindent 8 }} - {{- end }} - spec: - {{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.Version }} - {{- with .Values.enterpriseGateway.topologySpreadConstraints }} - topologySpreadConstraints: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- end }} - serviceAccountName: {{ template "loki.serviceAccountName" . }} - {{- if .Values.enterpriseGateway.priorityClassName }} - priorityClassName: {{ .Values.enterpriseGateway.priorityClassName }} - {{- end }} - securityContext: - {{- toYaml .Values.enterpriseGateway.podSecurityContext | nindent 8 }} - initContainers: - {{- toYaml .Values.enterpriseGateway.initContainers | nindent 8 }} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.enterpriseGateway.hostAliases }} - hostAliases: - {{- toYaml . | nindent 8 }} - {{- end }} - containers: - - name: gateway - image: "{{ template "loki.image" . }}" - imagePullPolicy: {{ .Values.enterprise.image.pullPolicy }} - args: - - -target=gateway - - -config.file=/etc/loki/config/config.yaml - {{- if .Values.minio.enabled }} - - -admin.client.backend-type=s3 - - -admin.client.s3.endpoint={{ template "loki.minio" . }} - - -admin.client.s3.bucket-name={{ .Values.loki.storage.bucketNames.admin }} - - -admin.client.s3.access-key-id={{ (index .Values.minio.users 0).accessKey }} - - -admin.client.s3.secret-access-key={{ (index .Values.minio.users 0).secretKey }} - - -admin.client.s3.insecure={{ .Values.loki.storage.s3.insecure }} - {{- end }} - {{- if and $isDistributed .Values.enterpriseGateway.useDefaultProxyURLs }} - - -gateway.proxy.default.url=http://{{ template "loki.fullname" . }}-admin-api.{{ .Release.Namespace }}.svc:3100 - - -gateway.proxy.admin-api.url=http://{{ template "loki.fullname" . }}-admin-api.{{ .Release.Namespace }}.svc:3100 - - -gateway.proxy.distributor.url=dns:///{{ template "loki.fullname" . }}-distributor-headless.{{ .Release.Namespace }}.svc:9095 - - -gateway.proxy.ingester.url=http://{{ template "loki.fullname" . }}-ingester.{{ .Release.Namespace }}.svc:3100 - - -gateway.proxy.query-frontend.url=http://{{ template "loki.fullname" . }}-query-frontend.{{ .Release.Namespace }}.svc:3100 - - -gateway.proxy.ruler.url=http://{{ template "loki.fullname" . }}-ruler.{{ .Release.Namespace }}.svc:3100 - {{- end }} - {{- if and $isSimpleScalable .Values.enterpriseGateway.useDefaultProxyURLs }} - - -gateway.proxy.default.url=http://{{ template "enterprise-logs.adminApiFullname" . }}.{{ .Release.Namespace }}.svc:3100 - - -gateway.proxy.admin-api.url=http://{{ template "enterprise-logs.adminApiFullname" . }}.{{ .Release.Namespace }}.svc:3100 - - -gateway.proxy.compactor.url=http://{{ template "loki.backendFullname" . }}-headless.{{ .Release.Namespace }}.svc:3100 - - -gateway.proxy.distributor.url=dns:///{{ template "loki.writeFullname" . }}-headless.{{ .Release.Namespace }}.svc:9095 - - -gateway.proxy.ingester.url=http://{{ template "loki.writeFullname" . }}.{{ .Release.Namespace }}.svc:3100 - - -gateway.proxy.query-frontend.url=http://{{ template "loki.readFullname" . }}.{{ .Release.Namespace }}.svc:3100 - - -gateway.proxy.ruler.url=http://{{ template "loki.backendFullname" . }}-headless.{{ .Release.Namespace }}.svc:3100 - - -gateway.proxy.query-scheduler.url=http://{{ template "loki.backendFullname" . }}-headless.{{ .Release.Namespace }}.svc:3100 - {{- end }} - {{- range $key, $value := .Values.enterpriseGateway.extraArgs }} - - "-{{ $key }}={{ $value }}" - {{- end }} - volumeMounts: - - name: config - mountPath: /etc/loki/config - - name: license - mountPath: /etc/loki/license - - name: storage - mountPath: /data - {{- if .Values.enterpriseGateway.extraVolumeMounts }} - {{ toYaml .Values.enterpriseGateway.extraVolumeMounts | nindent 12 }} - {{- end }} - ports: - - name: http-metrics - containerPort: 3100 - protocol: TCP - readinessProbe: - {{- toYaml .Values.enterpriseGateway.readinessProbe | nindent 12 }} - resources: - {{- toYaml .Values.enterpriseGateway.resources | nindent 12 }} - securityContext: - {{- toYaml .Values.enterpriseGateway.containerSecurityContext | nindent 12 }} - env: - {{- if .Values.enterpriseGateway.env }} - {{ toYaml .Values.enterpriseGateway.env | nindent 12 }} - {{- end }} - {{- with .Values.enterpriseGateway.extraEnvFrom }} - envFrom: - {{- toYaml . | nindent 12 }} - {{- end }} - {{- with .Values.enterpriseGateway.extraContainers }} - {{ toYaml . | nindent 8 }} - {{- end }} - nodeSelector: - {{- toYaml .Values.enterpriseGateway.nodeSelector | nindent 8 }} - affinity: - {{- toYaml .Values.enterpriseGateway.affinity | nindent 8 }} - tolerations: - {{- toYaml .Values.enterpriseGateway.tolerations | nindent 8 }} - terminationGracePeriodSeconds: {{ .Values.enterpriseGateway.terminationGracePeriodSeconds }} - volumes: - - name: config - {{- include "loki.configVolume" . | nindent 10 }} - - name: license - secret: - {{- if .Values.enterprise.useExternalLicense }} - secretName: {{ .Values.enterprise.externalLicenseName }} - {{- else }} - secretName: enterprise-logs-license - {{- end }} - - name: storage - emptyDir: {} - {{- if .Values.enterpriseGateway.extraVolumes }} - {{ toYaml .Values.enterpriseGateway.extraVolumes | nindent 8 }} - {{- end }} -{{- end }} diff --git a/charts/loki/templates/gateway/deployment-gateway-nginx.yaml b/charts/loki/templates/gateway/deployment-gateway-nginx.yaml deleted file mode 100644 index 405bd42..0000000 --- a/charts/loki/templates/gateway/deployment-gateway-nginx.yaml +++ /dev/null @@ -1,135 +0,0 @@ -{{- if and .Values.gateway.enabled (not (and .Values.enterprise.enabled .Values.enterprise.gelGateway)) }} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "loki.gatewayFullname" . }} - namespace: {{ $.Release.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 not .Values.gateway.autoscaling.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-gateway.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" . }} - {{ include "loki.enableServiceLinks" . }} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end -}} - {{- include "loki.gatewayPriorityClassName" . | nindent 6 }} - securityContext: - {{- toYaml .Values.gateway.podSecurityContext | nindent 8 }} - terminationGracePeriodSeconds: {{ .Values.gateway.terminationGracePeriodSeconds }} - containers: - - name: nginx - image: {{ include "loki.gatewayImage" . }} - imagePullPolicy: {{ .Values.gateway.image.pullPolicy }} - ports: - - name: http-metrics - containerPort: {{ .Values.gateway.containerPort }} - protocol: TCP - {{- with .Values.gateway.extraEnv }} - env: - {{- toYaml . | nindent 12 }} - {{- end }} - {{- with .Values.gateway.extraEnvFrom }} - envFrom: - {{- toYaml . | nindent 12 }} - {{- end }} - readinessProbe: - {{- toYaml .Values.gateway.readinessProbe | nindent 12 }} - 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 }} - resources: - {{- toYaml .Values.gateway.resources | nindent 12 }} - {{- if .Values.gateway.extraContainers }} - {{- toYaml .Values.gateway.extraContainers | nindent 8}} - {{- end }} - {{- with .Values.gateway.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.gateway.dnsConfig }} - dnsConfig: - {{- tpl . $ | nindent 8 }} - {{- end }} - {{- with .Values.gateway.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.gateway.topologySpreadConstraints }} - topologySpreadConstraints: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.gateway.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/charts/loki/templates/gateway/hpa.yaml b/charts/loki/templates/gateway/hpa.yaml deleted file mode 100644 index 3541ec6..0000000 --- a/charts/loki/templates/gateway/hpa.yaml +++ /dev/null @@ -1,50 +0,0 @@ -{{- $autoscalingv2 := .Capabilities.APIVersions.Has "autoscaling/v2" -}} -{{- if .Values.gateway.autoscaling.enabled }} -{{- if $autoscalingv2 }} -apiVersion: autoscaling/v2 -{{- else }} -apiVersion: autoscaling/v2beta1 -{{- end }} -kind: HorizontalPodAutoscaler -metadata: - name: {{ include "loki.gatewayFullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "loki.gatewayLabels" . | nindent 4 }} -spec: - scaleTargetRef: - apiVersion: apps/v1 - kind: Deployment - name: {{ include "loki.gatewayFullname" . }} - minReplicas: {{ .Values.gateway.autoscaling.minReplicas }} - maxReplicas: {{ .Values.gateway.autoscaling.maxReplicas }} - {{- with .Values.gateway.autoscaling.behavior }} - behavior: - {{- toYaml . | nindent 4 }} - {{- end }} - metrics: - {{- with .Values.gateway.autoscaling.targetMemoryUtilizationPercentage }} - - type: Resource - resource: - name: memory - {{- if $autoscalingv2 }} - target: - type: Utilization - averageUtilization: {{ . }} - {{- else }} - targetAverageUtilization: {{ . }} - {{- end }} - {{- end }} - {{- with .Values.gateway.autoscaling.targetCPUUtilizationPercentage }} - - type: Resource - resource: - name: cpu - {{- if $autoscalingv2 }} - target: - type: Utilization - averageUtilization: {{ . }} - {{- else }} - targetAverageUtilization: {{ . }} - {{- end }} - {{- end }} -{{- end }} diff --git a/charts/loki/templates/gateway/ingress-gateway.yaml b/charts/loki/templates/gateway/ingress-gateway.yaml deleted file mode 100644 index 6f18e33..0000000 --- a/charts/loki/templates/gateway/ingress-gateway.yaml +++ /dev/null @@ -1,59 +0,0 @@ -{{- if and .Values.gateway.enabled -}} -{{- if .Values.gateway.ingress.enabled -}} -{{- $ingressApiIsStable := eq (include "loki.ingress.isStable" .) "true" -}} -{{- $ingressSupportsIngressClassName := eq (include "loki.ingress.supportsIngressClassName" .) "true" -}} -{{- $ingressSupportsPathType := eq (include "loki.ingress.supportsPathType" .) "true" -}} -apiVersion: {{ include "loki.ingress.apiVersion" . }} -kind: Ingress -metadata: - name: {{ include "loki.gatewayFullname" . }} - namespace: {{ $.Release.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: - {{- if and $ingressSupportsIngressClassName .Values.gateway.ingress.ingressClassName }} - ingressClassName: {{ .Values.gateway.ingress.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 }} - {{- if $ingressSupportsPathType }} - pathType: {{ .pathType }} - {{- end }} - backend: - {{- if $ingressApiIsStable }} - service: - name: {{ include "loki.gatewayFullname" $ }} - port: - number: {{ $.Values.gateway.service.port }} - {{- else }} - serviceName: {{ include "loki.gatewayFullname" $ }} - servicePort: {{ $.Values.gateway.service.port }} - {{- end }} - {{- end }} - {{- end }} -{{- end }} -{{- end }} diff --git a/charts/loki/templates/gateway/poddisruptionbudget-gateway.yaml b/charts/loki/templates/gateway/poddisruptionbudget-gateway.yaml deleted file mode 100644 index 0057c56..0000000 --- a/charts/loki/templates/gateway/poddisruptionbudget-gateway.yaml +++ /dev/null @@ -1,19 +0,0 @@ -{{- if and .Values.gateway.enabled }} -{{- if or - (and (not .Values.gateway.autoscaling.enabled) (gt (int .Values.gateway.replicas) 1)) - (and .Values.gateway.autoscaling.enabled (gt (int .Values.gateway.autoscaling.minReplicas) 1)) -}} -apiVersion: policy/v1 -kind: PodDisruptionBudget -metadata: - name: {{ include "loki.gatewayFullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "loki.gatewayLabels" . | nindent 4 }} -spec: - selector: - matchLabels: - {{- include "loki.gatewaySelectorLabels" . | nindent 6 }} - maxUnavailable: 1 -{{- end }} -{{- end }} diff --git a/charts/loki/templates/gateway/secret-gateway.yaml b/charts/loki/templates/gateway/secret-gateway.yaml deleted file mode 100644 index c3c5e9a..0000000 --- a/charts/loki/templates/gateway/secret-gateway.yaml +++ /dev/null @@ -1,14 +0,0 @@ -{{- with .Values.gateway }} -{{- if and .enabled .basicAuth.enabled (not .basicAuth.existingSecret) }} -apiVersion: v1 -kind: Secret -metadata: - name: {{ include "loki.gatewayFullname" $ }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "loki.gatewayLabels" $ | nindent 4 }} -stringData: - .htpasswd: | - {{- tpl .basicAuth.htpasswd $ | nindent 4 }} -{{- end }} -{{- end }} diff --git a/charts/loki/templates/gateway/service-gateway.yaml b/charts/loki/templates/gateway/service-gateway.yaml deleted file mode 100644 index af44d0e..0000000 --- a/charts/loki/templates/gateway/service-gateway.yaml +++ /dev/null @@ -1,43 +0,0 @@ -{{- if .Values.gateway.enabled }} -apiVersion: v1 -kind: Service -metadata: - name: {{ include "loki.gatewayFullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "loki.gatewayLabels" . | nindent 4 }} - {{- with .Values.loki.serviceLabels }} - {{- toYaml . | nindent 4}} - {{- end }} - {{- with .Values.gateway.service.labels }} - {{- toYaml . | nindent 4}} - {{- end }} - {{- if not (and .Values.enterprise.enabled .Values.enterprise.gelGateway) }} - prometheus.io/service-monitor: "false" - {{- end }} - 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-metrics - port: {{ .Values.gateway.service.port }} - targetPort: http-metrics - {{- 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 }} -{{- end }} diff --git a/charts/loki/templates/index-gateway/_helpers-index-gateway.tpl b/charts/loki/templates/index-gateway/_helpers-index-gateway.tpl deleted file mode 100644 index f42dff3..0000000 --- a/charts/loki/templates/index-gateway/_helpers-index-gateway.tpl +++ /dev/null @@ -1,40 +0,0 @@ -{{/* -index-gateway fullname -*/}} -{{- define "loki.indexGatewayFullname" -}} -{{ include "loki.fullname" . }}-index-gateway -{{- end }} - -{{/* -index-gateway common labels -*/}} -{{- define "loki.indexGatewayLabels" -}} -{{ include "loki.labels" . }} -app.kubernetes.io/component: index-gateway -{{- end }} - -{{/* -index-gateway selector labels -*/}} -{{- define "loki.indexGatewaySelectorLabels" -}} -{{ include "loki.selectorLabels" . }} -app.kubernetes.io/component: index-gateway -{{- end }} - -{{/* -index-gateway image -*/}} -{{- define "loki.indexGatewayImage" -}} -{{- $dict := dict "loki" .Values.loki.image "service" .Values.indexGateway.image "global" .Values.global.image "defaultVersion" .Chart.AppVersion -}} -{{- include "loki.lokiImage" $dict -}} -{{- end }} - -{{/* -index-gateway priority class name -*/}} -{{- define "loki.indexGatewayPriorityClassName" -}} -{{- $pcn := coalesce .Values.global.priorityClassName .Values.indexGateway.priorityClassName -}} -{{- if $pcn }} -priorityClassName: {{ $pcn }} -{{- end }} -{{- end }} diff --git a/charts/loki/templates/index-gateway/poddisruptionbudget-index-gateway.yaml b/charts/loki/templates/index-gateway/poddisruptionbudget-index-gateway.yaml deleted file mode 100644 index cc230c2..0000000 --- a/charts/loki/templates/index-gateway/poddisruptionbudget-index-gateway.yaml +++ /dev/null @@ -1,21 +0,0 @@ -{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} -{{- if and $isDistributed (gt (int .Values.indexGateway.replicas) 1) }} -{{- if kindIs "invalid" .Values.indexGateway.maxUnavailable }} -{{- fail "`.Values.indexGateway.maxUnavailable` must be set when `.Values.indexGateway.replicas` is greater than 1." }} -{{- else }} -apiVersion: {{ include "loki.pdb.apiVersion" . }} -kind: PodDisruptionBudget -metadata: - name: {{ include "loki.indexGatewayFullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "loki.indexGatewayLabels" . | nindent 4 }} -spec: - selector: - matchLabels: - {{- include "loki.indexGatewaySelectorLabels" . | nindent 6 }} - {{- with .Values.indexGateway.maxUnavailable }} - maxUnavailable: {{ . }} - {{- end }} -{{- end }} -{{- end }} diff --git a/charts/loki/templates/index-gateway/service-index-gateway-headless.yaml b/charts/loki/templates/index-gateway/service-index-gateway-headless.yaml deleted file mode 100644 index 731a984..0000000 --- a/charts/loki/templates/index-gateway/service-index-gateway-headless.yaml +++ /dev/null @@ -1,35 +0,0 @@ -{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} -{{- if $isDistributed }} -apiVersion: v1 -kind: Service -metadata: - name: {{ include "loki.indexGatewayFullname" . }}-headless - namespace: {{ $.Release.Namespace }} - labels: - {{- include "loki.indexGatewaySelectorLabels" . | nindent 4 }} - prometheus.io/service-monitor: "false" - annotations: - {{- with .Values.loki.serviceAnnotations }} - {{- toYaml . | nindent 4}} - {{- end }} - {{- with .Values.indexGateway.serviceAnnotations }} - {{- toYaml . | nindent 4}} - {{- end }} -spec: - type: ClusterIP - clusterIP: None - ports: - - name: http-metrics - port: 3100 - targetPort: http-metrics - protocol: TCP - - name: grpc - port: 9095 - targetPort: grpc - protocol: TCP - {{- with .Values.indexGateway.appProtocol.grpc }} - appProtocol: {{ . }} - {{- end }} - selector: - {{- include "loki.indexGatewaySelectorLabels" . | nindent 4 }} -{{- end }} diff --git a/charts/loki/templates/index-gateway/service-index-gateway.yaml b/charts/loki/templates/index-gateway/service-index-gateway.yaml deleted file mode 100644 index b1a3523..0000000 --- a/charts/loki/templates/index-gateway/service-index-gateway.yaml +++ /dev/null @@ -1,36 +0,0 @@ -{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} -{{- if $isDistributed }} -apiVersion: v1 -kind: Service -metadata: - name: {{ include "loki.indexGatewayFullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "loki.indexGatewayLabels" . | nindent 4 }} - {{- with .Values.indexGateway.serviceLabels }} - {{- toYaml . | nindent 4 }} - {{- end }} - annotations: - {{- with .Values.loki.serviceAnnotations }} - {{- toYaml . | nindent 4}} - {{- end }} - {{- with .Values.indexGateway.serviceAnnotations }} - {{- toYaml . | nindent 4}} - {{- end }} -spec: - type: ClusterIP - ports: - - name: http-metrics - port: 3100 - targetPort: http-metrics - protocol: TCP - - name: grpc - port: 9095 - targetPort: grpc - protocol: TCP - {{- with .Values.indexGateway.appProtocol.grpc }} - appProtocol: {{ . }} - {{- end }} - selector: - {{- include "loki.indexGatewaySelectorLabels" . | nindent 4 }} -{{- end }} diff --git a/charts/loki/templates/index-gateway/statefulset-index-gateway.yaml b/charts/loki/templates/index-gateway/statefulset-index-gateway.yaml deleted file mode 100644 index 0a725e9..0000000 --- a/charts/loki/templates/index-gateway/statefulset-index-gateway.yaml +++ /dev/null @@ -1,191 +0,0 @@ -{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} -{{- if $isDistributed }} -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: {{ include "loki.indexGatewayFullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "loki.indexGatewayLabels" . | nindent 4 }} - {{- with .Values.loki.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - replicas: {{ .Values.indexGateway.replicas }} -{{- with .Values.indexGateway.updateStrategy }} - updateStrategy: - {{- tpl (. | toYaml) $ | nindent 4 }} -{{- end }} - serviceName: {{ include "loki.indexGatewayFullname" . }}-headless - revisionHistoryLimit: {{ .Values.loki.revisionHistoryLimit }} - {{- if and (semverCompare ">= 1.23-0" (include "loki.kubeVersion" .)) (.Values.indexGateway.persistence.enableStatefulSetAutoDeletePVC) }} - {{/* - Data on the read nodes is easy to replace, so we want to always delete PVCs to make - operation easier, and will rely on re-fetching data when needed. - */}} - persistentVolumeClaimRetentionPolicy: - whenDeleted: {{ .Values.indexGateway.persistence.whenDeleted }} - whenScaled: {{ .Values.indexGateway.persistence.whenScaled }} - {{- end }} - selector: - matchLabels: - {{- include "loki.indexGatewaySelectorLabels" . | nindent 6 }} - template: - metadata: - annotations: - {{- include "loki.config.checksum" . | nindent 8 }} - {{- with .Values.loki.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.indexGateway.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - {{- include "loki.indexGatewayLabels" . | nindent 8 }} - {{- with merge (dict) .Values.loki.podLabels .Values.indexGateway.podLabels }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- if .Values.indexGateway.joinMemberlist }} - app.kubernetes.io/part-of: memberlist - {{- end }} - spec: - serviceAccountName: {{ include "loki.serviceAccountName" . }} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.indexGateway.hostAliases }} - hostAliases: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- include "loki.indexGatewayPriorityClassName" . | nindent 6 }} - securityContext: - {{- toYaml .Values.loki.podSecurityContext | nindent 8 }} - terminationGracePeriodSeconds: {{ .Values.indexGateway.terminationGracePeriodSeconds }} - {{- with .Values.indexGateway.initContainers }} - initContainers: - {{- toYaml . | nindent 8 }} - {{- end }} - containers: - - name: index-gateway - image: {{ include "loki.image" . }} - imagePullPolicy: {{ .Values.loki.image.pullPolicy }} - args: - - -config.file=/etc/loki/config/config.yaml - - -target=index-gateway - {{- with (concat .Values.global.extraArgs .Values.indexGateway.extraArgs) | uniq }} - {{- toYaml . | nindent 12 }} - {{- end }} - ports: - - name: http-metrics - containerPort: 3100 - protocol: TCP - - name: grpc - containerPort: 9095 - protocol: TCP - {{- if .Values.indexGateway.joinMemberlist }} - - name: http-memberlist - containerPort: 7946 - protocol: TCP - {{- end }} - {{- with (concat .Values.global.extraEnv .Values.indexGateway.extraEnv) | uniq }} - env: - {{- toYaml . | nindent 12 }} - {{- end }} - {{- with (concat .Values.global.extraEnvFrom .Values.indexGateway.extraEnvFrom) | uniq }} - envFrom: - {{- toYaml . | nindent 12 }} - {{- end }} - securityContext: - {{- toYaml .Values.loki.containerSecurityContext | nindent 12 }} - readinessProbe: - {{- toYaml .Values.loki.readinessProbe | nindent 12 }} - livenessProbe: - {{- toYaml .Values.loki.livenessProbe | nindent 12 }} - volumeMounts: - - name: config - mountPath: /etc/loki/config - - name: runtime-config - mountPath: /etc/loki/runtime-config - - name: data - mountPath: /var/loki - {{- if .Values.enterprise.enabled }} - - name: license - mountPath: /etc/loki/license - {{- end }} - {{- with (concat .Values.global.extraVolumeMounts .Values.indexGateway.extraVolumeMounts) | uniq }} - {{- toYaml . | nindent 12 }} - {{- end }} - resources: - {{- toYaml .Values.indexGateway.resources | nindent 12 }} - {{- if .Values.indexGateway.extraContainers }} - {{- toYaml .Values.indexGateway.extraContainers | nindent 8}} - {{- end }} - {{- with .Values.indexGateway.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.indexGateway.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.indexGateway.topologySpreadConstraints }} - topologySpreadConstraints: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.indexGateway.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} - volumes: - - name: config - {{- include "loki.configVolume" . | nindent 10 }} - - name: runtime-config - configMap: - name: {{ template "loki.name" . }}-runtime - {{- if .Values.enterprise.enabled }} - - name: license - secret: - {{- if .Values.enterprise.useExternalLicense }} - secretName: {{ .Values.enterprise.externalLicenseName }} - {{- else }} - secretName: enterprise-logs-license - {{- end }} - {{- end }} - {{- with (concat .Values.global.extraVolumes .Values.indexGateway.extraVolumes) | uniq }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- if not .Values.indexGateway.persistence.enabled }} - - name: data - emptyDir: {} - {{- else if .Values.indexGateway.persistence.inMemory }} - - name: data - {{- if .Values.indexGateway.persistence.inMemory }} - emptyDir: - medium: Memory - {{- end }} - {{- if .Values.indexGateway.persistence.size }} - sizeLimit: {{ .Values.indexGateway.persistence.size }} - {{- end }} - {{- else }} - volumeClaimTemplates: - - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: data - {{- with .Values.indexGateway.persistence.annotations }} - annotations: - {{- . | toYaml | nindent 10 }} - {{- end }} - spec: - accessModes: - - ReadWriteOnce - {{- with .Values.indexGateway.persistence.storageClass }} - storageClassName: {{ if (eq "-" .) }}""{{ else }}{{ . }}{{ end }} - {{- end }} - resources: - requests: - storage: {{ .Values.indexGateway.persistence.size | quote }} - {{- end }} -{{- end }} diff --git a/charts/loki/templates/ingester/_helpers-ingester.tpl b/charts/loki/templates/ingester/_helpers-ingester.tpl deleted file mode 100644 index 70728a0..0000000 --- a/charts/loki/templates/ingester/_helpers-ingester.tpl +++ /dev/null @@ -1,92 +0,0 @@ -{{/* -ingester fullname -*/}} -{{- define "loki.ingesterFullname" -}} -{{ include "loki.fullname" . }}-ingester -{{- end }} - -{{/* -ingester common labels -*/}} -{{- define "loki.ingesterLabels" -}} -{{ include "loki.labels" . }} -app.kubernetes.io/component: ingester -{{- end }} - -{{/* -ingester selector labels -*/}} -{{- define "loki.ingesterSelectorLabels" -}} -{{ include "loki.selectorLabels" . }} -app.kubernetes.io/component: ingester -{{- end }} - -{{/* -ingester priority class name -*/}} -{{- define "loki.ingesterPriorityClassName" -}} -{{- $pcn := coalesce .Values.global.priorityClassName .Values.ingester.priorityClassName -}} -{{- if $pcn }} -priorityClassName: {{ $pcn }} -{{- end }} -{{- end }} - -{{- define "loki.ingester.readinessProbe" -}} -{{- with .Values.ingester.readinessProbe }} -readinessProbe: - {{- toYaml . | nindent 2 }} -{{- else }} -{{- with .Values.loki.readinessProbe }} -readinessProbe: - {{- toYaml . | nindent 2 }} -{{- end }} -{{- end }} -{{- end -}} - -{{- define "loki.ingester.livenessProbe" -}} -{{- with .Values.ingester.livenessProbe }} -livenessProbe: - {{- toYaml . | nindent 2 }} -{{- else }} -{{- with .Values.loki.livenessProbe }} -livenessProbe: - {{- toYaml . | nindent 2 }} -{{- end }} -{{- end }} -{{- end -}} - -{{/* -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" -}} -{{- 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/charts/loki/templates/ingester/hpa-zone-a.yaml b/charts/loki/templates/ingester/hpa-zone-a.yaml deleted file mode 100644 index 5ede187..0000000 --- a/charts/loki/templates/ingester/hpa-zone-a.yaml +++ /dev/null @@ -1,55 +0,0 @@ -{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} -{{- if and $isDistributed .Values.ingester.autoscaling.enabled .Values.ingester.zoneAwareReplication.enabled }} -{{- $apiVersion := include "loki.hpa.apiVersion" . -}} -apiVersion: {{ $apiVersion }} -kind: HorizontalPodAutoscaler -metadata: - name: {{ include "loki.ingesterFullname" . }}-zone-a - namespace: {{ .Release.Namespace }} - labels: - {{- include "loki.ingesterLabels" . | nindent 4 }} -spec: - scaleTargetRef: - apiVersion: apps/v1 - kind: StatefulSet - name: {{ include "loki.ingesterFullname" . }}-zone-a - minReplicas: {{ .Values.ingester.autoscaling.minReplicas }} - maxReplicas: {{ .Values.ingester.autoscaling.maxReplicas }} - metrics: - {{- with .Values.ingester.autoscaling.targetMemoryUtilizationPercentage }} - - type: Resource - resource: - name: memory - {{- if (eq $apiVersion "autoscaling/v2") }} - target: - type: Utilization - averageUtilization: {{ . }} - {{- else }} - targetAverageUtilization: {{ . }} - {{- end }} - {{- end }} - {{- with .Values.ingester.autoscaling.targetCPUUtilizationPercentage }} - - type: Resource - resource: - name: cpu - {{- if (eq $apiVersion "autoscaling/v2") }} - target: - type: Utilization - averageUtilization: {{ . }} - {{- else }} - targetAverageUtilization: {{ . }} - {{- end }} - {{- end }} - {{- with .Values.ingester.autoscaling.customMetrics }} - {{- toYaml . | nindent 4 }} - {{- end }} - {{- if .Values.ingester.autoscaling.behavior.enabled }} - behavior: - {{- with .Values.ingester.autoscaling.behavior.scaleDown }} - scaleDown: {{ toYaml . | nindent 6 }} - {{- end }} - {{- with .Values.ingester.autoscaling.behavior.scaleUp }} - scaleUp: {{ toYaml . | nindent 6 }} - {{- end }} - {{- end }} -{{- end }} diff --git a/charts/loki/templates/ingester/hpa-zone-b.yaml b/charts/loki/templates/ingester/hpa-zone-b.yaml deleted file mode 100644 index b001a6a..0000000 --- a/charts/loki/templates/ingester/hpa-zone-b.yaml +++ /dev/null @@ -1,55 +0,0 @@ -{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} -{{- if and $isDistributed .Values.ingester.autoscaling.enabled .Values.ingester.zoneAwareReplication.enabled }} -{{- $apiVersion := include "loki.hpa.apiVersion" . -}} -apiVersion: {{ $apiVersion }} -kind: HorizontalPodAutoscaler -metadata: - name: {{ include "loki.ingesterFullname" . }}-zone-b - namespace: {{ .Release.Namespace }} - labels: - {{- include "loki.ingesterLabels" . | nindent 4 }} -spec: - scaleTargetRef: - apiVersion: apps/v1 - kind: StatefulSet - name: {{ include "loki.ingesterFullname" . }}-zone-b - minReplicas: {{ .Values.ingester.autoscaling.minReplicas }} - maxReplicas: {{ .Values.ingester.autoscaling.maxReplicas }} - metrics: - {{- with .Values.ingester.autoscaling.targetMemoryUtilizationPercentage }} - - type: Resource - resource: - name: memory - {{- if (eq $apiVersion "autoscaling/v2") }} - target: - type: Utilization - averageUtilization: {{ . }} - {{- else }} - targetAverageUtilization: {{ . }} - {{- end }} - {{- end }} - {{- with .Values.ingester.autoscaling.targetCPUUtilizationPercentage }} - - type: Resource - resource: - name: cpu - {{- if (eq $apiVersion "autoscaling/v2") }} - target: - type: Utilization - averageUtilization: {{ . }} - {{- else }} - targetAverageUtilization: {{ . }} - {{- end }} - {{- end }} - {{- with .Values.ingester.autoscaling.customMetrics }} - {{- toYaml . | nindent 4 }} - {{- end }} - {{- if .Values.ingester.autoscaling.behavior.enabled }} - behavior: - {{- with .Values.ingester.autoscaling.behavior.scaleDown }} - scaleDown: {{ toYaml . | nindent 6 }} - {{- end }} - {{- with .Values.ingester.autoscaling.behavior.scaleUp }} - scaleUp: {{ toYaml . | nindent 6 }} - {{- end }} - {{- end }} -{{- end }} diff --git a/charts/loki/templates/ingester/hpa-zone-c.yaml b/charts/loki/templates/ingester/hpa-zone-c.yaml deleted file mode 100644 index 82f229c..0000000 --- a/charts/loki/templates/ingester/hpa-zone-c.yaml +++ /dev/null @@ -1,55 +0,0 @@ -{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} -{{- if and $isDistributed .Values.ingester.autoscaling.enabled .Values.ingester.zoneAwareReplication.enabled }} -{{- $apiVersion := include "loki.hpa.apiVersion" . -}} -apiVersion: {{ $apiVersion }} -kind: HorizontalPodAutoscaler -metadata: - name: {{ include "loki.ingesterFullname" . }}-zone-c - namespace: {{ .Release.Namespace }} - labels: - {{- include "loki.ingesterLabels" . | nindent 4 }} -spec: - scaleTargetRef: - apiVersion: apps/v1 - kind: StatefulSet - name: {{ include "loki.ingesterFullname" . }}-zone-c - minReplicas: {{ .Values.ingester.autoscaling.minReplicas }} - maxReplicas: {{ .Values.ingester.autoscaling.maxReplicas }} - metrics: - {{- with .Values.ingester.autoscaling.targetMemoryUtilizationPercentage }} - - type: Resource - resource: - name: memory - {{- if (eq $apiVersion "autoscaling/v2") }} - target: - type: Utilization - averageUtilization: {{ . }} - {{- else }} - targetAverageUtilization: {{ . }} - {{- end }} - {{- end }} - {{- with .Values.ingester.autoscaling.targetCPUUtilizationPercentage }} - - type: Resource - resource: - name: cpu - {{- if (eq $apiVersion "autoscaling/v2") }} - target: - type: Utilization - averageUtilization: {{ . }} - {{- else }} - targetAverageUtilization: {{ . }} - {{- end }} - {{- end }} - {{- with .Values.ingester.autoscaling.customMetrics }} - {{- toYaml . | nindent 4 }} - {{- end }} - {{- if .Values.ingester.autoscaling.behavior.enabled }} - behavior: - {{- with .Values.ingester.autoscaling.behavior.scaleDown }} - scaleDown: {{ toYaml . | nindent 6 }} - {{- end }} - {{- with .Values.ingester.autoscaling.behavior.scaleUp }} - scaleUp: {{ toYaml . | nindent 6 }} - {{- end }} - {{- end }} -{{- end }} diff --git a/charts/loki/templates/ingester/hpa.yaml b/charts/loki/templates/ingester/hpa.yaml deleted file mode 100644 index de35d67..0000000 --- a/charts/loki/templates/ingester/hpa.yaml +++ /dev/null @@ -1,55 +0,0 @@ -{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} -{{- if and $isDistributed .Values.ingester.autoscaling.enabled (or (not .Values.ingester.zoneAwareReplication.enabled) .Values.ingester.zoneAwareReplication.migration.enabled) }} -{{- $apiVersion := include "loki.hpa.apiVersion" . -}} -apiVersion: {{ $apiVersion }} -kind: HorizontalPodAutoscaler -metadata: - name: {{ include "loki.ingesterFullname" . }} - namespace: {{ .Release.Namespace }} - labels: - {{- include "loki.ingesterLabels" . | nindent 4 }} -spec: - scaleTargetRef: - apiVersion: apps/v1 - kind: StatefulSet - name: {{ include "loki.ingesterFullname" . }} - minReplicas: {{ .Values.ingester.autoscaling.minReplicas }} - maxReplicas: {{ .Values.ingester.autoscaling.maxReplicas }} - metrics: - {{- with .Values.ingester.autoscaling.targetMemoryUtilizationPercentage }} - - type: Resource - resource: - name: memory - {{- if (eq $apiVersion "autoscaling/v2") }} - target: - type: Utilization - averageUtilization: {{ . }} - {{- else }} - targetAverageUtilization: {{ . }} - {{- end }} - {{- end }} - {{- with .Values.ingester.autoscaling.targetCPUUtilizationPercentage }} - - type: Resource - resource: - name: cpu - {{- if (eq $apiVersion "autoscaling/v2") }} - target: - type: Utilization - averageUtilization: {{ . }} - {{- else }} - targetAverageUtilization: {{ . }} - {{- end }} - {{- end }} - {{- with .Values.ingester.autoscaling.customMetrics }} - {{- toYaml . | nindent 4 }} - {{- end }} - {{- if .Values.ingester.autoscaling.behavior.enabled }} - behavior: - {{- with .Values.ingester.autoscaling.behavior.scaleDown }} - scaleDown: {{ toYaml . | nindent 6 }} - {{- end }} - {{- with .Values.ingester.autoscaling.behavior.scaleUp }} - scaleUp: {{ toYaml . | nindent 6 }} - {{- end }} - {{- end }} -{{- end }} diff --git a/charts/loki/templates/ingester/poddisruptionbudget-ingester-rollout.yaml b/charts/loki/templates/ingester/poddisruptionbudget-ingester-rollout.yaml deleted file mode 100644 index 4c1b133..0000000 --- a/charts/loki/templates/ingester/poddisruptionbudget-ingester-rollout.yaml +++ /dev/null @@ -1,21 +0,0 @@ -{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} -{{- if and $isDistributed (gt (int .Values.ingester.replicas) 1) (.Values.ingester.zoneAwareReplication.enabled) }} -{{- if kindIs "invalid" .Values.ingester.maxUnavailable }} -{{- fail "`.Values.ingester.maxUnavailable` must be set when `.Values.ingester.replicas` is greater than 1." }} -{{- else }} -apiVersion: {{ include "loki.pdb.apiVersion" . }} -kind: PodDisruptionBudget -metadata: - name: {{ include "loki.ingesterFullname" . }}-rollout - namespace: {{ .Release.Namespace }} - labels: - {{- include "loki.ingesterLabels" . | nindent 4 }} -spec: - selector: - matchLabels: - rollout-group: {{ include "loki.prefixRolloutGroup" . }}ingester - {{- with .Values.ingester.maxUnavailable }} - maxUnavailable: {{ . }} - {{- end }} -{{- end }} -{{- end }} diff --git a/charts/loki/templates/ingester/poddisruptionbudget-ingester.yaml b/charts/loki/templates/ingester/poddisruptionbudget-ingester.yaml deleted file mode 100644 index f5c4838..0000000 --- a/charts/loki/templates/ingester/poddisruptionbudget-ingester.yaml +++ /dev/null @@ -1,27 +0,0 @@ -{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} -{{- if and $isDistributed (gt (int .Values.ingester.replicas) 1) (or (not .Values.ingester.zoneAwareReplication.enabled) .Values.ingester.zoneAwareReplication.migration.enabled) }} -{{- if kindIs "invalid" .Values.ingester.maxUnavailable }} -{{- fail "`.Values.ingester.maxUnavailable` must be set when `.Values.ingester.replicas` is greater than 1." }} -{{- else }} -apiVersion: {{ include "loki.pdb.apiVersion" . }} -kind: PodDisruptionBudget -metadata: - name: {{ include "loki.ingesterFullname" . }} - namespace: {{ .Release.Namespace }} - labels: - {{- include "loki.ingesterLabels" . | nindent 4 }} -spec: - selector: - matchLabels: - {{- include "loki.ingesterSelectorLabels" . | nindent 6 }} - {{/* zone aware ingesters get their own pod disruption budget, ignore them here */}} - matchExpressions: - - key: rollout-group - operator: NotIn - values: - - '{{ include "loki.prefixRolloutGroup" . }}ingester' - {{- with .Values.ingester.maxUnavailable }} - maxUnavailable: {{ . }} - {{- end }} -{{- end }} -{{- end }} diff --git a/charts/loki/templates/ingester/service-ingester-headless.yaml b/charts/loki/templates/ingester/service-ingester-headless.yaml deleted file mode 100644 index 8a8b92f..0000000 --- a/charts/loki/templates/ingester/service-ingester-headless.yaml +++ /dev/null @@ -1,35 +0,0 @@ -{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} -{{- if and $isDistributed (or (not .Values.ingester.zoneAwareReplication.enabled) .Values.ingester.zoneAwareReplication.migration.enabled) }} -apiVersion: v1 -kind: Service -metadata: - name: {{ include "loki.ingesterFullname" . }}-headless - namespace: {{ .Release.Namespace }} - labels: - {{- include "loki.ingesterSelectorLabels" . | nindent 4 }} - prometheus.io/service-monitor: "false" - annotations: - {{- with .Values.loki.serviceAnnotations }} - {{- toYaml . | nindent 4}} - {{- end }} - {{- with .Values.ingester.serviceAnnotations }} - {{- toYaml . | nindent 4}} - {{- end }} -spec: - type: ClusterIP - clusterIP: None - ports: - - name: http-metrics - port: 3100 - targetPort: http-metrics - protocol: TCP - - name: grpc - port: 9095 - targetPort: grpc - protocol: TCP - {{- if .Values.ingester.appProtocol.grpc }} - appProtocol: {{ .Values.ingester.appProtocol.grpc }} - {{- end }} - selector: - {{- include "loki.ingesterSelectorLabels" . | nindent 4 }} -{{- end -}} diff --git a/charts/loki/templates/ingester/service-ingester-zone-a-headless.yaml b/charts/loki/templates/ingester/service-ingester-zone-a-headless.yaml deleted file mode 100644 index 380ed09..0000000 --- a/charts/loki/templates/ingester/service-ingester-zone-a-headless.yaml +++ /dev/null @@ -1,38 +0,0 @@ -{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} -{{- if and $isDistributed .Values.ingester.zoneAwareReplication.enabled }} -apiVersion: v1 -kind: Service -metadata: - name: {{ include "loki.ingesterFullname" . }}-zone-a-headless - namespace: {{ .Release.Namespace }} - labels: - {{- include "loki.ingesterLabels" . | nindent 4 }} - {{- with .Values.ingester.serviceLabels }} - {{- toYaml . | nindent 4 }} - {{- end }} - annotations: - {{- with .Values.loki.serviceAnnotations }} - {{- toYaml . | nindent 4}} - {{- end }} - {{- with .Values.ingester.serviceAnnotations }} - {{- toYaml . | nindent 4}} - {{- end }} -spec: - clusterIP: None - ports: - - name: http-metrics - port: 3100 - targetPort: http-metrics - protocol: TCP - - name: grpc - port: 9095 - targetPort: grpc - protocol: TCP - {{- if .Values.ingester.appProtocol.grpc }} - appProtocol: {{ .Values.ingester.appProtocol.grpc }} - {{- end }} - selector: - {{- include "loki.ingesterSelectorLabels" . | nindent 4 }} - name: {{ include "loki.prefixIngesterName" . }}ingester-zone-a - rollout-group: {{ include "loki.prefixRolloutGroup" . }}ingester -{{- end -}} diff --git a/charts/loki/templates/ingester/service-ingester-zone-b-headless.yaml b/charts/loki/templates/ingester/service-ingester-zone-b-headless.yaml deleted file mode 100644 index 00d851f..0000000 --- a/charts/loki/templates/ingester/service-ingester-zone-b-headless.yaml +++ /dev/null @@ -1,38 +0,0 @@ -{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} -{{- if and $isDistributed .Values.ingester.zoneAwareReplication.enabled }} -apiVersion: v1 -kind: Service -metadata: - name: {{ include "loki.ingesterFullname" . }}-zone-b-headless - namespace: {{ .Release.Namespace }} - labels: - {{- include "loki.ingesterLabels" . | nindent 4 }} - {{- with .Values.ingester.serviceLabels }} - {{- toYaml . | nindent 4 }} - {{- end }} - annotations: - {{- with .Values.loki.serviceAnnotations }} - {{- toYaml . | nindent 4}} - {{- end }} - {{- with .Values.ingester.serviceAnnotations }} - {{- toYaml . | nindent 4}} - {{- end }} -spec: - clusterIP: None - ports: - - name: http-metrics - port: 3100 - targetPort: http-metrics - protocol: TCP - - name: grpc - port: 9095 - targetPort: grpc - protocol: TCP - {{- if .Values.ingester.appProtocol.grpc }} - appProtocol: {{ .Values.ingester.appProtocol.grpc }} - {{- end }} - selector: - {{- include "loki.ingesterSelectorLabels" . | nindent 4 }} - name: {{ include "loki.prefixIngesterName" . }}ingester-zone-b - rollout-group: {{ include "loki.prefixRolloutGroup" . }}ingester -{{- end -}} diff --git a/charts/loki/templates/ingester/service-ingester-zone-c-headless.yaml b/charts/loki/templates/ingester/service-ingester-zone-c-headless.yaml deleted file mode 100644 index 0bacdbc..0000000 --- a/charts/loki/templates/ingester/service-ingester-zone-c-headless.yaml +++ /dev/null @@ -1,38 +0,0 @@ -{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} -{{- if and $isDistributed .Values.ingester.zoneAwareReplication.enabled }} -apiVersion: v1 -kind: Service -metadata: - name: {{ include "loki.ingesterFullname" . }}-zone-c-headless - namespace: {{ .Release.Namespace }} - labels: - {{- include "loki.ingesterLabels" . | nindent 4 }} - {{- with .Values.ingester.serviceLabels }} - {{- toYaml . | nindent 4 }} - {{- end }} - annotations: - {{- with .Values.loki.serviceAnnotations }} - {{- toYaml . | nindent 4}} - {{- end }} - {{- with .Values.ingester.serviceAnnotations }} - {{- toYaml . | nindent 4}} - {{- end }} -spec: - clusterIP: None - ports: - - name: http-metrics - port: 3100 - targetPort: http-metrics - protocol: TCP - - name: grpc - port: 9095 - targetPort: grpc - protocol: TCP - {{- if .Values.ingester.appProtocol.grpc }} - appProtocol: {{ .Values.ingester.appProtocol.grpc }} - {{- end }} - selector: - {{- include "loki.ingesterSelectorLabels" . | nindent 4 }} - name: {{ include "loki.prefixIngesterName" . }}ingester-zone-c - rollout-group: {{ include "loki.prefixRolloutGroup" . }}ingester -{{- end -}} diff --git a/charts/loki/templates/ingester/service-ingester.yaml b/charts/loki/templates/ingester/service-ingester.yaml deleted file mode 100644 index 94d6f83..0000000 --- a/charts/loki/templates/ingester/service-ingester.yaml +++ /dev/null @@ -1,36 +0,0 @@ -{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} -{{- if and $isDistributed (or (not .Values.ingester.zoneAwareReplication.enabled) .Values.ingester.zoneAwareReplication.migration.enabled) }} -apiVersion: v1 -kind: Service -metadata: - name: {{ include "loki.ingesterFullname" . }} - namespace: {{ .Release.Namespace }} - labels: - {{- include "loki.ingesterLabels" . | nindent 4 }} - {{- with .Values.ingester.serviceLabels }} - {{- toYaml . | nindent 4 }} - {{- end }} - annotations: - {{- with .Values.loki.serviceAnnotations }} - {{- toYaml . | nindent 4}} - {{- end }} - {{- with .Values.ingester.serviceAnnotations }} - {{- toYaml . | nindent 4}} - {{- end }} -spec: - type: ClusterIP - ports: - - name: http-metrics - port: 3100 - targetPort: http-metrics - protocol: TCP - - name: grpc - port: 9095 - targetPort: grpc - protocol: TCP - {{- if .Values.ingester.appProtocol.grpc }} - appProtocol: {{ .Values.ingester.appProtocol.grpc }} - {{- end }} - selector: - {{- include "loki.ingesterSelectorLabels" . | nindent 4 }} -{{- end -}} diff --git a/charts/loki/templates/ingester/statefulset-ingester-zone-a.yaml b/charts/loki/templates/ingester/statefulset-ingester-zone-a.yaml deleted file mode 100644 index 9b21dec..0000000 --- a/charts/loki/templates/ingester/statefulset-ingester-zone-a.yaml +++ /dev/null @@ -1,233 +0,0 @@ -{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} -{{- if and $isDistributed .Values.ingester.zoneAwareReplication.enabled }} -{{- $replicas := (include "loki.ingester.replicaCount" .) -}} -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: {{ include "loki.ingesterFullname" . }}-zone-a - namespace: {{ .Release.Namespace }} - labels: - {{- include "loki.ingesterLabels" . | nindent 4 }} - app.kubernetes.io/part-of: memberlist - name: {{ include "loki.prefixIngesterName" . }}ingester-zone-a - rollout-group: {{ include "loki.prefixRolloutGroup" . }}ingester - annotations: - rollout-max-unavailable: "{{ include "loki.ingester.maxUnavailable" (dict "ctx" . "replicas" $replicas)}}" - {{- with .Values.loki.annotations }} - {{- toYaml . | nindent 4 }} - {{- end }} - {{- with .Values.ingester.zoneAwareReplication.zoneA.annotations }} - {{- toYaml . | nindent 4 }} - {{- end }} -spec: -{{- if not .Values.ingester.autoscaling.enabled }} - replicas: {{ $replicas }} -{{- end }} - podManagementPolicy: Parallel - serviceName: {{ include "loki.ingesterFullname" . }}-zone-a - revisionHistoryLimit: {{ .Values.loki.revisionHistoryLimit }} - {{- if and (semverCompare ">= 1.23-0" (include "loki.kubeVersion" .)) (.Values.ingester.persistence.enableStatefulSetAutoDeletePVC) }} - {{/* - Data on the read nodes is easy to replace, so we want to always delete PVCs to make - operation easier, and will rely on re-fetching data when needed. - */}} - persistentVolumeClaimRetentionPolicy: - whenDeleted: {{ .Values.ingester.persistence.whenDeleted }} - whenScaled: {{ .Values.ingester.persistence.whenScaled }} - {{- end }} - selector: - matchLabels: - {{- include "loki.ingesterSelectorLabels" . | nindent 6 }} - name: {{ include "loki.prefixIngesterName" . }}ingester-zone-a - rollout-group: {{ include "loki.prefixRolloutGroup" . }}ingester -{{- with .Values.ingester.updateStrategy }} - updateStrategy: - {{- tpl (. | toYaml) $ | nindent 4 }} -{{- end }} - template: - metadata: - annotations: - {{- include "loki.config.checksum" . | nindent 8 }} - {{- with .Values.loki.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.ingester.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.ingester.zoneAwareReplication.zoneA.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - {{- include "loki.ingesterLabels" . | nindent 8 }} - app.kubernetes.io/part-of: memberlist - name: {{ include "loki.prefixIngesterName" . }}ingester-zone-a - rollout-group: {{ include "loki.prefixRolloutGroup" . }}ingester - {{- with merge (dict) .Values.loki.podLabels .Values.ingester.podLabels }} - {{- toYaml . | nindent 8 }} - {{- end }} - spec: - {{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.Version }} - {{- with .Values.ingester.topologySpreadConstraints }} - topologySpreadConstraints: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- end }} - serviceAccountName: {{ include "loki.serviceAccountName" . }} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.ingester.hostAliases }} - hostAliases: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- include "loki.ingesterPriorityClassName" . | nindent 6 }} - securityContext: - {{- toYaml .Values.loki.podSecurityContext | nindent 8 }} - terminationGracePeriodSeconds: {{ .Values.ingester.terminationGracePeriodSeconds }} - {{- with .Values.ingester.initContainers }} - initContainers: - {{- toYaml . | nindent 8 }} - {{- end }} - containers: - - name: ingester - image: {{ include "loki.image" . }} - imagePullPolicy: {{ .Values.loki.image.pullPolicy }} - {{- if or .Values.loki.command .Values.ingester.command }} - command: - - {{ coalesce .Values.ingester.command .Values.loki.command | quote }} - {{- end }} - args: - - -config.file=/etc/loki/config/config.yaml - - -ingester.availability-zone=zone-a - - -ingester.unregister-on-shutdown=false - - -ingester.tokens-file-path=/var/loki/ring-tokens - - -target=ingester - {{- with (concat .Values.global.extraArgs .Values.ingester.extraArgs) | uniq }} - {{- toYaml . | nindent 12 }} - {{- end }} - ports: - - name: http-metrics - containerPort: 3100 - protocol: TCP - - name: grpc - containerPort: 9095 - protocol: TCP - - name: http-memberlist - containerPort: 7946 - protocol: TCP - {{- with (concat .Values.global.extraEnv .Values.ingester.extraEnv) | uniq }} - env: - {{- toYaml . | nindent 12 }} - {{- end }} - {{- with (concat .Values.global.extraEnvFrom .Values.ingester.extraEnvFrom) | uniq }} - envFrom: - {{- toYaml . | nindent 12 }} - {{- end }} - securityContext: - {{- toYaml .Values.loki.containerSecurityContext | nindent 12 }} - {{- include "loki.ingester.readinessProbe" . | nindent 10 }} - {{- include "loki.ingester.livenessProbe" . | nindent 10 }} - volumeMounts: - - name: config - mountPath: /etc/loki/config - - name: runtime-config - mountPath: /etc/loki/runtime-config - - name: data - mountPath: /var/loki - {{- if .Values.enterprise.enabled }} - - name: license - mountPath: /etc/loki/license - {{- end }} - {{- with (concat .Values.global.extraVolumeMounts .Values.ingester.extraVolumeMounts) | uniq }} - {{- toYaml . | nindent 12 }} - {{- end }} - {{- with .Values.ingester.resources }} - resources: - {{- toYaml . | nindent 12 }} - {{- end }} - {{- with .Values.ingester.lifecycle }} - lifecycle: - {{- toYaml . | nindent 12 }} - {{- end }} - {{- if .Values.ingester.extraContainers }} - {{- toYaml .Values.ingester.extraContainers | nindent 8}} - {{- end }} - affinity: - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchExpressions: - - key: rollout-group - operator: In - values: - - {{ include "loki.prefixRolloutGroup" . }}ingester - - key: name - operator: NotIn - values: - - {{ include "loki.prefixIngesterName" . }}ingester-zone-a - topologyKey: kubernetes.io/hostname - {{- with .Values.ingester.zoneAwareReplication.zoneA.extraAffinity }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.ingester.zoneAwareReplication.zoneA.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.ingester.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} - volumes: - - name: config - {{- include "loki.configVolume" . | nindent 10 }} - - name: runtime-config - configMap: - name: {{ template "loki.name" . }}-runtime - {{- if .Values.enterprise.enabled }} - - name: license - secret: - {{- if .Values.enterprise.useExternalLicense }} - secretName: {{ .Values.enterprise.externalLicenseName }} - {{- else }} - secretName: enterprise-logs-license - {{- end }} - {{- end }} - {{- with (concat .Values.global.extraVolumes .Values.ingester.extraVolumes) | uniq }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- if not .Values.ingester.persistence.enabled }} - - name: data - emptyDir: {} - {{- else if .Values.ingester.persistence.inMemory }} - - name: data - {{- if .Values.ingester.persistence.inMemory }} - emptyDir: - medium: Memory - {{- end }} - {{- if .Values.ingester.persistence.size }} - sizeLimit: {{ .Values.ingester.persistence.size }} - {{- end }} - {{- else }} - volumeClaimTemplates: - {{- range .Values.ingester.persistence.claims }} - - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: {{ .name }} - {{- with .annotations }} - annotations: - {{- . | toYaml | nindent 10 }} - {{- end }} - spec: - accessModes: - - ReadWriteOnce - {{- with .storageClass }} - storageClassName: {{ if (eq "-" .) }}""{{ else }}{{ . }}{{ end }} - {{- end }} - resources: - requests: - storage: {{ .size | quote }} - {{- end }} - {{- end }} -{{- end }} diff --git a/charts/loki/templates/ingester/statefulset-ingester-zone-b.yaml b/charts/loki/templates/ingester/statefulset-ingester-zone-b.yaml deleted file mode 100644 index 0b79c05..0000000 --- a/charts/loki/templates/ingester/statefulset-ingester-zone-b.yaml +++ /dev/null @@ -1,233 +0,0 @@ -{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} -{{- if and $isDistributed .Values.ingester.zoneAwareReplication.enabled }} -{{- $replicas := (include "loki.ingester.replicaCount" .) -}} -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: {{ include "loki.ingesterFullname" . }}-zone-b - namespace: {{ .Release.Namespace }} - labels: - {{- include "loki.ingesterLabels" . | nindent 4 }} - app.kubernetes.io/part-of: memberlist - name: {{ include "loki.prefixIngesterName" . }}ingester-zone-b - rollout-group: {{ include "loki.prefixRolloutGroup" . }}ingester - annotations: - rollout-max-unavailable: "{{ include "loki.ingester.maxUnavailable" (dict "ctx" . "replicas" $replicas)}}" - {{- with .Values.loki.annotations }} - {{- toYaml . | nindent 4 }} - {{- end }} - {{- with .Values.ingester.zoneAwareReplication.zoneB.annotations }} - {{- toYaml . | nindent 4 }} - {{- end }} -spec: -{{- if not .Values.ingester.autoscaling.enabled }} - replicas: {{ $replicas }} -{{- end }} - podManagementPolicy: Parallel - serviceName: {{ include "loki.ingesterFullname" . }}-zone-b - revisionHistoryLimit: {{ .Values.loki.revisionHistoryLimit }} - {{- if and (semverCompare ">= 1.23-0" (include "loki.kubeVersion" .)) (.Values.ingester.persistence.enableStatefulSetAutoDeletePVC) }} - {{/* - Data on the read nodes is easy to replace, so we want to always delete PVCs to make - operation easier, and will rely on re-fetching data when needed. - */}} - persistentVolumeClaimRetentionPolicy: - whenDeleted: {{ .Values.ingester.persistence.whenDeleted }} - whenScaled: {{ .Values.ingester.persistence.whenScaled }} - {{- end }} - selector: - matchLabels: - {{- include "loki.ingesterSelectorLabels" . | nindent 6 }} - name: {{ include "loki.prefixIngesterName" . }}ingester-zone-b - rollout-group: {{ include "loki.prefixRolloutGroup" . }}ingester -{{- with .Values.ingester.updateStrategy }} - updateStrategy: - {{- tpl (. | toYaml) $ | nindent 4 }} -{{- end }} - template: - metadata: - annotations: - {{- include "loki.config.checksum" . | nindent 8 }} - {{- with .Values.loki.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.ingester.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.ingester.zoneAwareReplication.zoneB.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - {{- include "loki.ingesterLabels" . | nindent 8 }} - app.kubernetes.io/part-of: memberlist - name: {{ include "loki.prefixIngesterName" . }}ingester-zone-b - rollout-group: {{ include "loki.prefixRolloutGroup" . }}ingester - {{- with merge (dict) .Values.ingester.podLabels .Values.loki.podLabels }} - {{- toYaml . | nindent 8 }} - {{- end }} - spec: - {{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.Version }} - {{- with .Values.ingester.topologySpreadConstraints }} - topologySpreadConstraints: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- end }} - serviceAccountName: {{ include "loki.serviceAccountName" . }} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.ingester.hostAliases }} - hostAliases: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- include "loki.ingesterPriorityClassName" . | nindent 6 }} - securityContext: - {{- toYaml .Values.loki.podSecurityContext | nindent 8 }} - terminationGracePeriodSeconds: {{ .Values.ingester.terminationGracePeriodSeconds }} - {{- with .Values.ingester.initContainers }} - initContainers: - {{- toYaml . | nindent 8 }} - {{- end }} - containers: - - name: ingester - image: {{ include "loki.image" . }} - imagePullPolicy: {{ .Values.loki.image.pullPolicy }} - {{- if or .Values.loki.command .Values.ingester.command }} - command: - - {{ coalesce .Values.ingester.command .Values.loki.command | quote }} - {{- end }} - args: - - -config.file=/etc/loki/config/config.yaml - - -ingester.availability-zone=zone-b - - -ingester.unregister-on-shutdown=false - - -ingester.tokens-file-path=/var/loki/ring-tokens - - -target=ingester - {{- with (concat .Values.global.extraArgs .Values.ingester.extraArgs) | uniq }} - {{- toYaml . | nindent 12 }} - {{- end }} - ports: - - name: http-metrics - containerPort: 3100 - protocol: TCP - - name: grpc - containerPort: 9095 - protocol: TCP - - name: http-memberlist - containerPort: 7946 - protocol: TCP - {{- with (concat .Values.global.extraEnv .Values.ingester.extraEnv) | uniq }} - env: - {{- toYaml . | nindent 12 }} - {{- end }} - {{- with (concat .Values.global.extraEnvFrom .Values.ingester.extraEnvFrom) | uniq }} - envFrom: - {{- toYaml . | nindent 12 }} - {{- end }} - securityContext: - {{- toYaml .Values.loki.containerSecurityContext | nindent 12 }} - {{- include "loki.ingester.readinessProbe" . | nindent 10 }} - {{- include "loki.ingester.livenessProbe" . | nindent 10 }} - volumeMounts: - - name: config - mountPath: /etc/loki/config - - name: runtime-config - mountPath: /etc/loki/runtime-config - - name: data - mountPath: /var/loki - {{- if .Values.enterprise.enabled }} - - name: license - mountPath: /etc/loki/license - {{- end }} - {{- with (concat .Values.global.extraVolumeMounts .Values.ingester.extraVolumeMounts) | uniq }} - {{- toYaml . | nindent 12 }} - {{- end }} - {{- with .Values.ingester.resources }} - resources: - {{- toYaml . | nindent 12 }} - {{- end }} - {{- with .Values.ingester.lifecycle }} - lifecycle: - {{- toYaml . | nindent 12 }} - {{- end }} - {{- if .Values.ingester.extraContainers }} - {{- toYaml .Values.ingester.extraContainers | nindent 8}} - {{- end }} - affinity: - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchExpressions: - - key: rollout-group - operator: In - values: - - {{ include "loki.prefixRolloutGroup" . }}ingester - - key: name - operator: NotIn - values: - - {{ include "loki.prefixIngesterName" . }}ingester-zone-b - topologyKey: kubernetes.io/hostname - {{- with .Values.ingester.zoneAwareReplication.zoneB.extraAffinity }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.ingester.zoneAwareReplication.zoneB.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.ingester.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} - volumes: - - name: config - {{- include "loki.configVolume" . | nindent 10 }} - - name: runtime-config - configMap: - name: {{ template "loki.name" . }}-runtime - {{- if .Values.enterprise.enabled }} - - name: license - secret: - {{- if .Values.enterprise.useExternalLicense }} - secretName: {{ .Values.enterprise.externalLicenseName }} - {{- else }} - secretName: enterprise-logs-license - {{- end }} - {{- end }} - {{- with (concat .Values.global.extraVolumes .Values.ingester.extraVolumes) | uniq }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- if not .Values.ingester.persistence.enabled }} - - name: data - emptyDir: {} - {{- else if .Values.ingester.persistence.inMemory }} - - name: data - {{- if .Values.ingester.persistence.inMemory }} - emptyDir: - medium: Memory - {{- end }} - {{- if .Values.ingester.persistence.size }} - sizeLimit: {{ .Values.ingester.persistence.size }} - {{- end }} - {{- else }} - volumeClaimTemplates: - {{- range .Values.ingester.persistence.claims }} - - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: {{ .name }} - {{- with .annotations }} - annotations: - {{- . | toYaml | nindent 10 }} - {{- end }} - spec: - accessModes: - - ReadWriteOnce - {{- with .storageClass }} - storageClassName: {{ if (eq "-" .) }}""{{ else }}{{ . }}{{ end }} - {{- end }} - resources: - requests: - storage: {{ .size | quote }} - {{- end }} - {{- end }} -{{- end }} diff --git a/charts/loki/templates/ingester/statefulset-ingester-zone-c.yaml b/charts/loki/templates/ingester/statefulset-ingester-zone-c.yaml deleted file mode 100644 index 140bf7a..0000000 --- a/charts/loki/templates/ingester/statefulset-ingester-zone-c.yaml +++ /dev/null @@ -1,233 +0,0 @@ -{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} -{{- if and $isDistributed .Values.ingester.zoneAwareReplication.enabled }} -{{- $replicas := (include "loki.ingester.replicaCount" .) -}} -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: {{ include "loki.ingesterFullname" . }}-zone-c - namespace: {{ .Release.Namespace }} - labels: - {{- include "loki.ingesterLabels" . | nindent 4 }} - app.kubernetes.io/part-of: memberlist - name: {{ include "loki.prefixIngesterName" . }}ingester-zone-c - rollout-group: {{ include "loki.prefixRolloutGroup" . }}ingester - annotations: - rollout-max-unavailable: "{{ include "loki.ingester.maxUnavailable" (dict "ctx" . "replicas" $replicas)}}" - {{- with .Values.loki.annotations }} - {{- toYaml . | nindent 4 }} - {{- end }} - {{- with .Values.ingester.zoneAwareReplication.zoneC.annotations }} - {{- toYaml . | nindent 4 }} - {{- end }} -spec: -{{- if not .Values.ingester.autoscaling.enabled }} - replicas: {{ $replicas }} -{{- end }} - podManagementPolicy: Parallel - serviceName: {{ include "loki.ingesterFullname" . }}-zone-c - revisionHistoryLimit: {{ .Values.loki.revisionHistoryLimit }} - {{- if and (semverCompare ">= 1.23-0" (include "loki.kubeVersion" .)) (.Values.ingester.persistence.enableStatefulSetAutoDeletePVC) }} - {{/* - Data on the read nodes is easy to replace, so we want to always delete PVCs to make - operation easier, and will rely on re-fetching data when needed. - */}} - persistentVolumeClaimRetentionPolicy: - whenDeleted: {{ .Values.ingester.persistence.whenDeleted }} - whenScaled: {{ .Values.ingester.persistence.whenScaled }} - {{- end }} - selector: - matchLabels: - {{- include "loki.ingesterSelectorLabels" . | nindent 6 }} - name: {{ include "loki.prefixIngesterName" . }}ingester-zone-c - rollout-group: {{ include "loki.prefixRolloutGroup" . }}ingester -{{- with .Values.ingester.updateStrategy }} - updateStrategy: - {{- tpl (. | toYaml) $ | nindent 4 }} -{{- end }} - template: - metadata: - annotations: - {{- include "loki.config.checksum" . | nindent 8 }} - {{- with .Values.loki.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.ingester.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.ingester.zoneAwareReplication.zoneC.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - {{- include "loki.ingesterLabels" . | nindent 8 }} - app.kubernetes.io/part-of: memberlist - name: {{ include "loki.prefixIngesterName" . }}ingester-zone-c - rollout-group: {{ include "loki.prefixRolloutGroup" . }}ingester - {{- with merge (dict) .Values.ingester.podLabels .Values.loki.podLabels }} - {{- toYaml . | nindent 8 }} - {{- end }} - spec: - {{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.Version }} - {{- with .Values.ingester.topologySpreadConstraints }} - topologySpreadConstraints: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- end }} - serviceAccountName: {{ include "loki.serviceAccountName" . }} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.ingester.hostAliases }} - hostAliases: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- include "loki.ingesterPriorityClassName" . | nindent 6 }} - securityContext: - {{- toYaml .Values.loki.podSecurityContext | nindent 8 }} - terminationGracePeriodSeconds: {{ .Values.ingester.terminationGracePeriodSeconds }} - {{- with .Values.ingester.initContainers }} - initContainers: - {{- toYaml . | nindent 8 }} - {{- end }} - containers: - - name: ingester - image: {{ include "loki.image" . }} - imagePullPolicy: {{ .Values.loki.image.pullPolicy }} - {{- if or .Values.loki.command .Values.ingester.command }} - command: - - {{ coalesce .Values.ingester.command .Values.loki.command | quote }} - {{- end }} - args: - - -config.file=/etc/loki/config/config.yaml - - -ingester.availability-zone=zone-c - - -ingester.unregister-on-shutdown=false - - -ingester.tokens-file-path=/var/loki/ring-tokens - - -target=ingester - {{- with (concat .Values.global.extraArgs .Values.ingester.extraArgs) | uniq }} - {{- toYaml . | nindent 12 }} - {{- end }} - ports: - - name: http-metrics - containerPort: 3100 - protocol: TCP - - name: grpc - containerPort: 9095 - protocol: TCP - - name: http-memberlist - containerPort: 7946 - protocol: TCP - {{- with (concat .Values.global.extraEnv .Values.ingester.extraEnv) | uniq }} - env: - {{- toYaml . | nindent 12 }} - {{- end }} - {{- with (concat .Values.global.extraEnvFrom .Values.ingester.extraEnvFrom) | uniq }} - envFrom: - {{- toYaml . | nindent 12 }} - {{- end }} - securityContext: - {{- toYaml .Values.loki.containerSecurityContext | nindent 12 }} - {{- include "loki.ingester.readinessProbe" . | nindent 10 }} - {{- include "loki.ingester.livenessProbe" . | nindent 10 }} - volumeMounts: - - name: config - mountPath: /etc/loki/config - - name: runtime-config - mountPath: /etc/loki/runtime-config - - name: data - mountPath: /var/loki - {{- if .Values.enterprise.enabled }} - - name: license - mountPath: /etc/loki/license - {{- end }} - {{- with (concat .Values.global.extraVolumeMounts .Values.ingester.extraVolumeMounts) | uniq }} - {{- toYaml . | nindent 12 }} - {{- end }} - {{- with .Values.ingester.resources }} - resources: - {{- toYaml . | nindent 12 }} - {{- end }} - {{- with .Values.ingester.lifecycle }} - lifecycle: - {{- toYaml . | nindent 12 }} - {{- end }} - {{- if .Values.ingester.extraContainers }} - {{- toYaml .Values.ingester.extraContainers | nindent 8}} - {{- end }} - affinity: - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchExpressions: - - key: rollout-group - operator: In - values: - - {{ include "loki.prefixIngesterName" . }}ingester - - key: name - operator: NotIn - values: - - {{ include "loki.prefixIngesterName" . }}ingester-zone-c - topologyKey: kubernetes.io/hostname - {{- with .Values.ingester.zoneAwareReplication.zoneC.extraAffinity }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.ingester.zoneAwareReplication.zoneC.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.ingester.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} - volumes: - - name: config - {{- include "loki.configVolume" . | nindent 10 }} - - name: runtime-config - configMap: - name: {{ template "loki.name" . }}-runtime - {{- if .Values.enterprise.enabled }} - - name: license - secret: - {{- if .Values.enterprise.useExternalLicense }} - secretName: {{ .Values.enterprise.externalLicenseName }} - {{- else }} - secretName: enterprise-logs-license - {{- end }} - {{- end }} - {{- with (concat .Values.global.extraVolumes .Values.ingester.extraVolumes) | uniq }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- if not .Values.ingester.persistence.enabled }} - - name: data - emptyDir: {} - {{- else if .Values.ingester.persistence.inMemory }} - - name: data - {{- if .Values.ingester.persistence.inMemory }} - emptyDir: - medium: Memory - {{- end }} - {{- if .Values.ingester.persistence.size }} - sizeLimit: {{ .Values.ingester.persistence.size }} - {{- end }} - {{- else }} - volumeClaimTemplates: - {{- range .Values.ingester.persistence.claims }} - - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: {{ .name }} - {{- with .annotations }} - annotations: - {{- . | toYaml | nindent 10 }} - {{- end }} - spec: - accessModes: - - ReadWriteOnce - {{- with .storageClass }} - storageClassName: {{ if (eq "-" .) }}""{{ else }}{{ . }}{{ end }} - {{- end }} - resources: - requests: - storage: {{ .size | quote }} - {{- end }} - {{- end }} -{{- end }} diff --git a/charts/loki/templates/ingester/statefulset-ingester.yaml b/charts/loki/templates/ingester/statefulset-ingester.yaml deleted file mode 100644 index 9055fe2..0000000 --- a/charts/loki/templates/ingester/statefulset-ingester.yaml +++ /dev/null @@ -1,204 +0,0 @@ -{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} -{{- if and $isDistributed (or (not .Values.ingester.zoneAwareReplication.enabled) .Values.ingester.zoneAwareReplication.migration.enabled) }} -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: {{ include "loki.ingesterFullname" . }} - namespace: {{ .Release.Namespace }} - labels: - {{- include "loki.ingesterLabels" . | nindent 4 }} - app.kubernetes.io/part-of: memberlist - {{- with .Values.loki.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -spec: -{{- if not .Values.ingester.autoscaling.enabled }} - replicas: {{ .Values.ingester.replicas }} -{{- end }} - podManagementPolicy: Parallel -{{- with .Values.ingester.updateStrategy }} - updateStrategy: - {{- tpl (. | toYaml) $ | nindent 4 }} -{{- end }} - serviceName: {{ include "loki.ingesterFullname" . }}-headless - revisionHistoryLimit: {{ .Values.loki.revisionHistoryLimit }} - {{- if and (semverCompare ">= 1.23-0" (include "loki.kubeVersion" .)) (.Values.ingester.persistence.enableStatefulSetAutoDeletePVC) }} - {{/* - Data on the read nodes is easy to replace, so we want to always delete PVCs to make - operation easier, and will rely on re-fetching data when needed. - */}} - persistentVolumeClaimRetentionPolicy: - whenDeleted: {{ .Values.ingester.persistence.whenDeleted }} - whenScaled: {{ .Values.ingester.persistence.whenScaled }} - {{- end }} - selector: - matchLabels: - {{- include "loki.ingesterSelectorLabels" . | nindent 6 }} - template: - metadata: - annotations: - {{- include "loki.config.checksum" . | nindent 8 }} - {{- with .Values.loki.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.ingester.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - {{- include "loki.ingesterLabels" . | nindent 8 }} - app.kubernetes.io/part-of: memberlist - {{- with merge (dict) .Values.loki.podLabels .Values.ingester.podLabels }} - {{- toYaml . | nindent 8 }} - {{- end }} - spec: - {{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.Version }} - {{- with .Values.ingester.topologySpreadConstraints }} - topologySpreadConstraints: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- end }} - serviceAccountName: {{ include "loki.serviceAccountName" . }} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.ingester.hostAliases }} - hostAliases: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- include "loki.ingesterPriorityClassName" . | nindent 6 }} - securityContext: - {{- toYaml .Values.loki.podSecurityContext | nindent 8 }} - terminationGracePeriodSeconds: {{ .Values.ingester.terminationGracePeriodSeconds }} - {{- with .Values.ingester.initContainers }} - initContainers: - {{- toYaml . | nindent 8 }} - {{- end }} - containers: - - name: ingester - image: {{ include "loki.image" . }} - imagePullPolicy: {{ .Values.loki.image.pullPolicy }} - {{- if or .Values.loki.command .Values.ingester.command }} - command: - - {{ coalesce .Values.ingester.command .Values.loki.command | quote }} - {{- end }} - args: - - -config.file=/etc/loki/config/config.yaml - - -ingester.availability-zone=zone-default - - -target=ingester - {{- with (concat .Values.global.extraArgs .Values.ingester.extraArgs) | uniq }} - {{- toYaml . | nindent 12 }} - {{- end }} - ports: - - name: http-metrics - containerPort: 3100 - protocol: TCP - - name: grpc - containerPort: 9095 - protocol: TCP - - name: http-memberlist - containerPort: 7946 - protocol: TCP - {{- with (concat .Values.global.extraEnv .Values.ingester.extraEnv) | uniq }} - env: - {{- toYaml . | nindent 12 }} - {{- end }} - {{- with (concat .Values.global.extraEnvFrom .Values.ingester.extraEnvFrom) | uniq }} - envFrom: - {{- toYaml . | nindent 12 }} - {{- end }} - securityContext: - {{- toYaml .Values.loki.containerSecurityContext | nindent 12 }} - {{- include "loki.ingester.readinessProbe" . | nindent 10 }} - {{- include "loki.ingester.livenessProbe" . | nindent 10 }} - volumeMounts: - - name: config - mountPath: /etc/loki/config - - name: runtime-config - mountPath: /etc/loki/runtime-config - - name: data - mountPath: /var/loki - {{- if .Values.enterprise.enabled }} - - name: license - mountPath: /etc/loki/license - {{- end }} - {{- with (concat .Values.global.extraVolumeMounts .Values.ingester.extraVolumeMounts) | uniq }} - {{- toYaml . | nindent 12 }} - {{- end }} - {{- with .Values.ingester.resources }} - resources: - {{- toYaml . | nindent 12 }} - {{- end }} - {{- with .Values.ingester.lifecycle }} - lifecycle: - {{- toYaml . | nindent 12 }} - {{- end }} - {{- if .Values.ingester.extraContainers }} - {{- toYaml .Values.ingester.extraContainers | nindent 8}} - {{- end }} - {{- with .Values.ingester.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.ingester.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.ingester.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} - volumes: - - name: config - {{- include "loki.configVolume" . | nindent 10 }} - - name: runtime-config - configMap: - name: {{ template "loki.name" . }}-runtime - {{- if .Values.enterprise.enabled }} - - name: license - secret: - {{- if .Values.enterprise.useExternalLicense }} - secretName: {{ .Values.enterprise.externalLicenseName }} - {{- else }} - secretName: enterprise-logs-license - {{- end }} - {{- end }} - {{- with (concat .Values.global.extraVolumes .Values.ingester.extraVolumes) | uniq }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- if not .Values.ingester.persistence.enabled }} - - name: data - emptyDir: { } - {{- else if .Values.ingester.persistence.inMemory }} - - name: data - {{- if .Values.ingester.persistence.inMemory }} - emptyDir: - medium: Memory - {{- end }} - {{- if .Values.ingester.persistence.size }} - sizeLimit: {{ .Values.ingester.persistence.size }} - {{- end }} - {{- else }} - volumeClaimTemplates: - {{- range .Values.ingester.persistence.claims }} - - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: {{ .name }} - {{- with .annotations }} - annotations: - {{- . | toYaml | nindent 10 }} - {{- end }} - spec: - accessModes: - - ReadWriteOnce - {{- with .storageClass }} - storageClassName: {{ if (eq "-" .) }}""{{ else }}{{ . }}{{ end }} - {{- end }} - resources: - requests: - storage: {{ .size | quote }} - {{- end }} - {{- end }} -{{- end }} diff --git a/charts/loki/templates/ingress.yaml b/charts/loki/templates/ingress.yaml deleted file mode 100644 index ddbcf7f..0000000 --- a/charts/loki/templates/ingress.yaml +++ /dev/null @@ -1,40 +0,0 @@ -{{- if .Values.ingress.enabled }} -{{- $ingressSupportsIngressClassName := eq (include "loki.ingress.supportsIngressClassName" .) "true" -}} -apiVersion: {{ include "loki.ingress.apiVersion" . }} -kind: Ingress -metadata: - name: {{ include "loki.fullname" . }} - namespace: {{ $.Release.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: - {{- if and $ingressSupportsIngressClassName .Values.ingress.ingressClassName }} - ingressClassName: {{ .Values.ingress.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/charts/loki/templates/loki-canary/_helpers.tpl b/charts/loki/templates/loki-canary/_helpers.tpl deleted file mode 100644 index 01e588c..0000000 --- a/charts/loki/templates/loki-canary/_helpers.tpl +++ /dev/null @@ -1,40 +0,0 @@ -{{/* -canary fullname -*/}} -{{- define "loki-canary.fullname" -}} -{{ include "loki.name" . }}-canary -{{- end }} - -{{/* -canary common labels -*/}} -{{- define "loki-canary.labels" -}} -{{ include "loki.labels" . }} -app.kubernetes.io/component: canary -{{- end }} - -{{/* -canary selector labels -*/}} -{{- define "loki-canary.selectorLabels" -}} -{{ include "loki.selectorLabels" . }} -app.kubernetes.io/component: canary -{{- end }} - -{{/* -Docker image name for loki-canary -*/}} -{{- define "loki-canary.image" -}} -{{- $dict := dict "service" .Values.lokiCanary.image "global" .Values.global.image "defaultVersion" .Chart.AppVersion -}} -{{- include "loki.baseImage" $dict -}} -{{- end -}} - -{{/* -canary priority class name -*/}} -{{- define "loki-canary.priorityClassName" -}} -{{- $pcn := coalesce .Values.global.priorityClassName .Values.lokiCanary.priorityClassName .Values.read.priorityClassName -}} -{{- if $pcn }} -priorityClassName: {{ $pcn }} -{{- end }} -{{- end }} diff --git a/charts/loki/templates/loki-canary/daemonset.yaml b/charts/loki/templates/loki-canary/daemonset.yaml deleted file mode 100644 index fa4690e..0000000 --- a/charts/loki/templates/loki-canary/daemonset.yaml +++ /dev/null @@ -1,127 +0,0 @@ -{{- with .Values.lokiCanary -}} -{{- if .enabled -}} ---- -apiVersion: apps/v1 -kind: DaemonSet -metadata: - name: {{ include "loki-canary.fullname" $ }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "loki-canary.labels" $ | nindent 4 }} -spec: - selector: - matchLabels: - {{- include "loki-canary.selectorLabels" $ | nindent 6 }} - {{- with .updateStrategy }} - updateStrategy: - {{- toYaml . | nindent 4 }} - {{- end }} - template: - metadata: - {{- with .annotations }} - annotations: - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - {{- include "loki-canary.selectorLabels" $ | nindent 8 }} - {{- with .podLabels }} - {{- toYaml . | nindent 8 }} - {{- end }} - spec: - serviceAccountName: {{ include "loki-canary.fullname" $ }} - {{- with $.Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- include "loki-canary.priorityClassName" $ | nindent 6 }} - securityContext: - {{- toYaml $.Values.loki.podSecurityContext | nindent 8 }} - containers: - - name: loki-canary - image: {{ include "loki-canary.image" $ }} - imagePullPolicy: {{ $.Values.loki.image.pullPolicy }} - args: - - -addr={{- include "loki.host" $ }} - - -labelname={{ .labelname }} - - -labelvalue=$(POD_NAME) - {{- if $.Values.enterprise.enabled }} - - -user=$(USER) - - -tenant-id=$(USER) - - -pass=$(PASS) - {{- else if $.Values.loki.auth_enabled }} - - -user={{ $.Values.monitoring.selfMonitoring.tenant.name }} - - -tenant-id={{ $.Values.monitoring.selfMonitoring.tenant.name }} - - -pass={{ $.Values.monitoring.selfMonitoring.tenant.password }} - {{- end }} - {{- if .push }} - - -push=true - {{- end }} - {{- with .extraArgs }} - {{- toYaml . | nindent 12 }} - {{- end }} - securityContext: - {{- toYaml $.Values.loki.containerSecurityContext | nindent 12 }} - volumeMounts: - {{- with $.Values.lokiCanary.extraVolumeMounts }} - {{- toYaml . | nindent 12 }} - {{- end }} - ports: - - name: http-metrics - containerPort: 3500 - protocol: TCP - env: - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - {{ if $.Values.enterprise.enabled }} - - name: USER - valueFrom: - secretKeyRef: - name: {{ include "enterprise-logs.selfMonitoringTenantSecret" $ }} - key: username - - name: PASS - valueFrom: - secretKeyRef: - name: {{ include "enterprise-logs.selfMonitoringTenantSecret" $ }} - key: password - {{- end -}} - {{- with .extraEnv }} - {{- toYaml . | nindent 12 }} - {{- end }} - {{- with .extraEnvFrom }} - envFrom: - {{- toYaml . | nindent 12 }} - {{- end }} - readinessProbe: - httpGet: - path: /metrics - port: http-metrics - initialDelaySeconds: 15 - timeoutSeconds: 1 - {{- with .resources}} - resources: - {{- toYaml . | nindent 12 }} - {{- end }} - {{- with .dnsConfig }} - dnsConfig: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - volumes: - {{- with $.Values.lokiCanary.extraVolumes }} - {{- toYaml . | nindent 8 }} - {{- end }} -{{- end }} -{{- end }} diff --git a/charts/loki/templates/loki-canary/service.yaml b/charts/loki/templates/loki-canary/service.yaml deleted file mode 100644 index 38022a3..0000000 --- a/charts/loki/templates/loki-canary/service.yaml +++ /dev/null @@ -1,34 +0,0 @@ -{{- with .Values.lokiCanary -}} -{{- if .enabled -}} ---- -apiVersion: v1 -kind: Service -metadata: - name: {{ include "loki-canary.fullname" $ }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "loki-canary.labels" $ | nindent 4 }} - {{- with $.Values.loki.serviceLabels }} - {{- toYaml . | nindent 4}} - {{- end }} - {{- with .service.labels }} - {{- toYaml . | nindent 4}} - {{- end }} - annotations: - {{- with $.Values.loki.serviceAnnotations }} - {{- toYaml . | nindent 4}} - {{- end }} - {{- with .service.annotations }} - {{- toYaml . | nindent 4}} - {{- end }} -spec: - type: ClusterIP - ports: - - name: http-metrics - port: 3500 - targetPort: http-metrics - protocol: TCP - selector: - {{- include "loki-canary.selectorLabels" $ | nindent 4 }} -{{- end -}} -{{- end -}} diff --git a/charts/loki/templates/loki-canary/serviceaccount.yaml b/charts/loki/templates/loki-canary/serviceaccount.yaml deleted file mode 100644 index 2c1f79a..0000000 --- a/charts/loki/templates/loki-canary/serviceaccount.yaml +++ /dev/null @@ -1,21 +0,0 @@ -{{- with .Values.lokiCanary -}} -{{- if .enabled -}} ---- -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ include "loki-canary.fullname" $ }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "loki-canary.labels" $ | nindent 4 }} - {{- with .annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -automountServiceAccountToken: {{ $.Values.serviceAccount.automountServiceAccountToken }} -{{- with $.Values.serviceAccount.imagePullSecrets }} -imagePullSecrets: - {{- toYaml . | nindent 2 }} -{{- end }} -{{- end }} -{{- end }} diff --git a/charts/loki/templates/memcached/_memcached-statefulset.tpl b/charts/loki/templates/memcached/_memcached-statefulset.tpl deleted file mode 100644 index cb798e5..0000000 --- a/charts/loki/templates/memcached/_memcached-statefulset.tpl +++ /dev/null @@ -1,180 +0,0 @@ -{{/* -memcached StatefulSet -Params: - ctx = . context - 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 convetion and k8s components are named with snake case. -*/}} -{{- define "loki.memcached.statefulSet" -}} -{{ with (index $.ctx.Values $.valuesSection) }} -{{- if .enabled -}} -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: {{ include "loki.resourceName" (dict "ctx" $.ctx "component" $.component) }} - labels: - {{- include "loki.labels" $.ctx | nindent 4 }} - app.kubernetes.io/component: "memcached-{{ $.component }}" - name: "memcached-{{ $.component }}" - annotations: - {{- toYaml .annotations | nindent 4 }} - namespace: {{ $.ctx.Release.Namespace | quote }} -spec: - podManagementPolicy: {{ .podManagementPolicy }} - replicas: {{ .replicas }} - selector: - matchLabels: - {{- include "loki.selectorLabels" $.ctx | nindent 6 }} - app.kubernetes.io/component: "memcached-{{ $.component }}" - name: "memcached-{{ $.component }}" - updateStrategy: - {{- toYaml .statefulStrategy | nindent 4 }} - serviceName: {{ template "loki.fullname" $.ctx }}-{{ $.component }} - - template: - metadata: - labels: - {{- include "loki.selectorLabels" $.ctx | nindent 8 }} - app.kubernetes.io/component: "memcached-{{ $.component }}" - name: "memcached-{{ $.component }}" - {{- 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: {{ template "loki.serviceAccountName" $.ctx }} - {{- if .priorityClassName }} - priorityClassName: {{ .priorityClassName }} - {{- end }} - securityContext: - {{- toYaml $.ctx.Values.memcached.podSecurityContext | nindent 8 }} - 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 - {{- with $.ctx.Values.memcached.image }} - image: {{ .repository }}:{{ .tag }} - imagePullPolicy: {{ .pullPolicy }} - {{- end }} - 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: 500m - memory: {{ $requestMemory }}Mi - {{- 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 }} - - {{- if $.ctx.Values.memcachedExporter.enabled }} - - name: exporter - {{- with $.ctx.Values.memcachedExporter.image }} - image: {{ .repository}}:{{ .tag }} - imagePullPolicy: {{ .pullPolicy }} - {{- end }} - 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 }} - securityContext: - {{- toYaml $.ctx.Values.memcachedExporter.containerSecurityContext | nindent 12 }} - {{- if .extraVolumeMounts }} - volumeMounts: - {{- toYaml .extraVolumeMounts | nindent 12 }} - {{- end }} - {{- end }} - {{- if .persistence.enabled }} - volumeClaimTemplates: - - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: data - spec: - accessModes: [ "ReadWriteOnce" ] - {{- with .persistence.storageClass }} - storageClassName: {{ if (eq "-" .) }}""{{ else }}{{ . }}{{ end }} - {{- end }} - resources: - requests: - storage: {{ .persistence.storageSize | quote }} - {{- end }} -{{- end -}} -{{- end -}} -{{- end -}} - diff --git a/charts/loki/templates/memcached/_memcached-svc.tpl b/charts/loki/templates/memcached/_memcached-svc.tpl deleted file mode 100644 index 8574151..0000000 --- a/charts/loki/templates/memcached/_memcached-svc.tpl +++ /dev/null @@ -1,42 +0,0 @@ -{{/* -memcached Service -Params: - ctx = . context - 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 convetion and k8s components are named with snake case. -*/}} -{{- define "loki.memcached.service" -}} -{{ with (index $.ctx.Values $.valuesSection) }} -{{- if .enabled -}} -apiVersion: v1 -kind: Service -metadata: - name: {{ include "loki.resourceName" (dict "ctx" $.ctx "component" $.component) }} - labels: - {{- include "loki.labels" $.ctx | nindent 4 }} - app.kubernetes.io/component: "memcached-{{ $.component }}" - {{- with .service.labels }} - {{- toYaml . | nindent 4 }} - {{- end }} - annotations: - {{- toYaml .service.annotations | nindent 4 }} - namespace: {{ $.ctx.Release.Namespace | quote }} -spec: - type: ClusterIP - clusterIP: None - ports: - - name: memcached-client - port: {{ .port }} - targetPort: {{ .port }} - {{ if $.ctx.Values.memcachedExporter.enabled -}} - - name: http-metrics - port: 9150 - targetPort: 9150 - {{ end }} - selector: - {{- include "loki.selectorLabels" $.ctx | nindent 4 }} - app.kubernetes.io/component: "memcached-{{ $.component }}" -{{- end -}} -{{- end -}} -{{- end -}} diff --git a/charts/loki/templates/monitoring/_helpers-monitoring.tpl b/charts/loki/templates/monitoring/_helpers-monitoring.tpl deleted file mode 100644 index cb693e4..0000000 --- a/charts/loki/templates/monitoring/_helpers-monitoring.tpl +++ /dev/null @@ -1,47 +0,0 @@ -{{/* -Client definition for LogsInstance -*/}} -{{- define "loki.logsInstanceClient" -}} -{{- $isSingleBinary := eq (include "loki.deployment.isSingleBinary" .) "true" -}} -{{- $url := printf "http://%s.%s.svc.%s:%s/loki/api/v1/push" (include "loki.writeFullname" .) .Release.Namespace .Values.global.clusterDomain ( .Values.loki.server.http_listen_port | toString ) }} -{{- if $isSingleBinary }} - {{- $url = printf "http://%s.%s.svc.%s:%s/loki/api/v1/push" (include "loki.singleBinaryFullname" .) .Release.Namespace .Values.global.clusterDomain ( .Values.loki.server.http_listen_port | toString ) }} -{{- else if .Values.gateway.enabled -}} - {{- $url = printf "http://%s.%s.svc.%s/loki/api/v1/push" (include "loki.gatewayFullname" .) .Release.Namespace .Values.global.clusterDomain }} -{{- end -}} -- url: {{ $url }} - externalLabels: - cluster: {{ include "loki.clusterLabel" . }} - {{- if .Values.enterprise.enabled }} - basicAuth: - username: - name: {{ include "enterprise-logs.selfMonitoringTenantSecret" . }} - key: username - password: - name: {{ include "enterprise-logs.selfMonitoringTenantSecret" . }} - key: password - {{- else if .Values.loki.auth_enabled }} - tenantId: {{ .Values.monitoring.selfMonitoring.tenant.name | quote }} - {{- end }} -{{- end -}} - -{{/* -Convert a recording rule group to yaml -*/}} -{{- define "loki.ruleGroupToYaml" -}} -{{- range . }} -- name: {{ .name }} - rules: - {{- toYaml .rules | nindent 4 }} -{{- end }} -{{- end }} - -{{/* -GrafanaAgent priority class name -*/}} -{{- define "grafana-agent.priorityClassName" -}} -{{- $pcn := coalesce .Values.global.priorityClassName .Values.monitoring.selfMonitoring.grafanaAgent.priorityClassName -}} -{{- if $pcn }} -priorityClassName: {{ $pcn }} -{{- end }} -{{- end }} diff --git a/charts/loki/templates/monitoring/dashboards/_helpers-dashboards.tpl b/charts/loki/templates/monitoring/dashboards/_helpers-dashboards.tpl deleted file mode 100644 index 00fd722..0000000 --- a/charts/loki/templates/monitoring/dashboards/_helpers-dashboards.tpl +++ /dev/null @@ -1,6 +0,0 @@ -{{/* -dashboards name -*/}} -{{- define "loki.dashboardsName" -}} -{{ include "loki.name" . }}-dashboards -{{- end }} diff --git a/charts/loki/templates/monitoring/dashboards/configmap-1.yaml b/charts/loki/templates/monitoring/dashboards/configmap-1.yaml deleted file mode 100644 index 6352f25..0000000 --- a/charts/loki/templates/monitoring/dashboards/configmap-1.yaml +++ /dev/null @@ -1,30 +0,0 @@ -{{- with .Values.monitoring.dashboards }} -{{- if .enabled }} ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ include "loki.dashboardsName" $ }}-1 - namespace: {{ .namespace | default $.Release.Namespace }} - labels: - {{- include "loki.labels" $ | nindent 4 }} - {{- with .labels }} - {{- toYaml . | nindent 4 }} - {{- end }} - {{- with .annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -data: - "loki-chunks.json": | - {{ $.Files.Get "src/dashboards/loki-chunks.json" | fromJson | toJson }} - "loki-deletion.json": | - {{ $.Files.Get "src/dashboards/loki-deletion.json" | fromJson | toJson }} - "loki-logs.json": | - {{ $.Files.Get "src/dashboards/loki-logs.json" | fromJson | toJson }} - "loki-mixin-recording-rules.json": | - {{ $.Files.Get "src/dashboards/loki-mixin-recording-rules.json" | fromJson | toJson }} - "loki-operational.json": | - {{ $.Files.Get "src/dashboards/loki-operational.json" | fromJson | toJson }} -{{- end -}} -{{- end -}} diff --git a/charts/loki/templates/monitoring/dashboards/configmap-2.yaml b/charts/loki/templates/monitoring/dashboards/configmap-2.yaml deleted file mode 100644 index 67d3cf4..0000000 --- a/charts/loki/templates/monitoring/dashboards/configmap-2.yaml +++ /dev/null @@ -1,30 +0,0 @@ -{{- with .Values.monitoring.dashboards }} -{{- if .enabled }} ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ include "loki.dashboardsName" $ }}-2 - namespace: {{ .namespace | default $.Release.Namespace }} - labels: - {{- include "loki.labels" $ | nindent 4 }} - {{- with .labels }} - {{- toYaml . | nindent 4 }} - {{- end }} - {{- with .annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -data: - "loki-reads-resources.json": | - {{ $.Files.Get "src/dashboards/loki-reads-resources.json" | fromJson | toJson }} - "loki-reads.json": | - {{ $.Files.Get "src/dashboards/loki-reads.json" | fromJson | toJson }} - "loki-retention.json": | - {{ $.Files.Get "src/dashboards/loki-retention.json" | fromJson | toJson }} - "loki-writes-resources.json": | - {{ $.Files.Get "src/dashboards/loki-writes-resources.json" | fromJson | toJson }} - "loki-writes.json": | - {{ $.Files.Get "src/dashboards/loki-writes.json" | fromJson | toJson }} -{{- end -}} -{{- end -}} diff --git a/charts/loki/templates/monitoring/grafana-agent.yaml b/charts/loki/templates/monitoring/grafana-agent.yaml deleted file mode 100644 index a047e5f..0000000 --- a/charts/loki/templates/monitoring/grafana-agent.yaml +++ /dev/null @@ -1,100 +0,0 @@ -{{- if .Values.monitoring.selfMonitoring.enabled }} -{{- with .Values.monitoring.selfMonitoring.grafanaAgent }} -apiVersion: monitoring.grafana.com/v1alpha1 -kind: GrafanaAgent -metadata: - name: {{ include "loki.fullname" $ }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "loki.labels" $ | nindent 4 }} - {{- with .labels }} - {{- toYaml . | nindent 4 }} - {{- end }} - {{- with .annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - serviceAccountName: {{ include "loki.fullname" $ }}-grafana-agent - enableConfigReadAPI: {{ .enableConfigReadAPI }} - {{- include "grafana-agent.priorityClassName" $ | nindent 2 }} - logs: - instanceSelector: - matchLabels: - {{- include "loki.selectorLabels" $ | nindent 8 }} - {{- with $.Values.monitoring.serviceMonitor}} - {{- if .metricsInstance.remoteWrite}} - metrics: - instanceSelector: - matchLabels: - {{- include "loki.selectorLabels" $ | nindent 8 }} - {{- end }} - {{- end }} - {{- with .resources }} - resources: - {{- toYaml . | nindent 4 }} - {{- end }} - {{- with .tolerations }} - tolerations: - {{- toYaml . | nindent 4 }} - {{- end }} - ---- - -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ include "loki.fullname" $ }}-grafana-agent - namespace: {{ .namespace | default $.Release.Namespace }} - ---- - -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: {{ include "loki.fullname" $ }}-grafana-agent -rules: -- apiGroups: - - "" - resources: - - nodes - - nodes/proxy - - nodes/metrics - - services - - endpoints - - pods - - events - verbs: - - get - - list - - watch -- apiGroups: - - networking.k8s.io - resources: - - ingresses - verbs: - - get - - list - - watch -- nonResourceURLs: - - /metrics - - /metrics/cadvisor - verbs: - - get - ---- - -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: {{ include "loki.fullname" $ }}-grafana-agent -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: {{ include "loki.fullname" $ }}-grafana-agent -subjects: -- kind: ServiceAccount - name: {{ include "loki.fullname" $ }}-grafana-agent - namespace: {{ .namespace | default $.Release.Namespace }} -{{- end}} -{{- end}} diff --git a/charts/loki/templates/monitoring/logs-instance.yaml b/charts/loki/templates/monitoring/logs-instance.yaml deleted file mode 100644 index 5ae1917..0000000 --- a/charts/loki/templates/monitoring/logs-instance.yaml +++ /dev/null @@ -1,30 +0,0 @@ -{{- if .Values.monitoring.selfMonitoring.enabled }} -{{- with .Values.monitoring.selfMonitoring.logsInstance }} -apiVersion: monitoring.grafana.com/v1alpha1 -kind: LogsInstance -metadata: - name: {{ include "loki.fullname" $ }} - namespace: {{ $.Release.Namespace }} - {{- with .annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} - labels: - {{- include "loki.labels" $ | nindent 4 }} - {{- with .labels }} - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - clients: - {{- include "loki.logsInstanceClient" $ | nindent 4}} - {{- with .clients}} - {{- toYaml . | nindent 4 }} - {{- end }} - - podLogsNamespaceSelector: {} - - podLogsSelector: - matchLabels: - {{- include "loki.selectorLabels" $ | nindent 6 }} -{{- end -}} -{{- end -}} \ No newline at end of file diff --git a/charts/loki/templates/monitoring/loki-alerts.yaml b/charts/loki/templates/monitoring/loki-alerts.yaml deleted file mode 100644 index f3333df..0000000 --- a/charts/loki/templates/monitoring/loki-alerts.yaml +++ /dev/null @@ -1,22 +0,0 @@ -{{- with .Values.monitoring.rules }} -{{- if and ($.Capabilities.APIVersions.Has "monitoring.coreos.com/v1/PrometheusRule") .enabled .alerting }} ---- -apiVersion: monitoring.coreos.com/v1 -kind: PrometheusRule -metadata: - labels: - {{- include "loki.labels" $ | nindent 4 }} - {{- with .labels }} - {{- toYaml . | nindent 4 }} - {{- end }} - {{- with .annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} - name: {{ include "loki.fullname" $ }}-loki-alerts - namespace: {{ .namespace | default $.Release.Namespace }} -spec: - groups: - {{- include "loki.ruleGroupToYaml" (tpl ($.Files.Get "src/alerts.yaml.tpl") $ | fromYaml).groups | indent 4 }} -{{- end }} -{{- end }} diff --git a/charts/loki/templates/monitoring/loki-rules.yaml b/charts/loki/templates/monitoring/loki-rules.yaml deleted file mode 100644 index f9eb392..0000000 --- a/charts/loki/templates/monitoring/loki-rules.yaml +++ /dev/null @@ -1,23 +0,0 @@ -{{- with .Values.monitoring.rules }} -{{- if and ($.Capabilities.APIVersions.Has "monitoring.coreos.com/v1/PrometheusRule") .enabled }} ---- -apiVersion: monitoring.coreos.com/v1 -kind: PrometheusRule -metadata: - labels: - {{- include "loki.labels" $ | nindent 4 }} - {{- with .labels }} - {{- toYaml . | nindent 4 }} - {{- end }} - {{- with .annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} - name: {{ include "loki.fullname" $ }}-loki-rules - namespace: {{ .namespace | default $.Release.Namespace }} -spec: - groups: - {{- include "loki.ruleGroupToYaml" (tpl ($.Files.Get "src/rules.yaml.tpl") $ | fromYaml).groups | indent 4 }} - {{- include "loki.ruleGroupToYaml" .additionalGroups | indent 4 }} -{{- end }} -{{- end }} diff --git a/charts/loki/templates/monitoring/metrics-instance.yaml b/charts/loki/templates/monitoring/metrics-instance.yaml deleted file mode 100644 index 82102c0..0000000 --- a/charts/loki/templates/monitoring/metrics-instance.yaml +++ /dev/null @@ -1,30 +0,0 @@ -{{- if .Values.monitoring.serviceMonitor.enabled }} -{{- with .Values.monitoring.serviceMonitor.metricsInstance }} -{{- if and ($.Capabilities.APIVersions.Has "monitoring.grafana.com/v1alpha1/MetricsInstance") .enabled }} -apiVersion: monitoring.grafana.com/v1alpha1 -kind: MetricsInstance -metadata: - name: {{ include "loki.fullname" $ }} - {{- with .annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} - labels: - {{- include "loki.labels" $ | nindent 4 }} - {{- with .labels }} - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - {{- with .remoteWrite}} - remoteWrite: - {{- toYaml . | nindent 4 }} - {{- end }} - - serviceMonitorNamespaceSelector: {} - - serviceMonitorSelector: - matchLabels: - {{- include "loki.selectorLabels" $ | nindent 6 }} -{{- end -}} -{{- end -}} -{{- end -}} diff --git a/charts/loki/templates/monitoring/pod-logs.yaml b/charts/loki/templates/monitoring/pod-logs.yaml deleted file mode 100644 index 317339d..0000000 --- a/charts/loki/templates/monitoring/pod-logs.yaml +++ /dev/null @@ -1,62 +0,0 @@ ---- -{{- if .Values.monitoring.selfMonitoring.enabled }} -{{- with .Values.monitoring.selfMonitoring.podLogs }} -apiVersion: {{ .apiVersion }} -kind: PodLogs -metadata: - name: {{ include "loki.fullname" $ }} - namespace: {{ $.Release.Namespace }} - {{- with .annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} - labels: - {{- include "loki.labels" $ | nindent 4 }} - {{- with .labels }} - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - pipelineStages: - - cri: { } - {{- with .additionalPipelineStages }} - {{- toYaml . | nindent 4 }} - {{- end }} - relabelings: - - action: replace - sourceLabels: - - __meta_kubernetes_pod_node_name - targetLabel: __host__ - - action: labelmap - regex: __meta_kubernetes_pod_label_(.+) - - action: replace - replacement: "$1" - separator: "-" - sourceLabels: - - __meta_kubernetes_pod_label_app_kubernetes_io_name - - __meta_kubernetes_pod_label_app_kubernetes_io_component - targetLabel: __service__ - - action: replace - replacement: "$1" - separator: "/" - sourceLabels: - - __meta_kubernetes_namespace - - __service__ - targetLabel: job - - action: replace - sourceLabels: - - __meta_kubernetes_pod_container_name - targetLabel: container - - action: replace - replacement: "{{ include "loki.clusterLabel" $ }}" - targetLabel: cluster - {{- with .relabelings }} - {{- toYaml . | nindent 4 }} - {{- end }} - namespaceSelector: - matchNames: - - {{ $.Release.Namespace }} - selector: - matchLabels: - {{- include "loki.selectorLabels" $ | nindent 6 }} -{{- end }} -{{- end }} diff --git a/charts/loki/templates/monitoring/servicemonitor.yaml b/charts/loki/templates/monitoring/servicemonitor.yaml deleted file mode 100644 index 856cee8..0000000 --- a/charts/loki/templates/monitoring/servicemonitor.yaml +++ /dev/null @@ -1,63 +0,0 @@ -{{- with .Values.monitoring.serviceMonitor }} -{{- if and ($.Capabilities.APIVersions.Has "monitoring.coreos.com/v1/ServiceMonitor") .enabled }} ---- -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - name: {{ include "loki.fullname" $ }} - namespace: {{ $.Release.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: - - sourceLabels: [job] - action: replace - replacement: "{{ $.Release.Namespace }}/$1" - targetLabel: job - - action: replace - replacement: "{{ include "loki.clusterLabel" $ }}" - targetLabel: cluster - {{- 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/charts/loki/templates/networkpolicy.yaml b/charts/loki/templates/networkpolicy.yaml deleted file mode 100644 index 9286edb..0000000 --- a/charts/loki/templates/networkpolicy.yaml +++ /dev/null @@ -1,203 +0,0 @@ -{{- if and (.Values.networkPolicy.enabled) (eq .Values.networkPolicy.flavor "kubernetes") }} ---- -apiVersion: networking.k8s.io/v1 -kind: NetworkPolicy -metadata: - name: {{ include "loki.name" . }}-namespace-only - namespace: {{ $.Release.Namespace }} - labels: - {{- include "loki.labels" . | nindent 4 }} -spec: - policyTypes: - - Ingress - - Egress - podSelector: {} - egress: - - to: - - podSelector: {} - ingress: - - from: - - podSelector: {} - ---- -apiVersion: networking.k8s.io/v1 -kind: NetworkPolicy -metadata: - name: {{ include "loki.name" . }}-egress-dns - namespace: {{ $.Release.Namespace }} - labels: - {{- include "loki.labels" . | nindent 4 }} -spec: - policyTypes: - - Egress - podSelector: - matchLabels: - {{- include "loki.selectorLabels" . | nindent 6 }} - egress: - - ports: - - port: dns - protocol: UDP - to: - - namespaceSelector: {} - ---- -apiVersion: networking.k8s.io/v1 -kind: NetworkPolicy -metadata: - name: {{ include "loki.name" . }}-ingress - namespace: {{ $.Release.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 - {{- end }} - matchLabels: - {{- include "loki.selectorLabels" . | nindent 6 }} - ingress: - - ports: - - port: http-metrics - 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.name" . }}-ingress-metrics - namespace: {{ $.Release.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 .Values.networkPolicy.metrics.cidrs }} - 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.name" . }}-egress-alertmanager - namespace: {{ $.Release.Namespace }} - labels: - {{- include "loki.labels" . | nindent 4 }} -spec: - policyTypes: - - Egress - podSelector: - matchLabels: - {{- include "loki.backendSelectorLabels" . | nindent 6 }} - 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.name" . }}-egress-external-storage - namespace: {{ $.Release.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 and .Values.networkPolicy.discovery.port (eq .Values.networkPolicy.flavor "kubernetes") }} ---- -apiVersion: networking.k8s.io/v1 -kind: NetworkPolicy -metadata: - name: {{ include "loki.name" . }}-egress-discovery - namespace: {{ $.Release.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/charts/loki/templates/overrides-exporter/_helpers-overrides-exporter.tpl b/charts/loki/templates/overrides-exporter/_helpers-overrides-exporter.tpl deleted file mode 100644 index 1baa60e..0000000 --- a/charts/loki/templates/overrides-exporter/_helpers-overrides-exporter.tpl +++ /dev/null @@ -1,32 +0,0 @@ -{{/* -overrides-exporter fullname -*/}} -{{- define "loki.overridesExporterFullname" -}} -{{ include "loki.fullname" . }}-overrides-exporter -{{- end }} - -{{/* -overrides-exporter common labels -*/}} -{{- define "loki.overridesExporterLabels" -}} -{{ include "loki.labels" . }} -app.kubernetes.io/component: overrides-exporter -{{- end }} - -{{/* -overrides-exporter selector labels -*/}} -{{- define "loki.overridesExporterSelectorLabels" -}} -{{ include "loki.selectorLabels" . }} -app.kubernetes.io/component: overrides-exporter -{{- end }} - -{{/* -overrides-exporter priority class name -*/}} -{{- define "loki.overridesExporterPriorityClassName" -}} -{{- $pcn := coalesce .Values.global.priorityClassName .Values.overridesExporter.priorityClassName -}} -{{- if $pcn }} -priorityClassName: {{ $pcn }} -{{- end }} -{{- end }} diff --git a/charts/loki/templates/overrides-exporter/deployment-overrides-exporter.yaml b/charts/loki/templates/overrides-exporter/deployment-overrides-exporter.yaml deleted file mode 100644 index f214ce5..0000000 --- a/charts/loki/templates/overrides-exporter/deployment-overrides-exporter.yaml +++ /dev/null @@ -1,143 +0,0 @@ -{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} -{{- if and $isDistributed .Values.overridesExporter.enabled }} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "loki.overridesExporterFullname" . }} - namespace: {{ .Release.Namespace }} - labels: - {{- include "loki.overridesExporterLabels" . | nindent 4 }} - {{- with .Values.loki.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - replicas: {{ .Values.overridesExporter.replicas }} - strategy: - rollingUpdate: - maxSurge: 0 - maxUnavailable: 1 - revisionHistoryLimit: {{ .Values.loki.revisionHistoryLimit }} - selector: - matchLabels: - {{- include "loki.overridesExporterSelectorLabels" . | nindent 6 }} - template: - metadata: - annotations: - {{- include "loki.config.checksum" . | nindent 8 }} - {{- with .Values.loki.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.overridesExporter.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - {{- include "loki.overridesExporterLabels" . | nindent 8 }} - app.kubernetes.io/part-of: memberlist - {{- with merge (dict) .Values.loki.podLabels .Values.overridesExporter.podLabels }} - {{- toYaml . | nindent 8 }} - {{- end }} - spec: - {{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.Version }} - {{- with .Values.overridesExporter.topologySpreadConstraints }} - topologySpreadConstraints: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- end }} - serviceAccountName: {{ include "loki.serviceAccountName" . }} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.overridesExporter.hostAliases }} - hostAliases: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- include "loki.overridesExporterPriorityClassName" . | nindent 6 }} - securityContext: - {{- toYaml .Values.loki.podSecurityContext | nindent 8 }} - terminationGracePeriodSeconds: {{ .Values.overridesExporter.terminationGracePeriodSeconds }} - containers: - - name: overrides-exporter - image: {{ include "loki.image" . }} - imagePullPolicy: {{ .Values.loki.image.pullPolicy }} - {{- if or .Values.loki.command .Values.overridesExporter.command }} - command: - - {{ coalesce .Values.overridesExporter.command .Values.loki.command | quote }} - {{- end }} - args: - - -config.file=/etc/loki/config/config.yaml - - -target=overrides-exporter - {{- with (concat .Values.global.extraArgs .Values.overridesExporter.extraArgs) | uniq }} - {{- toYaml . | nindent 12 }} - {{- end }} - ports: - - name: http-metrics - containerPort: 3100 - protocol: TCP - - name: grpc - containerPort: 9095 - protocol: TCP - - name: http-memberlist - containerPort: 7946 - protocol: TCP - {{- with (concat .Values.global.extraEnv .Values.overridesExporter.extraEnv) | uniq }} - env: - {{- toYaml . | nindent 12 }} - {{- end }} - {{- with (concat .Values.global.extraEnvFrom .Values.overridesExporter.extraEnvFrom) | uniq }} - envFrom: - {{- toYaml . | nindent 12 }} - {{- end }} - securityContext: - {{- toYaml .Values.loki.containerSecurityContext | nindent 12 }} - readinessProbe: - {{- toYaml .Values.loki.readinessProbe | nindent 12 }} - volumeMounts: - - name: config - mountPath: /etc/loki/config - - name: runtime-config - mountPath: /etc/loki/runtime-config - {{- if .Values.enterprise.enabled }} - - name: license - mountPath: /etc/loki/license - {{- end }} - {{- with (concat .Values.global.extraVolumeMounts .Values.overridesExporter.extraVolumeMounts) | uniq }} - {{- toYaml . | nindent 12 }} - {{- end }} - resources: - {{- toYaml .Values.overridesExporter.resources | nindent 12 }} - {{- if .Values.overridesExporter.extraContainers }} - {{- toYaml .Values.overridesExporter.extraContainers | nindent 8}} - {{- end }} - {{- with .Values.overridesExporter.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.overridesExporter.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.overridesExporter.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} - volumes: - - name: config - {{- include "loki.configVolume" . | nindent 10 }} - - name: runtime-config - configMap: - name: {{ template "loki.name" . }}-runtime - {{- if .Values.enterprise.enabled }} - - name: license - secret: - {{- if .Values.enterprise.useExternalLicense }} - secretName: {{ .Values.enterprise.externalLicenseName }} - {{- else }} - secretName: enterprise-logs-license - {{- end }} - {{- end }} - {{- with (concat .Values.global.extraVolumes .Values.overridesExporter.extraVolumes) | uniq }} - {{- toYaml . | nindent 8 }} - {{- end }} -{{- end -}} diff --git a/charts/loki/templates/overrides-exporter/poddisruptionbudget-overrides-exporter.yaml b/charts/loki/templates/overrides-exporter/poddisruptionbudget-overrides-exporter.yaml deleted file mode 100644 index d8be6f4..0000000 --- a/charts/loki/templates/overrides-exporter/poddisruptionbudget-overrides-exporter.yaml +++ /dev/null @@ -1,21 +0,0 @@ -{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} -{{- if and $isDistributed .Values.overridesExporter.enabled (gt (int .Values.overridesExporter.replicas) 1) }} -{{- if kindIs "invalid" .Values.overridesExporter.maxUnavailable }} -{{- fail "`.Values.overridesExporter.maxUnavailable` must be set when `.Values.overridesExporter.replicas` is greater than 1." }} -{{- else }} -apiVersion: {{ include "loki.pdb.apiVersion" . }} -kind: PodDisruptionBudget -metadata: - name: {{ include "loki.overridesExporterFullname" . }} - namespace: {{ .Release.Namespace }} - labels: - {{- include "loki.overridesExporterLabels" . | nindent 4 }} -spec: - selector: - matchLabels: - {{- include "loki.overridesExporterSelectorLabels" . | nindent 6 }} - {{- with .Values.overridesExporter.maxUnavailable }} - maxUnavailable: {{ . }} - {{- end }} -{{- end }} -{{- end }} diff --git a/charts/loki/templates/overrides-exporter/service-overrides-exporter-headless.yaml b/charts/loki/templates/overrides-exporter/service-overrides-exporter-headless.yaml deleted file mode 100644 index a645a8e..0000000 --- a/charts/loki/templates/overrides-exporter/service-overrides-exporter-headless.yaml +++ /dev/null @@ -1,39 +0,0 @@ -{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} -{{- if and $isDistributed .Values.overridesExporter.enabled }} -apiVersion: v1 -kind: Service -metadata: - name: {{ include "loki.overridesExporterFullname" . }}-headless - namespace: {{ .Release.Namespace }} - labels: - {{- include "loki.overridesExporterLabels" . | nindent 4 }} - {{- with .Values.overridesExporter.serviceLabels }} - {{- toYaml . | nindent 4 }} - {{- end }} - prometheus.io/service-monitor: "false" - annotations: - {{- with .Values.loki.serviceAnnotations }} - {{- toYaml . | nindent 4}} - {{- end }} - {{- with .Values.overridesExporter.serviceAnnotations }} - {{- toYaml . | nindent 4}} - {{- end }} -spec: - clusterIP: None - type: ClusterIP - publishNotReadyAddresses: true - ports: - - name: http-metrics - port: 3100 - targetPort: http-metrics - protocol: TCP - - name: grpc - port: 9095 - targetPort: grpc - protocol: TCP - {{- if .Values.overridesExporter.appProtocol.grpc }} - appProtocol: {{ .Values.overridesExporter.appProtocol.grpc }} - {{- end }} - selector: - {{- include "loki.overridesExporterSelectorLabels" . | nindent 4 }} -{{- end -}} diff --git a/charts/loki/templates/overrides-exporter/service-overrides-exporter.yaml b/charts/loki/templates/overrides-exporter/service-overrides-exporter.yaml deleted file mode 100644 index 847aa2f..0000000 --- a/charts/loki/templates/overrides-exporter/service-overrides-exporter.yaml +++ /dev/null @@ -1,37 +0,0 @@ -{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} -{{- if and $isDistributed .Values.overridesExporter.enabled }} -apiVersion: v1 -kind: Service -metadata: - name: {{ include "loki.overridesExporterFullname" . }} - namespace: {{ .Release.Namespace }} - labels: - {{- include "loki.overridesExporterLabels" . | nindent 4 }} - {{- with .Values.overridesExporter.serviceLabels }} - {{- toYaml . | nindent 4 }} - {{- end }} - annotations: - {{- with .Values.loki.serviceAnnotations }} - {{- toYaml . | nindent 4}} - {{- end }} - {{- with .Values.overridesExporter.serviceAnnotations }} - {{- toYaml . | nindent 4}} - {{- end }} -spec: - type: ClusterIP - publishNotReadyAddresses: true - ports: - - name: http-metrics - port: 3100 - targetPort: http-metrics - protocol: TCP - - name: grpc - port: 9095 - targetPort: grpc - protocol: TCP - {{- if .Values.overridesExporter.appProtocol.grpc }} - appProtocol: {{ .Values.overridesExporter.appProtocol.grpc }} - {{- end }} - selector: - {{- include "loki.overridesExporterSelectorLabels" . | nindent 4 }} -{{- end -}} diff --git a/charts/loki/templates/pattern-ingester/_helpers-pattern-ingester.tpl b/charts/loki/templates/pattern-ingester/_helpers-pattern-ingester.tpl deleted file mode 100644 index 5477214..0000000 --- a/charts/loki/templates/pattern-ingester/_helpers-pattern-ingester.tpl +++ /dev/null @@ -1,58 +0,0 @@ -{{/* -pattern ingester fullname -*/}} -{{- define "loki.patternIngesterFullname" -}} -{{ include "loki.fullname" . }}-pattern-ingester -{{- end }} - -{{/* -pattern ingester common labels -*/}} -{{- define "loki.patternIngesterLabels" -}} -{{ include "loki.labels" . }} -app.kubernetes.io/component: pattern-ingester -{{- end }} - -{{/* -pattern ingester selector labels -*/}} -{{- define "loki.patternIngesterSelectorLabels" -}} -{{ include "loki.selectorLabels" . }} -app.kubernetes.io/component: pattern-ingester -{{- end }} - -{{/* -pattern ingester readinessProbe -*/}} -{{- define "loki.patternIngester.readinessProbe" -}} -{{- with .Values.patternIngester.readinessProbe }} -readinessProbe: - {{- toYaml . | nindent 2 }} -{{- else }} -{{- with .Values.loki.readinessProbe }} -readinessProbe: - {{- toYaml . | nindent 2 }} -{{- end }} -{{- end }} -{{- end -}} - -{{/* -pattern ingester priority class name -*/}} -{{- define "loki.patternIngesterPriorityClassName" }} -{{- $pcn := coalesce .Values.global.priorityClassName .Values.patternIngester.priorityClassName -}} -{{- if $pcn }} -priorityClassName: {{ $pcn }} -{{- end }} -{{- end }} - -{{/* -Create the name of the pattern ingester service account -*/}} -{{- define "loki.patternIngesterServiceAccountName" -}} -{{- if .Values.patternIngester.serviceAccount.create -}} - {{ default (print (include "loki.serviceAccountName" .) "-pattern-ingester") .Values.patternIngester.serviceAccount.name }} -{{- else -}} - {{ default (include "loki.serviceAccountName" .) .Values.patternIngester.serviceAccount.name }} -{{- end -}} -{{- end -}} diff --git a/charts/loki/templates/pattern-ingester/statefulset-pattern-ingester.yaml b/charts/loki/templates/pattern-ingester/statefulset-pattern-ingester.yaml deleted file mode 100644 index 7756b40..0000000 --- a/charts/loki/templates/pattern-ingester/statefulset-pattern-ingester.yaml +++ /dev/null @@ -1,186 +0,0 @@ -{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} -{{- if $isDistributed }} -{{- if (gt (int .Values.patternIngester.replicas) 0) -}} -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: {{ include "loki.patternIngesterFullname" . }} - namespace: {{ .Release.Namespace }} - labels: - {{- include "loki.patternIngesterLabels" . | nindent 4 }} - {{- with .Values.loki.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - replicas: {{ .Values.patternIngester.replicas }} - podManagementPolicy: Parallel - updateStrategy: - rollingUpdate: - partition: 0 - serviceName: {{ include "loki.patternIngesterFullname" . }}-headless - revisionHistoryLimit: {{ .Values.loki.revisionHistoryLimit }} - {{- if and (semverCompare ">= 1.23-0" (include "loki.kubeVersion" .)) (.Values.patternIngester.persistence.enableStatefulSetAutoDeletePVC) }} - persistentVolumeClaimRetentionPolicy: - whenDeleted: {{ .Values.patternIngester.persistence.whenDeleted }} - whenScaled: {{ .Values.patternIngester.persistence.whenScaled }} - {{- end }} - selector: - matchLabels: - {{- include "loki.patternIngesterSelectorLabels" . | nindent 6 }} - template: - metadata: - annotations: - {{- include "loki.config.checksum" . | nindent 8 }} - {{- with .Values.loki.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.patternIngester.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - {{- include "loki.patternIngesterLabels" . | nindent 8 }} - app.kubernetes.io/part-of: memberlist - {{- with merge (dict) .Values.loki.podLabels .Values.patternIngester.podLabels }} - {{- toYaml . | nindent 8 }} - {{- end }} - spec: - serviceAccountName: {{ include "loki.serviceAccountName" . }} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.patternIngester.hostAliases }} - hostAliases: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- include "loki.patternIngesterPriorityClassName" . | nindent 6 }} - securityContext: - {{- toYaml .Values.loki.podSecurityContext | nindent 8 }} - terminationGracePeriodSeconds: {{ .Values.patternIngester.terminationGracePeriodSeconds }} - {{- with .Values.patternIngester.initContainers }} - initContainers: - {{- toYaml . | nindent 8 }} - {{- end }} - containers: - - name: pattern-ingester - image: {{ include "loki.image" . }} - imagePullPolicy: {{ .Values.loki.image.pullPolicy }} - {{- if or .Values.loki.command .Values.patternIngester.command }} - command: - - {{ coalesce .Values.patternIngester.command .Values.loki.command | quote }} - {{- end }} - args: - - -config.file=/etc/loki/config/config.yaml - - -target=pattern-ingester - {{- with (concat .Values.global.extraArgs .Values.patternIngester.extraArgs) | uniq }} - {{- toYaml . | nindent 12 }} - {{- end }} - ports: - - name: http-metrics - containerPort: 3100 - protocol: TCP - - name: grpc - containerPort: 9095 - protocol: TCP - - name: http-memberlist - containerPort: 7946 - protocol: TCP - {{- with (concat .Values.global.extraEnv .Values.patternIngester.extraEnv) | uniq }} - env: - {{- toYaml . | nindent 12 }} - {{- end }} - {{- with (concat .Values.global.extraEnvFrom .Values.patternIngester.extraEnvFrom) | uniq }} - envFrom: - {{- toYaml . | nindent 12 }} - {{- end }} - securityContext: - {{- toYaml .Values.loki.containerSecurityContext | nindent 12 }} - {{- include "loki.patternIngester.readinessProbe" . | nindent 10 }} - volumeMounts: - - name: temp - mountPath: /tmp - - name: config - mountPath: /etc/loki/config - - name: runtime-config - mountPath: /etc/loki/runtime-config - - name: data - mountPath: /var/loki - {{- if .Values.enterprise.enabled }} - - name: license - mountPath: /etc/loki/license - {{- end }} - {{- with (concat .Values.global.extraVolumeMounts .Values.patternIngester.extraVolumeMounts) | uniq }} - {{- toYaml . | nindent 12 }} - {{- end }} - {{- with .Values.patternIngester.resources }} - resources: - {{- toYaml . | nindent 12 }} - {{- end }} - {{- if .Values.patternIngester.extraContainers }} - {{- toYaml .Values.patternIngester.extraContainers | nindent 8}} - {{- end }} - {{- with .Values.patternIngester.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.patternIngester.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.patternIngester.topologySpreadConstraints }} - topologySpreadConstraints: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.patternIngester.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} - volumes: - - name: temp - emptyDir: {} - - name: config - {{- include "loki.configVolume" . | nindent 10 }} - - name: runtime-config - configMap: - name: {{ template "loki.name" . }}-runtime - {{- if .Values.enterprise.enabled }} - - name: license - secret: - {{- if .Values.enterprise.useExternalLicense }} - secretName: {{ .Values.enterprise.externalLicenseName }} - {{- else }} - secretName: enterprise-logs-license - {{- end }} - {{- end }} - {{- if not .Values.patternIngester.persistence.enabled }} - - name: data - emptyDir: {} - {{- end }} - {{- with (concat .Values.global.extraVolumes .Values.patternIngester.extraVolumes) | uniq }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- if .Values.patternIngester.persistence.enabled }} - volumeClaimTemplates: - {{- range .Values.patternIngester.persistence.claims }} - - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: {{ .name }} - {{- with .annotations }} - annotations: - {{- . | toYaml | nindent 10 }} - {{- end }} - spec: - accessModes: - - ReadWriteOnce - {{- with .storageClass }} - storageClassName: {{ if (eq "-" .) }}""{{ else }}{{ . }}{{ end }} - {{- end }} - resources: - requests: - storage: {{ .size | quote }} - {{- end }} - {{- end }} -{{- end -}} -{{- end -}} diff --git a/charts/loki/templates/podsecuritypolicy.yaml b/charts/loki/templates/podsecuritypolicy.yaml deleted file mode 100644 index 05470d9..0000000 --- a/charts/loki/templates/podsecuritypolicy.yaml +++ /dev/null @@ -1,41 +0,0 @@ -{{- if .Values.rbac.pspEnabled }} -apiVersion: policy/v1beta1 -kind: PodSecurityPolicy -metadata: - name: {{ include "loki.name" . }} - labels: - {{- include "loki.labels" . | nindent 4 }} -{{- if .Values.rbac.pspAnnotations }} - annotations: -{{ toYaml .Values.rbac.pspAnnotations | indent 4 }} -{{- end }} -spec: - privileged: false - allowPrivilegeEscalation: false - volumes: - - 'configMap' - - 'emptyDir' - - 'persistentVolumeClaim' - - 'secret' - - 'projected' - hostNetwork: false - hostIPC: false - hostPID: false - runAsUser: - rule: 'MustRunAsNonRoot' - seLinux: - rule: 'RunAsAny' - supplementalGroups: - rule: 'MustRunAs' - ranges: - - min: 1 - max: 65535 - fsGroup: - rule: 'MustRunAs' - ranges: - - min: 1 - max: 65535 - readOnlyRootFilesystem: true - requiredDropCapabilities: - - ALL -{{- end }} diff --git a/charts/loki/templates/provisioner/_helpers.yaml b/charts/loki/templates/provisioner/_helpers.yaml deleted file mode 100644 index 8b04b07..0000000 --- a/charts/loki/templates/provisioner/_helpers.yaml +++ /dev/null @@ -1,32 +0,0 @@ -{{/* -provisioner fullname -*/}} -{{- define "enterprise-logs.provisionerFullname" -}} -{{ include "loki.name" . }}-provisioner -{{- end }} - -{{/* -provisioner common labels -*/}} -{{- define "enterprise-logs.provisionerLabels" -}} -{{ include "loki.labels" . }} -app.kubernetes.io/component: provisioner -{{- end }} - -{{/* -provisioner selector labels -*/}} -{{- define "enterprise-logs.provisionerSelectorLabels" -}} -{{ include "loki.selectorLabels" . }} -app.kubernetes.io/component: provisioner -{{- end }} - -{{/* -provisioner image name -*/}} -{{- define "enterprise-logs.provisionerImage" -}} -{{- $dict := dict "service" .Values.enterprise.provisioner.image "global" .Values.global.image "defaultVersion" "latest" -}} -{{- include "loki.baseImage" $dict -}} -{{- end -}} - - diff --git a/charts/loki/templates/provisioner/job-provisioner.yaml b/charts/loki/templates/provisioner/job-provisioner.yaml deleted file mode 100644 index 2609f21..0000000 --- a/charts/loki/templates/provisioner/job-provisioner.yaml +++ /dev/null @@ -1,147 +0,0 @@ -{{ if and .Values.enterprise.provisioner.enabled .Values.enterprise.enabled }} ---- -apiVersion: batch/v1 -kind: Job -metadata: - name: {{ template "enterprise-logs.provisionerFullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "enterprise-logs.provisionerLabels" . | nindent 4 }} - {{- with .Values.enterprise.provisioner.labels }} - {{- toYaml . | nindent 4 }} - {{- end }} - annotations: - {{- with .Values.enterprise.provisioner.annotations }} - {{- toYaml . | nindent 4 }} - {{- end }} - "helm.sh/hook": {{ .Values.enterprise.provisioner.hookType | default "post-install" | quote }} - "helm.sh/hook-weight": "15" -spec: - backoffLimit: 6 - completions: 1 - parallelism: 1 - template: - metadata: - labels: - {{- include "enterprise-logs.provisionerSelectorLabels" . | nindent 8 }} - {{- with .Values.enterprise.provisioner.labels }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.enterprise.provisioner.annotations }} - annotations: - {{- toYaml . | nindent 8 }} - {{- end }} - spec: - {{- with .Values.enterprise.provisioner.priorityClassName }} - priorityClassName: {{ . }} - {{- end }} - securityContext: - {{- toYaml .Values.enterprise.provisioner.securityContext | nindent 8 }} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - initContainers: - - name: provisioner - image: {{ template "enterprise-logs.provisionerImage" . }} - imagePullPolicy: {{ .Values.enterprise.provisioner.image.pullPolicy }} - command: - - /bin/sh - - -exuc - - | - {{- range .Values.enterprise.provisioner.additionalTenants }} - /usr/bin/enterprise-logs-provisioner \ - -bootstrap-path=/bootstrap \ - -cluster-name={{ include "loki.clusterName" $ }} \ - -gel-url={{ include "loki.address" $ }} \ - -instance={{ .name }} \ - -access-policy=write-{{ .name }}:{{ .name }}:logs:write \ - -access-policy=read-{{ .name }}:{{ .name }}:logs:read \ - -token=write-{{ .name }} \ - -token=read-{{ .name }} - {{- end -}} - - {{- with .Values.monitoring.selfMonitoring.tenant }} - /usr/bin/enterprise-logs-provisioner \ - -bootstrap-path=/bootstrap \ - -cluster-name={{ include "loki.clusterName" $ }} \ - -gel-url={{ include "loki.address" $ }} \ - -instance={{ .name }} \ - -access-policy=self-monitoring:{{ .name }}:logs:write,logs:read \ - -token=self-monitoring - {{- end }} - volumeMounts: - {{- with .Values.enterprise.provisioner.extraVolumeMounts }} - {{ toYaml . | nindent 12 }} - {{- end }} - - name: bootstrap - mountPath: /bootstrap - - name: admin-token - mountPath: /bootstrap/token - subPath: token - {{- with .Values.enterprise.provisioner.env }} - env: - {{ toYaml . | nindent 12 }} - {{- end }} - containers: - - name: create-secret - image: {{ include "loki.kubectlImage" . }} - imagePullPolicy: {{ .Values.kubectlImage.pullPolicy }} - command: - - /bin/bash - - -exuc - - | - # In case, the admin resources have already been created, the provisioner job - # does not write the token files to the bootstrap mount. - # Therefore, secrets are only created if the respective token files exist. - # Note: the following bash commands should always return a success status code. - # Therefore, in case the token file does not exist, the first clause of the - # or-operation is successful. - {{- range .Values.enterprise.provisioner.additionalTenants }} - ! test -s /bootstrap/token-write-{{ .name }} || \ - kubectl --namespace "{{ .secretNamespace }}" create secret generic "{{ include "enterprise-logs.provisionedSecretPrefix" $ }}-{{ .name }}" \ - --from-literal=token-write="$(cat /bootstrap/token-write-{{ .name }})" \ - --from-literal=token-read="$(cat /bootstrap/token-read-{{ .name }})" - {{- end }} - {{- $namespace := $.Release.Namespace }} - {{- with .Values.monitoring.selfMonitoring.tenant }} - {{- $secretNamespace := tpl .secretNamespace $ }} - ! test -s /bootstrap/token-self-monitoring || \ - kubectl --namespace "{{ $namespace }}" create secret generic "{{ include "enterprise-logs.selfMonitoringTenantSecret" $ }}" \ - --from-literal=username="{{ .name }}" \ - --from-literal=password="$(cat /bootstrap/token-self-monitoring)" - {{- if not (eq $secretNamespace $namespace) }} - ! test -s /bootstrap/token-self-monitoring || \ - kubectl --namespace "{{ $secretNamespace }}" create secret generic "{{ include "enterprise-logs.selfMonitoringTenantSecret" $ }}" \ - --from-literal=username="{{ .name }}" \ - --from-literal=password="$(cat /bootstrap/token-self-monitoring)" - {{- end }} - {{- end }} - volumeMounts: - {{- with .Values.enterprise.provisioner.extraVolumeMounts }} - {{ toYaml . | nindent 12 }} - {{- end }} - - name: bootstrap - mountPath: /bootstrap - {{- with .Values.enterprise.provisioner.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.enterprise.provisioner.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.enterprise.provisioner.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} - restartPolicy: OnFailure - serviceAccount: {{ include "enterprise-logs.provisionerFullname" . }} - serviceAccountName: {{ include "enterprise-logs.provisionerFullname" . }} - volumes: - - name: admin-token - secret: - secretName: "{{ include "enterprise-logs.adminTokenSecret" . }}" - - name: bootstrap - emptyDir: {} -{{- end }} diff --git a/charts/loki/templates/provisioner/role-provisioner.yaml b/charts/loki/templates/provisioner/role-provisioner.yaml deleted file mode 100644 index 4c8121f..0000000 --- a/charts/loki/templates/provisioner/role-provisioner.yaml +++ /dev/null @@ -1,21 +0,0 @@ -{{ if and .Values.enterprise.provisioner.enabled .Values.enterprise.enabled }} -apiVersion: rbac.authorization.k8s.io/v1 -kind: {{ if not .Values.rbac.namespaced }}Cluster{{ end }}Role -metadata: - name: {{ template "enterprise-logs.provisionerFullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "enterprise-logs.provisionerLabels" . | nindent 4 }} - {{- with .Values.enterprise.provisioner.labels }} - {{- toYaml . | nindent 4 }} - {{- end }} - annotations: - {{- with .Values.enterprise.provisioner.annotations }} - {{- toYaml . | nindent 4 }} - {{- end }} - "helm.sh/hook": post-install -rules: - - apiGroups: [""] - resources: ["secrets"] - verbs: ["create"] -{{- end }} diff --git a/charts/loki/templates/provisioner/rolebinding-provisioner.yaml b/charts/loki/templates/provisioner/rolebinding-provisioner.yaml deleted file mode 100644 index 5cd4560..0000000 --- a/charts/loki/templates/provisioner/rolebinding-provisioner.yaml +++ /dev/null @@ -1,26 +0,0 @@ -{{ if and .Values.enterprise.provisioner.enabled .Values.enterprise.enabled}} ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: {{ if not .Values.rbac.namespaced }}Cluster{{ else }}Role{{ end }}Binding -metadata: - name: {{ template "enterprise-logs.provisionerFullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "enterprise-logs.provisionerLabels" . | nindent 4 }} - {{- with .Values.enterprise.provisioner.labels }} - {{- toYaml . | nindent 4 }} - {{- end }} - annotations: - {{- with .Values.enterprise.provisioner.annotations }} - {{- toYaml . | nindent 4 }} - {{- end }} - "helm.sh/hook": post-install -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: {{ if not .Values.rbac.namespaced }}Cluster{{ end }}Role - name: {{ template "enterprise-logs.provisionerFullname" . }} -subjects: - - kind: ServiceAccount - name: {{ template "enterprise-logs.provisionerFullname" . }} - namespace: {{ $.Release.Namespace }} -{{- end }} diff --git a/charts/loki/templates/provisioner/serviceaccount-provisioner.yaml b/charts/loki/templates/provisioner/serviceaccount-provisioner.yaml deleted file mode 100644 index 81e92e9..0000000 --- a/charts/loki/templates/provisioner/serviceaccount-provisioner.yaml +++ /dev/null @@ -1,18 +0,0 @@ -{{ if and .Values.enterprise.provisioner.enabled .Values.enterprise.enabled }} ---- -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ template "enterprise-logs.provisionerFullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "enterprise-logs.provisionerLabels" . | nindent 4 }} - {{- with .Values.enterprise.provisioner.labels }} - {{- toYaml . | nindent 4 }} - {{- end }} - annotations: - {{- with .Values.enterprise.provisioner.annotations }} - {{- toYaml . | nindent 4 }} - {{- end }} - "helm.sh/hook": post-install -{{- end }} diff --git a/charts/loki/templates/querier/_helpers-querier.tpl b/charts/loki/templates/querier/_helpers-querier.tpl deleted file mode 100644 index aa557c5..0000000 --- a/charts/loki/templates/querier/_helpers-querier.tpl +++ /dev/null @@ -1,32 +0,0 @@ -{{/* -querier fullname -*/}} -{{- define "loki.querierFullname" -}} -{{ include "loki.fullname" . }}-querier -{{- end }} - -{{/* -querier common labels -*/}} -{{- define "loki.querierLabels" -}} -{{ include "loki.labels" . }} -app.kubernetes.io/component: querier -{{- end }} - -{{/* -querier selector labels -*/}} -{{- define "loki.querierSelectorLabels" -}} -{{ include "loki.selectorLabels" . }} -app.kubernetes.io/component: querier -{{- end }} - -{{/* -querier priority class name -*/}} -{{- define "loki.querierPriorityClassName" -}} -{{- $pcn := coalesce .Values.global.priorityClassName .Values.querier.priorityClassName -}} -{{- if $pcn }} -priorityClassName: {{ $pcn }} -{{- end }} -{{- end }} diff --git a/charts/loki/templates/querier/deployment-querier.yaml b/charts/loki/templates/querier/deployment-querier.yaml deleted file mode 100644 index ffebc85..0000000 --- a/charts/loki/templates/querier/deployment-querier.yaml +++ /dev/null @@ -1,163 +0,0 @@ -{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} -{{- if $isDistributed }} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "loki.querierFullname" . }} - namespace: {{ .Release.Namespace }} - labels: - {{- include "loki.querierLabels" . | nindent 4 }} - app.kubernetes.io/part-of: memberlist - {{- with .Values.loki.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -spec: -{{- if not .Values.querier.autoscaling.enabled }} - replicas: {{ .Values.querier.replicas }} -{{- end }} - strategy: - rollingUpdate: - maxSurge: {{ .Values.querier.maxSurge }} - maxUnavailable: 1 - revisionHistoryLimit: {{ .Values.loki.revisionHistoryLimit }} - selector: - matchLabels: - {{- include "loki.querierSelectorLabels" . | nindent 6 }} - template: - metadata: - annotations: - {{- include "loki.config.checksum" . | nindent 8 }} - {{- with .Values.loki.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.querier.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - {{- include "loki.querierLabels" . | nindent 8 }} - app.kubernetes.io/part-of: memberlist - {{- with merge (dict) .Values.loki.podLabels .Values.querier.podLabels }} - {{- toYaml . | nindent 8 }} - {{- end }} - spec: - {{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.Version }} - {{- with .Values.querier.topologySpreadConstraints }} - topologySpreadConstraints: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- end }} - serviceAccountName: {{ include "loki.serviceAccountName" . }} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.querier.hostAliases }} - hostAliases: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- include "loki.querierPriorityClassName" . | nindent 6 }} - securityContext: - {{- toYaml .Values.loki.podSecurityContext | nindent 8 }} - terminationGracePeriodSeconds: {{ .Values.querier.terminationGracePeriodSeconds }} - {{- with .Values.querier.initContainers }} - initContainers: - {{- toYaml . | nindent 8 }} - {{- end }} - containers: - - name: querier - image: {{ include "loki.image" . }} - imagePullPolicy: {{ .Values.loki.image.pullPolicy }} - args: - - -config.file=/etc/loki/config/config.yaml - - -target=querier - {{- if .Values.ingester.zoneAwareReplication.enabled }} - {{- if and (.Values.ingester.zoneAwareReplication.migration.enabled) (not .Values.ingester.zoneAwareReplication.migration.readPath) }} - - -distributor.zone-awareness-enabled=false - {{- else }} - - -distributor.zone-awareness-enabled=true - {{- end }} - {{- end }} - {{- with (concat .Values.global.extraArgs .Values.querier.extraArgs) | uniq }} - {{- toYaml . | nindent 12 }} - {{- end }} - ports: - - name: http-metrics - containerPort: 3100 - protocol: TCP - - name: grpc - containerPort: 9095 - protocol: TCP - - name: http-memberlist - containerPort: 7946 - protocol: TCP - {{- with (concat .Values.global.extraEnv .Values.querier.extraEnv) | uniq }} - env: - {{- toYaml . | nindent 12 }} - {{- end }} - {{- with (concat .Values.global.extraEnvFrom .Values.querier.extraEnvFrom) | uniq }} - envFrom: - {{- toYaml . | nindent 12 }} - {{- end }} - securityContext: - {{- toYaml .Values.loki.containerSecurityContext | nindent 12 }} - readinessProbe: - {{- toYaml .Values.loki.readinessProbe | nindent 12 }} - livenessProbe: - {{- toYaml .Values.loki.livenessProbe | nindent 12 }} - volumeMounts: - - name: config - mountPath: /etc/loki/config - - name: runtime-config - mountPath: /etc/loki/runtime-config - - name: data - mountPath: /var/loki - {{- if .Values.enterprise.enabled }} - - name: license - mountPath: /etc/loki/license - {{- end }} - {{- with (concat .Values.global.extraVolumeMounts .Values.querier.extraVolumeMounts) | uniq }} - {{- toYaml . | nindent 12 }} - {{- end }} - resources: - {{- toYaml .Values.querier.resources | nindent 12 }} - {{- if .Values.querier.extraContainers }} - {{- toYaml .Values.querier.extraContainers | nindent 8}} - {{- end }} - {{- with .Values.querier.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.querier.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.querier.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.querier.dnsConfig }} - dnsConfig: - {{- toYaml . | nindent 8 }} - {{- end }} - volumes: - - name: config - {{- include "loki.configVolume" . | nindent 10 }} - - name: runtime-config - configMap: - name: {{ template "loki.name" . }}-runtime - {{- if .Values.enterprise.enabled }} - - name: license - secret: - {{- if .Values.enterprise.useExternalLicense }} - secretName: {{ .Values.enterprise.externalLicenseName }} - {{- else }} - secretName: enterprise-logs-license - {{- end }} - {{- end }} - - name: data - emptyDir: {} - {{- with (concat .Values.global.extraVolumes .Values.querier.extraVolumes) | uniq }} - {{- toYaml . | nindent 8 }} - {{- end }} -{{- end }} diff --git a/charts/loki/templates/querier/hpa.yaml b/charts/loki/templates/querier/hpa.yaml deleted file mode 100644 index 08d81cb..0000000 --- a/charts/loki/templates/querier/hpa.yaml +++ /dev/null @@ -1,55 +0,0 @@ -{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} -{{- if and $isDistributed .Values.querier.autoscaling.enabled }} -{{- $apiVersion := include "loki.hpa.apiVersion" . -}} -apiVersion: {{ $apiVersion }} -kind: HorizontalPodAutoscaler -metadata: - name: {{ include "loki.querierFullname" . }} - namespace: {{ .Release.Namespace }} - labels: - {{- include "loki.querierLabels" . | nindent 4 }} -spec: - scaleTargetRef: - apiVersion: apps/v1 - kind: Deployment - name: {{ include "loki.querierFullname" . }} - minReplicas: {{ .Values.querier.autoscaling.minReplicas }} - maxReplicas: {{ .Values.querier.autoscaling.maxReplicas }} - metrics: - {{- with .Values.querier.autoscaling.targetMemoryUtilizationPercentage }} - - type: Resource - resource: - name: memory - {{- if (eq $apiVersion "autoscaling/v2") }} - target: - type: Utilization - averageUtilization: {{ . }} - {{- else }} - targetAverageUtilization: {{ . }} - {{- end }} - {{- end }} - {{- with .Values.querier.autoscaling.targetCPUUtilizationPercentage }} - - type: Resource - resource: - name: cpu - {{- if (eq $apiVersion "autoscaling/v2") }} - target: - type: Utilization - averageUtilization: {{ . }} - {{- else }} - targetAverageUtilization: {{ . }} - {{- end }} - {{- end }} - {{- with .Values.querier.autoscaling.customMetrics }} - {{- toYaml . | nindent 4 }} - {{- end }} - {{- if .Values.querier.autoscaling.behavior.enabled }} - behavior: - {{- with .Values.querier.autoscaling.behavior.scaleDown }} - scaleDown: {{ toYaml . | nindent 6 }} - {{- end }} - {{- with .Values.querier.autoscaling.behavior.scaleUp }} - scaleUp: {{ toYaml . | nindent 6 }} - {{- end }} - {{- end }} -{{- end }} diff --git a/charts/loki/templates/querier/poddisruptionbudget-querier.yaml b/charts/loki/templates/querier/poddisruptionbudget-querier.yaml deleted file mode 100644 index 9dff3cd..0000000 --- a/charts/loki/templates/querier/poddisruptionbudget-querier.yaml +++ /dev/null @@ -1,21 +0,0 @@ -{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} -{{- if and $isDistributed (gt (int .Values.querier.replicas) 1) }} -{{- if kindIs "invalid" .Values.querier.maxUnavailable }} -{{- fail "`.Values.querier.maxUnavailable` must be set when `.Values.querier.replicas` is greater than 1." }} -{{- else }} -apiVersion: {{ include "loki.pdb.apiVersion" . }} -kind: PodDisruptionBudget -metadata: - name: {{ include "loki.querierFullname" . }} - namespace: {{ .Release.Namespace }} - labels: - {{- include "loki.querierLabels" . | nindent 4 }} -spec: - selector: - matchLabels: - {{- include "loki.querierSelectorLabels" . | nindent 6 }} - {{- with .Values.querier.maxUnavailable }} - maxUnavailable: {{ . }} - {{- end }} -{{- end }} -{{- end }} diff --git a/charts/loki/templates/querier/service-querier.yaml b/charts/loki/templates/querier/service-querier.yaml deleted file mode 100644 index 15c9c6a..0000000 --- a/charts/loki/templates/querier/service-querier.yaml +++ /dev/null @@ -1,36 +0,0 @@ -{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} -{{- if $isDistributed -}} -apiVersion: v1 -kind: Service -metadata: - name: {{ include "loki.querierFullname" . }} - namespace: {{ .Release.Namespace }} - labels: - {{- include "loki.querierLabels" . | nindent 4 }} - {{- with .Values.querier.serviceLabels }} - {{- toYaml . | nindent 4 }} - {{- end }} - annotations: - {{- with .Values.loki.serviceAnnotations }} - {{- toYaml . | nindent 4}} - {{- end }} - {{- with .Values.querier.serviceAnnotations }} - {{- toYaml . | nindent 4}} - {{- end }} -spec: - type: ClusterIP - ports: - - name: http-metrics - port: 3100 - targetPort: http-metrics - protocol: TCP - - name: grpc - port: 9095 - targetPort: grpc - protocol: TCP - {{- if .Values.querier.appProtocol.grpc }} - appProtocol: {{ .Values.querier.appProtocol.grpc }} - {{- end }} - selector: - {{- include "loki.querierSelectorLabels" . | nindent 4 }} -{{- end -}} diff --git a/charts/loki/templates/query-frontend/_helpers-query-frontend.tpl b/charts/loki/templates/query-frontend/_helpers-query-frontend.tpl deleted file mode 100644 index 5aebde7..0000000 --- a/charts/loki/templates/query-frontend/_helpers-query-frontend.tpl +++ /dev/null @@ -1,32 +0,0 @@ -{{/* -query-frontend fullname -*/}} -{{- define "loki.queryFrontendFullname" -}} -{{ include "loki.fullname" . }}-query-frontend -{{- end }} - -{{/* -query-frontend common labels -*/}} -{{- define "loki.queryFrontendLabels" -}} -{{ include "loki.labels" . }} -app.kubernetes.io/component: query-frontend -{{- end }} - -{{/* -query-frontend selector labels -*/}} -{{- define "loki.queryFrontendSelectorLabels" -}} -{{ include "loki.selectorLabels" . }} -app.kubernetes.io/component: query-frontend -{{- end }} - -{{/* -query-frontend priority class name -*/}} -{{- define "loki.queryFrontendPriorityClassName" -}} -{{- $pcn := coalesce .Values.global.priorityClassName .Values.queryFrontend.priorityClassName -}} -{{- if $pcn }} -priorityClassName: {{ $pcn }} -{{- end }} -{{- end }} diff --git a/charts/loki/templates/query-frontend/deployment-query-frontend.yaml b/charts/loki/templates/query-frontend/deployment-query-frontend.yaml deleted file mode 100644 index 1476d67..0000000 --- a/charts/loki/templates/query-frontend/deployment-query-frontend.yaml +++ /dev/null @@ -1,145 +0,0 @@ -{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} -{{- if $isDistributed -}} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "loki.queryFrontendFullname" . }} - namespace: {{ .Release.Namespace }} - labels: - {{- include "loki.queryFrontendLabels" . | nindent 4 }} - {{- with .Values.loki.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -spec: -{{- if not .Values.queryFrontend.autoscaling.enabled }} - replicas: {{ .Values.queryFrontend.replicas }} -{{- end }} - strategy: - rollingUpdate: - maxSurge: 0 - maxUnavailable: 1 - revisionHistoryLimit: {{ .Values.loki.revisionHistoryLimit }} - selector: - matchLabels: - {{- include "loki.queryFrontendSelectorLabels" . | nindent 6 }} - template: - metadata: - annotations: - {{- include "loki.config.checksum" . | nindent 8 }} - {{- with .Values.loki.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.queryFrontend.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - {{- include "loki.queryFrontendLabels" . | nindent 8 }} - app.kubernetes.io/part-of: memberlist - {{- with merge (dict) .Values.loki.podLabels .Values.queryFrontend.podLabels }} - {{- toYaml . | nindent 8 }} - {{- end }} - spec: - {{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.Version }} - {{- with .Values.queryFrontend.topologySpreadConstraints }} - topologySpreadConstraints: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- end }} - serviceAccountName: {{ include "loki.serviceAccountName" . }} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.queryFrontend.hostAliases }} - hostAliases: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- include "loki.queryFrontendPriorityClassName" . | nindent 6 }} - securityContext: - {{- toYaml .Values.loki.podSecurityContext | nindent 8 }} - terminationGracePeriodSeconds: {{ .Values.queryFrontend.terminationGracePeriodSeconds }} - containers: - - name: query-frontend - image: {{ include "loki.image" . }} - imagePullPolicy: {{ .Values.loki.image.pullPolicy }} - {{- if or .Values.loki.command .Values.queryFrontend.command }} - command: - - {{ coalesce .Values.queryFrontend.command .Values.loki.command | quote }} - {{- end }} - args: - - -config.file=/etc/loki/config/config.yaml - - -target=query-frontend - {{- with (concat .Values.global.extraArgs .Values.queryFrontend.extraArgs) | uniq }} - {{- toYaml . | nindent 12 }} - {{- end }} - ports: - - name: http-metrics - containerPort: 3100 - protocol: TCP - - name: grpc - containerPort: 9095 - protocol: TCP - - name: http-memberlist - containerPort: 7946 - protocol: TCP - {{- with (concat .Values.global.extraEnv .Values.queryFrontend.extraEnv) | uniq }} - env: - {{- toYaml . | nindent 12 }} - {{- end }} - {{- with (concat .Values.global.extraEnvFrom .Values.queryFrontend.extraEnvFrom) | uniq }} - envFrom: - {{- toYaml . | nindent 12 }} - {{- end }} - securityContext: - {{- toYaml .Values.loki.containerSecurityContext | nindent 12 }} - readinessProbe: - {{- toYaml .Values.loki.readinessProbe | nindent 12 }} - volumeMounts: - - name: config - mountPath: /etc/loki/config - - name: runtime-config - mountPath: /etc/loki/runtime-config - {{- if .Values.enterprise.enabled }} - - name: license - mountPath: /etc/loki/license - {{- end }} - {{- with (concat .Values.global.extraVolumeMounts .Values.queryFrontend.extraVolumeMounts) | uniq }} - {{- toYaml . | nindent 12 }} - {{- end }} - resources: - {{- toYaml .Values.queryFrontend.resources | nindent 12 }} - {{- if .Values.queryFrontend.extraContainers }} - {{- toYaml .Values.queryFrontend.extraContainers | nindent 8}} - {{- end }} - {{- with .Values.queryFrontend.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.queryFrontend.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.queryFrontend.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} - volumes: - - name: config - {{- include "loki.configVolume" . | nindent 10 }} - - name: runtime-config - configMap: - name: {{ template "loki.name" . }}-runtime - {{- if .Values.enterprise.enabled }} - - name: license - secret: - {{- if .Values.enterprise.useExternalLicense }} - secretName: {{ .Values.enterprise.externalLicenseName }} - {{- else }} - secretName: enterprise-logs-license - {{- end }} - {{- end }} - {{- with (concat .Values.global.extraVolumes .Values.queryFrontend.extraVolumes) | uniq }} - {{- toYaml . | nindent 8 }} - {{- end }} -{{- end -}} diff --git a/charts/loki/templates/query-frontend/hpa.yaml b/charts/loki/templates/query-frontend/hpa.yaml deleted file mode 100644 index c326287..0000000 --- a/charts/loki/templates/query-frontend/hpa.yaml +++ /dev/null @@ -1,55 +0,0 @@ -{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} -{{- if and $isDistributed .Values.queryFrontend.autoscaling.enabled }} -{{- $apiVersion := include "loki.hpa.apiVersion" . -}} -apiVersion: {{ $apiVersion }} -kind: HorizontalPodAutoscaler -metadata: - name: {{ include "loki.queryFrontendFullname" . }} - namespace: {{ .Release.Namespace }} - labels: - {{- include "loki.queryFrontendLabels" . | nindent 4 }} -spec: - scaleTargetRef: - apiVersion: apps/v1 - kind: Deployment - name: {{ include "loki.queryFrontendFullname" . }} - minReplicas: {{ .Values.queryFrontend.autoscaling.minReplicas }} - maxReplicas: {{ .Values.queryFrontend.autoscaling.maxReplicas }} - metrics: - {{- with .Values.queryFrontend.autoscaling.targetMemoryUtilizationPercentage }} - - type: Resource - resource: - name: memory - {{- if (eq $apiVersion "autoscaling/v2") }} - target: - type: Utilization - averageUtilization: {{ . }} - {{- else }} - targetAverageUtilization: {{ . }} - {{- end }} - {{- end }} - {{- with .Values.queryFrontend.autoscaling.targetCPUUtilizationPercentage }} - - type: Resource - resource: - name: cpu - {{- if (eq $apiVersion "autoscaling/v2") }} - target: - type: Utilization - averageUtilization: {{ . }} - {{- else }} - targetAverageUtilization: {{ . }} - {{- end }} - {{- end }} - {{- with .Values.queryFrontend.autoscaling.customMetrics }} - {{- toYaml . | nindent 4 }} - {{- end }} - {{- if .Values.queryFrontend.autoscaling.behavior.enabled }} - behavior: - {{- with .Values.queryFrontend.autoscaling.behavior.scaleDown }} - scaleDown: {{ toYaml . | nindent 6 }} - {{- end }} - {{- with .Values.queryFrontend.autoscaling.behavior.scaleUp }} - scaleUp: {{ toYaml . | nindent 6 }} - {{- end }} - {{- end }} -{{- end }} diff --git a/charts/loki/templates/query-frontend/poddisruptionbudget-query-frontend.yaml b/charts/loki/templates/query-frontend/poddisruptionbudget-query-frontend.yaml deleted file mode 100644 index f100405..0000000 --- a/charts/loki/templates/query-frontend/poddisruptionbudget-query-frontend.yaml +++ /dev/null @@ -1,21 +0,0 @@ -{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} -{{- if and $isDistributed (gt (int .Values.queryFrontend.replicas) 1) }} -{{- if kindIs "invalid" .Values.queryFrontend.maxUnavailable }} -{{- fail "`.Values.queryFrontend.maxUnavailable` must be set when `.Values.queryFrontend.replicas` is greater than 1." }} -{{- else }} -apiVersion: {{ include "loki.pdb.apiVersion" . }} -kind: PodDisruptionBudget -metadata: - name: {{ include "loki.queryFrontendFullname" . }} - namespace: {{ .Release.Namespace }} - labels: - {{- include "loki.queryFrontendLabels" . | nindent 4 }} -spec: - selector: - matchLabels: - {{- include "loki.queryFrontendSelectorLabels" . | nindent 6 }} - {{- with .Values.queryFrontend.maxUnavailable }} - maxUnavailable: {{ . }} - {{- end }} -{{- end }} -{{- end }} diff --git a/charts/loki/templates/query-frontend/service-query-frontend-headless.yaml b/charts/loki/templates/query-frontend/service-query-frontend-headless.yaml deleted file mode 100644 index 8da9054..0000000 --- a/charts/loki/templates/query-frontend/service-query-frontend-headless.yaml +++ /dev/null @@ -1,46 +0,0 @@ -{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} -{{- if $isDistributed -}} -apiVersion: v1 -kind: Service -metadata: - name: {{ include "loki.queryFrontendFullname" . }}-headless - namespace: {{ .Release.Namespace }} - labels: - {{- include "loki.queryFrontendLabels" . | nindent 4 }} - {{- with .Values.queryFrontend.serviceLabels }} - {{- toYaml . | nindent 4 }} - {{- end }} - prometheus.io/service-monitor: "false" - annotations: - {{- with .Values.loki.serviceAnnotations }} - {{- toYaml . | nindent 4}} - {{- end }} - {{- with .Values.queryFrontend.serviceAnnotations }} - {{- toYaml . | nindent 4}} - {{- end }} -spec: - clusterIP: None - type: ClusterIP - publishNotReadyAddresses: true - ports: - - name: http-metrics - port: 3100 - targetPort: http-metrics - protocol: TCP - - name: grpc - port: 9095 - targetPort: grpc - protocol: TCP - {{- if .Values.queryFrontend.appProtocol.grpc }} - appProtocol: {{ .Values.queryFrontend.appProtocol.grpc }} - {{- end }} - - name: grpclb - port: 9096 - targetPort: grpc - protocol: TCP - {{- if .Values.queryFrontend.appProtocol.grpc }} - appProtocol: {{ .Values.queryFrontend.appProtocol.grpc }} - {{- end }} - selector: - {{- include "loki.queryFrontendSelectorLabels" . | nindent 4 }} -{{- end -}} diff --git a/charts/loki/templates/query-frontend/service-query-frontend.yaml b/charts/loki/templates/query-frontend/service-query-frontend.yaml deleted file mode 100644 index a239695..0000000 --- a/charts/loki/templates/query-frontend/service-query-frontend.yaml +++ /dev/null @@ -1,44 +0,0 @@ -{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} -{{- if $isDistributed -}} -apiVersion: v1 -kind: Service -metadata: - name: {{ include "loki.queryFrontendFullname" . }} - namespace: {{ .Release.Namespace }} - labels: - {{- include "loki.queryFrontendLabels" . | nindent 4 }} - {{- with .Values.queryFrontend.serviceLabels }} - {{- toYaml . | nindent 4 }} - {{- end }} - annotations: - {{- with .Values.loki.serviceAnnotations }} - {{- toYaml . | nindent 4}} - {{- end }} - {{- with .Values.queryFrontend.serviceAnnotations }} - {{- toYaml . | nindent 4}} - {{- end }} -spec: - type: ClusterIP - publishNotReadyAddresses: true - ports: - - name: http-metrics - port: 3100 - targetPort: http-metrics - protocol: TCP - - name: grpc - port: 9095 - targetPort: grpc - protocol: TCP - {{- if .Values.queryFrontend.appProtocol.grpc }} - appProtocol: {{ .Values.queryFrontend.appProtocol.grpc }} - {{- end }} - - name: grpclb - port: 9096 - targetPort: grpc - protocol: TCP - {{- if .Values.queryFrontend.appProtocol.grpc }} - appProtocol: {{ .Values.queryFrontend.appProtocol.grpc }} - {{- end }} - selector: - {{- include "loki.queryFrontendSelectorLabels" . | nindent 4 }} -{{- end -}} diff --git a/charts/loki/templates/query-scheduler/_helpers-query-scheduler.tpl b/charts/loki/templates/query-scheduler/_helpers-query-scheduler.tpl deleted file mode 100644 index 1f64802..0000000 --- a/charts/loki/templates/query-scheduler/_helpers-query-scheduler.tpl +++ /dev/null @@ -1,40 +0,0 @@ -{{/* -query-scheduler fullname -*/}} -{{- define "loki.querySchedulerFullname" -}} -{{ include "loki.fullname" . }}-query-scheduler -{{- end }} - -{{/* -query-scheduler common labels -*/}} -{{- define "loki.querySchedulerLabels" -}} -{{ include "loki.labels" . }} -app.kubernetes.io/component: query-scheduler -{{- end }} - -{{/* -query-scheduler selector labels -*/}} -{{- define "loki.querySchedulerSelectorLabels" -}} -{{ include "loki.selectorLabels" . }} -app.kubernetes.io/component: query-scheduler -{{- end }} - -{{/* -query-scheduler image -*/}} -{{- define "loki.querySchedulerImage" -}} -{{- $dict := dict "loki" .Values.loki.image "service" .Values.queryScheduler.image "global" .Values.global.image "defaultVersion" .Chart.AppVersion -}} -{{- include "loki.lokiImage" $dict -}} -{{- end }} - -{{/* -query-scheduler priority class name -*/}} -{{- define "loki.querySchedulerPriorityClassName" -}} -{{- $pcn := coalesce .Values.global.priorityClassName .Values.queryScheduler.priorityClassName -}} -{{- if $pcn }} -priorityClassName: {{ $pcn }} -{{- end }} -{{- end }} diff --git a/charts/loki/templates/query-scheduler/deployment-query-scheduler.yaml b/charts/loki/templates/query-scheduler/deployment-query-scheduler.yaml deleted file mode 100644 index 28dadaa..0000000 --- a/charts/loki/templates/query-scheduler/deployment-query-scheduler.yaml +++ /dev/null @@ -1,143 +0,0 @@ -{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} -{{- if $isDistributed }} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "loki.querySchedulerFullname" . }} - namespace: {{ .Release.Namespace }} - labels: - {{- include "loki.querySchedulerLabels" . | nindent 4 }} - {{- with .Values.loki.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - replicas: {{ .Values.queryScheduler.replicas }} - strategy: - rollingUpdate: - maxSurge: 0 - maxUnavailable: 1 - revisionHistoryLimit: {{ .Values.loki.revisionHistoryLimit }} - selector: - matchLabels: - {{- include "loki.querySchedulerSelectorLabels" . | nindent 6 }} - template: - metadata: - annotations: - {{- include "loki.config.checksum" . | nindent 8 }} - {{- with .Values.loki.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.queryScheduler.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - {{- include "loki.querySchedulerLabels" . | nindent 8 }} - {{- with merge (dict) .Values.loki.podLabels .Values.queryScheduler.podLabels }} - {{- toYaml . | nindent 8 }} - {{- end }} - app.kubernetes.io/part-of: memberlist - spec: - {{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.Version }} - {{- with .Values.queryScheduler.topologySpreadConstraints }} - topologySpreadConstraints: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- end }} - serviceAccountName: {{ include "loki.serviceAccountName" . }} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.queryScheduler.hostAliases }} - hostAliases: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- include "loki.querySchedulerPriorityClassName" . | nindent 6 }} - securityContext: - {{- toYaml .Values.loki.podSecurityContext | nindent 8 }} - terminationGracePeriodSeconds: {{ .Values.queryScheduler.terminationGracePeriodSeconds }} - containers: - - name: query-scheduler - image: {{ include "loki.image" . }} - imagePullPolicy: {{ .Values.loki.image.pullPolicy }} - args: - - -config.file=/etc/loki/config/config.yaml - - -target=query-scheduler - {{- with (concat .Values.global.extraArgs .Values.queryScheduler.extraArgs) | uniq }} - {{- toYaml . | nindent 12 }} - {{- end }} - ports: - - name: http-metrics - containerPort: 3100 - protocol: TCP - - name: grpc - containerPort: 9095 - protocol: TCP - - name: http-memberlist - containerPort: 7946 - protocol: TCP - {{- with (concat .Values.global.extraEnv .Values.queryScheduler.extraEnv) | uniq }} - env: - {{- toYaml . | nindent 12 }} - {{- end }} - {{- with (concat .Values.global.extraEnvFrom .Values.queryScheduler.extraEnvFrom) | uniq }} - envFrom: - {{- toYaml . | nindent 12 }} - {{- end }} - securityContext: - {{- toYaml .Values.loki.containerSecurityContext | nindent 12 }} - readinessProbe: - {{- toYaml .Values.loki.readinessProbe | nindent 12 }} - livenessProbe: - {{- toYaml .Values.loki.livenessProbe | nindent 12 }} - volumeMounts: - - name: config - mountPath: /etc/loki/config - - name: runtime-config - mountPath: /etc/loki/runtime-config - {{- if .Values.enterprise.enabled }} - - name: license - mountPath: /etc/loki/license - {{- end }} - {{- with (concat .Values.global.extraVolumeMounts .Values.queryScheduler.extraVolumeMounts) | uniq }} - {{- toYaml . | nindent 12 }} - {{- end }} - {{- with .Values.queryScheduler.resources }} - resources: - {{- toYaml . | nindent 12 }} - {{- end }} - {{- if .Values.queryScheduler.extraContainers }} - {{- toYaml .Values.queryScheduler.extraContainers | nindent 8}} - {{- end }} - {{- with .Values.queryScheduler.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.queryScheduler.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.queryScheduler.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} - volumes: - - name: config - {{- include "loki.configVolume" . | nindent 10 }} - - name: runtime-config - configMap: - name: {{ template "loki.name" . }}-runtime - {{- if .Values.enterprise.enabled }} - - name: license - secret: - {{- if .Values.enterprise.useExternalLicense }} - secretName: {{ .Values.enterprise.externalLicenseName }} - {{- else }} - secretName: enterprise-logs-license - {{- end }} - {{- end }} - {{- with (concat .Values.global.extraVolumes .Values.queryScheduler.extraVolumes) | uniq }} - {{- toYaml . | nindent 8 }} - {{- end }} -{{- end }} diff --git a/charts/loki/templates/query-scheduler/poddisruptionbudget-query-scheduler.yaml b/charts/loki/templates/query-scheduler/poddisruptionbudget-query-scheduler.yaml deleted file mode 100644 index ed8051f..0000000 --- a/charts/loki/templates/query-scheduler/poddisruptionbudget-query-scheduler.yaml +++ /dev/null @@ -1,21 +0,0 @@ -{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} -{{- if and $isDistributed (gt (int .Values.queryScheduler.replicas) 1) }} -{{- if kindIs "invalid" .Values.queryScheduler.maxUnavailable }} -{{- fail "`.Values.queryScheduler.maxUnavailable` must be set when `.Values.queryScheduler.replicas` is greater than 1." }} -{{- else }} -apiVersion: {{ include "loki.pdb.apiVersion" . }} -kind: PodDisruptionBudget -metadata: - name: {{ include "loki.querySchedulerFullname" . }} - namespace: {{ .Release.Namespace }} - labels: - {{- include "loki.querySchedulerLabels" . | nindent 4 }} -spec: - selector: - matchLabels: - {{- include "loki.querySchedulerSelectorLabels" . | nindent 6 }} - {{- with .Values.queryScheduler.maxUnavailable }} - maxUnavailable: {{ . }} - {{- end }} -{{- end }} -{{- end }} diff --git a/charts/loki/templates/query-scheduler/service-query-scheduler.yaml b/charts/loki/templates/query-scheduler/service-query-scheduler.yaml deleted file mode 100644 index 746c7bd..0000000 --- a/charts/loki/templates/query-scheduler/service-query-scheduler.yaml +++ /dev/null @@ -1,38 +0,0 @@ -{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} -{{- if $isDistributed }} -apiVersion: v1 -kind: Service -metadata: - name: {{ include "loki.querySchedulerFullname" . }} - namespace: {{ .Release.Namespace }} - labels: - {{- include "loki.querySchedulerLabels" . | nindent 4 }} - {{- with .Values.queryScheduler.serviceLabels }} - {{- toYaml . | nindent 4 }} - {{- end }} - annotations: - {{- with .Values.loki.serviceAnnotations }} - {{- toYaml . | nindent 4}} - {{- end }} - {{- with .Values.queryScheduler.serviceAnnotations }} - {{- toYaml . | nindent 4}} - {{- end }} -spec: - type: ClusterIP - clusterIP: None - publishNotReadyAddresses: true - ports: - - name: http-metrics - port: 3100 - targetPort: http-metrics - protocol: TCP - - name: grpclb - port: 9095 - targetPort: grpc - protocol: TCP - {{- with .Values.queryScheduler.appProtocol.grpc }} - appProtocol: {{ . }} - {{- end }} - selector: - {{- include "loki.querySchedulerSelectorLabels" . | nindent 4 }} -{{- end }} diff --git a/charts/loki/templates/read/_helpers-read.tpl b/charts/loki/templates/read/_helpers-read.tpl deleted file mode 100644 index d205314..0000000 --- a/charts/loki/templates/read/_helpers-read.tpl +++ /dev/null @@ -1,32 +0,0 @@ -{{/* -read fullname -*/}} -{{- define "loki.readFullname" -}} -{{ include "loki.name" . }}-read -{{- end }} - -{{/* -read common labels -*/}} -{{- define "loki.readLabels" -}} -{{ include "loki.labels" . }} -app.kubernetes.io/component: read -{{- end }} - -{{/* -read selector labels -*/}} -{{- define "loki.readSelectorLabels" -}} -{{ include "loki.selectorLabels" . }} -app.kubernetes.io/component: read -{{- end }} - -{{/* -read priority class name -*/}} -{{- define "loki.readPriorityClassName" -}} -{{- $pcn := coalesce .Values.global.priorityClassName .Values.read.priorityClassName -}} -{{- if $pcn }} -priorityClassName: {{ $pcn }} -{{- end }} -{{- end }} diff --git a/charts/loki/templates/read/deployment-read.yaml b/charts/loki/templates/read/deployment-read.yaml deleted file mode 100644 index 1592f30..0000000 --- a/charts/loki/templates/read/deployment-read.yaml +++ /dev/null @@ -1,167 +0,0 @@ -{{- $isSimpleScalable := eq (include "loki.deployment.isScalable" .) "true" -}} -{{- if and $isSimpleScalable (not .Values.read.legacyReadTarget ) }} ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "loki.readFullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - app.kubernetes.io/part-of: memberlist - {{- include "loki.readLabels" . | nindent 4 }} - {{- if or (not (empty .Values.loki.annotations)) (not (empty .Values.read.annotations))}} - annotations: - {{- with .Values.loki.annotations }} - {{- toYaml . | nindent 4 }} - {{- end }} - {{- with .Values.read.annotations }} - {{- toYaml . | nindent 4 }} - {{- end }} - {{- end }} -spec: - {{- if not .Values.read.autoscaling.enabled }} - replicas: {{ .Values.read.replicas }} - {{- end }} - strategy: - rollingUpdate: - maxSurge: 0 - maxUnavailable: 1 - revisionHistoryLimit: {{ .Values.loki.revisionHistoryLimit }} - selector: - matchLabels: - {{- include "loki.readSelectorLabels" . | nindent 6 }} - template: - metadata: - annotations: - checksum/config: {{ include "loki.configMapOrSecretContentHash" (dict "ctx" . "name" "/config.yaml") }} - {{- with .Values.loki.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.read.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - app.kubernetes.io/part-of: memberlist - {{- include "loki.readSelectorLabels" . | nindent 8 }} - {{- with .Values.loki.podLabels }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.read.podLabels }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.read.selectorLabels }} - {{- tpl (toYaml .) $ | nindent 8 }} - {{- end }} - spec: - serviceAccountName: {{ include "loki.serviceAccountName" . }} - automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- include "loki.readPriorityClassName" . | nindent 6 }} - securityContext: - {{- toYaml .Values.loki.podSecurityContext | nindent 8 }} - terminationGracePeriodSeconds: {{ .Values.read.terminationGracePeriodSeconds }} - containers: - - name: loki - image: {{ include "loki.image" . }} - imagePullPolicy: {{ .Values.loki.image.pullPolicy }} - args: - - -config.file=/etc/loki/config/config.yaml - - -target={{ .Values.read.targetModule }} - - -legacy-read-mode=false - - -common.compactor-grpc-address={{ include "loki.backendFullname" . }}.{{ .Release.Namespace }}.svc.{{ .Values.global.clusterDomain }}:{{ .Values.loki.server.grpc_listen_port }} - {{- with (concat .Values.global.extraArgs .Values.read.extraArgs) | uniq }} - {{- toYaml . | nindent 12 }} - {{- end }} - ports: - - 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 - {{- with (concat .Values.global.extraEnv .Values.read.extraEnv) | uniq }} - env: - {{- toYaml . | nindent 12 }} - {{- end }} - {{- with (concat .Values.global.extraEnvFrom .Values.read.extraEnvFrom) | uniq }} - envFrom: - {{- toYaml . | nindent 12 }} - {{- end }} - securityContext: - {{- toYaml .Values.loki.containerSecurityContext | nindent 12 }} - readinessProbe: - {{- toYaml .Values.loki.readinessProbe | nindent 12 }} - {{- if .Values.read.livenessProbe }} - livenessProbe: - {{- toYaml .Values.read.livenessProbe | nindent 12 }} - {{- end }} - volumeMounts: - - name: config - mountPath: /etc/loki/config - - name: runtime-config - mountPath: /etc/loki/runtime-config - - name: tmp - mountPath: /tmp - - name: data - mountPath: /var/loki - {{- if .Values.enterprise.enabled }} - - name: license - mountPath: /etc/loki/license - {{- end}} - {{- with (concat .Values.global.extraVolumeMounts .Values.read.extraVolumeMounts) | uniq }} - {{- toYaml . | nindent 12 }} - {{- end }} - resources: - {{- toYaml .Values.read.resources | nindent 12 }} - {{- with .Values.read.extraContainers }} - {{- toYaml . | nindent 8}} - {{- end }} - {{- with .Values.read.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.read.dnsConfig }} - dnsConfig: - {{- tpl . $ | nindent 8 }} - {{- end }} - {{- with .Values.read.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.read.topologySpreadConstraints }} - topologySpreadConstraints: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.read.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} - volumes: - - name: tmp - emptyDir: {} - - name: data - emptyDir: {} - - name: config - {{- include "loki.configVolume" . | nindent 10 }} - - name: runtime-config - configMap: - name: {{ template "loki.name" . }}-runtime - {{- if .Values.enterprise.enabled }} - - name: license - secret: - {{- if .Values.enterprise.useExternalLicense }} - secretName: {{ .Values.enterprise.externalLicenseName }} - {{- else }} - secretName: enterprise-logs-license - {{- end }} - {{- end }} - {{- with (concat .Values.global.extraVolumes .Values.read.extraVolumes) | uniq }} - {{- toYaml . | nindent 8 }} - {{- end }} -{{- end }} diff --git a/charts/loki/templates/read/hpa.yaml b/charts/loki/templates/read/hpa.yaml deleted file mode 100644 index 5515ecb..0000000 --- a/charts/loki/templates/read/hpa.yaml +++ /dev/null @@ -1,55 +0,0 @@ -{{- $isSimpleScalable := eq (include "loki.deployment.isScalable" .) "true" -}} -{{- $autoscalingv2 := .Capabilities.APIVersions.Has "autoscaling/v2" -}} -{{- if and $isSimpleScalable ( .Values.read.autoscaling.enabled ) }} -{{- if $autoscalingv2 }} -apiVersion: autoscaling/v2 -{{- else }} -apiVersion: autoscaling/v2beta1 -{{- end }} -kind: HorizontalPodAutoscaler -metadata: - name: {{ include "loki.readFullname" . }} - labels: - {{- include "loki.readLabels" . | nindent 4 }} -spec: - scaleTargetRef: - apiVersion: apps/v1 -{{- if and $isSimpleScalable (not .Values.read.legacyReadTarget ) }} - kind: Deployment - name: {{ include "loki.readFullname" . }} -{{- else }} - kind: StatefulSet - name: {{ include "loki.readFullname" . }} -{{- end }} - minReplicas: {{ .Values.read.autoscaling.minReplicas }} - maxReplicas: {{ .Values.read.autoscaling.maxReplicas }} - {{- with .Values.read.autoscaling.behavior }} - behavior: - {{- toYaml . | nindent 4 }} - {{- end }} - metrics: - {{- with .Values.read.autoscaling.targetMemoryUtilizationPercentage }} - - type: Resource - resource: - name: memory - {{- if $autoscalingv2 }} - target: - type: Utilization - averageUtilization: {{ . }} - {{- else }} - targetAverageUtilization: {{ . }} - {{- end }} - {{- end }} - {{- with .Values.read.autoscaling.targetCPUUtilizationPercentage }} - - type: Resource - resource: - name: cpu - {{- if $autoscalingv2 }} - target: - type: Utilization - averageUtilization: {{ . }} - {{- else }} - targetAverageUtilization: {{ . }} - {{- end }} - {{- end }} -{{- end }} diff --git a/charts/loki/templates/read/poddisruptionbudget-read.yaml b/charts/loki/templates/read/poddisruptionbudget-read.yaml deleted file mode 100644 index af4fcbf..0000000 --- a/charts/loki/templates/read/poddisruptionbudget-read.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- $isSimpleScalable := eq (include "loki.deployment.isScalable" .) "true" -}} -{{- if and $isSimpleScalable (gt (int .Values.read.replicas) 1) }} -apiVersion: policy/v1 -kind: PodDisruptionBudget -metadata: - name: {{ include "loki.readFullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "loki.readLabels" . | nindent 4 }} -spec: - selector: - matchLabels: - {{- include "loki.readSelectorLabels" . | nindent 6 }} - maxUnavailable: 1 -{{- end }} diff --git a/charts/loki/templates/read/service-read-headless.yaml b/charts/loki/templates/read/service-read-headless.yaml deleted file mode 100644 index 14ba0f6..0000000 --- a/charts/loki/templates/read/service-read-headless.yaml +++ /dev/null @@ -1,41 +0,0 @@ -{{- $isSimpleScalable := eq (include "loki.deployment.isScalable" .) "true" -}} -{{ if $isSimpleScalable }} ---- -apiVersion: v1 -kind: Service -metadata: - name: {{ include "loki.readFullname" . }}-headless - namespace: {{ $.Release.Namespace }} - labels: - {{- include "loki.readSelectorLabels" . | nindent 4 }} - {{- with .Values.loki.serviceLabels }} - {{- toYaml . | nindent 4}} - {{- end }} - {{- with .Values.read.service.labels }} - {{- toYaml . | nindent 4}} - {{- end }} - variant: headless - prometheus.io/service-monitor: "false" - annotations: - {{- with .Values.loki.serviceAnnotations }} - {{- toYaml . | nindent 4}} - {{- end }} - {{- with .Values.read.service.annotations }} - {{- toYaml . | nindent 4}} - {{- end }} -spec: - type: ClusterIP - clusterIP: None - 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 - appProtocol: tcp - selector: - {{- include "loki.readSelectorLabels" . | nindent 4 }} -{{- end }} diff --git a/charts/loki/templates/read/service-read.yaml b/charts/loki/templates/read/service-read.yaml deleted file mode 100644 index f4000fd..0000000 --- a/charts/loki/templates/read/service-read.yaml +++ /dev/null @@ -1,37 +0,0 @@ -{{- $isSimpleScalable := eq (include "loki.deployment.isScalable" .) "true" -}} -{{- if $isSimpleScalable }} ---- -apiVersion: v1 -kind: Service -metadata: - name: {{ include "loki.readFullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "loki.readLabels" . | nindent 4 }} - {{- with .Values.loki.serviceLabels }} - {{- toYaml . | nindent 4}} - {{- end }} - {{- with .Values.read.service.labels }} - {{- toYaml . | nindent 4}} - {{- end }} - annotations: - {{- with .Values.loki.serviceAnnotations }} - {{- toYaml . | nindent 4}} - {{- end }} - {{- with .Values.read.service.annotations }} - {{- toYaml . | nindent 4}} - {{- end }} -spec: - type: ClusterIP - 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.readSelectorLabels" . | nindent 4 }} -{{- end }} diff --git a/charts/loki/templates/read/statefulset-read.yaml b/charts/loki/templates/read/statefulset-read.yaml deleted file mode 100644 index d2f440c..0000000 --- a/charts/loki/templates/read/statefulset-read.yaml +++ /dev/null @@ -1,198 +0,0 @@ -{{- $isSimpleScalable := eq (include "loki.deployment.isScalable" .) "true" -}} -{{- if and $isSimpleScalable (.Values.read.legacyReadTarget ) }} ---- -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: {{ include "loki.readFullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - app.kubernetes.io/part-of: memberlist - {{- include "loki.readLabels" . | nindent 4 }} - {{- if or (not (empty .Values.loki.annotations)) (not (empty .Values.read.annotations))}} - annotations: - {{- with .Values.loki.annotations }} - {{- toYaml . | nindent 4 }} - {{- end }} - {{- with .Values.read.annotations }} - {{- toYaml . | nindent 4 }} - {{- end }} - {{- end }} -spec: -{{- if not .Values.read.autoscaling.enabled }} - {{- if eq .Values.deploymentMode "SingleBinary" }} - replicas: 0 - {{- else }} - replicas: {{ .Values.read.replicas }} - {{- end }} -{{- end }} - podManagementPolicy: {{ .Values.read.podManagementPolicy }} - updateStrategy: - rollingUpdate: - partition: 0 - serviceName: {{ printf "%s-headless" (include "loki.readFullname" .) }} - revisionHistoryLimit: {{ .Values.loki.revisionHistoryLimit }} - {{- if and (semverCompare ">= 1.23-0" (include "loki.kubeVersion" .)) (.Values.read.persistence.enableStatefulSetAutoDeletePVC) }} - {{/* - Data on the read nodes is easy to replace, so we want to always delete PVCs to make - operation easier, and will rely on re-fetching data when needed. - */}} - persistentVolumeClaimRetentionPolicy: - whenDeleted: Delete - whenScaled: Delete - {{- end }} - selector: - matchLabels: - {{- include "loki.readSelectorLabels" . | nindent 6 }} - template: - metadata: - annotations: - checksum/config: {{ include "loki.configMapOrSecretContentHash" (dict "ctx" . "name" "/config.yaml") }} - {{- with .Values.loki.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.read.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - app.kubernetes.io/part-of: memberlist - {{- include "loki.readLabels" . | nindent 8 }} - {{- with merge (dict) .Values.loki.podLabels .Values.read.podLabels }} - {{- tpl (toYaml .) $ | nindent 8 }} - {{- end }} - spec: - serviceAccountName: {{ include "loki.serviceAccountName" . }} - automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }} - {{ include "loki.enableServiceLinks" . }} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- include "loki.readPriorityClassName" . | nindent 6 }} - securityContext: - {{- toYaml .Values.loki.podSecurityContext | nindent 8 }} - terminationGracePeriodSeconds: {{ .Values.read.terminationGracePeriodSeconds }} - containers: - - name: loki - image: {{ include "loki.image" . }} - imagePullPolicy: {{ .Values.loki.image.pullPolicy }} - args: - - -config.file=/etc/loki/config/config.yaml - - -target={{ .Values.read.targetModule }} - {{- with (concat .Values.global.extraArgs .Values.read.extraArgs) | uniq }} - {{- toYaml . | nindent 12 }} - {{- end }} - ports: - - 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 - {{- with (concat .Values.global.extraEnv .Values.read.extraEnv) | uniq }} - env: - {{- toYaml . | nindent 12 }} - {{- end }} - {{- with (concat .Values.global.extraEnvFrom .Values.read.extraEnvFrom) | uniq }} - envFrom: - {{- toYaml . | nindent 12 }} - {{- end }} - securityContext: - {{- toYaml .Values.loki.containerSecurityContext | nindent 12 }} - readinessProbe: - {{- toYaml .Values.loki.readinessProbe | nindent 12 }} - {{- if .Values.read.livenessProbe }} - livenessProbe: - {{- toYaml .Values.read.livenessProbe | nindent 12 }} - {{- end }} - {{- with .Values.read.lifecycle }} - lifecycle: - {{- toYaml . | nindent 12 }} - {{- end }} - volumeMounts: - - name: config - mountPath: /etc/loki/config - - name: runtime-config - mountPath: /etc/loki/runtime-config - - name: tmp - mountPath: /tmp - - name: data - mountPath: /var/loki - {{- if .Values.enterprise.enabled }} - - name: license - mountPath: /etc/loki/license - {{- end}} - {{- with (concat .Values.global.extraVolumeMounts .Values.read.extraVolumeMounts) | uniq }} - {{- toYaml . | nindent 12 }} - {{- end }} - resources: - {{- toYaml .Values.read.resources | nindent 12 }} - {{- with .Values.read.extraContainers }} - {{- toYaml . | nindent 8}} - {{- end }} - {{- with .Values.read.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.read.dnsConfig }} - dnsConfig: - {{- tpl . $ | nindent 8 }} - {{- end }} - {{- with .Values.read.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.read.topologySpreadConstraints }} - topologySpreadConstraints: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.read.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} - volumes: - - name: tmp - emptyDir: {} - - name: config - {{- include "loki.configVolume" . | nindent 10 }} - - name: runtime-config - configMap: - name: {{ template "loki.name" . }}-runtime - {{- if .Values.enterprise.enabled }} - - name: license - secret: - {{- if .Values.enterprise.useExternalLicense }} - secretName: {{ .Values.enterprise.externalLicenseName }} - {{- else }} - secretName: enterprise-logs-license - {{- end }} - {{- end }} - {{- with (concat .Values.global.extraVolumes .Values.read.extraVolumes) | uniq }} - {{- toYaml . | nindent 8 }} - {{- end }} - volumeClaimTemplates: - - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: data - {{- with .Values.read.persistence.annotations }} - annotations: - {{- toYaml . | nindent 10 }} - {{- end }} - spec: - accessModes: - - ReadWriteOnce - {{- with .Values.read.persistence.storageClass }} - storageClassName: {{ if (eq "-" .) }}""{{ else }}{{ . }}{{ end }} - {{- end }} - resources: - requests: - storage: {{ .Values.read.persistence.size | quote }} - {{- with .Values.read.persistence.selector }} - selector: - {{- toYaml . | nindent 10 }} - {{- end }} -{{- end }} diff --git a/charts/loki/templates/results-cache/poddisruptionbudget-results-cache.yaml b/charts/loki/templates/results-cache/poddisruptionbudget-results-cache.yaml deleted file mode 100644 index 6bc393a..0000000 --- a/charts/loki/templates/results-cache/poddisruptionbudget-results-cache.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{- if .Values.resultsCache.enabled }} -apiVersion: {{ include "loki.pdb.apiVersion" . }} -kind: PodDisruptionBudget -metadata: - name: {{ include "loki.fullname" . }}-memcached-results-cache - namespace: {{ .Release.Namespace }} - labels: - {{- include "loki.selectorLabels" . | nindent 4 }} - app.kubernetes.io/component: memcached-results-cache -spec: - selector: - matchLabels: - {{- include "loki.selectorLabels" . | nindent 6 }} - app.kubernetes.io/component: memcached-results-cache - maxUnavailable: 1 -{{- end -}} diff --git a/charts/loki/templates/results-cache/service-results-cache-headless.yaml b/charts/loki/templates/results-cache/service-results-cache-headless.yaml deleted file mode 100644 index ce92008..0000000 --- a/charts/loki/templates/results-cache/service-results-cache-headless.yaml +++ /dev/null @@ -1 +0,0 @@ -{{- include "loki.memcached.service" (dict "ctx" $ "valuesSection" "resultsCache" "component" "results-cache" ) }} diff --git a/charts/loki/templates/results-cache/statefulset-results-cache.yaml b/charts/loki/templates/results-cache/statefulset-results-cache.yaml deleted file mode 100644 index 042e74e..0000000 --- a/charts/loki/templates/results-cache/statefulset-results-cache.yaml +++ /dev/null @@ -1 +0,0 @@ -{{- include "loki.memcached.statefulSet" (dict "ctx" $ "valuesSection" "resultsCache" "component" "results-cache" ) }} diff --git a/charts/loki/templates/role.yaml b/charts/loki/templates/role.yaml deleted file mode 100644 index 1e714b6..0000000 --- a/charts/loki/templates/role.yaml +++ /dev/null @@ -1,36 +0,0 @@ -{{- if or .Values.rbac.pspEnabled .Values.rbac.sccEnabled }} -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - name: {{ include "loki.name" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "loki.labels" . | nindent 4 }} -{{- if .Values.rbac.pspEnabled }} -rules: - - apiGroups: - - policy - resources: - - podsecuritypolicies - verbs: - - use - resourceNames: - - {{ include "loki.name" . }} -{{- end }} -{{- if .Values.rbac.sccEnabled }} -rules: - - apiGroups: - - security.openshift.io - resources: - - securitycontextconstraints - verbs: - - use - resourceNames: - - {{ include "loki.name" . }} - {{- if and .Values.rbac.namespaced .Values.sidecar.rules.enabled }} - - apiGroups: [""] # "" indicates the core API group - resources: ["configmaps", "secrets"] - verbs: ["get", "watch", "list"] - {{- end }} -{{- end }} -{{- end }} diff --git a/charts/loki/templates/rolebinding.yaml b/charts/loki/templates/rolebinding.yaml deleted file mode 100644 index cc0dfd2..0000000 --- a/charts/loki/templates/rolebinding.yaml +++ /dev/null @@ -1,17 +0,0 @@ -{{- if or .Values.rbac.pspEnabled .Values.rbac.sccEnabled }} -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - name: {{ include "loki.name" . }} - namespace: {{ $.Release.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" . }} - namespace: {{ $.Release.Namespace }} -{{- end }} diff --git a/charts/loki/templates/ruler/_helpers-ruler.tpl b/charts/loki/templates/ruler/_helpers-ruler.tpl deleted file mode 100644 index 2079e03..0000000 --- a/charts/loki/templates/ruler/_helpers-ruler.tpl +++ /dev/null @@ -1,47 +0,0 @@ -{{/* -ruler fullname -*/}} -{{- define "loki.rulerFullname" -}} -{{ include "loki.fullname" . }}-ruler -{{- end }} - -{{/* -ruler common labels -*/}} -{{- define "loki.rulerLabels" -}} -{{ include "loki.labels" . }} -app.kubernetes.io/component: ruler -{{- end }} - -{{/* -ruler selector labels -*/}} -{{- define "loki.rulerSelectorLabels" -}} -{{ include "loki.selectorLabels" . }} -app.kubernetes.io/component: ruler -{{- end }} - -{{/* -ruler image -*/}} -{{- define "loki.rulerImage" -}} -{{- $dict := dict "loki" .Values.loki.image "service" .Values.ruler.image "global" .Values.global.image "defaultVersion" .Chart.AppVersion -}} -{{- include "loki.lokiImage" $dict -}} -{{- end }} - -{{/* -format rules dir -*/}} -{{- define "loki.rulerRulesDirName" -}} -rules-{{ . | replace "_" "-" | trimSuffix "-" | lower }} -{{- end }} - -{{/* -ruler priority class name -*/}} -{{- define "loki.rulerPriorityClassName" -}} -{{- $pcn := coalesce .Values.global.priorityClassName .Values.ruler.priorityClassName -}} -{{- if $pcn }} -priorityClassName: {{ $pcn }} -{{- end }} -{{- end }} diff --git a/charts/loki/templates/ruler/configmap-ruler.yaml b/charts/loki/templates/ruler/configmap-ruler.yaml deleted file mode 100644 index 3a0c533..0000000 --- a/charts/loki/templates/ruler/configmap-ruler.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} -{{- if $isDistributed }} -{{- range $dir, $files := .Values.ruler.directories }} ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ include "loki.rulerFullname" $ }}-{{ include "loki.rulerRulesDirName" $dir }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "loki.rulerLabels" $ | nindent 4 }} -data: - {{- toYaml $files | nindent 2}} -{{- end }} -{{- end }} diff --git a/charts/loki/templates/ruler/poddisruptionbudget-ruler.yaml b/charts/loki/templates/ruler/poddisruptionbudget-ruler.yaml deleted file mode 100644 index b9c03cf..0000000 --- a/charts/loki/templates/ruler/poddisruptionbudget-ruler.yaml +++ /dev/null @@ -1,21 +0,0 @@ -{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} -{{- if and $isDistributed (gt (int .Values.ruler.replicas) 1) }} -{{- if kindIs "invalid" .Values.ruler.maxUnavailable }} -{{- fail "`.Values.ruler.maxUnavailable` must be set when `.Values.ruler.replicas` is greater than 1." }} -{{- else }} -apiVersion: {{ include "loki.pdb.apiVersion" . }} -kind: PodDisruptionBudget -metadata: - name: {{ include "loki.rulerFullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "loki.rulerLabels" . | nindent 4 }} -spec: - selector: - matchLabels: - {{- include "loki.rulerSelectorLabels" . | nindent 6 }} - {{- with .Values.ruler.maxUnavailable }} - maxUnavailable: {{ . }} - {{- end }} -{{- end }} -{{- end }} diff --git a/charts/loki/templates/ruler/service-ruler.yaml b/charts/loki/templates/ruler/service-ruler.yaml deleted file mode 100644 index 8847683..0000000 --- a/charts/loki/templates/ruler/service-ruler.yaml +++ /dev/null @@ -1,37 +0,0 @@ -{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} -{{- if and $isDistributed .Values.ruler.enabled }} -apiVersion: v1 -kind: Service -metadata: - name: {{ include "loki.rulerFullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "loki.rulerSelectorLabels" . | nindent 4 }} - {{- with .Values.ruler.serviceLabels }} - {{- toYaml . | nindent 4 }} - {{- end }} - annotations: - {{- with .Values.loki.serviceAnnotations }} - {{- toYaml . | nindent 4}} - {{- end }} - {{- with .Values.ruler.serviceAnnotations }} - {{- toYaml . | nindent 4}} - {{- end }} -spec: - type: ClusterIP - clusterIP: None - ports: - - name: http-metrics - port: 3100 - targetPort: http-metrics - protocol: TCP - - name: grpc - port: 9095 - targetPort: grpc - protocol: TCP - {{- with .Values.ruler.appProtocol.grpc }} - appProtocol: {{ . }} - {{- end }} - selector: - {{- include "loki.rulerSelectorLabels" . | nindent 4 }} -{{- end }} diff --git a/charts/loki/templates/ruler/statefulset-ruler.yaml b/charts/loki/templates/ruler/statefulset-ruler.yaml deleted file mode 100644 index 9583289..0000000 --- a/charts/loki/templates/ruler/statefulset-ruler.yaml +++ /dev/null @@ -1,265 +0,0 @@ -{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} -{{- if and $isDistributed .Values.ruler.enabled }} -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: {{ include "loki.rulerFullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "loki.rulerLabels" . | nindent 4 }} - app.kubernetes.io/part-of: memberlist - {{- with .Values.loki.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - replicas: {{ .Values.ruler.replicas }} - revisionHistoryLimit: {{ .Values.loki.revisionHistoryLimit }} - serviceName: {{ include "loki.rulerFullname" . }} - selector: - matchLabels: - {{- include "loki.rulerSelectorLabels" . | nindent 6 }} - template: - metadata: - annotations: - {{- include "loki.config.checksum" . | nindent 8 }} - {{- with .Values.loki.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.ruler.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - {{- include "loki.rulerLabels" . | nindent 8 }} - app.kubernetes.io/part-of: memberlist - {{- with merge (dict) .Values.loki.podLabels .Values.ruler.podLabels }} - {{- toYaml . | nindent 8 }} - {{- end }} - spec: - {{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.Version }} - {{- with .Values.ruler.topologySpreadConstraints }} - topologySpreadConstraints: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- end }} - serviceAccountName: {{ include "loki.serviceAccountName" . }} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.ruler.hostAliases }} - hostAliases: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- include "loki.rulerPriorityClassName" . | nindent 6 }} - securityContext: - {{- toYaml .Values.loki.podSecurityContext | nindent 8 }} - terminationGracePeriodSeconds: {{ .Values.ruler.terminationGracePeriodSeconds }} - {{- with .Values.ruler.initContainers }} - initContainers: - {{- toYaml . | nindent 8 }} - {{- end }} - containers: - {{- if and .Values.sidecar.rules.enabled .Values.ruler.sidecar }} - - name: loki-sc-rules - {{- if .Values.sidecar.image.sha }} - image: "{{ .Values.sidecar.image.repository }}:{{ .Values.sidecar.image.tag }}@sha256:{{ .Values.sidecar.image.sha }}" - {{- else }} - image: "{{ .Values.sidecar.image.repository }}:{{ .Values.sidecar.image.tag }}" - {{- end }} - imagePullPolicy: {{ .Values.sidecar.image.pullPolicy }} - 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 }}" - - 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.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.livenessProbe }} - livenessProbe: - {{- toYaml .Values.sidecar.livenessProbe | nindent 12 }} - {{- end }} - {{- if .Values.sidecar.readinessProbe }} - readinessProbe: - {{- toYaml .Values.sidecar.readinessProbe | nindent 12 }} - {{- end }} - {{- if .Values.sidecar.resources }} - resources: - {{- toYaml .Values.sidecar.resources | nindent 12 }} - {{- end }} - {{- if .Values.sidecar.securityContext }} - securityContext: - {{- toYaml .Values.sidecar.securityContext | nindent 12 }} - {{- end }} - volumeMounts: - - name: sc-rules-volume - mountPath: {{ .Values.sidecar.rules.folder | quote }} - {{- end}} - - name: ruler - image: {{ include "loki.image" . }} - imagePullPolicy: {{ .Values.loki.image.pullPolicy }} - args: - - -config.file=/etc/loki/config/config.yaml - - -target=ruler - {{- with (concat .Values.global.extraArgs .Values.ruler.extraArgs) | uniq }} - {{- toYaml . | nindent 12 }} - {{- end }} - ports: - - name: http-metrics - containerPort: 3100 - protocol: TCP - - name: grpc - containerPort: 9095 - protocol: TCP - - name: http-memberlist - containerPort: 7946 - protocol: TCP - {{- with (concat .Values.global.extraEnv .Values.ruler.extraEnv) | uniq }} - env: - {{- toYaml . | nindent 12 }} - {{- end }} - {{- with (concat .Values.global.extraEnvFrom .Values.ruler.extraEnvFrom) | uniq }} - envFrom: - {{- toYaml . | nindent 12 }} - {{- end }} - securityContext: - {{- toYaml .Values.loki.containerSecurityContext | nindent 12 }} - readinessProbe: - {{- toYaml .Values.loki.readinessProbe | nindent 12 }} - volumeMounts: - - name: config - mountPath: /etc/loki/config - - name: runtime-config - mountPath: /etc/loki/runtime-config - - name: data - mountPath: /var/loki - - name: tmp - mountPath: /tmp/loki - {{- if .Values.enterprise.enabled }} - - name: license - mountPath: /etc/loki/license - {{- end }} - {{- if and .Values.sidecar.rules.enabled .Values.ruler.sidecar }} - - name: sc-rules-volume - mountPath: {{ .Values.sidecar.rules.folder | quote }} - {{- end}} - {{- range $dir, $_ := .Values.ruler.directories }} - - name: {{ include "loki.rulerRulesDirName" $dir }} - mountPath: /etc/loki/rules/{{ $dir }} - {{- end }} - {{- with (concat .Values.global.extraVolumeMounts .Values.ruler.extraVolumeMounts) | uniq }} - {{- toYaml . | nindent 12 }} - {{- end }} - resources: - {{- toYaml .Values.ruler.resources | nindent 12 }} - {{- with .Values.ruler.extraContainers }} - {{- toYaml . | nindent 8}} - {{- end }} - {{- with .Values.ruler.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.ruler.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.ruler.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.ruler.dnsConfig }} - dnsConfig: - {{- toYaml . | nindent 8 }} - {{- end }} - volumes: - - name: config - {{- include "loki.configVolume" . | nindent 10 }} - - name: runtime-config - configMap: - name: {{ template "loki.name" . }}-runtime - {{- if .Values.enterprise.enabled }} - - name: license - secret: - {{- if .Values.enterprise.useExternalLicense }} - secretName: {{ .Values.enterprise.externalLicenseName }} - {{- else }} - secretName: enterprise-logs-license - {{- end }} - {{- end }} - {{- if and .Values.sidecar.rules.enabled .Values.ruler.sidecar }} - - name: sc-rules-volume - {{- if .Values.sidecar.rules.sizeLimit }} - emptyDir: - sizeLimit: {{ .Values.sidecar.rules.sizeLimit }} - {{- else }} - emptyDir: {} - {{- end -}} - {{- end -}} - {{- range $dir, $_ := .Values.ruler.directories }} - - name: {{ include "loki.rulerRulesDirName" $dir }} - configMap: - name: {{ include "loki.rulerFullname" $ }}-{{ include "loki.rulerRulesDirName" $dir }} - {{- end }} - - name: tmp - emptyDir: {} - {{- with (concat .Values.global.extraVolumes .Values.ruler.extraVolumes) | uniq }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- if not .Values.ruler.persistence.enabled }} - - name: data - emptyDir: {} - {{- else }} - volumeClaimTemplates: - - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: data - {{- with .Values.ruler.persistence.annotations }} - annotations: - {{- . | toYaml | nindent 10 }} - {{- end }} - spec: - accessModes: - - ReadWriteOnce - {{- with .Values.ruler.persistence.storageClass }} - storageClassName: {{ if (eq "-" .) }}""{{ else }}{{ . }}{{ end }} - {{- end }} - resources: - requests: - storage: {{ .Values.ruler.persistence.size | quote }} - {{- end }} -{{- end }} diff --git a/charts/loki/templates/runtime-configmap.yaml b/charts/loki/templates/runtime-configmap.yaml deleted file mode 100644 index 2f38193..0000000 --- a/charts/loki/templates/runtime-configmap.yaml +++ /dev/null @@ -1,10 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ include "loki.name" . }}-runtime - namespace: {{ $.Release.Namespace }} - labels: - {{- include "loki.labels" . | nindent 4 }} -data: - runtime-config.yaml: | - {{- tpl (toYaml .Values.loki.runtimeConfig) . | nindent 4 }} diff --git a/charts/loki/templates/secret-license.yaml b/charts/loki/templates/secret-license.yaml deleted file mode 100644 index eaa519f..0000000 --- a/charts/loki/templates/secret-license.yaml +++ /dev/null @@ -1,11 +0,0 @@ -{{- if and (not .Values.enterprise.useExternalLicense) .Values.enterprise.enabled -}} -apiVersion: v1 -kind: Secret -metadata: - name: enterprise-logs-license - namespace: {{ $.Release.Namespace }} - labels: - {{- include "loki.labels" . | nindent 4 }} -data: - license.jwt: {{ .Values.enterprise.license.contents | b64enc }} -{{- end }} diff --git a/charts/loki/templates/securitycontextconstraints.yaml b/charts/loki/templates/securitycontextconstraints.yaml deleted file mode 100644 index c3a604d..0000000 --- a/charts/loki/templates/securitycontextconstraints.yaml +++ /dev/null @@ -1,40 +0,0 @@ -{{- if .Values.rbac.sccEnabled }} -apiVersion: security.openshift.io/v1 -kind: SecurityContextConstraints -metadata: - name: {{ include "loki.name" . }} - labels: - {{- include "loki.labels" . | nindent 4 }} -allowHostDirVolumePlugin: false -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 - - hostPath - - persistentVolumeClaim - - projected - - secret -{{- end }} diff --git a/charts/loki/templates/service-memberlist.yaml b/charts/loki/templates/service-memberlist.yaml deleted file mode 100644 index 3d46f23..0000000 --- a/charts/loki/templates/service-memberlist.yaml +++ /dev/null @@ -1,29 +0,0 @@ ---- -apiVersion: v1 -kind: Service -metadata: - name: {{ include "loki.memberlist" . }} - namespace: {{ $.Release.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/charts/loki/templates/serviceaccount.yaml b/charts/loki/templates/serviceaccount.yaml deleted file mode 100644 index dd89141..0000000 --- a/charts/loki/templates/serviceaccount.yaml +++ /dev/null @@ -1,21 +0,0 @@ -{{ if .Values.serviceAccount.create }} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ include "loki.serviceAccountName" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "loki.labels" . | nindent 4 }} - {{- with .Values.serviceAccount.labels }} - {{- toYaml . | nindent 4 }} - {{- end }} - {{- with .Values.serviceAccount.annotations }} - annotations: - {{- tpl (toYaml . | nindent 4) $ }} - {{- end }} -automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }} -{{- with .Values.serviceAccount.imagePullSecrets }} -imagePullSecrets: - {{- toYaml . | nindent 2 }} -{{- end }} -{{- end }} diff --git a/charts/loki/templates/single-binary/_helpers-single-binary.tpl b/charts/loki/templates/single-binary/_helpers-single-binary.tpl deleted file mode 100644 index 4ea3c6d..0000000 --- a/charts/loki/templates/single-binary/_helpers-single-binary.tpl +++ /dev/null @@ -1,34 +0,0 @@ -{{/* -singleBinary common labels -*/}} -{{- define "loki.singleBinaryLabels" -}} -{{ include "loki.labels" . }} -app.kubernetes.io/component: single-binary -{{- end }} - - -{{/* singleBinary selector labels */}} -{{- define "loki.singleBinarySelectorLabels" -}} -{{ include "loki.selectorLabels" . }} -app.kubernetes.io/component: single-binary -{{- end }} - -{{/* -singleBinary priority class name -*/}} -{{- define "loki.singleBinaryPriorityClassName" -}} -{{- $pcn := coalesce .Values.global.priorityClassName .Values.singleBinary.priorityClassName -}} -{{- if $pcn }} -priorityClassName: {{ $pcn }} -{{- end }} -{{- end }} - -{{/* singleBinary replicas calculation */}} -{{- define "loki.singleBinaryReplicas" -}} -{{- $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/charts/loki/templates/single-binary/hpa.yaml b/charts/loki/templates/single-binary/hpa.yaml deleted file mode 100644 index c529f18..0000000 --- a/charts/loki/templates/single-binary/hpa.yaml +++ /dev/null @@ -1,51 +0,0 @@ -{{- $isSingleBinary := eq (include "loki.deployment.isSingleBinary" .) "true" -}} -{{- $usingObjectStorage := eq (include "loki.isUsingObjectStorage" .) "true" }} -{{- $autoscalingv2 := .Capabilities.APIVersions.Has "autoscaling/v2" -}} -{{- if and $isSingleBinary $usingObjectStorage ( .Values.singleBinary.autoscaling.enabled ) }} -{{- if $autoscalingv2 }} -apiVersion: autoscaling/v2 -{{- else }} -apiVersion: autoscaling/v2beta1 -{{- end }} -kind: HorizontalPodAutoscaler -metadata: - name: {{ include "loki.singleBinaryFullname" . }} - labels: - {{- include "loki.singleBinaryLabels" . | nindent 4 }} -spec: - scaleTargetRef: - apiVersion: apps/v1 - kind: StatefulSet - name: {{ include "loki.singleBinaryFullname" . }} - minReplicas: {{ .Values.singleBinary.autoscaling.minReplicas }} - maxReplicas: {{ .Values.singleBinary.autoscaling.maxReplicas }} - {{- with .Values.singleBinary.autoscaling.behavior }} - behavior: - {{- toYaml . | nindent 4 }} - {{- end }} - metrics: - {{- with .Values.singleBinary.autoscaling.targetMemoryUtilizationPercentage }} - - type: Resource - resource: - name: memory - {{- if $autoscalingv2 }} - target: - type: Utilization - averageUtilization: {{ . }} - {{- else }} - targetAverageUtilization: {{ . }} - {{- end }} - {{- end }} - {{- with .Values.singleBinary.autoscaling.targetCPUUtilizationPercentage }} - - type: Resource - resource: - name: cpu - {{- if $autoscalingv2 }} - target: - type: Utilization - averageUtilization: {{ . }} - {{- else }} - targetAverageUtilization: {{ . }} - {{- end }} - {{- end }} -{{- end }} diff --git a/charts/loki/templates/single-binary/pdb.yaml b/charts/loki/templates/single-binary/pdb.yaml deleted file mode 100644 index bb1e1cc..0000000 --- a/charts/loki/templates/single-binary/pdb.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{- $isSingleBinary := eq (include "loki.deployment.isSingleBinary" .) "true" -}} -{{- if and .Values.podDisruptionBudget $isSingleBinary -}} ---- -apiVersion: policy/v1 -kind: PodDisruptionBudget -metadata: - name: {{ template "loki.fullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "loki.labels" . | nindent 4 }} -spec: - selector: - matchLabels: - {{- include "loki.singleBinarySelectorLabels" . | nindent 6 }} -{{ toYaml .Values.podDisruptionBudget | indent 2 }} -{{- end }} diff --git a/charts/loki/templates/single-binary/service-headless.yaml b/charts/loki/templates/single-binary/service-headless.yaml deleted file mode 100644 index 7522240..0000000 --- a/charts/loki/templates/single-binary/service-headless.yaml +++ /dev/null @@ -1,35 +0,0 @@ -{{- $isSingleBinary := eq (include "loki.deployment.isSingleBinary" .) "true" -}} -{{- if $isSingleBinary }} ---- -apiVersion: v1 -kind: Service -metadata: - name: {{ include "loki.name" . }}-headless - namespace: {{ $.Release.Namespace }} - labels: - {{- include "loki.labels" . | nindent 4 }} - {{- with .Values.loki.serviceLabels }} - {{- toYaml . | nindent 4}} - {{- end }} - {{- with .Values.singleBinary.service.labels }} - {{- toYaml . | nindent 4}} - {{- end }} - variant: headless - prometheus.io/service-monitor: "false" - annotations: - {{- with .Values.loki.serviceAnnotations }} - {{- toYaml . | nindent 4}} - {{- end }} - {{- with .Values.singleBinary.service.annotations }} - {{- toYaml . | nindent 4}} - {{- end }} -spec: - clusterIP: None - ports: - - name: http-metrics - port: {{ .Values.loki.server.http_listen_port }} - targetPort: http-metrics - protocol: TCP - selector: - {{- include "loki.selectorLabels" . | nindent 4 }} -{{- end }} diff --git a/charts/loki/templates/single-binary/service.yaml b/charts/loki/templates/single-binary/service.yaml deleted file mode 100644 index 352fcad..0000000 --- a/charts/loki/templates/single-binary/service.yaml +++ /dev/null @@ -1,40 +0,0 @@ -{{- $isSingleBinary := eq (include "loki.deployment.isSingleBinary" .) "true" -}} -{{- if $isSingleBinary }} ---- -apiVersion: v1 -kind: Service -metadata: - name: {{ include "loki.singleBinaryFullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "loki.labels" . | nindent 4 }} - {{- with .Values.loki.serviceLabels }} - {{- toYaml . | nindent 4}} - {{- end }} - {{- with .Values.singleBinary.service.labels }} - {{- toYaml . | nindent 4}} - {{- end }} - annotations: - {{- with .Values.loki.serviceAnnotations }} - {{- toYaml . | nindent 4}} - {{- end }} - {{- with .Values.singleBinary.service.annotations }} - {{- toYaml . | nindent 4}} - {{- end }} -spec: - type: ClusterIP - 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.singleBinarySelectorLabels" . | nindent 4 }} - {{- with .Values.singleBinary.selectorLabels }} - {{- tpl (toYaml .) $ | nindent 4 }} - {{- end }} -{{- end }} diff --git a/charts/loki/templates/single-binary/statefulset.yaml b/charts/loki/templates/single-binary/statefulset.yaml deleted file mode 100644 index 54f3d92..0000000 --- a/charts/loki/templates/single-binary/statefulset.yaml +++ /dev/null @@ -1,278 +0,0 @@ -{{- $isSingleBinary := eq (include "loki.deployment.isSingleBinary" .) "true" -}} -{{- if $isSingleBinary }} ---- -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: {{ include "loki.singleBinaryFullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "loki.singleBinaryLabels" . | nindent 4 }} - app.kubernetes.io/part-of: memberlist - {{- if or (not (empty .Values.loki.annotations)) (not (empty .Values.singleBinary.annotations))}} - annotations: - {{- with .Values.loki.annotations }} - {{- toYaml . | nindent 4 }} - {{- end }} - {{- with .Values.singleBinary.annotations }} - {{- toYaml . | nindent 4 }} - {{- end }} - {{- end }} -spec: - replicas: {{ include "loki.singleBinaryReplicas" . }} - podManagementPolicy: Parallel - updateStrategy: - rollingUpdate: - partition: 0 - serviceName: {{ include "loki.singleBinaryFullname" . }}-headless - revisionHistoryLimit: {{ .Values.loki.revisionHistoryLimit }} - {{- if and (semverCompare ">= 1.23-0" (include "loki.kubeVersion" .)) (.Values.singleBinary.persistence.enableStatefulSetAutoDeletePVC) (.Values.singleBinary.persistence.enabled) }} - {{/* - Data on the singleBinary nodes is easy to replace, so we want to always delete PVCs to make - operation easier, and will rely on re-fetching data when needed. - */}} - persistentVolumeClaimRetentionPolicy: - whenDeleted: Delete - whenScaled: Delete - {{- end }} - selector: - matchLabels: - {{- include "loki.singleBinarySelectorLabels" . | nindent 6 }} - template: - metadata: - annotations: - checksum/config: {{ include "loki.configMapOrSecretContentHash" (dict "ctx" . "name" "/config.yaml") }} - {{- with .Values.loki.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.singleBinary.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - {{- include "loki.singleBinarySelectorLabels" . | nindent 8 }} - {{- with .Values.loki.podLabels }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.singleBinary.podLabels }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.singleBinary.selectorLabels }} - {{- tpl (toYaml .) $ | nindent 8 }} - {{- end }} - app.kubernetes.io/part-of: memberlist - spec: - serviceAccountName: {{ include "loki.serviceAccountName" . }} - automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }} - {{ include "loki.enableServiceLinks" . }} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- include "loki.singleBinaryPriorityClassName" . | nindent 6 }} - securityContext: - {{- toYaml .Values.loki.podSecurityContext | nindent 8 }} - terminationGracePeriodSeconds: {{ .Values.singleBinary.terminationGracePeriodSeconds }} - {{- if .Values.singleBinary.initContainers }} - initContainers: - {{- with .Values.singleBinary.initContainers }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- end }} - containers: - {{- if .Values.sidecar.rules.enabled }} - - name: loki-sc-rules - {{- if .Values.sidecar.image.sha }} - image: "{{ .Values.sidecar.image.repository }}:{{ .Values.sidecar.image.tag }}@sha256:{{ .Values.sidecar.image.sha }}" - {{- else }} - image: "{{ .Values.sidecar.image.repository }}:{{ .Values.sidecar.image.tag }}" - {{- end }} - imagePullPolicy: {{ .Values.sidecar.image.pullPolicy }} - 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 }}" - - 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.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.livenessProbe }} - livenessProbe: - {{- toYaml .Values.sidecar.livenessProbe | nindent 12 }} - {{- end }} - {{- if .Values.sidecar.readinessProbe }} - readinessProbe: - {{- toYaml .Values.sidecar.readinessProbe | nindent 12 }} - {{- end }} - {{- if .Values.sidecar.resources }} - resources: - {{- toYaml .Values.sidecar.resources | nindent 12 }} - {{- end }} - {{- if .Values.sidecar.securityContext }} - securityContext: - {{- toYaml .Values.sidecar.securityContext | nindent 12 }} - {{- end }} - volumeMounts: - - name: sc-rules-volume - mountPath: {{ .Values.sidecar.rules.folder | quote }} - {{- end}} - - name: loki - image: {{ include "loki.image" . }} - imagePullPolicy: {{ .Values.loki.image.pullPolicy }} - args: - - -config.file=/etc/loki/config/config.yaml - - -target={{ .Values.singleBinary.targetModule }} - {{- with .Values.singleBinary.extraArgs }} - {{- toYaml . | nindent 12 }} - {{- end }} - ports: - - 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 - {{- with .Values.singleBinary.extraEnv }} - env: - {{- toYaml . | nindent 12 }} - {{- end }} - {{- with .Values.singleBinary.extraEnvFrom }} - envFrom: - {{- toYaml . | nindent 12 }} - {{- end }} - securityContext: - {{- toYaml .Values.loki.containerSecurityContext | nindent 12 }} - readinessProbe: - {{- toYaml .Values.loki.readinessProbe | nindent 12 }} - volumeMounts: - - name: tmp - mountPath: /tmp - - name: config - mountPath: /etc/loki/config - - name: runtime-config - mountPath: /etc/loki/runtime-config - {{- if .Values.singleBinary.persistence.enabled }} - - name: storage - mountPath: /var/loki - {{- end }} - {{- if .Values.enterprise.enabled }} - - name: license - mountPath: /etc/loki/license - {{- end }} - {{- if .Values.sidecar.rules.enabled }} - - name: sc-rules-volume - mountPath: {{ .Values.sidecar.rules.folder | quote }} - {{- end}} - {{- with .Values.singleBinary.extraVolumeMounts }} - {{- toYaml . | nindent 12 }} - {{- end }} - resources: - {{- toYaml .Values.singleBinary.resources | nindent 12 }} - {{- with .Values.singleBinary.extraContainers }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.singleBinary.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.singleBinary.dnsConfig }} - dnsConfig: - {{- tpl . $ | nindent 8 }} - {{- end }} - {{- with .Values.singleBinary.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.singleBinary.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} - volumes: - - name: tmp - emptyDir: {} - - name: config - {{- include "loki.configVolume" . | nindent 10 }} - - name: runtime-config - configMap: - name: {{ template "loki.name" . }}-runtime - {{- if .Values.enterprise.enabled }} - - name: license - secret: - {{- if .Values.enterprise.useExternalLicense }} - secretName: {{ .Values.enterprise.externalLicenseName }} - {{- else }} - secretName: enterprise-logs-license - {{- end }} - {{- end }} - {{- if .Values.sidecar.rules.enabled }} - - name: sc-rules-volume - {{- if .Values.sidecar.rules.sizeLimit }} - emptyDir: - sizeLimit: {{ .Values.sidecar.rules.sizeLimit }} - {{- else }} - emptyDir: {} - {{- end -}} - {{- end -}} - {{- with .Values.singleBinary.extraVolumes }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- if .Values.singleBinary.persistence.enabled }} - volumeClaimTemplates: - - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: storage - {{- with .Values.singleBinary.persistence.annotations }} - annotations: - {{- toYaml . | nindent 10 }} - {{- end }} - spec: - accessModes: - - ReadWriteOnce - {{- with .Values.singleBinary.persistence.storageClass }} - storageClassName: {{ if (eq "-" .) }}""{{ else }}{{ . }}{{ end }} - {{- end }} - resources: - requests: - storage: {{ .Values.singleBinary.persistence.size | quote }} - {{- with .Values.singleBinary.persistence.selector }} - selector: - {{- toYaml . | nindent 10 }} - {{- end }} - {{- end }} -{{- end }} diff --git a/charts/loki/templates/table-manager/_helpers-table-manager.tpl b/charts/loki/templates/table-manager/_helpers-table-manager.tpl deleted file mode 100644 index ff25832..0000000 --- a/charts/loki/templates/table-manager/_helpers-table-manager.tpl +++ /dev/null @@ -1,32 +0,0 @@ -{{/* -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/charts/loki/templates/table-manager/deployment-table-manager.yaml b/charts/loki/templates/table-manager/deployment-table-manager.yaml deleted file mode 100644 index a45ee48..0000000 --- a/charts/loki/templates/table-manager/deployment-table-manager.yaml +++ /dev/null @@ -1,126 +0,0 @@ -{{- if .Values.tableManager.enabled }} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "loki.tableManagerFullname" . }} - 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: - metadata: - annotations: - checksum/config: {{ include "loki.configMapOrSecretContentHash" (dict "ctx" . "name" "/config.yaml") }} - {{- with .Values.loki.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.tableManager.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - {{- include "loki.tableManagerSelectorLabels" . | nindent 8 }} - {{- with .Values.loki.podLabels }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.tableManager.podLabels }} - {{- toYaml . | nindent 8 }} - {{- end }} - spec: - serviceAccountName: {{ include "loki.serviceAccountName" . }} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- include "loki.tableManagerPriorityClassName" . | nindent 6 }} - securityContext: - {{- toYaml .Values.loki.podSecurityContext | nindent 8 }} - terminationGracePeriodSeconds: {{ .Values.tableManager.terminationGracePeriodSeconds }} - containers: - - name: table-manager - image: {{ include "loki.image" . }} - imagePullPolicy: {{ .Values.loki.image.pullPolicy }} - args: - - -config.file=/etc/loki/config/config.yaml - - -target=table-manager - {{- with (concat .Values.global.extraArgs .Values.tableManager.extraArgs) | uniq }} - {{- toYaml . | nindent 12 }} - {{- end }} - ports: - - name: http-metrics - containerPort: {{ .Values.loki.server.http_listen_port }} - protocol: TCP - - name: grpc - containerPort: {{ .Values.loki.server.grpc_listen_port }} - protocol: TCP - {{- with .Values.tableManager.extraEnv }} - env: - {{- toYaml . | nindent 12 }} - {{- end }} - {{- with .Values.tableManager.extraEnvFrom }} - envFrom: - {{- toYaml . | nindent 12 }} - {{- end }} - securityContext: - {{- toYaml .Values.loki.containerSecurityContext | nindent 12 }} - readinessProbe: - {{- toYaml .Values.loki.readinessProbe | nindent 12 }} - livenessProbe: - {{- toYaml .Values.loki.livenessProbe | nindent 12 }} - volumeMounts: - - name: config - mountPath: /etc/loki/config - {{- if .Values.enterprise.enabled }} - - name: license - mountPath: /etc/loki/license - {{- end }} - {{- with (concat .Values.global.extraVolumeMounts .Values.tableManager.extraVolumeMounts) | uniq }} - {{- toYaml . | nindent 12 }} - {{- end }} - resources: - {{- toYaml .Values.tableManager.resources | nindent 12 }} - {{- if .Values.tableManager.extraContainers }} - {{- toYaml .Values.tableManager.extraContainers | nindent 8}} - {{- end }} - {{- with .Values.tableManager.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.tableManager.dnsConfig }} - dnsConfig: - {{- tpl . $ | nindent 8 }} - {{- end }} - {{- with .Values.tableManager.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.tableManager.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} - volumes: - - name: config - {{- include "loki.configVolume" . | nindent 10 }} - {{- if .Values.enterprise.enabled }} - - name: license - secret: - {{- if .Values.enterprise.useExternalLicense }} - secretName: {{ .Values.enterprise.externalLicenseName }} - {{- else }} - secretName: enterprise-logs-license - {{- end }} - {{- end }} - {{- with (concat .Values.global.extraVolumes .Values.tableManager.extraVolumes) | uniq }} - {{- toYaml . | nindent 8 }} - {{- end }} -{{- end }} diff --git a/charts/loki/templates/table-manager/service-table-manager.yaml b/charts/loki/templates/table-manager/service-table-manager.yaml deleted file mode 100644 index 214cd36..0000000 --- a/charts/loki/templates/table-manager/service-table-manager.yaml +++ /dev/null @@ -1,36 +0,0 @@ -{{- if .Values.tableManager.enabled }} -apiVersion: v1 -kind: Service -metadata: - name: {{ include "loki.fullname" . }}-table-manager - labels: - {{- include "loki.labels" . | nindent 4 }} - {{- with .Values.loki.serviceLabels }} - {{- toYaml . | nindent 4}} - {{- end }} - {{- with .Values.tableManager.service.labels }} - {{- toYaml . | nindent 4}} - {{- end }} - app.kubernetes.io/component: table-manager - annotations: - {{- with .Values.loki.serviceAnnotations }} - {{- toYaml . | nindent 4}} - {{- end }} - {{- with .Values.tableManager.service.annotations }} - {{- toYaml . | nindent 4}} - {{- end }} -spec: - type: ClusterIP - 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: table-manager -{{- end }} diff --git a/charts/loki/templates/table-manager/servicemonitor-table-manager.yaml b/charts/loki/templates/table-manager/servicemonitor-table-manager.yaml deleted file mode 100644 index 09aa727..0000000 --- a/charts/loki/templates/table-manager/servicemonitor-table-manager.yaml +++ /dev/null @@ -1,57 +0,0 @@ -{{- if .Values.tableManager.enabled }} -{{- with .Values.serviceMonitor }} -{{- if .enabled }} -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - name: {{ include "loki.tableManagerFullname" $ }} - {{- with .namespace }} - 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/charts/loki/templates/tests/_helpers.tpl b/charts/loki/templates/tests/_helpers.tpl deleted file mode 100644 index 9ef7c15..0000000 --- a/charts/loki/templates/tests/_helpers.tpl +++ /dev/null @@ -1,16 +0,0 @@ -{{/* -Docker image name for loki helm test -*/}} -{{- define "loki.helmTestImage" -}} -{{- $dict := dict "service" .Values.test.image "global" .Values.global.image "defaultVersion" "latest" -}} -{{- include "loki.baseImage" $dict -}} -{{- end -}} - - -{{/* -test common labels -*/}} -{{- define "loki.helmTestLabels" -}} -{{ include "loki.labels" . }} -app.kubernetes.io/component: helm-test -{{- end }} diff --git a/charts/loki/templates/tests/test-canary.yaml b/charts/loki/templates/tests/test-canary.yaml deleted file mode 100644 index 4d99228..0000000 --- a/charts/loki/templates/tests/test-canary.yaml +++ /dev/null @@ -1,36 +0,0 @@ -{{- with .Values.test }} -{{- if (and .enabled $.Values.lokiCanary.enabled) }} ---- -apiVersion: v1 -kind: Pod -metadata: - name: "{{ include "loki.name" $ }}-helm-test" - namespace: {{ $.Release.Namespace }} - labels: - {{- include "loki.helmTestLabels" $ | nindent 4 }} - {{- with .labels }} - {{- toYaml . | nindent 4 }} - {{- end }} - annotations: - {{- with .annotations }} - {{- toYaml . | nindent 4 }} - {{- end }} - "helm.sh/hook": test -spec: - containers: - - name: loki-helm-test - image: {{ include "loki.helmTestImage" $ }} - env: - - name: CANARY_SERVICE_ADDRESS - value: "{{ .canaryServiceAddress }}" - - name: CANARY_PROMETHEUS_ADDRESS - value: "{{ .prometheusAddress }}" - {{- with .timeout }} - - name: CANARY_TEST_TIMEOUT - value: "{{ . }}" - {{- end }} - args: - - -test.v - restartPolicy: Never -{{- end }} -{{- end }} diff --git a/charts/loki/templates/tokengen/_helpers.yaml b/charts/loki/templates/tokengen/_helpers.yaml deleted file mode 100644 index 3c881f2..0000000 --- a/charts/loki/templates/tokengen/_helpers.yaml +++ /dev/null @@ -1,22 +0,0 @@ -{{/* -tokengen fullname -*/}} -{{- define "enterprise-logs.tokengenFullname" -}} -{{ include "loki.name" . }}-tokengen -{{- end }} - -{{/* -tokengen common labels -*/}} -{{- define "enterprise-logs.tokengenLabels" -}} -{{ include "loki.labels" . }} -app.kubernetes.io/component: tokengen -{{- end }} - -{{/* -tokengen selector labels -*/}} -{{- define "enterprise-logs.tokengenSelectorLabels" -}} -{{ include "loki.selectorLabels" . }} -app.kubernetes.io/component: tokengen -{{- end }} diff --git a/charts/loki/templates/tokengen/clusterrole-tokengen.yaml b/charts/loki/templates/tokengen/clusterrole-tokengen.yaml deleted file mode 100644 index d357622..0000000 --- a/charts/loki/templates/tokengen/clusterrole-tokengen.yaml +++ /dev/null @@ -1,21 +0,0 @@ -{{ if and .Values.enterprise.tokengen.enabled .Values.enterprise.enabled }} ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: {{ if not .Values.rbac.namespaced }}Cluster{{ end }}Role -metadata: - name: {{ template "enterprise-logs.tokengenFullname" . }} - labels: - {{- include "enterprise-logs.tokengenLabels" . | nindent 4 }} - {{- with .Values.enterprise.tokengen.labels }} - {{- toYaml . | nindent 4 }} - {{- end }} - annotations: - {{- with .Values.enterprise.tokengen.annotations }} - {{- toYaml . | nindent 4 }} - {{- end }} - "helm.sh/hook": post-install -rules: - - apiGroups: [""] - resources: ["secrets"] - verbs: ["create", "get", "patch"] -{{- end }} diff --git a/charts/loki/templates/tokengen/clusterrolebinding-tokengen.yaml b/charts/loki/templates/tokengen/clusterrolebinding-tokengen.yaml deleted file mode 100644 index fb21d8f..0000000 --- a/charts/loki/templates/tokengen/clusterrolebinding-tokengen.yaml +++ /dev/null @@ -1,25 +0,0 @@ -{{ if and .Values.enterprise.tokengen.enabled .Values.enterprise.enabled }} ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: {{ if not .Values.rbac.namespaced }}Cluster{{ end }}RoleBinding -metadata: - name: {{ template "enterprise-logs.tokengenFullname" . }} - labels: - {{- include "enterprise-logs.tokengenLabels" . | nindent 4 }} - {{- with .Values.enterprise.tokengen.labels }} - {{- toYaml . | nindent 4 }} - {{- end }} - annotations: - {{- with .Values.enterprise.tokengen.annotations }} - {{- toYaml . | nindent 4 }} - {{- end }} - "helm.sh/hook": post-install -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: {{ if not .Values.rbac.namespaced }}Cluster{{ end }}Role - name: {{ template "enterprise-logs.tokengenFullname" . }} -subjects: - - kind: ServiceAccount - name: {{ template "enterprise-logs.tokengenFullname" . }} - namespace: {{ $.Release.Namespace }} -{{- end }} diff --git a/charts/loki/templates/tokengen/job-tokengen.yaml b/charts/loki/templates/tokengen/job-tokengen.yaml deleted file mode 100644 index b0950d6..0000000 --- a/charts/loki/templates/tokengen/job-tokengen.yaml +++ /dev/null @@ -1,143 +0,0 @@ -{{ if and .Values.enterprise.tokengen.enabled .Values.enterprise.enabled }} ---- -apiVersion: batch/v1 -kind: Job -metadata: - name: {{ template "enterprise-logs.tokengenFullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "enterprise-logs.tokengenLabels" . | nindent 4 }} - {{- with .Values.enterprise.tokengen.labels }} - {{- toYaml . | nindent 4 }} - {{- end }} - annotations: - {{- with .Values.enterprise.tokengen.annotations }} - {{- toYaml . | nindent 4 }} - {{- end }} - "helm.sh/hook": post-install - "helm.sh/hook-weight": "10" -spec: - backoffLimit: 6 - completions: 1 - parallelism: 1 - template: - metadata: - labels: - {{- include "enterprise-logs.tokengenSelectorLabels" . | nindent 8 }} - {{- with .Values.enterprise.tokengen.labels }} - {{- toYaml . | nindent 8 }} - {{- end }} - annotations: - {{- with .Values.enterprise.tokengen.annotations }} - {{- toYaml . | nindent 8 }} - {{- end }} - spec: - {{- with .Values.enterprise.tokengen.priorityClassName }} - priorityClassName: {{ . }} - {{- end }} - securityContext: - {{- toYaml .Values.enterprise.tokengen.securityContext | nindent 8 }} - {{- if .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml .Values.imagePullSecrets | nindent 8 }} - {{- end }} - initContainers: - - name: loki - image: {{ template "loki.image" . }} - imagePullPolicy: {{ .Values.loki.image.pullPolicy }} - args: - # The shared emptyDir exists only while the job is running, and is deleted once the job is completed. - # The tokengen generates a new admin token in case the 'token-file' file doesn't exist. - # As a result, subsequent executions of this tokengen job will generate new admin tokens. - # Note that previously generated tokens remain valid, as these remain present in the object storage. - - -config.file=/etc/loki/config/config.yaml - - -target={{ .Values.enterprise.tokengen.targetModule }} - - -tokengen.token-file=/shared/admin-token - {{- with .Values.enterprise.tokengen.extraArgs }} - {{- toYaml . | nindent 12 }} - {{- end }} - volumeMounts: - {{- if .Values.enterprise.tokengen.extraVolumeMounts }} - {{ toYaml .Values.enterprise.tokengen.extraVolumeMounts | nindent 12 }} - {{- end }} - - name: shared - mountPath: /shared - - name: config - mountPath: /etc/loki/config - - name: runtime-config - mountPath: /etc/loki/runtime-config - - name: license - mountPath: /etc/loki/license - env: - {{- if .Values.enterprise.tokengen.env }} - {{ toYaml .Values.enterprise.tokengen.env | nindent 12 }} - {{- end }} - {{- with .Values.enterprise.tokengen.extraEnvFrom }} - envFrom: - {{- toYaml . | nindent 12 }} - {{- end }} - containers: - - name: create-secret - image: {{ include "loki.kubectlImage" . }} - imagePullPolicy: {{ .Values.kubectlImage.pullPolicy }} - command: - - /bin/bash - - -euc - - | - # Create or update admin token secrets generated by tokengen job - kubectl create secret generic "{{ include "enterprise-logs.adminTokenSecret" . }}" \ - --from-file=token=/shared/admin-token \ - --dry-run=client -o yaml \ - | kubectl apply -f - - {{- with .Values.enterprise.adminToken.additionalNamespaces }} - {{- range . }} - kubectl --namespace "{{ . }}" create secret generic "{{ include "enterprise-logs.adminTokenSecret" $ }}" \ - --from-file=token=/shared/admin-token \ - --dry-run=client -o yaml \ - | kubectl apply -f - - {{- end }} - {{- end }} - volumeMounts: - {{- if .Values.enterprise.tokengen.extraVolumeMounts }} - {{ toYaml .Values.enterprise.tokengen.extraVolumeMounts | nindent 12 }} - {{- end }} - - name: shared - mountPath: /shared - - name: config - mountPath: /etc/loki/config - - name: license - mountPath: /etc/loki/license - restartPolicy: OnFailure - serviceAccount: {{ template "enterprise-logs.tokengenFullname" . }} - serviceAccountName: {{ template "enterprise-logs.tokengenFullname" . }} - {{- with .Values.enterprise.tokengen.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.enterprise.tokengen.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.enterprise.tokengen.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} - volumes: - - name: config - {{- include "loki.configVolume" . | nindent 10 }} - - name: runtime-config - configMap: - name: {{ template "loki.name" . }}-runtime - - name: license - secret: - {{- if .Values.enterprise.useExternalLicense }} - secretName: {{ .Values.enterprise.externalLicenseName }} - {{- else }} - secretName: enterprise-logs-license - {{- end }} - - name: shared - emptyDir: {} - {{- if .Values.enterprise.tokengen.extraVolumes }} - {{ toYaml .Values.enterprise.tokengen.extraVolumes | nindent 8 }} - {{- end }} -{{- end }} diff --git a/charts/loki/templates/tokengen/serviceaccount-tokengen.yaml b/charts/loki/templates/tokengen/serviceaccount-tokengen.yaml deleted file mode 100644 index 6f0e5a3..0000000 --- a/charts/loki/templates/tokengen/serviceaccount-tokengen.yaml +++ /dev/null @@ -1,18 +0,0 @@ -{{ if and .Values.enterprise.tokengen.enabled .Values.enterprise.enabled }} ---- -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ template "enterprise-logs.tokengenFullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "enterprise-logs.tokengenLabels" . | nindent 4 }} - {{- with .Values.enterprise.tokengen.labels }} - {{- toYaml . | nindent 4 }} - {{- end }} - annotations: - {{- with .Values.enterprise.tokengen.annotations }} - {{- toYaml . | nindent 4 }} - {{- end }} - "helm.sh/hook": post-install -{{- end }} diff --git a/charts/loki/templates/validate.yaml b/charts/loki/templates/validate.yaml deleted file mode 100644 index 93e2490..0000000 --- a/charts/loki/templates/validate.yaml +++ /dev/null @@ -1,41 +0,0 @@ -{{- 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 }} - -{{- $singleBinaryReplicas := 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 $singleBinaryReplicas 1) }} -{{- fail "Cannot run more than 1 Single Binary replica without an object storage backend."}} -{{- end }} - -{{- if and $isUsingFilesystem (and (eq $singleBinaryReplicas 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 $singleBinaryReplicas 0) $atLeastOneDistributedReplica }} -{{- fail "You have more than zero replicas configured for both the single binary 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 $singleBinaryReplicas 0) $atLeastOneScalableReplica (ne .Values.deploymentMode "SingleBinary<->SimpleScalable") }} -{{- fail "You have more than zero replicas configured for both the single binary and simple scalable targets. If this was intentional change the deploymentMode to the transitional 'SingleBinary<->SimpleScalable' mode"}} -{{- end }} - -{{- 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 }} \ No newline at end of file diff --git a/charts/loki/templates/write/_helpers-write.tpl b/charts/loki/templates/write/_helpers-write.tpl deleted file mode 100644 index 8f526bc..0000000 --- a/charts/loki/templates/write/_helpers-write.tpl +++ /dev/null @@ -1,32 +0,0 @@ -{{/* -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/charts/loki/templates/write/hpa.yaml b/charts/loki/templates/write/hpa.yaml deleted file mode 100644 index ba88ee2..0000000 --- a/charts/loki/templates/write/hpa.yaml +++ /dev/null @@ -1,51 +0,0 @@ -{{- $isSimpleScalable := eq (include "loki.deployment.isScalable" .) "true" -}} -{{- $autoscalingv2 := .Capabilities.APIVersions.Has "autoscaling/v2" -}} -{{- if and $isSimpleScalable ( .Values.write.autoscaling.enabled ) }} -{{- if $autoscalingv2 }} -apiVersion: autoscaling/v2 -{{- else }} -apiVersion: autoscaling/v2beta1 -{{- end }} -kind: HorizontalPodAutoscaler -metadata: - name: {{ include "loki.writeFullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "loki.writeLabels" . | nindent 4 }} -spec: - scaleTargetRef: - apiVersion: apps/v1 - kind: StatefulSet - name: {{ include "loki.writeFullname" . }} - minReplicas: {{ .Values.write.autoscaling.minReplicas }} - maxReplicas: {{ .Values.write.autoscaling.maxReplicas }} - {{- with .Values.write.autoscaling.behavior }} - behavior: - {{- toYaml . | nindent 4 }} - {{- end }} - metrics: - {{- with .Values.write.autoscaling.targetMemoryUtilizationPercentage }} - - type: Resource - resource: - name: memory - {{- if $autoscalingv2 }} - target: - type: Utilization - averageUtilization: {{ . }} - {{- else }} - targetAverageUtilization: {{ . }} - {{- end }} - {{- end }} - {{- with .Values.write.autoscaling.targetCPUUtilizationPercentage }} - - type: Resource - resource: - name: cpu - {{- if $autoscalingv2 }} - target: - type: Utilization - averageUtilization: {{ . }} - {{- else }} - targetAverageUtilization: {{ . }} - {{- end }} - {{- end }} -{{- end }} diff --git a/charts/loki/templates/write/poddisruptionbudget-write.yaml b/charts/loki/templates/write/poddisruptionbudget-write.yaml deleted file mode 100644 index 24e1356..0000000 --- a/charts/loki/templates/write/poddisruptionbudget-write.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- $isSimpleScalable := eq (include "loki.deployment.isScalable" .) "true" -}} -{{- if and $isSimpleScalable (gt (int .Values.write.replicas) 1) }} -apiVersion: policy/v1 -kind: PodDisruptionBudget -metadata: - name: {{ include "loki.writeFullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "loki.writeLabels" . | nindent 4 }} -spec: - selector: - matchLabels: - {{- include "loki.writeSelectorLabels" . | nindent 6 }} - maxUnavailable: 1 -{{- end }} diff --git a/charts/loki/templates/write/service-write-headless.yaml b/charts/loki/templates/write/service-write-headless.yaml deleted file mode 100644 index 84cf5d7..0000000 --- a/charts/loki/templates/write/service-write-headless.yaml +++ /dev/null @@ -1,41 +0,0 @@ -{{- $isSimpleScalable := eq (include "loki.deployment.isScalable" .) "true" -}} -{{- if $isSimpleScalable }} ---- -apiVersion: v1 -kind: Service -metadata: - name: {{ include "loki.writeFullname" . }}-headless - namespace: {{ $.Release.Namespace }} - labels: - {{- include "loki.writeSelectorLabels" . | nindent 4 }} - {{- with .Values.loki.serviceLabels }} - {{- toYaml . | nindent 4}} - {{- end }} - {{- with .Values.write.service.labels }} - {{- toYaml . | nindent 4}} - {{- end }} - variant: headless - prometheus.io/service-monitor: "false" - annotations: - {{- with .Values.loki.serviceAnnotations }} - {{- toYaml . | nindent 4}} - {{- end }} - {{- with .Values.write.service.annotations }} - {{- toYaml . | nindent 4}} - {{- end }} -spec: - type: ClusterIP - clusterIP: None - 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 - appProtocol: tcp - selector: - {{- include "loki.writeSelectorLabels" . | nindent 4 }} -{{- end }} diff --git a/charts/loki/templates/write/service-write.yaml b/charts/loki/templates/write/service-write.yaml deleted file mode 100644 index 9603706..0000000 --- a/charts/loki/templates/write/service-write.yaml +++ /dev/null @@ -1,37 +0,0 @@ -{{- $isSimpleScalable := eq (include "loki.deployment.isScalable" .) "true" -}} -{{- if $isSimpleScalable }} ---- -apiVersion: v1 -kind: Service -metadata: - name: {{ include "loki.writeFullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "loki.writeLabels" . | nindent 4 }} - {{- with .Values.loki.serviceLabels }} - {{- toYaml . | nindent 4}} - {{- end }} - {{- with .Values.write.service.labels }} - {{- toYaml . | nindent 4}} - {{- end }} - annotations: - {{- with .Values.loki.serviceAnnotations }} - {{- toYaml . | nindent 4}} - {{- end }} - {{- with .Values.write.service.annotations }} - {{- toYaml . | nindent 4}} - {{- end }} -spec: - type: ClusterIP - 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.writeSelectorLabels" . | nindent 4 }} -{{- end }} diff --git a/charts/loki/templates/write/statefulset-write.yaml b/charts/loki/templates/write/statefulset-write.yaml deleted file mode 100644 index 57f97bc..0000000 --- a/charts/loki/templates/write/statefulset-write.yaml +++ /dev/null @@ -1,211 +0,0 @@ -{{- $isSimpleScalable := eq (include "loki.deployment.isScalable" .) "true" -}} -{{- if $isSimpleScalable }} ---- -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: {{ include "loki.writeFullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "loki.writeLabels" . | nindent 4 }} - app.kubernetes.io/part-of: memberlist - {{- if or (not (empty .Values.loki.annotations)) (not (empty .Values.write.annotations))}} - annotations: - {{- with .Values.loki.annotations }} - {{- toYaml . | nindent 4 }} - {{- end }} - {{- with .Values.write.annotations }} - {{- toYaml . | nindent 4 }} - {{- end }} - {{- end }} -spec: -{{- if not .Values.write.autoscaling.enabled }} - {{- if eq .Values.deploymentMode "SingleBinary" }} - replicas: 0 - {{- else }} - replicas: {{ .Values.write.replicas }} - {{- end }} -{{- end }} - podManagementPolicy: {{ .Values.write.podManagementPolicy }} - updateStrategy: - rollingUpdate: - partition: 0 - serviceName: {{ include "loki.writeFullname" . }}-headless - revisionHistoryLimit: {{ .Values.loki.revisionHistoryLimit }} - {{- if and (semverCompare ">= 1.23-0" (include "loki.kubeVersion" .)) (.Values.write.persistence.enableStatefulSetAutoDeletePVC) (.Values.write.persistence.volumeClaimsEnabled) }} - {{/* - Data on the write nodes is easy to replace, so we want to always delete PVCs to make - operation easier, and will rely on re-fetching data when needed. - */}} - persistentVolumeClaimRetentionPolicy: - whenDeleted: Delete - whenScaled: Delete - {{- end }} - selector: - matchLabels: - {{- include "loki.writeSelectorLabels" . | nindent 6 }} - template: - metadata: - annotations: - checksum/config: {{ include "loki.configMapOrSecretContentHash" (dict "ctx" . "name" "/config.yaml") }} - {{- with .Values.loki.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.write.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - {{- include "loki.writeLabels" . | nindent 8 }} - {{- with merge (dict) .Values.loki.podLabels .Values.write.podLabels }} - {{- tpl (toYaml .) $ | nindent 8 }} - {{- end }} - app.kubernetes.io/part-of: memberlist - spec: - serviceAccountName: {{ include "loki.serviceAccountName" . }} - automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }} - {{ include "loki.enableServiceLinks" . }} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- include "loki.writePriorityClassName" . | nindent 6 }} - securityContext: - {{- toYaml .Values.loki.podSecurityContext | nindent 8 }} - terminationGracePeriodSeconds: {{ .Values.write.terminationGracePeriodSeconds }} - {{- if .Values.write.initContainers }} - initContainers: - {{- with .Values.write.initContainers }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- end }} - containers: - - name: loki - image: {{ include "loki.image" . }} - imagePullPolicy: {{ .Values.loki.image.pullPolicy }} - args: - - -config.file=/etc/loki/config/config.yaml - - -target={{ .Values.write.targetModule }} - {{- with (concat .Values.global.extraArgs .Values.write.extraArgs) | uniq }} - {{- toYaml . | nindent 12 }} - {{- end }} - ports: - - 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 - {{- with (concat .Values.global.extraEnv .Values.write.extraEnv) | uniq }} - env: - {{- toYaml . | nindent 12 }} - {{- end }} - {{- with (concat .Values.global.extraEnvFrom .Values.write.extraEnvFrom) | uniq }} - envFrom: - {{- toYaml . | nindent 12 }} - {{- end }} - securityContext: - {{- toYaml .Values.loki.containerSecurityContext | nindent 12 }} - readinessProbe: - {{- toYaml .Values.loki.readinessProbe | nindent 12 }} - {{- if .Values.write.lifecycle }} - lifecycle: - {{- toYaml .Values.write.lifecycle | nindent 12 }} - {{- else if .Values.write.autoscaling.enabled }} - lifecycle: - preStop: - httpGet: - path: "/ingester/shutdown?terminate=false" - port: http-metrics - {{- end }} - volumeMounts: - - name: config - mountPath: /etc/loki/config - - name: runtime-config - mountPath: /etc/loki/runtime-config - - name: data - mountPath: /var/loki - {{- if .Values.enterprise.enabled }} - - name: license - mountPath: /etc/loki/license - {{- end }} - {{- with (concat .Values.global.extraVolumeMounts .Values.write.extraVolumeMounts) | uniq }} - {{- toYaml . | nindent 12 }} - {{- end }} - resources: - {{- toYaml .Values.write.resources | nindent 12 }} - {{- with .Values.write.extraContainers }} - {{- toYaml . | nindent 8}} - {{- end }} - {{- with .Values.write.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.write.dnsConfig }} - dnsConfig: - {{- tpl . $ | nindent 8 }} - {{- end }} - {{- with .Values.write.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.write.topologySpreadConstraints }} - topologySpreadConstraints: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.write.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} - volumes: - {{- if not .Values.write.persistence.volumeClaimsEnabled }} - - name: data - {{- toYaml .Values.write.persistence.dataVolumeParameters | nindent 10 }} - {{- end}} - - name: config - {{- include "loki.configVolume" . | nindent 10 }} - - name: runtime-config - configMap: - name: {{ template "loki.name" . }}-runtime - {{- if .Values.enterprise.enabled }} - - name: license - secret: - {{- if .Values.enterprise.useExternalLicense }} - secretName: {{ .Values.enterprise.externalLicenseName }} - {{- else }} - secretName: enterprise-logs-license - {{- end }} - {{- end }} - {{- with (concat .Values.global.extraVolumes .Values.write.extraVolumes) | uniq }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- if .Values.write.persistence.volumeClaimsEnabled }} - volumeClaimTemplates: - - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: data - {{- with .Values.write.persistence.annotations }} - annotations: - {{- toYaml . | nindent 10 }} - {{- end }} - spec: - accessModes: - - ReadWriteOnce - {{- with .Values.write.persistence.storageClass }} - storageClassName: {{ if (eq "-" .) }}""{{ else }}{{ . }}{{ end }} - {{- end }} - resources: - requests: - storage: {{ .Values.write.persistence.size | quote }} - {{- with .Values.write.persistence.selector }} - selector: - {{- toYaml . | nindent 10 }} - {{- end }} - {{- with .Values.write.extraVolumeClaimTemplates }} - {{- toYaml . | nindent 4 }} - {{- end }} - {{- end }} -{{- end }} diff --git a/charts/loki/test/config_test.go b/charts/loki/test/config_test.go deleted file mode 100644 index 6926c7b..0000000 --- a/charts/loki/test/config_test.go +++ /dev/null @@ -1,220 +0,0 @@ -package test - -import ( - "os" - "os/exec" - "testing" - - "github.com/stretchr/testify/require" - "gopkg.in/yaml.v2" -) - -type replicas struct { - Replicas int `yaml:"replicas"` -} -type loki struct { - Storage struct { - Type string `yaml:"type"` - } `yaml:"storage"` -} - -type values struct { - DeploymentMode string `yaml:"deploymentMode"` - Backend replicas `yaml:"backend"` - Compactor replicas `yaml:"compactor"` - Distributor replicas `yaml:"distributor"` - IndexGateway replicas `yaml:"indexGateway"` - Ingester replicas `yaml:"ingester"` - Querier replicas `yaml:"querier"` - QueryFrontend replicas `yaml:"queryFrontend"` - QueryScheduler replicas `yaml:"queryScheduler"` - Read replicas `yaml:"read"` - Ruler replicas `yaml:"ruler"` - SingleBinary replicas `yaml:"singleBinary"` - Write replicas `yaml:"write"` - - Loki loki `yaml:"loki"` -} - -func templateConfig(t *testing.T, vals values) error { - y, err := yaml.Marshal(&vals) - require.NoError(t, err) - require.Greater(t, len(y), 0) - - f, err := os.CreateTemp("", "values.yaml") - require.NoError(t, err) - - _, err = f.Write(y) - require.NoError(t, err) - - cmd := exec.Command("helm", "dependency", "build") - // Dependency build needs to be run from the parent directory where the chart is located. - cmd.Dir = "../" - var cmdOutput []byte - if cmdOutput, err = cmd.CombinedOutput(); err != nil { - t.Log("dependency build failed", "err", string(cmdOutput)) - return err - } - - cmd = exec.Command("helm", "template", "../", "--values", f.Name()) - if cmdOutput, err := cmd.CombinedOutput(); err != nil { - t.Log("template failed", "err", string(cmdOutput)) - return err - } - - return nil -} - -// E.Welch these tests fail because the templateConfig function above can't resolve the chart dependencies and I'm not sure how to fix this.... - -//func Test_InvalidConfigs(t *testing.T) { -// t.Run("running both single binary and scalable targets", func(t *testing.T) { -// vals := values{ -// SingleBinary: replicas{Replicas: 1}, -// Write: replicas{Replicas: 1}, -// Loki: loki{ -// Storage: struct { -// Type string `yaml:"type"` -// }{Type: "gcs"}, -// }, -// } -// require.Error(t, templateConfig(t, vals)) -// }) -// -// t.Run("running both single binary and distributed targets", func(t *testing.T) { -// vals := values{ -// SingleBinary: replicas{Replicas: 1}, -// Distributor: replicas{Replicas: 1}, -// Loki: loki{ -// Storage: struct { -// Type string `yaml:"type"` -// }{Type: "gcs"}, -// }, -// } -// require.Error(t, templateConfig(t, vals)) -// }) -// -// t.Run("running both scalable and distributed targets", func(t *testing.T) { -// vals := values{ -// Read: replicas{Replicas: 1}, -// Distributor: replicas{Replicas: 1}, -// Loki: loki{ -// Storage: struct { -// Type string `yaml:"type"` -// }{Type: "gcs"}, -// }, -// } -// require.Error(t, templateConfig(t, vals)) -// }) -// -// t.Run("running scalable with filesystem storage", func(t *testing.T) { -// vals := values{ -// Read: replicas{Replicas: 1}, -// Loki: loki{ -// Storage: struct { -// Type string `yaml:"type"` -// }{Type: "filesystem"}, -// }, -// } -// -// require.Error(t, templateConfig(t, vals)) -// }) -// -// t.Run("running distributed with filesystem storage", func(t *testing.T) { -// vals := values{ -// Distributor: replicas{Replicas: 1}, -// Loki: loki{ -// Storage: struct { -// Type string `yaml:"type"` -// }{Type: "filesystem"}, -// }, -// } -// -// require.Error(t, templateConfig(t, vals)) -// }) -//} -// -//func Test_ValidConfigs(t *testing.T) { -// t.Run("single binary", func(t *testing.T) { -// vals := values{ -// -// DeploymentMode: "SingleBinary", -// -// SingleBinary: replicas{Replicas: 1}, -// -// Backend: replicas{Replicas: 0}, -// Compactor: replicas{Replicas: 0}, -// Distributor: replicas{Replicas: 0}, -// IndexGateway: replicas{Replicas: 0}, -// Ingester: replicas{Replicas: 0}, -// Querier: replicas{Replicas: 0}, -// QueryFrontend: replicas{Replicas: 0}, -// QueryScheduler: replicas{Replicas: 0}, -// Read: replicas{Replicas: 0}, -// Ruler: replicas{Replicas: 0}, -// Write: replicas{Replicas: 0}, -// -// Loki: loki{ -// Storage: struct { -// Type string `yaml:"type"` -// }{Type: "filesystem"}, -// }, -// } -// require.NoError(t, templateConfig(t, vals)) -// }) -// -// t.Run("scalable", func(t *testing.T) { -// vals := values{ -// -// DeploymentMode: "SimpleScalable", -// -// Backend: replicas{Replicas: 1}, -// Read: replicas{Replicas: 1}, -// Write: replicas{Replicas: 1}, -// -// Compactor: replicas{Replicas: 0}, -// Distributor: replicas{Replicas: 0}, -// IndexGateway: replicas{Replicas: 0}, -// Ingester: replicas{Replicas: 0}, -// Querier: replicas{Replicas: 0}, -// QueryFrontend: replicas{Replicas: 0}, -// QueryScheduler: replicas{Replicas: 0}, -// Ruler: replicas{Replicas: 0}, -// SingleBinary: replicas{Replicas: 0}, -// -// Loki: loki{ -// Storage: struct { -// Type string `yaml:"type"` -// }{Type: "gcs"}, -// }, -// } -// require.NoError(t, templateConfig(t, vals)) -// }) -// -// t.Run("distributed", func(t *testing.T) { -// vals := values{ -// DeploymentMode: "Distributed", -// -// Compactor: replicas{Replicas: 1}, -// Distributor: replicas{Replicas: 1}, -// IndexGateway: replicas{Replicas: 1}, -// Ingester: replicas{Replicas: 1}, -// Querier: replicas{Replicas: 1}, -// QueryFrontend: replicas{Replicas: 1}, -// QueryScheduler: replicas{Replicas: 1}, -// Ruler: replicas{Replicas: 1}, -// -// Backend: replicas{Replicas: 0}, -// Read: replicas{Replicas: 0}, -// SingleBinary: replicas{Replicas: 0}, -// Write: replicas{Replicas: 0}, -// -// Loki: loki{ -// Storage: struct { -// Type string `yaml:"type"` -// }{Type: "gcs"}, -// }, -// } -// require.NoError(t, templateConfig(t, vals)) -// }) -//} diff --git a/charts/loki/values.yaml b/charts/loki/values.yaml deleted file mode 100644 index 606aff0..0000000 --- a/charts/loki/values.yaml +++ /dev/null @@ -1,3801 +0,0 @@ -# -- 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: null - -global: - image: - # -- Overrides the Docker registry globally for all images - registry: 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) - # scope: admin-api, 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. - # scope: admin-api, 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. - # scope: admin-api, 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. - # scope: admin-api, 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. - # scope: admin-api, 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: null -# -- Overrides the chart's computed fullname -fullnameOverride: null -# -- Overrides the chart's cluster label -clusterLabelOverride: null -# -- Image pull secrets for Docker images -imagePullSecrets: [] -# -- Deployment mode lets you specify how to deploy Loki. -# There are 3 options: -# - SingleBinary: Loki is deployed as a single binary, useful for small installs typically without HA, up to a few tens of GB/day. -# - SimpleScalable: 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: -# - 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. -deploymentMode: SimpleScalable -###################################################################################################################### -# -# 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: - # Configures the readiness probe for all of the Loki pods - readinessProbe: - httpGet: - path: /ready - port: http-metrics - initialDelaySeconds: 30 - timeoutSeconds: 1 - image: - # -- The Docker registry - registry: docker.io - # -- Docker image repository - repository: grafana/loki - # -- Overrides the image tag whose default is the chart's appVersion - tag: 3.5.0 - # -- Overrides the image tag with an image digest - digest: null - # -- Docker image pull policy - pullPolicy: IfNotPresent - # -- Common annotations for all deployments/StatefulSets - annotations: {} - # -- Common annotations for all pods - podAnnotations: {} - # -- Common labels for all pods - podLabels: {} - # -- Common annotations for all services - serviceAnnotations: {} - # -- Common labels for all services - serviceLabels: {} - # -- The number of old ReplicaSets to retain to allow rollback - revisionHistoryLimit: 10 - # -- The SecurityContext for Loki pods - podSecurityContext: - fsGroup: 10001 - runAsGroup: 10001 - runAsNonRoot: true - runAsUser: 10001 - # -- The SecurityContext for Loki containers - containerSecurityContext: - readOnlyRootFilesystem: true - capabilities: - drop: - - ALL - allowPrivilegeEscalation: false - # -- Should enableServiceLinks be enabled. Default to enable - enableServiceLinks: true - ###################################################################################################################### - # - # 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: | - {{- if .Values.enterprise.enabled}} - {{- tpl .Values.enterprise.config . }} - {{- else }} - auth_enabled: {{ .Values.loki.auth_enabled }} - {{- end }} - - {{- with .Values.loki.server }} - server: - {{- toYaml . | nindent 2}} - {{- end}} - - pattern_ingester: - enabled: {{ .Values.loki.pattern_ingester.enabled }} - - 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" . }} - {{- with .Values.migrate.fromDistributed }} - {{- if .enabled }} - - {{ .memberlistService }} - {{- end }} - {{- end }} - {{- end }} - - {{- with .Values.loki.ingester }} - ingester: - {{- 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 - - {{- with .Values.chunksCache }} - {{- if .enabled }} - 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: dnssrvnoa+_memcached-client._tcp.{{ template "loki.fullname" $ }}-chunks-cache.{{ $.Release.Namespace }}.svc - consistent_hash: true - timeout: {{ .timeout }} - max_idle_conns: 72 - {{- 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: - consistent_hash: true - addresses: dnssrvnoa+_memcached-client._tcp.{{ template "loki.fullname" $ }}-results-cache.{{ $.Release.Namespace }}.svc - timeout: {{ .timeout }} - update_interval: 1m - {{- end }} - {{- end }} - - {{- with .Values.loki.storage_config }} - storage_config: - {{- 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.analytics }} - analytics: - {{- tpl (. | toYaml) $ | nindent 4 }} - {{- end }} - - {{- if .Values.loki.ui.enabled }} - ui: - discovery: - join_peers: - - '{{ include "loki.queryFrontendFullname" . }}.{{ $.Release.Namespace }}.svc.{{ .Values.global.clusterDomain }}' - {{- 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 }} - # Should authentication be enabled - auth_enabled: true - # -- memberlist configuration (overrides embedded default) - memberlistConfig: {} - # -- Extra memberlist configuration - extraMemberlistConfig: {} - # -- Tenants list to be created on nginx htpasswd file, with name and password keys - tenants: [] - # -- Check https://grafana.com/docs/loki/latest/configuration/#server for more info on the server configuration. - server: - http_listen_port: 3100 - grpc_listen_port: 9095 - http_server_read_timeout: 600s - http_server_write_timeout: 600s - # -- 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: {} - # -- 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 - compactor_address: '{{ include "loki.compactorAddress" . }}' - # -- 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. GEL requires a third bucket for the admin API. - # Please provide these values if you are using object storage. - # bucketNames: - # chunks: FIXME - # ruler: FIXME - # admin: FIXME - type: s3 - s3: - s3: null - endpoint: null - region: null - secretAccessKey: null - accessKeyId: 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: - accountName: null - accountKey: null - connectionString: null - useManagedIdentity: false - useFederatedToken: false - userAssignedId: null - requestTimeout: null - endpointSuffix: null - chunkDelimiter: null - swift: - auth_version: null - auth_url: null - internal: null - username: null - user_domain_name: null - user_domain_id: null - user_id: null - password: null - domain_id: null - domain_name: null - project_id: null - project_name: null - project_domain_id: null - project_domain_name: null - region_name: null - container_name: null - max_retries: null - connect_timeout: null - request_timeout: null - filesystem: - chunks_directory: /var/loki/chunks - rules_directory: /var/loki/rules - admin_api_directory: /var/loki/admin - - # 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 - - object_store: - # Type of object store. Valid options are: s3, gcs, azure - type: s3 - # Optional prefix for storage keys - storage_prefix: null - # S3 configuration (when type is "s3") - s3: - # S3 endpoint URL - endpoint: null - # Optional region - region: null - # Optional access key - access_key_id: 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: - # Name of the bucket - bucket_name: null - # Optional service account JSON - service_account: null - - # Azure configuration (when type is "azure") - azure: - # Storage account name - account_name: null - # Optional storage account key - account_key: null - - # -- Configure memcached as an external cache for chunk and results cache. Disabled by default - # must enable and specify a host for each cache you would like to use. - memcached: - chunk_cache: - enabled: false - host: "" - service: "memcached-client" - batch_size: 256 - parallelism: 10 - results_cache: - enabled: false - host: "" - service: "memcached-client" - timeout: "500ms" - default_validity: "12h" - # -- 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 - testSchemaConfig: - configs: - - from: 2024-04-01 - store: tsdb - object_store: '{{ include "loki.testSchemaObjectStore" . }}' - schema: v13 - index: - prefix: index_ - period: 24h - # -- Check https://grafana.com/docs/loki/latest/configuration/#ruler for more info on configuring ruler - rulerConfig: - wal: - dir: /var/loki/ruler-wal - # -- Structured loki configuration, takes precedence over `loki.config`, `loki.schemaConfig`, `loki.storageConfig` - structuredConfig: {} - # -- Additional query scheduler config - query_scheduler: {} - # -- 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 - # -- Optional compactor configuration - compactor: {} - # -- Optional pattern ingester configuration - pattern_ingester: - enabled: false - # -- Optional analytics configuration - analytics: {} - # -- 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 - # -- Optional querier configuration - query_range: {} - # -- Optional querier configuration - querier: {} - # -- Optional ingester configuration - ingester: {} - # -- Optional index gateway configuration - index_gateway: - mode: simple - frontend: - scheduler_address: '{{ include "loki.querySchedulerAddress" . }}' - tail_proxy_url: '{{ include "loki.querierAddress" . }}' - frontend_worker: - scheduler_address: '{{ include "loki.querySchedulerAddress" . }}' - # -- Optional distributor configuration - distributor: {} - # -- Enable tracing - tracing: - enabled: false - bloom_build: - enabled: false - builder: - planner_address: '{{ include "loki.bloomPlannerAddress" . }}' - bloom_gateway: - enabled: false - client: - addresses: '{{ include "loki.bloomGatewayAddresses" . }}' -###################################################################################################################### -# -# Enterprise Loki Configs -# -###################################################################################################################### - -# -- Configuration for running Enterprise Loki -enterprise: - # Enable enterprise features, license must be provided - enabled: false - # Default verion of GEL to deploy - version: 3.4.0 - # -- Optional name of the GEL cluster, otherwise will use .Release.Name - # The cluster name must match what is in your GEL license - cluster_name: null - # -- Grafana Enterprise Logs license - # In order to use Grafana Enterprise Logs features, you will need to provide - # the contents of your Grafana Enterprise Logs license, either by providing the - # contents of the license.jwt, or the name Kubernetes Secret that contains your - # license.jwt. - # To set the license contents, use the flag `--set-file 'enterprise.license.contents=./license.jwt'` - license: - contents: "NOTAVALIDLICENSE" - # -- Set to true when providing an external license - useExternalLicense: false - # -- Name of external license secret to use - externalLicenseName: null - # -- Name of the external config secret to use - externalConfigName: "" - # -- Use GEL gateway, if false will use the default nginx gateway - gelGateway: true - # -- If enabled, the correct admin_client storage will be configured. If disabled while running enterprise, - # make sure auth is set to `type: trust`, or that `auth_enabled` is set to `false`. - adminApi: - enabled: true - # enterprise specific sections of the config.yaml file - config: | - {{- if .Values.enterprise.adminApi.enabled }} - admin_client: - {{ include "enterprise-logs.adminAPIStorageConfig" . | nindent 2 }} - {{ end }} - auth: - type: {{ .Values.enterprise.adminApi.enabled | ternary "enterprise" "trust" }} - auth_enabled: {{ .Values.loki.auth_enabled }} - cluster_name: {{ include "loki.clusterName" . }} - license: - path: /etc/loki/license/license.jwt - image: - # -- The Docker registry - registry: docker.io - # -- Docker image repository - repository: grafana/enterprise-logs - # -- Docker image tag - tag: 3.5.1 - # -- Overrides the image tag with an image digest - digest: null - # -- Docker image pull policy - pullPolicy: IfNotPresent - adminToken: - # -- Alternative name for admin token secret, needed by tokengen and provisioner jobs - secret: null - # -- Additional namespace to also create the token in. Useful if your Grafana instance - # is in a different namespace - additionalNamespaces: [] - # -- Alternative name of the secret to store token for the canary - canarySecret: null - # -- Configuration for `tokengen` target - tokengen: - # -- Whether the job should be part of the deployment - enabled: true - # -- Comma-separated list of Loki modules to load for tokengen - targetModule: "tokengen" - # -- Additional CLI arguments for the `tokengen` target - extraArgs: [] - # -- Additional Kubernetes environment - env: [] - # -- Additional labels for the `tokengen` Job - labels: {} - # -- Additional annotations for the `tokengen` Job - annotations: {} - # -- Affinity for tokengen Pods - affinity: {} - # -- Node selector for tokengen Pods - nodeSelector: {} - # -- Tolerations for tokengen Job - tolerations: [] - # -- Additional volumes for Pods - extraVolumes: [] - # -- Additional volume mounts for Pods - extraVolumeMounts: [] - # -- Run containers as user `enterprise-logs(uid=10001)` - securityContext: - runAsNonRoot: true - runAsGroup: 10001 - runAsUser: 10001 - fsGroup: 10001 - # -- Environment variables from secrets or configmaps to add to the tokengen pods - extraEnvFrom: [] - # -- The name of the PriorityClass for tokengen Pods - priorityClassName: "" - # -- Configuration for `provisioner` target - provisioner: - # -- Whether the job should be part of the deployment - enabled: true - # -- Name of the secret to store provisioned tokens in - provisionedSecretPrefix: null - # -- Hook type(s) to customize when the job runs. defaults to post-install - hookType: "post-install" - # -- Additional tenants to be created. Each tenant will get a read and write policy - # and associated token. Tenant must have a name and a namespace for the secret containting - # the token to be created in. For example - # additionalTenants: - # - name: loki - # secretNamespace: grafana - additionalTenants: [] - # -- Additional Kubernetes environment - env: [] - # -- Additional labels for the `provisioner` Job - labels: {} - # -- Additional annotations for the `provisioner` Job - annotations: {} - # -- Affinity for tokengen Pods - affinity: {} - # -- Node selector for tokengen Pods - nodeSelector: {} - # -- Tolerations for tokengen Pods - tolerations: [] - # -- The name of the PriorityClass for provisioner Job - priorityClassName: null - # -- Run containers as user `enterprise-logs(uid=10001)` - securityContext: - runAsNonRoot: true - runAsGroup: 10001 - runAsUser: 10001 - fsGroup: 10001 - # -- Provisioner image to Utilize - image: - # -- The Docker registry - registry: docker.io - # -- Docker image repository - repository: grafana/enterprise-logs-provisioner - # -- Overrides the image tag whose default is the chart's appVersion - tag: null - # -- Overrides the image tag with an image digest - digest: null - # -- Docker image pull policy - pullPolicy: IfNotPresent - # -- Volume mounts to add to the provisioner pods - extraVolumeMounts: [] -# -- kubetclImage is used in the enterprise provisioner and tokengen jobs -kubectlImage: - # -- The Docker registry - registry: docker.io - # -- Docker image repository - repository: bitnami/kubectl - # -- Overrides the image tag whose default is the chart's appVersion - tag: null - # -- Overrides the image tag with an image digest - digest: null - # -- Docker image pull policy - pullPolicy: IfNotPresent -###################################################################################################################### -# -# 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://loki-canary: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 - # -- Additional labels for the test pods - labels: {} - # -- 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: "ewelch-distributed-helm-chart-17db5ee" - # -- Overrides the image tag with an image digest - digest: null - # -- Docker image pull policy - pullPolicy: IfNotPresent -# The Loki canary pushes logs to and queries from this loki installation to test -# that it's working correctly -lokiCanary: - enabled: true - # -- 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 - # -- The name of the label to look for at loki when doing the checks. - labelname: pod - # -- Additional annotations for the `loki-canary` Daemonset - annotations: {} - # -- Additional labels for each `loki-canary` pod - podLabels: {} - service: - # -- Annotations for loki-canary Service - annotations: {} - # -- 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: [] - # -- Resource requests and limits for the canary - resources: {} - # -- DNS config for canary pods - dnsConfig: {} - # -- Node selector for canary pods - nodeSelector: {} - # -- Tolerations for canary pods - tolerations: [] - # -- Affinity for canary pods - affinity: {} - # -- The name of the PriorityClass for loki-canary pods - priorityClassName: null - # -- Image to use for loki canary - image: - # -- The Docker registry - registry: docker.io - # -- Docker image repository - repository: grafana/loki-canary - # -- Overrides the image tag whose default is the chart's appVersion - tag: null - # -- Overrides the image tag with an image digest - digest: null - # -- Docker image pull policy - pullPolicy: IfNotPresent - # -- Update strategy for the `loki-canary` Daemonset pods - updateStrategy: - type: RollingUpdate - rollingUpdate: - maxUnavailable: 1 -###################################################################################################################### -# -# Service Accounts and Kubernetes RBAC -# -###################################################################################################################### -serviceAccount: - # -- Specifies whether a ServiceAccount should be created - create: true - # -- The name of the ServiceAccount to use. - # If not set and create is true, a name is generated using the fullname template - name: null - # -- Image pull secrets for the service account - imagePullSecrets: [] - # -- Annotations for the service account - annotations: {} - # -- 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: - # -- If pspEnabled true, a PodSecurityPolicy is created for K8s that use psp. - pspEnabled: false - # -- For OpenShift set pspEnabled to 'false' and sccEnabled to 'true' to use the SecurityContextConstraints. - sccEnabled: false - # -- Specify PSP annotations - # Ref: https://kubernetes.io/docs/reference/access-authn-authz/psp-to-pod-security-standards/#podsecuritypolicy-annotations - pspAnnotations: {} - # seccomp.security.alpha.kubernetes.io/allowedProfileNames: '*' - # seccomp.security.alpha.kubernetes.io/defaultProfileName: 'docker/default' - # apparmor.security.beta.kubernetes.io/defaultProfileName: 'runtime/default' - # -- 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 - # -- Specifies whether the policies created will be standard Network Policies (flavor: kubernetes) - # or Cilium Network Policies (flavor: cilium) - flavor: kubernetes - 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: - # -- 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: - # -- (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: {} - egressWorld: - # -- Enable additional cilium egress rules to external world for write, read and backend. - enabled: false - egressKubeApiserver: - # -- Enable additional cilium egress rules to kube-apiserver for backend. - enabled: false -###################################################################################################################### -# -# Global memberlist configuration -# -###################################################################################################################### - -# Configuration for the memberlist service -memberlist: - service: - publishNotReadyAddresses: false - annotations: {} -###################################################################################################################### -# -# adminAPI configuration, enterprise only. -# -###################################################################################################################### - -# -- Configuration for the `admin-api` target -adminApi: - # -- Define the amount of instances - replicas: 1 - # -- hostAliases to add - hostAliases: [] - # - ip: 1.2.3.4 - # hostnames: - # - domain.tld - # -- Additional CLI arguments for the `admin-api` target - extraArgs: {} - # -- Environment variables to add to the admin-api pods - extraEnv: [] - # -- Environment variables from secrets or configmaps to add to the admin-api pods - extraEnvFrom: [] - # -- Additional labels for the `admin-api` Deployment - labels: {} - # -- Additional annotations for the `admin-api` Deployment - annotations: {} - # -- Additional labels and annotations for the `admin-api` Service - service: - labels: {} - annotations: {} - # -- Run container as user `enterprise-logs(uid=10001)` - # `fsGroup` must not be specified, because these security options are applied - # on container level not on Pod level. - podSecurityContext: - runAsNonRoot: true - runAsGroup: 10001 - runAsUser: 10001 - containerSecurityContext: - readOnlyRootFilesystem: true - capabilities: - drop: - - ALL - allowPrivilegeEscalation: false - # -- Update strategy - strategy: - type: RollingUpdate - # -- Readiness probe - readinessProbe: - httpGet: - path: /ready - port: http-metrics - initialDelaySeconds: 45 - # -- Request and limit Kubernetes resources - # -- Values are defined in small.yaml and large.yaml - resources: {} - # -- Configure optional environment variables - env: [] - # -- Configure optional initContainers - initContainers: [] - # -- Conifgure optional extraContainers - extraContainers: [] - # -- Additional volumes for Pods - extraVolumes: [] - # -- Additional volume mounts for Pods - extraVolumeMounts: [] - # -- Affinity for admin-api Pods - affinity: {} - # -- Node selector for admin-api Pods - nodeSelector: {} - # -- Topology Spread Constraints for admin-api pods - topologySpreadConstraints: [] - # -- Tolerations for admin-api Pods - tolerations: [] - # -- Grace period to allow the admin-api to shutdown before it is killed - terminationGracePeriodSeconds: 60 -###################################################################################################################### -# -# 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 - # -- Target CPU utilisation percentage for the gateway - targetCPUUtilizationPercentage: 60 - # -- Target memory utilisation percentage for the gateway - targetMemoryUtilizationPercentage: - # -- 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 - 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.28-alpine - # -- Overrides the gateway image tag with an image digest - digest: null - # -- The gateway image pull policy - pullPolicy: IfNotPresent - # -- The name of the PriorityClass for gateway pods - priorityClassName: null - # -- Annotations for gateway deployment - annotations: {} - # -- Annotations for gateway pods - podAnnotations: {} - # -- 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: [] - # -- The SecurityContext for gateway containers - podSecurityContext: - fsGroup: 101 - runAsGroup: 101 - runAsNonRoot: true - runAsUser: 101 - # -- The SecurityContext for gateway containers - containerSecurityContext: - readOnlyRootFilesystem: true - capabilities: - drop: - - ALL - allowPrivilegeEscalation: false - # -- Resource requests and limits for the gateway - resources: {} - # -- Containers to add to the gateway pods - extraContainers: [] - # -- Grace period to allow the gateway to shutdown before it is killed - terminationGracePeriodSeconds: 30 - # -- Affinity for gateway pods. - # @default -- Hard node anti-affinity - affinity: - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchLabels: - app.kubernetes.io/component: gateway - topologyKey: kubernetes.io/hostname - # -- DNS config for gateway pods - dnsConfig: {} - # -- Node selector for gateway pods - nodeSelector: {} - # -- Topology Spread Constraints for gateway pods - topologySpreadConstraints: [] - # -- Tolerations for gateway pods - tolerations: [] - # Gateway service configuration - service: - # -- Port of the gateway service - port: 80 - # -- Type of the gateway service - type: ClusterIP - # -- ClusterIP of the gateway service - clusterIP: null - # -- (int) Node port if service type is NodePort - nodePort: null - # -- Load balancer IPO address if service type is LoadBalancer - loadBalancerIP: null - # -- Annotations for the gateway service - annotations: {} - # -- Labels for gateway service - labels: {} - # 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: "" - # -- Annotations for the gateway ingress - annotations: {} - # -- 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 - # -- The basic auth username for the gateway - username: 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: >- - {{ if .Values.loki.tenants }} - - - {{- range $t := .Values.loki.tenants }} - {{ htpasswd (required "All tenants must have a 'name' set" $t.name) (required "All tenants must have a 'password' set" $t.password) }} - - - {{- end }} - {{ else }} {{ htpasswd (required "'gateway.basicAuth.username' is required" .Values.gateway.basicAuth.username) (required "'gateway.basicAuth.password' is required" .Values.gateway.basicAuth.password) }} {{ end }} - # -- Existing basic auth secret to use. Must contain '.htpasswd' - existingSecret: null - # Configures the readiness probe for the gateway - readinessProbe: - httpGet: - path: / - port: http-metrics - initialDelaySeconds: 15 - timeoutSeconds: 1 - 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: >- - {{ 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 - # -- Override Read URL - customReadUrl: null - # -- Override Write URL - customWriteUrl: 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" . | indent 2 -}} -# -- If running enterprise and using the default enterprise gateway, configs go here. -enterpriseGateway: - # -- Define the amount of instances - replicas: 1 - # -- hostAliases to add - hostAliases: [] - # - ip: 1.2.3.4 - # hostnames: - # - domain.tld - # -- Additional CLI arguments for the `gateway` target - extraArgs: {} - # -- Environment variables from secrets or configmaps to add to the enterprise gateway pods - extraEnvFrom: [] - # -- Additional labels for the `gateway` Pod - labels: {} - # -- Additional annotations for the `gateway` Pod - annotations: {} - # -- Additional labels and annotations for the `gateway` Service - # -- Service overriding service type - service: - type: ClusterIP - labels: {} - annotations: {} - # -- Run container as user `enterprise-logs(uid=10001)` - podSecurityContext: - runAsNonRoot: true - runAsGroup: 10001 - runAsUser: 10001 - fsGroup: 10001 - containerSecurityContext: - readOnlyRootFilesystem: true - capabilities: - drop: - - ALL - allowPrivilegeEscalation: false - # -- If you want to use your own proxy URLs, set this to false. - useDefaultProxyURLs: true - # -- update strategy - strategy: - type: RollingUpdate - # -- Readiness probe - readinessProbe: - httpGet: - path: /ready - port: http-metrics - initialDelaySeconds: 45 - # -- Request and limit Kubernetes resources - # -- Values are defined in small.yaml and large.yaml - resources: {} - # -- Configure optional environment variables - env: [] - # -- Configure optional initContainers - initContainers: [] - # -- Conifgure optional extraContainers - extraContainers: [] - # -- Additional volumes for Pods - extraVolumes: [] - # -- Additional volume mounts for Pods - extraVolumeMounts: [] - # -- Affinity for gateway Pods - affinity: {} - # -- Node selector for gateway Pods - nodeSelector: {} - # -- Topology Spread Constraints for enterprise-gateway pods - topologySpreadConstraints: [] - # -- Tolerations for gateway Pods - tolerations: [] - # -- Grace period to allow the gateway to shutdown before it is killed - terminationGracePeriodSeconds: 60 -# -- 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: "" - annotations: {} - # 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: `{{"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.singleBinaryFullname"}}` - 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: `{{"loki.queryFrontendFullname"}}`. - # If deployment mode is SimpleScalable, the requests are forwarded to write k8s service: `{{"loki.readFullname"}}`. - # If deployment mode is SingleBinary, the requests are forwarded to the central/single k8s service: `{{"loki.singleBinaryFullname"}}` - 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 - # -- Paths that are exposed by Loki Ruler. - # If deployment mode is Distributed, the requests are forwarded to the service: `{{"loki.rulerFullname"}}`. - # If deployment mode is SimpleScalable, the requests are forwarded to k8s service: `{{"loki.backendFullname"}}`. - # If deployment mode is SimpleScalable but `read.legacyReadTarget` is `true`, the requests are forwarded to k8s service: `{{"loki.readFullname"}}`. - # If deployment mode is SingleBinary, the requests are forwarded to the central/single k8s service: `{{"loki.singleBinaryFullname"}}` - 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 - # -- 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 - -###################################################################################################################### -# -# 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. -# -###################################################################################################################### - -# Configuration for the single binary node(s) -singleBinary: - # -- Number of replicas for the single binary - replicas: 0 - autoscaling: - # -- Enable autoscaling - enabled: false - # -- Minimum autoscaling replicas for the single binary - minReplicas: 1 - # -- Maximum autoscaling replicas for the single binary - maxReplicas: 3 - # -- Target CPU utilisation percentage for the single binary - targetCPUUtilizationPercentage: 60 - # -- Target memory utilisation percentage for the single binary - targetMemoryUtilizationPercentage: - image: - # -- The Docker registry for the single binary image. Overrides `loki.image.registry` - registry: null - # -- Docker image repository for the single binary image. Overrides `loki.image.repository` - repository: null - # -- Docker image tag for the single binary image. Overrides `loki.image.tag` - tag: null - # -- The name of the PriorityClass for single binary pods - priorityClassName: null - # -- Annotations for single binary StatefulSet - annotations: {} - # -- Annotations for single binary pods - podAnnotations: {} - # -- Additional labels for each `single binary` pod - podLabels: {} - # -- Additional selector labels for each `single binary` pod - selectorLabels: {} - service: - # -- Annotations for single binary Service - annotations: {} - # -- Additional labels for single binary Service - labels: {} - # -- 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: [] - # -- Extra containers to add to the single binary loki pod - extraContainers: [] - # -- 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: [] - # -- Resource requests and limits for the single binary - resources: {} - # -- Grace period to allow the single binary to shutdown before it is killed - terminationGracePeriodSeconds: 30 - # -- Affinity for single binary pods. - # @default -- Hard node anti-affinity - affinity: - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchLabels: - app.kubernetes.io/component: single-binary - topologyKey: kubernetes.io/hostname - # -- DNS config for single binary pods - dnsConfig: {} - # -- Node selector for single binary pods - nodeSelector: {} - # -- Tolerations for single binary pods - tolerations: [] - persistence: - # -- Enable StatefulSetAutoDeletePVC feature - enableStatefulSetAutoDeletePVC: true - # -- Enable persistent disk - enabled: true - # -- Size of persistent disk - size: 10Gi - # -- 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 - # -- Selector for persistent disk - selector: null - # -- Annotations for volume claim - annotations: {} -###################################################################################################################### -# -# 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: - # -- Number of replicas for the write - replicas: 3 - autoscaling: - # -- Enable autoscaling for the write. - enabled: false - # -- Minimum autoscaling replicas for the write. - minReplicas: 2 - # -- Maximum autoscaling replicas for the write. - maxReplicas: 6 - # -- Target CPU utilisation percentage for the write. - targetCPUUtilizationPercentage: 60 - # -- Target memory utilization percentage for the write. - targetMemoryUtilizationPercentage: - # -- 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 - image: - # -- The Docker registry for the write image. Overrides `loki.image.registry` - registry: null - # -- Docker image repository for the write image. Overrides `loki.image.repository` - repository: null - # -- Docker image tag for the write image. Overrides `loki.image.tag` - tag: null - # -- The name of the PriorityClass for write pods - priorityClassName: null - # -- Annotations for write StatefulSet - annotations: {} - # -- Annotations for write pods - podAnnotations: {} - # -- Additional labels for each `write` pod - podLabels: {} - # -- Additional selector labels for each `write` pod - selectorLabels: {} - service: - # -- Annotations for write Service - annotations: {} - # -- Additional labels for write Service - labels: {} - # -- Comma-separated list of Loki modules to load for the write - targetModule: "write" - # -- 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: {} - # -- The default /flush_shutdown preStop hook is recommended as part of the ingester - # scaledown process so it's added to the template by default when autoscaling is enabled, - # but it's disabled to optimize rolling restarts in instances that will never be scaled - # down or when using chunks storage with WAL disabled. - # https://github.com/grafana/loki/blob/main/docs/sources/operations/storage/wal.md#how-to-scale-updown - # -- Init containers to add to the write pods - initContainers: [] - # -- 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: [] - # -- Resource requests and limits for the write - resources: {} - # -- 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 - # -- Affinity for write pods. - # @default -- Hard node anti-affinity - affinity: - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchLabels: - app.kubernetes.io/component: write - topologyKey: kubernetes.io/hostname - # -- DNS config for write pods - dnsConfig: {} - # -- Node selector for write pods - nodeSelector: {} - # -- Topology Spread Constraints for write pods - topologySpreadConstraints: [] - # -- Tolerations for write pods - tolerations: [] - # -- The default is to deploy all pods in parallel. - podManagementPolicy: "Parallel" - persistence: - # -- Enable volume claims in pod spec - volumeClaimsEnabled: true - # -- Parameters used for the `data` volume when volumeClaimEnabled if false - dataVolumeParameters: - emptyDir: {} - # -- Enable StatefulSetAutoDeletePVC feature - enableStatefulSetAutoDeletePVC: false - # -- Size of persistent disk - size: 10Gi - # -- 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 - # -- Selector for persistent disk - selector: null - # -- Annotations for volume claim - annotations: {} -# -- Configuration for the read pod(s) -read: - # -- Number of replicas for the read - replicas: 3 - 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 - # -- Target CPU utilisation percentage for the read - targetCPUUtilizationPercentage: 60 - # -- Target memory utilisation percentage for the read - targetMemoryUtilizationPercentage: - # -- 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 - image: - # -- The Docker registry for the read image. Overrides `loki.image.registry` - registry: null - # -- Docker image repository for the read image. Overrides `loki.image.repository` - repository: null - # -- Docker image tag for the read image. Overrides `loki.image.tag` - tag: null - # -- The name of the PriorityClass for read pods - priorityClassName: null - # -- Annotations for read deployment - annotations: {} - # -- Annotations for read pods - podAnnotations: {} - # -- Additional labels for each `read` pod - podLabels: {} - # -- Additional selector labels for each `read` pod - selectorLabels: {} - service: - # -- Annotations for read Service - annotations: {} - # -- Additional labels for read Service - labels: {} - # -- Comma-separated list of Loki modules to load for the read - targetModule: "read" - # -- Whether or not to use the 2 target type simple scalable mode (read, write) or the - # 3 target type (read, write, backend). Legacy refers to the 2 target type, so true will - # run two targets, false will run 3 targets. - legacyReadTarget: false - # -- Additional CLI args for the read - extraArgs: [] - # -- 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: [] - # -- Resource requests and limits for the read - resources: {} - # -- liveness probe settings for read pods. If empty, applies no livenessProbe - livenessProbe: {} - # -- Grace period to allow the read to shutdown before it is killed - terminationGracePeriodSeconds: 30 - # -- Affinity for read pods. - # @default -- Hard node anti-affinity - affinity: - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchLabels: - app.kubernetes.io/component: read - topologyKey: kubernetes.io/hostname - # -- DNS config for read pods - dnsConfig: {} - # -- Node selector for read pods - nodeSelector: {} - # -- Topology Spread Constraints for read pods - topologySpreadConstraints: [] - # -- Tolerations for read pods - tolerations: [] - # -- The default is to deploy all pods in parallel. - podManagementPolicy: "Parallel" - # -- read.persistence is used only if legacyReadTarget is set to true - persistence: - # -- Enable StatefulSetAutoDeletePVC feature - enableStatefulSetAutoDeletePVC: true - # -- Size of persistent disk - size: 10Gi - # -- 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 - # -- Selector for persistent disk - selector: null - # -- Annotations for volume claim - annotations: {} -# -- Configuration for the backend pod(s) -backend: - # -- Number of replicas for the backend - replicas: 3 - autoscaling: - # -- Enable autoscaling for the backend. - enabled: false - # -- Minimum autoscaling replicas for the backend. - minReplicas: 3 - # -- Maximum autoscaling replicas for the backend. - maxReplicas: 6 - # -- Target CPU utilization percentage for the backend. - targetCPUUtilizationPercentage: 60 - # -- Target memory utilization percentage for the backend. - targetMemoryUtilizationPercentage: - # -- 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 - image: - # -- The Docker registry for the backend image. Overrides `loki.image.registry` - registry: null - # -- Docker image repository for the backend image. Overrides `loki.image.repository` - repository: null - # -- Docker image tag for the backend image. Overrides `loki.image.tag` - tag: null - # -- The name of the PriorityClass for backend pods - priorityClassName: null - # -- Annotations for backend StatefulSet - annotations: {} - # -- Annotations for backend pods - podAnnotations: {} - # -- Additional labels for each `backend` pod - podLabels: {} - # -- Additional selector labels for each `backend` pod - selectorLabels: {} - service: - # -- Annotations for backend Service - annotations: {} - # -- Additional labels for backend Service - labels: {} - # -- Comma-separated list of Loki modules to load for the backend - targetModule: "backend" - # -- 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: [] - # -- Init containers to add to the backend pods - initContainers: [] - # -- 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: [] - # -- Resource requests and limits for the backend - resources: {} - # -- 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 - # -- Affinity for backend pods. - # @default -- Hard node anti-affinity - affinity: - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchLabels: - app.kubernetes.io/component: backend - topologyKey: kubernetes.io/hostname - # -- DNS config for backend pods - dnsConfig: {} - # -- Node selector for backend pods - nodeSelector: {} - # -- Topology Spread Constraints for backend pods - topologySpreadConstraints: [] - # -- Tolerations for backend pods - tolerations: [] - # -- The default is to deploy all pods in parallel. - podManagementPolicy: "Parallel" - persistence: - # -- Enable volume claims in pod spec - volumeClaimsEnabled: true - # -- Parameters used for the `data` volume when volumeClaimEnabled if false - dataVolumeParameters: - emptyDir: {} - # -- Enable StatefulSetAutoDeletePVC feature - enableStatefulSetAutoDeletePVC: true - # -- Size of persistent disk - size: 10Gi - # -- 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 - # -- Selector for persistent disk - selector: null - # -- Annotations for volume claim - annotations: {} -###################################################################################################################### -# -# Microservices Mode -# -# For large Loki deployments ingesting more than 1 TB/day -# -###################################################################################################################### - -# -- Configuration for the ingester -ingester: - # -- 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. - replicas: 0 - # -- hostAliases to add - hostAliases: [] - # - ip: 1.2.3.4 - # hostnames: - # - domain.tld - autoscaling: - # -- Enable autoscaling for the ingester - enabled: false - # -- Minimum autoscaling replicas for the ingester - minReplicas: 1 - # -- Maximum autoscaling replicas for the ingester - maxReplicas: 3 - # -- Target CPU utilisation percentage for the ingester - targetCPUUtilizationPercentage: 60 - # -- 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 - behavior: - # -- Enable autoscaling behaviours - enabled: false - # -- define scale down policies, must conform to HPAScalingRules - scaleDown: {} - # -- define scale up policies, must conform to HPAScalingRules - scaleUp: {} - image: - # -- The Docker registry for the ingester image. Overrides `loki.image.registry` - registry: null - # -- Docker image repository for the ingester image. Overrides `loki.image.repository` - repository: null - # -- Docker image tag for the ingester image. Overrides `loki.image.tag` - tag: null - # -- Command to execute instead of defined in Docker image - command: null - priorityClassName: null - # -- Labels for ingester pods - podLabels: {} - # -- Annotations for ingester pods - podAnnotations: {} - # -- The name of the PriorityClass for ingester pods - # -- Labels for ingestor service - serviceLabels: {} - # -- Annotations for ingestor service - serviceAnnotations: {} - # -- 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: [] - # -- Resource requests and limits for the ingester - resources: {} - # -- Containers to add to the ingester pods - extraContainers: [] - # -- 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: {} - # -- topologySpread for ingester pods. - # @default -- Defaults to allow skew no more than 1 node - topologySpreadConstraints: - - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: ScheduleAnyway - labelSelector: - matchLabels: - app.kubernetes.io/component: ingester - # -- Affinity for ingester pods. Ignored if zoneAwareReplication is enabled. - # @default -- Hard node anti-affinity - affinity: - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchLabels: - app.kubernetes.io/component: ingester - topologyKey: kubernetes.io/hostname - # -- Pod Disruption Budget maxUnavailable - maxUnavailable: 1 - # -- Node selector for ingester pods - nodeSelector: {} - # -- Tolerations for ingester pods - tolerations: [] - # -- readiness probe settings for ingester pods. If empty, use `loki.readinessProbe` - readinessProbe: {} - # -- liveness probe settings for ingester pods. If empty use `loki.livenessProbe` - livenessProbe: {} - # -- 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 - size: 10Gi - # -- 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 - # - name: wal - # size: 150Gi - # -- Enable StatefulSetAutoDeletePVC feature - enableStatefulSetAutoDeletePVC: false - whenDeleted: Retain - whenScaled: Retain - # -- 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: "" - # -- 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: - # -- 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 - extraAffinity: {} - # -- Specific annotations to add to zone A statefulset - annotations: {} - # -- Specific annotations to add to zone A pods - podAnnotations: {} - zoneB: - # -- 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 - extraAffinity: {} - # -- Specific annotations to add to zone B statefulset - annotations: {} - # -- Specific annotations to add to zone B pods - podAnnotations: {} - zoneC: - # -- 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 - extraAffinity: {} - # -- Specific annotations to add to zone C statefulset - annotations: {} - # -- Specific annotations to add to zone C pods - podAnnotations: {} - # -- The migration block allows migrating non zone aware ingesters to zone aware ingesters. - migration: - enabled: false - excludeDefaultZone: false - readPath: false - writePath: false - - # 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: - # -- Number of replicas for the distributor - replicas: 0 - # -- hostAliases to add - hostAliases: [] - # - ip: 1.2.3.4 - # hostnames: - # - domain.tld - autoscaling: - # -- Enable autoscaling for the distributor - enabled: false - # -- Minimum autoscaling replicas for the distributor - minReplicas: 1 - # -- Maximum autoscaling replicas for the distributor - maxReplicas: 3 - # -- Target CPU utilisation percentage for the distributor - targetCPUUtilizationPercentage: 60 - # -- 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 - behavior: - # -- Enable autoscaling behaviours - enabled: false - # -- define scale down policies, must conform to HPAScalingRules - scaleDown: {} - # -- define scale up policies, must conform to HPAScalingRules - scaleUp: {} - image: - # -- The Docker registry for the distributor image. Overrides `loki.image.registry` - registry: null - # -- Docker image repository for the distributor image. Overrides `loki.image.repository` - repository: null - # -- Docker image tag for the distributor image. Overrides `loki.image.tag` - tag: null - # -- Command to execute instead of defined in Docker image - command: null - # -- The name of the PriorityClass for distributor pods - priorityClassName: null - # -- Labels for distributor pods - podLabels: {} - # -- Annotations for distributor pods - podAnnotations: {} - # -- Labels for distributor service - serviceLabels: {} - # -- Annotations for distributor service - serviceAnnotations: {} - # -- 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: [] - # -- Resource requests and limits for the distributor - resources: {} - # -- Containers to add to the distributor pods - extraContainers: [] - # -- Grace period to allow the distributor to shutdown before it is killed - terminationGracePeriodSeconds: 30 - # -- Affinity for distributor pods. - # @default -- Hard node anti-affinity - affinity: - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchLabels: - app.kubernetes.io/component: distributor - topologyKey: kubernetes.io/hostname - # -- Pod Disruption Budget maxUnavailable - maxUnavailable: null - # -- Max Surge for distributor pods - maxSurge: 0 - # -- Node selector for distributor pods - nodeSelector: {} - # -- Topology Spread Constraints for distributor pods - topologySpreadConstraints: [] - # -- Tolerations for distributor pods - tolerations: [] - # -- 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: "" -# -- Configuration for the querier -querier: - # -- Number of replicas for the querier - replicas: 0 - # -- hostAliases to add - hostAliases: [] - # - ip: 1.2.3.4 - # hostnames: - # - domain.tld - 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 - # -- Target CPU utilisation percentage for the querier - targetCPUUtilizationPercentage: 60 - # -- 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 - behavior: - # -- Enable autoscaling behaviours - enabled: false - # -- define scale down policies, must conform to HPAScalingRules - scaleDown: {} - # -- define scale up policies, must conform to HPAScalingRules - scaleUp: {} - image: - # -- The Docker registry for the querier image. Overrides `loki.image.registry` - registry: null - # -- Docker image repository for the querier image. Overrides `loki.image.repository` - repository: null - # -- Docker image tag for the querier image. Overrides `loki.image.tag` - tag: null - # -- Command to execute instead of defined in Docker image - command: null - # -- The name of the PriorityClass for querier pods - priorityClassName: null - # -- Labels for querier pods - podLabels: {} - # -- Annotations for querier pods - podAnnotations: {} - # -- Labels for querier service - serviceLabels: {} - # -- Annotations for querier service - serviceAnnotations: {} - # -- 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: [] - # -- Resource requests and limits for the querier - resources: {} - # -- Containers to add to the querier pods - extraContainers: [] - # -- Init containers to add to the querier pods - initContainers: [] - # -- Grace period to allow the querier to shutdown before it is killed - terminationGracePeriodSeconds: 30 - # -- topologySpread for querier pods. - # @default -- Defaults to allow skew no more then 1 node - topologySpreadConstraints: - - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: ScheduleAnyway - labelSelector: - matchLabels: - app.kubernetes.io/component: querier - # -- Affinity for querier pods. - # @default -- Hard node anti-affinity - affinity: - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchLabels: - app.kubernetes.io/component: querier - topologyKey: kubernetes.io/hostname - # -- Pod Disruption Budget maxUnavailable - maxUnavailable: null - # -- Max Surge for querier pods - maxSurge: 0 - # -- Node selector for querier pods - nodeSelector: {} - # -- Tolerations for querier pods - tolerations: [] - # -- DNSConfig for querier pods - dnsConfig: {} - persistence: - # -- Enable creating PVCs for the querier cache - enabled: false - # -- Size of persistent disk - size: 10Gi - # -- 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 - # -- Annotations for querier PVCs - annotations: {} - # -- 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: "" -# -- Configuration for the query-frontend -queryFrontend: - # -- Number of replicas for the query-frontend - replicas: 0 - # -- hostAliases to add - hostAliases: [] - # - ip: 1.2.3.4 - # hostnames: - # - domain.tld - 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 - # -- Target CPU utilisation percentage for the query-frontend - targetCPUUtilizationPercentage: 60 - # -- 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 - behavior: - # -- Enable autoscaling behaviours - enabled: false - # -- define scale down policies, must conform to HPAScalingRules - scaleDown: {} - # -- define scale up policies, must conform to HPAScalingRules - scaleUp: {} - image: - # -- The Docker registry for the query-frontend image. Overrides `loki.image.registry` - registry: null - # -- Docker image repository for the query-frontend image. Overrides `loki.image.repository` - repository: null - # -- Docker image tag for the query-frontend image. Overrides `loki.image.tag` - tag: null - # -- Command to execute instead of defined in Docker image - command: null - # -- The name of the PriorityClass for query-frontend pods - priorityClassName: null - # -- Labels for query-frontend pods - podLabels: {} - # -- Annotations for query-frontend pods - podAnnotations: {} - # -- Labels for query-frontend service - serviceLabels: {} - # -- Annotations for query-frontend service - serviceAnnotations: {} - # -- 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: [] - # -- Resource requests and limits for the query-frontend - resources: {} - # -- Containers to add to the query-frontend pods - extraContainers: [] - # -- Grace period to allow the query-frontend to shutdown before it is killed - terminationGracePeriodSeconds: 30 - # -- Affinity for query-frontend pods. - # @default -- Hard node anti-affinity - affinity: - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchLabels: - app.kubernetes.io/component: query-frontend - topologyKey: kubernetes.io/hostname - # -- Pod Disruption Budget maxUnavailable - maxUnavailable: null - # -- Node selector for query-frontend pods - nodeSelector: {} - # -- Topology Spread Constraints for query-frontend pods - topologySpreadConstraints: [] - # -- Tolerations for query-frontend pods - tolerations: [] - # -- Adds the appProtocol field to the queryFrontend service. This allows queryFrontend to work with istio protocol selection. - appProtocol: - # -- Set the optional grpc service protocol. Ex: "grpc", "http2" or "https" - grpc: "" -# -- Configuration for the query-scheduler -queryScheduler: - # -- 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 - replicas: 0 - # -- hostAliases to add - hostAliases: [] - # - ip: 1.2.3.4 - # hostnames: - # - domain.tld - image: - # -- The Docker registry for the query-scheduler image. Overrides `loki.image.registry` - registry: null - # -- Docker image repository for the query-scheduler image. Overrides `loki.image.repository` - repository: null - # -- Docker image tag for the query-scheduler image. Overrides `loki.image.tag` - tag: null - # -- The name of the PriorityClass for query-scheduler pods - priorityClassName: null - # -- Labels for query-scheduler pods - podLabels: {} - # -- Annotations for query-scheduler pods - podAnnotations: {} - # -- Labels for query-scheduler service - serviceLabels: {} - # -- Annotations for query-scheduler service - serviceAnnotations: {} - # -- 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: [] - # -- Resource requests and limits for the query-scheduler - resources: {} - # -- Containers to add to the query-scheduler pods - extraContainers: [] - # -- Grace period to allow the query-scheduler to shutdown before it is killed - terminationGracePeriodSeconds: 30 - # -- Affinity for query-scheduler pods. - # @default -- Hard node anti-affinity - affinity: - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchLabels: - app.kubernetes.io/component: query-scheduler - topologyKey: kubernetes.io/hostname - # -- Pod Disruption Budget maxUnavailable - maxUnavailable: 1 - # -- Node selector for query-scheduler pods - nodeSelector: {} - # -- Topology Spread Constraints for query-scheduler pods - topologySpreadConstraints: [] - # -- Tolerations for query-scheduler pods - tolerations: [] - # -- Set the optional grpc service protocol. Ex: "grpc", "http2" or "https" - appProtocol: - grpc: "" -# -- Configuration for the index-gateway -indexGateway: - # -- Number of replicas for the index-gateway - replicas: 0 - # -- Whether the index gateway should join the memberlist hashring - joinMemberlist: true - # -- hostAliases to add - hostAliases: [] - # - ip: 1.2.3.4 - # hostnames: - # - domain.tld - image: - # -- The Docker registry for the index-gateway image. Overrides `loki.image.registry` - registry: null - # -- Docker image repository for the index-gateway image. Overrides `loki.image.repository` - repository: null - # -- Docker image tag for the index-gateway image. Overrides `loki.image.tag` - tag: null - # -- The name of the PriorityClass for index-gateway pods - priorityClassName: null - # -- Labels for index-gateway pods - podLabels: {} - # -- Annotations for index-gateway pods - podAnnotations: {} - # -- Labels for index-gateway service - serviceLabels: {} - # -- Annotations for index-gateway service - serviceAnnotations: {} - # -- 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: [] - # -- Resource requests and limits for the index-gateway - resources: {} - # -- Containers to add to the index-gateway pods - extraContainers: [] - # -- 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 - # -- Affinity for index-gateway pods. - # @default -- Hard node anti-affinity - affinity: - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchLabels: - app.kubernetes.io/component: index-gateway - topologyKey: kubernetes.io/hostname - # -- Pod Disruption Budget maxUnavailable - maxUnavailable: null - # -- Node selector for index-gateway pods - nodeSelector: {} - # -- Topology Spread Constraints for index-gateway pods - topologySpreadConstraints: [] - # -- Tolerations for index-gateway pods - tolerations: [] - 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 indexGateway will be lost on pod restart** - inMemory: false - # -- Size of persistent or memory disk - size: 10Gi - # -- 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 - # -- Annotations for index gateway PVCs - annotations: {} - # -- Enable StatefulSetAutoDeletePVC feature - enableStatefulSetAutoDeletePVC: false - whenDeleted: Retain - whenScaled: Retain - # -- Set the optional grpc service protocol. Ex: "grpc", "http2" or "https" - appProtocol: - grpc: "" - # -- UpdateStrategy for the indexGateway StatefulSet. - 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 -# -- Configuration for the compactor -compactor: - # -- Number of replicas for the compactor - replicas: 0 - # -- hostAliases to add - hostAliases: [] - # - ip: 1.2.3.4 - # hostnames: - # - domain.tld - image: - # -- The Docker registry for the compactor image. Overrides `loki.image.registry` - registry: null - # -- Docker image repository for the compactor image. Overrides `loki.image.repository` - repository: null - # -- Docker image tag for the compactor image. Overrides `loki.image.tag` - tag: null - # -- Command to execute instead of defined in Docker image - command: null - # -- The name of the PriorityClass for compactor pods - priorityClassName: null - # -- Labels for compactor pods - podLabels: {} - # -- Annotations for compactor pods - podAnnotations: {} - # -- Affinity for compactor pods. - # @default -- Hard node anti-affinity - affinity: - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchLabels: - app.kubernetes.io/component: compactor - topologyKey: kubernetes.io/hostname - # -- Labels for compactor service - serviceLabels: {} - # -- Annotations for compactor service - serviceAnnotations: {} - # -- 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: [] - # -- readiness probe settings for ingester pods. If empty, use `loki.readinessProbe` - readinessProbe: {} - # -- liveness probe settings for ingester pods. If empty use `loki.livenessProbe` - livenessProbe: {} - # -- Resource requests and limits for the compactor - resources: {} - # -- Containers to add to the compactor pods - extraContainers: [] - # -- Init containers to add to the compactor pods - initContainers: [] - # -- Grace period to allow the compactor to shutdown before it is killed - terminationGracePeriodSeconds: 30 - # -- Node selector for compactor pods - nodeSelector: {} - # -- Tolerations for compactor pods - tolerations: [] - # -- Set the optional grpc service protocol. Ex: "grpc", "http2" or "https" - appProtocol: - grpc: "" - persistence: - # -- Enable creating PVCs for the compactor - enabled: false - # -- Size of persistent disk - size: 10Gi - # -- 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 - # -- Annotations for compactor PVCs - annotations: {} - # -- List of the compactor PVCs - # @notationType -- list - claims: - - name: data - size: 10Gi - # -- 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 - # - name: wal - # size: 150Gi - # -- Enable StatefulSetAutoDeletePVC feature - enableStatefulSetAutoDeletePVC: false - whenDeleted: Retain - whenScaled: Retain - serviceAccount: - create: false - # -- 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 - # -- Image pull secrets for the compactor service account - imagePullSecrets: [] - # -- 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: - # -- Number of replicas for the bloom-gateway - replicas: 0 - # -- hostAliases to add - hostAliases: [] - # - ip: 1.2.3.4 - # hostnames: - # - domain.tld - image: - # -- The Docker registry for the bloom-gateway image. Overrides `loki.image.registry` - registry: null - # -- Docker image repository for the bloom-gateway image. Overrides `loki.image.repository` - repository: null - # -- Docker image tag for the bloom-gateway image. Overrides `loki.image.tag` - tag: null - # -- Command to execute instead of defined in Docker image - command: null - # -- The name of the PriorityClass for bloom-gateway pods - priorityClassName: null - # -- Labels for bloom-gateway pods - podLabels: {} - # -- Annotations for bloom-gateway pods - podAnnotations: {} - # -- Affinity for bloom-gateway pods. - # @default -- Hard node anti-affinity - affinity: - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchLabels: - app.kubernetes.io/component: bloom-gateway - topologyKey: kubernetes.io/hostname - # -- Labels for bloom-gateway service - serviceLabels: {} - # -- Annotations for bloom-gateway service - serviceAnnotations: {} - # -- 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: [] - # -- readiness probe settings for ingester pods. If empty, use `loki.readinessProbe` - readinessProbe: {} - # -- liveness probe settings for ingester pods. If empty use `loki.livenessProbe` - livenessProbe: {} - # -- Resource requests and limits for the bloom-gateway - resources: {} - # -- Containers to add to the bloom-gateway pods - extraContainers: [] - # -- 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 - # -- Node selector for bloom-gateway pods - nodeSelector: {} - # -- Tolerations for bloom-gateway pods - tolerations: [] - # -- Set the optional grpc service protocol. Ex: "grpc", "http2" or "https" - appProtocol: - grpc: "" - persistence: - # -- Enable creating PVCs for the bloom-gateway - enabled: false - # -- Annotations for bloom-gateway PVCs - annotations: {} - # -- List of the bloom-gateway PVCs - # @notationType -- list - claims: - - name: data - # -- Size of persistent disk - size: 10Gi - # -- 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 - # -- Enable StatefulSetAutoDeletePVC feature - enableStatefulSetAutoDeletePVC: false - whenDeleted: Retain - whenScaled: Retain - serviceAccount: - create: false - # -- The name of the ServiceAccount to use for the bloom-gateway. - # If not set and create is true, a name is generated by appending - # "-bloom-gateway" to the common ServiceAccount. - name: null - # -- Image pull secrets for the bloom-gateway service account - imagePullSecrets: [] - # -- Annotations for the bloom-gateway 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-planner -bloomPlanner: - # -- Number of replicas for the bloom-planner - replicas: 0 - # -- hostAliases to add - hostAliases: [] - # - ip: 1.2.3.4 - # hostnames: - # - domain.tld - image: - # -- The Docker registry for the bloom-planner image. Overrides `loki.image.registry` - registry: null - # -- Docker image repository for the bloom-planner image. Overrides `loki.image.repository` - repository: null - # -- Docker image tag for the bloom-planner image. Overrides `loki.image.tag` - tag: null - # -- Command to execute instead of defined in Docker image - command: null - # -- The name of the PriorityClass for bloom-planner pods - priorityClassName: null - # -- Labels for bloom-planner pods - podLabels: {} - # -- Annotations for bloom-planner pods - podAnnotations: {} - # -- Affinity for bloom-planner pods. - # @default -- Hard node anti-affinity - affinity: - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchLabels: - app.kubernetes.io/component: bloom-planner - topologyKey: kubernetes.io/hostname - # -- Labels for bloom-planner service - serviceLabels: {} - # -- Annotations for bloom-planner service - serviceAnnotations: {} - # -- 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: [] - # -- readiness probe settings for ingester pods. If empty, use `loki.readinessProbe` - readinessProbe: {} - # -- liveness probe settings for ingester pods. If empty use `loki.livenessProbe` - livenessProbe: {} - # -- Resource requests and limits for the bloom-planner - resources: {} - # -- Containers to add to the bloom-planner pods - extraContainers: [] - # -- 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 - # -- Node selector for bloom-planner pods - nodeSelector: {} - # -- Tolerations for bloom-planner pods - tolerations: [] - # -- Set the optional grpc service protocol. Ex: "grpc", "http2" or "https" - appProtocol: - grpc: "" - persistence: - # -- Enable creating PVCs for the bloom-planner - enabled: false - # -- Annotations for bloom-planner PVCs - annotations: {} - # -- List of the bloom-planner PVCs - # @notationType -- list - claims: - - name: data - # -- Size of persistent disk - size: 10Gi - # -- 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 - # -- Enable StatefulSetAutoDeletePVC feature - enableStatefulSetAutoDeletePVC: false - whenDeleted: Retain - whenScaled: Retain - serviceAccount: - create: false - # -- The name of the ServiceAccount to use for the bloom-planner. - # If not set and create is true, a name is generated by appending - # "-bloom-planner" to the common ServiceAccount. - name: null - # -- Image pull secrets for the bloom-planner service account - imagePullSecrets: [] - # -- Annotations for the bloom-planner 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-builder -bloomBuilder: - # -- Number of replicas for the bloom-builder - replicas: 0 - # -- hostAliases to add - hostAliases: [] - # - ip: 1.2.3.4 - # hostnames: - # - domain.tld - 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 - # -- Target CPU utilisation percentage for the bloom-builder - targetCPUUtilizationPercentage: 60 - # -- 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 - behavior: - # -- Enable autoscaling behaviours - enabled: false - # -- define scale down policies, must conform to HPAScalingRules - scaleDown: {} - # -- define scale up policies, must conform to HPAScalingRules - scaleUp: {} - image: - # -- The Docker registry for the bloom-builder image. Overrides `loki.image.registry` - registry: null - # -- Docker image repository for the bloom-builder image. Overrides `loki.image.repository` - repository: null - # -- Docker image tag for the bloom-builder image. Overrides `loki.image.tag` - tag: null - # -- Command to execute instead of defined in Docker image - command: null - # -- The name of the PriorityClass for bloom-builder pods - priorityClassName: null - # -- Labels for bloom-builder pods - podLabels: {} - # -- Annotations for bloom-builder pods - podAnnotations: {} - # -- Labels for bloom-builder service - serviceLabels: {} - # -- Annotations for bloom-builder service - serviceAnnotations: {} - # -- 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: [] - # -- Resource requests and limits for the bloom-builder - resources: {} - # -- Containers to add to the bloom-builder pods - extraContainers: [] - # -- Grace period to allow the bloom-builder to shutdown before it is killed - terminationGracePeriodSeconds: 30 - # -- Affinity for bloom-builder pods. - # @default -- Hard node anti-affinity - affinity: - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchLabels: - app.kubernetes.io/component: bloom-builder - topologyKey: kubernetes.io/hostname - # -- Pod Disruption Budget maxUnavailable - maxUnavailable: null - # -- Node selector for bloom-builder pods - nodeSelector: {} - # -- Tolerations for bloom-builder pods - tolerations: [] - # -- Adds the appProtocol field to the queryFrontend service. This allows bloomBuilder to work with istio protocol selection. - appProtocol: - # -- Set the optional grpc service protocol. Ex: "grpc", "http2" or "https" - grpc: "" -# -- Configuration for the pattern ingester -patternIngester: - # -- Number of replicas for the pattern ingester - replicas: 0 - # -- hostAliases to add - hostAliases: [] - # - ip: 1.2.3.4 - # hostnames: - # - domain.tld - image: - # -- The Docker registry for the pattern ingester image. Overrides `loki.image.registry` - registry: null - # -- Docker image repository for the pattern ingester image. Overrides `loki.image.repository` - repository: null - # -- Docker image tag for the pattern ingester image. Overrides `loki.image.tag` - tag: null - # -- Command to execute instead of defined in Docker image - command: null - # -- The name of the PriorityClass for pattern ingester pods - priorityClassName: null - # -- Labels for pattern ingester pods - podLabels: {} - # -- Annotations for pattern ingester pods - podAnnotations: {} - # -- Affinity for pattern ingester pods. - # @default -- Hard node anti-affinity - affinity: - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchLabels: - app.kubernetes.io/component: pattern-ingester - topologyKey: kubernetes.io/hostname - # -- Labels for pattern ingester service - serviceLabels: {} - # -- Annotations for pattern ingester service - serviceAnnotations: {} - # -- 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: [] - # -- readiness probe settings for ingester pods. If empty, use `loki.readinessProbe` - readinessProbe: {} - # -- liveness probe settings for ingester pods. If empty use `loki.livenessProbe` - livenessProbe: {} - # -- Resource requests and limits for the pattern ingester - resources: {} - # -- Containers to add to the pattern ingester pods - extraContainers: [] - # -- 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 - # -- Node selector for pattern ingester pods - nodeSelector: {} - # -- Topology Spread Constraints for pattern ingester pods - topologySpreadConstraints: [] - # -- Tolerations for pattern ingester pods - 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 - # -- 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 - # -- Annotations for pattern ingester PVCs - annotations: {} - # -- List of the pattern ingester PVCs - # @notationType -- list - claims: - - name: data - size: 10Gi - # -- 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 - # - name: wal - # size: 150Gi - # -- Enable StatefulSetAutoDeletePVC feature - enableStatefulSetAutoDeletePVC: false - whenDeleted: Retain - whenScaled: Retain - serviceAccount: - create: false - # -- The name of the ServiceAccount to use for the pattern ingester. - # If not set and create is true, a name is generated by appending - # "-pattern-ingester" to the common ServiceAccount. - name: null - # -- Image pull secrets for the pattern ingester service account - imagePullSecrets: [] - # -- Annotations for the pattern ingester service account - annotations: {} - # -- 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 - # -- Whether to enable the rules sidecar - sidecar: false - # -- Number of replicas for the ruler - replicas: 0 - # -- hostAliases to add - hostAliases: [] - # - ip: 1.2.3.4 - # hostnames: - # - domain.tld - image: - # -- The Docker registry for the ruler image. Overrides `loki.image.registry` - registry: null - # -- Docker image repository for the ruler image. Overrides `loki.image.repository` - repository: null - # -- Docker image tag for the ruler image. Overrides `loki.image.tag` - tag: null - # -- Command to execute instead of defined in Docker image - command: null - # -- The name of the PriorityClass for ruler pods - priorityClassName: null - # -- Labels for compactor pods - podLabels: {} - # -- Annotations for ruler pods - podAnnotations: {} - # -- Labels for ruler service - serviceLabels: {} - # -- Annotations for ruler service - serviceAnnotations: {} - # -- 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: [] - # -- Resource requests and limits for the ruler - resources: {} - # -- Containers to add to the ruler pods - extraContainers: [] - # -- Init containers to add to the ruler pods - initContainers: [] - # -- Grace period to allow the ruler to shutdown before it is killed - terminationGracePeriodSeconds: 300 - # -- Affinity for ruler pods. - # @default -- Hard node anti-affinity - affinity: - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchLabels: - app.kubernetes.io/component: ruler - topologyKey: kubernetes.io/hostname - # -- Pod Disruption Budget maxUnavailable - maxUnavailable: null - # -- Node selector for ruler pods - nodeSelector: {} - # -- Topology Spread Constraints for ruler pods - topologySpreadConstraints: [] - # -- Tolerations for ruler pods - tolerations: [] - # -- DNSConfig for ruler pods - dnsConfig: {} - persistence: - # -- Enable creating PVCs which is required when using recording rules - enabled: false - # -- Size of persistent disk - size: 10Gi - # -- 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 - # -- Annotations for ruler PVCs - annotations: {} - # -- Set the optional grpc service protocol. Ex: "grpc", "http2" or "https" - appProtocol: - grpc: "" - # -- Directories containing rules files - 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 - -# -- Configuration for the overrides-exporter -overridesExporter: - # -- The overrides-exporter component is optional and can be disabled if desired. - enabled: false - # -- Number of replicas for the overrides-exporter - replicas: 0 - # -- hostAliases to add - hostAliases: [] - # - ip: 1.2.3.4 - # hostnames: - # - domain.tld - image: - # -- The Docker registry for the overrides-exporter image. Overrides `loki.image.registry` - registry: null - # -- Docker image repository for the overrides-exporter image. Overrides `loki.image.repository` - repository: null - # -- Docker image tag for the overrides-exporter image. Overrides `loki.image.tag` - tag: null - # -- Command to execute instead of defined in Docker image - command: null - # -- The name of the PriorityClass for overrides-exporter pods - priorityClassName: null - # -- Labels for overrides-exporter pods - podLabels: {} - # -- Annotations for overrides-exporter pods - podAnnotations: {} - # -- Labels for overrides-exporter service - serviceLabels: {} - # -- Annotations for overrides-exporter service - serviceAnnotations: {} - # -- 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: [] - # -- Resource requests and limits for the overrides-exporter - resources: {} - # -- Containers to add to the overrides-exporter pods - extraContainers: [] - # -- 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 - # -- Affinity for overrides-exporter pods. - # @default -- Hard node anti-affinity - affinity: - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchLabels: - app.kubernetes.io/component: overrides-exporter - topologyKey: kubernetes.io/hostname - # -- Pod Disruption Budget maxUnavailable - maxUnavailable: null - # -- Node selector for overrides-exporter pods - nodeSelector: {} - # -- Topology Spread Constraints for overrides-exporter pods - topologySpreadConstraints: [] - # -- Tolerations for overrides-exporter pods - tolerations: [] - # -- Set the optional grpc service protocol. Ex: "grpc", "http2" or "https" - appProtocol: - grpc: "" - -memcached: - image: - # -- Memcached Docker image repository - repository: memcached - # -- Memcached Docker image tag - tag: 1.6.38-alpine - # -- Memcached Docker image pull policy - pullPolicy: IfNotPresent - # -- The SecurityContext override for memcached pods - podSecurityContext: - runAsNonRoot: true - runAsUser: 11211 - runAsGroup: 11211 - fsGroup: 11211 - # -- The name of the PriorityClass for memcached pods - priorityClassName: null - # -- The SecurityContext for memcached containers - containerSecurityContext: - readOnlyRootFilesystem: true - capabilities: - drop: [ALL] - allowPrivilegeEscalation: false -memcachedExporter: - # -- Whether memcached metrics should be exported - enabled: true - image: - repository: prom/memcached-exporter - tag: v0.15.2 - pullPolicy: IfNotPresent - resources: - requests: {} - limits: {} - # -- The SecurityContext for memcached exporter containers - containerSecurityContext: - readOnlyRootFilesystem: true - capabilities: - drop: [ALL] - allowPrivilegeEscalation: false - # -- 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: {} -resultsCache: - # -- Specifies whether memcached based results-cache should be enabled - enabled: true - # -- 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 - # -- 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: [] - # -- Annotations for the results-cache pods - annotations: {} - # -- Node selector for results-cache pods - nodeSelector: {} - # -- Affinity for results-cache pods - affinity: {} - # -- 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: [] - # maxSkew: 1 - # topologyKey: kubernetes.io/hostname - # whenUnsatisfiable: ScheduleAnyway - # -- Tolerations for results-cache pods - tolerations: [] - # -- Pod Disruption Budget - podDisruptionBudget: - maxUnavailable: 1 - # -- The name of the PriorityClass for results-cache pods - priorityClassName: null - # -- Labels for results-cache pods - podLabels: {} - # -- 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 - # -- 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: {} - # -- 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: [] - # -- 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: null - # -- Service annotations and labels - service: - annotations: {} - 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 - # -- 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 - # -- Volume mount path - mountPath: /data -chunksCache: - # -- Specifies whether memcached based chunks-cache should be enabled - enabled: true - # -- 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 - # -- 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: [] - # -- Annotations for the chunks-cache pods - annotations: {} - # -- Node selector for chunks-cache pods - nodeSelector: {} - # -- Affinity for chunks-cache pods - affinity: {} - # -- 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: [] - # maxSkew: 1 - # topologyKey: kubernetes.io/hostname - # whenUnsatisfiable: ScheduleAnyway - # -- Tolerations for chunks-cache pods - tolerations: [] - # -- Pod Disruption Budget - podDisruptionBudget: - maxUnavailable: 1 - # -- The name of the PriorityClass for chunks-cache pods - priorityClassName: null - # -- Labels for chunks-cache pods - podLabels: {} - # -- 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 - # -- 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: {} - # -- 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: [] - # -- 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: null - # -- Service annotations and labels - service: - annotations: {} - 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 - # -- 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 - # -- Volume mount path - mountPath: /data -###################################################################################################################### -# -# Subchart configurations -# -###################################################################################################################### -# -- Setting for the Grafana Rollout Operator https://github.com/grafana/helm-charts/tree/main/charts/rollout-operator -rollout_operator: - enabled: false - # -- 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 - # Set the container security context - securityContext: - readOnlyRootFilesystem: true - capabilities: - drop: [ALL] - allowPrivilegeEscalation: false -# -- Configuration for the minio subchart -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; not used for GEL authentication - rootUser: root-user - rootPassword: supersecretpassword - # The first user in the list below is used for Loki/GEL authentication. - # You can add additional users if desired; they will not impact Loki/GEL. - # `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 - - name: admin - policy: none - purge: false - persistence: - size: 5Gi - annotations: {} - resources: - requests: - cpu: 100m - memory: 128Mi - # Allow the address used by Loki to refer to Minio to be overridden - address: null -# Create extra manifests via values. Would be passed through `tpl` for templating -# objects can also be provided as multiline strings, useful for templating field names -extraObjects: [] -# - 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: - # -- The Docker registry and image for the k8s sidecar - repository: kiwigrid/k8s-sidecar - # -- Docker image tag - tag: 1.30.3 - # -- Docker image sha. If empty, no sha will be used - sha: "" - # -- Docker image pull policy - pullPolicy: IfNotPresent - # -- Resource requests and limits for the sidecar - resources: {} - # limits: - # cpu: 100m - # memory: 100Mi - # requests: - # cpu: 50m - # memory: 50Mi - # -- The SecurityContext for the sidecar. - securityContext: - readOnlyRootFilesystem: true - capabilities: - drop: - - ALL - allowPrivilegeEscalation: false - # -- Set to true to skip tls verification for kube api calls. - skipTlsVerify: false - # -- Ensure that rule files aren't conflicting and being overwritten by prefixing their name with the namespace they are defined in. - enableUniqueFilenames: false - # -- Readiness probe definition. Probe is disabled on the sidecar by default. - readinessProbe: {} - # -- Liveness probe definition. Probe is disabled on the sidecar by default. - livenessProbe: {} - 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 - # -- 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 - # -- 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 -############################################## WARNING ############################################################### -# -# DEPRECATED VALUES -# -# The following values are deprecated and will be removed in a future version of the helm chart! -# -############################################## WARNING ############################################################## - -# -- DEPRECATED Monitoring section determines which monitoring features to enable, this section is being replaced -# by https://github.com/grafana/meta-monitoring-chart -monitoring: - # Dashboards for monitoring Loki - dashboards: - # -- If enabled, create configmap with dashboards for monitoring Loki - enabled: false - # -- Alternative namespace to create dashboards ConfigMap in - namespace: null - # -- Additional annotations for the dashboards ConfigMap - annotations: {} - # -- Labels for the dashboards ConfigMap - labels: - grafana_dashboard: "1" - # -- DEPRECATED Recording rules for monitoring Loki, required for some dashboards - rules: - # -- If enabled, create PrometheusRule resource with Loki recording rules - enabled: false - # -- Include alerting rules - alerting: true - # -- Specify which individual alerts should be disabled - # -- Instead of turning off each alert one by one, set the .monitoring.rules.alerting value to false instead. - # -- If you disable all the alerts and keep .monitoring.rules.alerting set to true, the chart will fail to render. - disabled: {} - # LokiRequestErrors: true - # LokiRequestPanics: true - # -- Alternative namespace to create PrometheusRule resources in - namespace: null - # -- Additional annotations for the rules PrometheusRule resource - annotations: {} - # -- Additional labels for the rules PrometheusRule resource - labels: {} - # -- Additional labels for PrometheusRule alerts - additionalRuleLabels: {} - # -- Additional groups to add to the rules file - additionalGroups: [] - # - name: additional-loki-rules - # rules: - # - record: job:loki_request_duration_seconds_bucket:sum_rate - # expr: sum(rate(loki_request_duration_seconds_bucket[1m])) by (le, job) - # - record: job_route:loki_request_duration_seconds_bucket:sum_rate - # expr: sum(rate(loki_request_duration_seconds_bucket[1m])) by (le, job, route) - # - record: node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate - # expr: sum(rate(container_cpu_usage_seconds_total[1m])) by (node, namespace, pod, container) - # -- DEPRECATED ServiceMonitor configuration - serviceMonitor: - # -- If enabled, ServiceMonitor resources for Prometheus Operator are created - enabled: false - # -- Namespace selector for ServiceMonitor resources - namespaceSelector: {} - # -- ServiceMonitor annotations - annotations: {} - # -- 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 - # -- 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 - # -- ServiceMonitor will use these tlsConfig settings to make the health check requests - tlsConfig: null - # -- If defined, will create a MetricsInstance for the Grafana Agent Operator. - metricsInstance: - # -- If enabled, MetricsInstance resources for Grafana Agent Operator are created - enabled: true - # -- MetricsInstance annotations - annotations: {} - # -- Additional MetricsInstance labels - labels: {} - # -- If defined a MetricsInstance will be created to remote write metrics. - remoteWrite: null - # -- DEPRECATED Self monitoring determines whether Loki should scrape its own logs. - # This feature currently relies on the Grafana Agent Operator being installed, - # which is installed by default using the grafana-agent-operator sub-chart. - # It will create custom resources for GrafanaAgent, LogsInstance, and PodLogs to configure - # scrape configs to scrape its own logs with the labels expected by the included dashboards. - selfMonitoring: - enabled: false - # -- Tenant to use for self monitoring - tenant: - # -- Name of the tenant - name: "self-monitoring" - # -- Password of the gateway for Basic auth - password: null - # -- Namespace to create additional tenant token secret in. Useful if your Grafana instance - # is in a separate namespace. Token will still be created in the canary namespace. - secretNamespace: "{{ .Release.Namespace }}" - # -- DEPRECATED Grafana Agent configuration - grafanaAgent: - # -- DEPRECATED Controls whether to install the Grafana Agent Operator and its CRDs. - # Note that helm will not install CRDs if this flag is enabled during an upgrade. - # In that case install the CRDs manually from https://github.com/grafana/agent/tree/main/production/operator/crds - installOperator: false - # -- Grafana Agent annotations - annotations: {} - # -- Additional Grafana Agent labels - labels: {} - # -- Enable the config read api on port 8080 of the agent - enableConfigReadAPI: false - # -- The name of the PriorityClass for GrafanaAgent pods - priorityClassName: null - # -- Resource requests and limits for the grafanaAgent pods - resources: {} - # limits: - # memory: 200Mi - # requests: - # cpu: 50m - # memory: 100Mi - # -- Tolerations for GrafanaAgent pods - tolerations: [] - # PodLogs configuration - podLogs: - # -- PodLogs version - apiVersion: monitoring.grafana.com/v1alpha1 - # -- PodLogs annotations - annotations: {} - # -- Additional PodLogs labels - labels: {} - # -- PodLogs relabel configs to apply to samples before scraping - # https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#relabelconfig - relabelings: [] - # -- Additional pipeline stages to process logs after scraping - # https://grafana.com/docs/agent/latest/operator/api/#pipelinestagespec-a-namemonitoringgrafanacomv1alpha1pipelinestagespeca - additionalPipelineStages: [] - # LogsInstance configuration - logsInstance: - # -- LogsInstance annotations - annotations: {} - # -- Additional LogsInstance labels - labels: {} - # -- Additional clients for remote write - clients: null -# -- 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: - # -- The Docker registry for the table-manager image. Overrides `loki.image.registry` - registry: null - # -- Docker image repository for the table-manager image. Overrides `loki.image.repository` - repository: null - # -- Docker image tag for the table-manager image. Overrides `loki.image.tag` - tag: null - # -- Command to execute instead of defined in Docker image - command: null - # -- The name of the PriorityClass for table-manager pods - priorityClassName: null - # -- Labels for table-manager pods - podLabels: {} - # -- Annotations for table-manager deployment - annotations: {} - # -- Annotations for table-manager pods - podAnnotations: {} - service: - # -- Annotations for table-manager Service - annotations: {} - # -- Additional labels for table-manager Service - labels: {} - # -- 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: [] - # -- Resource requests and limits for the table-manager - resources: {} - # -- Containers to add to the table-manager pods - extraContainers: [] - # -- Grace period to allow the table-manager to shutdown before it is killed - terminationGracePeriodSeconds: 30 - # -- Affinity for table-manager pods. - # @default -- Hard node and anti-affinity - affinity: - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchLabels: - app.kubernetes.io/component: table-manager - topologyKey: kubernetes.io/hostname - # -- DNS config table-manager pods - dnsConfig: {} - # -- Node selector for table-manager pods - nodeSelector: {} - # -- Tolerations for table-manager pods - tolerations: [] - # -- Enable deletes by retention - retention_deletes_enabled: false - # -- Set retention period - retention_period: 0