diff --git a/Makefile b/Makefile index 0c551dd0c7ba2..cd1eb0217486c 100644 --- a/Makefile +++ b/Makefile @@ -193,8 +193,8 @@ production/helm/loki/src/helm-test/helm-test: helm-lint: ## run helm linter $(MAKE) -BC production/helm/loki lint -helm-docs: - helm-docs -c production/helm/loki -g production/helm/loki +helm-docs: ## generate reference documentation + $(MAKE) -BC docs sources/setup/install/helm/reference.md ################# # Loki-QueryTee # diff --git a/docs/sources/setup/install/helm/reference.md b/docs/sources/setup/install/helm/reference.md index b616845c7d13a..f9028da643849 100644 --- a/docs/sources/setup/install/helm/reference.md +++ b/docs/sources/setup/install/helm/reference.md @@ -698,9 +698,9 @@ null - bloomCompactor + bloomBuilder object - Configuration for the bloom compactor + Configuration for the bloom-builder
 {
   "affinity": {
@@ -709,7 +709,369 @@ null
         {
           "labelSelector": {
             "matchLabels": {
-              "app.kubernetes.io/component": "bloom-compactor"
+              "app.kubernetes.io/component": "bloom-builder"
+            }
+          },
+          "topologyKey": "kubernetes.io/hostname"
+        }
+      ]
+    }
+  },
+  "appProtocol": {
+    "grpc": ""
+  },
+  "autoscaling": {
+    "behavior": {
+      "enabled": false,
+      "scaleDown": {},
+      "scaleUp": {}
+    },
+    "customMetrics": [],
+    "enabled": false,
+    "maxReplicas": 3,
+    "minReplicas": 1,
+    "targetCPUUtilizationPercentage": 60,
+    "targetMemoryUtilizationPercentage": null
+  },
+  "command": null,
+  "extraArgs": [],
+  "extraContainers": [],
+  "extraEnv": [],
+  "extraEnvFrom": [],
+  "extraVolumeMounts": [],
+  "extraVolumes": [],
+  "hostAliases": [],
+  "image": {
+    "registry": null,
+    "repository": null,
+    "tag": null
+  },
+  "maxUnavailable": null,
+  "nodeSelector": {},
+  "podAnnotations": {},
+  "podLabels": {},
+  "priorityClassName": null,
+  "replicas": 0,
+  "resources": {},
+  "serviceLabels": {},
+  "terminationGracePeriodSeconds": 30,
+  "tolerations": []
+}
+
+ + + + bloomBuilder.affinity + object + Affinity for bloom-builder pods. +
+Hard node anti-affinity
+
+ + + + bloomBuilder.appProtocol + object + Adds the appProtocol field to the queryFrontend service. This allows bloomBuilder to work with istio protocol selection. +
+{
+  "grpc": ""
+}
+
+ + + + bloomBuilder.appProtocol.grpc + string + Set the optional grpc service protocol. Ex: "grpc", "http2" or "https" +
+""
+
+ + + + bloomBuilder.autoscaling.behavior.enabled + bool + Enable autoscaling behaviours +
+false
+
+ + + + bloomBuilder.autoscaling.behavior.scaleDown + object + define scale down policies, must conform to HPAScalingRules +
+{}
+
+ + + + bloomBuilder.autoscaling.behavior.scaleUp + object + define scale up policies, must conform to HPAScalingRules +
+{}
+
+ + + + bloomBuilder.autoscaling.customMetrics + list + Allows one to define custom metrics using the HPA/v2 schema (for example, Pods, Object or External metrics) +
+[]
+
+ + + + bloomBuilder.autoscaling.enabled + bool + Enable autoscaling for the bloom-builder +
+false
+
+ + + + bloomBuilder.autoscaling.maxReplicas + int + Maximum autoscaling replicas for the bloom-builder +
+3
+
+ + + + bloomBuilder.autoscaling.minReplicas + int + Minimum autoscaling replicas for the bloom-builder +
+1
+
+ + + + bloomBuilder.autoscaling.targetCPUUtilizationPercentage + int + Target CPU utilisation percentage for the bloom-builder +
+60
+
+ + + + bloomBuilder.autoscaling.targetMemoryUtilizationPercentage + string + Target memory utilisation percentage for the bloom-builder +
+null
+
+ + + + bloomBuilder.command + string + Command to execute instead of defined in Docker image +
+null
+
+ + + + bloomBuilder.extraArgs + list + Additional CLI args for the bloom-builder +
+[]
+
+ + + + bloomBuilder.extraContainers + list + Containers to add to the bloom-builder pods +
+[]
+
+ + + + bloomBuilder.extraEnv + list + Environment variables to add to the bloom-builder pods +
+[]
+
+ + + + bloomBuilder.extraEnvFrom + list + Environment variables from secrets or configmaps to add to the bloom-builder pods +
+[]
+
+ + + + bloomBuilder.extraVolumeMounts + list + Volume mounts to add to the bloom-builder pods +
+[]
+
+ + + + bloomBuilder.extraVolumes + list + Volumes to add to the bloom-builder pods +
+[]
+
+ + + + bloomBuilder.hostAliases + list + hostAliases to add +
+[]
+
+ + + + bloomBuilder.image.registry + string + The Docker registry for the bloom-builder image. Overrides `loki.image.registry` +
+null
+
+ + + + bloomBuilder.image.repository + string + Docker image repository for the bloom-builder image. Overrides `loki.image.repository` +
+null
+
+ + + + bloomBuilder.image.tag + string + Docker image tag for the bloom-builder image. Overrides `loki.image.tag` +
+null
+
+ + + + bloomBuilder.maxUnavailable + string + Pod Disruption Budget maxUnavailable +
+null
+
+ + + + bloomBuilder.nodeSelector + object + Node selector for bloom-builder pods +
+{}
+
+ + + + bloomBuilder.podAnnotations + object + Annotations for bloom-builder pods +
+{}
+
+ + + + bloomBuilder.podLabels + object + Labels for bloom-builder pods +
+{}
+
+ + + + bloomBuilder.priorityClassName + string + The name of the PriorityClass for bloom-builder pods +
+null
+
+ + + + bloomBuilder.replicas + int + Number of replicas for the bloom-builder +
+0
+
+ + + + bloomBuilder.resources + object + Resource requests and limits for the bloom-builder +
+{}
+
+ + + + bloomBuilder.serviceLabels + object + Labels for bloom-builder service +
+{}
+
+ + + + bloomBuilder.terminationGracePeriodSeconds + int + Grace period to allow the bloom-builder to shutdown before it is killed +
+30
+
+ + + + bloomBuilder.tolerations + list + Tolerations for bloom-builder pods +
+[]
+
+ + + + bloomGateway + object + Configuration for the bloom-gateway +
+{
+  "affinity": {
+    "podAntiAffinity": {
+      "requiredDuringSchedulingIgnoredDuringExecution": [
+        {
+          "labelSelector": {
+            "matchLabels": {
+              "app.kubernetes.io/component": "bloom-gateway"
             }
           },
           "topologyKey": "kubernetes.io/hostname"
@@ -773,16 +1135,16 @@ null
 
 		
 		
-			bloomCompactor.affinity
+			bloomGateway.affinity
 			object
-			Affinity for bloom compactor pods.
+			Affinity for bloom-gateway pods.
 			
 Hard node anti-affinity
 
- bloomCompactor.appProtocol + bloomGateway.appProtocol object Set the optional grpc service protocol. Ex: "grpc", "http2" or "https"
@@ -793,7 +1155,7 @@ Hard node anti-affinity
 
 		
 		
-			bloomCompactor.command
+			bloomGateway.command
 			string
 			Command to execute instead of defined in Docker image
 			
@@ -802,61 +1164,61 @@ null
 
 		
 		
-			bloomCompactor.extraArgs
+			bloomGateway.extraArgs
 			list
-			Additional CLI args for the bloom compactor
+			Additional CLI args for the bloom-gateway
 			
 []
 
- bloomCompactor.extraContainers + bloomGateway.extraContainers list - Containers to add to the bloom compactor pods + Containers to add to the bloom-gateway pods
 []
 
- bloomCompactor.extraEnv + bloomGateway.extraEnv list - Environment variables to add to the bloom compactor pods + Environment variables to add to the bloom-gateway pods
 []
 
- bloomCompactor.extraEnvFrom + bloomGateway.extraEnvFrom list - Environment variables from secrets or configmaps to add to the bloom compactor pods + Environment variables from secrets or configmaps to add to the bloom-gateway pods
 []
 
- bloomCompactor.extraVolumeMounts + bloomGateway.extraVolumeMounts list - Volume mounts to add to the bloom compactor pods + Volume mounts to add to the bloom-gateway pods
 []
 
- bloomCompactor.extraVolumes + bloomGateway.extraVolumes list - Volumes to add to the bloom compactor pods + Volumes to add to the bloom-gateway pods
 []
 
- bloomCompactor.hostAliases + bloomGateway.hostAliases list hostAliases to add
@@ -865,43 +1227,43 @@ null
 
 		
 		
-			bloomCompactor.image.registry
+			bloomGateway.image.registry
 			string
-			The Docker registry for the bloom compactor image. Overrides `loki.image.registry`
+			The Docker registry for the bloom-gateway image. Overrides `loki.image.registry`
 			
 null
 
- bloomCompactor.image.repository + bloomGateway.image.repository string - Docker image repository for the bloom compactor image. Overrides `loki.image.repository` + Docker image repository for the bloom-gateway image. Overrides `loki.image.repository`
 null
 
- bloomCompactor.image.tag + bloomGateway.image.tag string - Docker image tag for the bloom compactor image. Overrides `loki.image.tag` + Docker image tag for the bloom-gateway image. Overrides `loki.image.tag`
 null
 
- bloomCompactor.initContainers + bloomGateway.initContainers list - Init containers to add to the bloom compactor pods + Init containers to add to the bloom-gateway pods
 []
 
- bloomCompactor.livenessProbe + bloomGateway.livenessProbe object liveness probe settings for ingester pods. If empty use `loki.livenessProbe`
@@ -910,34 +1272,34 @@ null
 
 		
 		
-			bloomCompactor.nodeSelector
+			bloomGateway.nodeSelector
 			object
-			Node selector for bloom compactor pods
+			Node selector for bloom-gateway pods
 			
 {}
 
- bloomCompactor.persistence.annotations + bloomGateway.persistence.annotations object - Annotations for bloom compactor PVCs + Annotations for bloom-gateway PVCs
 {}
 
- bloomCompactor.persistence.claims + bloomGateway.persistence.claims list - List of the bloom compactor PVCs + List of the bloom-gateway PVCs
 
 
- bloomCompactor.persistence.enableStatefulSetAutoDeletePVC + bloomGateway.persistence.enableStatefulSetAutoDeletePVC bool Enable StatefulSetAutoDeletePVC feature
@@ -946,16 +1308,16 @@ false
 
 		
 		
-			bloomCompactor.persistence.enabled
+			bloomGateway.persistence.enabled
 			bool
-			Enable creating PVCs for the bloom compactor
+			Enable creating PVCs for the bloom-gateway
 			
 false
 
- bloomCompactor.persistence.size + bloomGateway.persistence.size string Size of persistent disk
@@ -964,7 +1326,7 @@ false
 
 		
 		
-			bloomCompactor.persistence.storageClass
+			bloomGateway.persistence.storageClass
 			string
 			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).
 			
@@ -973,34 +1335,34 @@ null
 
 		
 		
-			bloomCompactor.podAnnotations
+			bloomGateway.podAnnotations
 			object
-			Annotations for bloom compactor pods
+			Annotations for bloom-gateway pods
 			
 {}
 
- bloomCompactor.podLabels + bloomGateway.podLabels object - Labels for bloom compactor pods + Labels for bloom-gateway pods
 {}
 
- bloomCompactor.priorityClassName + bloomGateway.priorityClassName string - The name of the PriorityClass for bloom compactor pods + The name of the PriorityClass for bloom-gateway pods
 null
 
- bloomCompactor.readinessProbe + bloomGateway.readinessProbe object readiness probe settings for ingester pods. If empty, use `loki.readinessProbe`
@@ -1009,34 +1371,34 @@ null
 
 		
 		
-			bloomCompactor.replicas
+			bloomGateway.replicas
 			int
-			Number of replicas for the bloom compactor
+			Number of replicas for the bloom-gateway
 			
 0
 
- bloomCompactor.resources + bloomGateway.resources object - Resource requests and limits for the bloom compactor + Resource requests and limits for the bloom-gateway
 {}
 
- bloomCompactor.serviceAccount.annotations + bloomGateway.serviceAccount.annotations object - Annotations for the bloom compactor service account + Annotations for the bloom-gateway service account
 {}
 
- bloomCompactor.serviceAccount.automountServiceAccountToken + bloomGateway.serviceAccount.automountServiceAccountToken bool Set this toggle to false to opt out of automounting API credentials for the service account
@@ -1045,54 +1407,54 @@ true
 
 		
 		
-			bloomCompactor.serviceAccount.imagePullSecrets
+			bloomGateway.serviceAccount.imagePullSecrets
 			list
-			Image pull secrets for the bloom compactor service account
+			Image pull secrets for the bloom-gateway service account
 			
 []
 
- bloomCompactor.serviceAccount.name + bloomGateway.serviceAccount.name string - The name of the ServiceAccount to use for the bloom compactor. If not set and create is true, a name is generated by appending "-bloom-compactor" to the common ServiceAccount. + 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.
 null
 
- bloomCompactor.serviceLabels + bloomGateway.serviceLabels object - Labels for bloom compactor service + Labels for bloom-gateway service
 {}
 
- bloomCompactor.terminationGracePeriodSeconds + bloomGateway.terminationGracePeriodSeconds int - Grace period to allow the bloom compactor to shutdown before it is killed + Grace period to allow the bloom-gateway to shutdown before it is killed
 30
 
- bloomCompactor.tolerations + bloomGateway.tolerations list - Tolerations for bloom compactor pods + Tolerations for bloom-gateway pods
 []
 
- bloomGateway + bloomPlanner object - Configuration for the bloom gateway + Configuration for the bloom-planner
 {
   "affinity": {
@@ -1101,7 +1463,7 @@ null
         {
           "labelSelector": {
             "matchLabels": {
-              "app.kubernetes.io/component": "bloom-gateway"
+              "app.kubernetes.io/component": "bloom-planner"
             }
           },
           "topologyKey": "kubernetes.io/hostname"
@@ -1130,13 +1492,7 @@ null
   "nodeSelector": {},
   "persistence": {
     "annotations": {},
-    "claims": [
-      {
-        "name": "data",
-        "size": "10Gi",
-        "storageClass": null
-      }
-    ],
+    "claims": [],
     "enableStatefulSetAutoDeletePVC": false,
     "enabled": false,
     "size": "10Gi",
@@ -1165,16 +1521,16 @@ null
 
 		
 		
-			bloomGateway.affinity
+			bloomPlanner.affinity
 			object
-			Affinity for bloom gateway pods.
+			Affinity for bloom-planner pods.
 			
 Hard node anti-affinity
 
- bloomGateway.appProtocol + bloomPlanner.appProtocol object Set the optional grpc service protocol. Ex: "grpc", "http2" or "https"
@@ -1185,7 +1541,7 @@ Hard node anti-affinity
 
 		
 		
-			bloomGateway.command
+			bloomPlanner.command
 			string
 			Command to execute instead of defined in Docker image
 			
@@ -1194,61 +1550,61 @@ null
 
 		
 		
-			bloomGateway.extraArgs
+			bloomPlanner.extraArgs
 			list
-			Additional CLI args for the bloom gateway
+			Additional CLI args for the bloom-planner
 			
 []
 
- bloomGateway.extraContainers + bloomPlanner.extraContainers list - Containers to add to the bloom gateway pods + Containers to add to the bloom-planner pods
 []
 
- bloomGateway.extraEnv + bloomPlanner.extraEnv list - Environment variables to add to the bloom gateway pods + Environment variables to add to the bloom-planner pods
 []
 
- bloomGateway.extraEnvFrom + bloomPlanner.extraEnvFrom list - Environment variables from secrets or configmaps to add to the bloom gateway pods + Environment variables from secrets or configmaps to add to the bloom-planner pods
 []
 
- bloomGateway.extraVolumeMounts + bloomPlanner.extraVolumeMounts list - Volume mounts to add to the bloom gateway pods + Volume mounts to add to the bloom-planner pods
 []
 
- bloomGateway.extraVolumes + bloomPlanner.extraVolumes list - Volumes to add to the bloom gateway pods + Volumes to add to the bloom-planner pods
 []
 
- bloomGateway.hostAliases + bloomPlanner.hostAliases list hostAliases to add
@@ -1257,43 +1613,43 @@ null
 
 		
 		
-			bloomGateway.image.registry
+			bloomPlanner.image.registry
 			string
-			The Docker registry for the bloom gateway image. Overrides `loki.image.registry`
+			The Docker registry for the bloom-planner image. Overrides `loki.image.registry`
 			
 null
 
- bloomGateway.image.repository + bloomPlanner.image.repository string - Docker image repository for the bloom gateway image. Overrides `loki.image.repository` + Docker image repository for the bloom-planner image. Overrides `loki.image.repository`
 null
 
- bloomGateway.image.tag + bloomPlanner.image.tag string - Docker image tag for the bloom gateway image. Overrides `loki.image.tag` + Docker image tag for the bloom-planner image. Overrides `loki.image.tag`
 null
 
- bloomGateway.initContainers + bloomPlanner.initContainers list - Init containers to add to the bloom gateway pods + Init containers to add to the bloom-planner pods
 []
 
- bloomGateway.livenessProbe + bloomPlanner.livenessProbe object liveness probe settings for ingester pods. If empty use `loki.livenessProbe`
@@ -1302,34 +1658,34 @@ null
 
 		
 		
-			bloomGateway.nodeSelector
+			bloomPlanner.nodeSelector
 			object
-			Node selector for bloom gateway pods
+			Node selector for bloom-planner pods
 			
 {}
 
- bloomGateway.persistence.annotations + bloomPlanner.persistence.annotations object - Annotations for bloom gateway PVCs + Annotations for bloom-planner PVCs
 {}
 
- bloomGateway.persistence.claims + bloomPlanner.persistence.claims list - List of the bloom gateway PVCs + List of the bloom-planner PVCs
-
+[]
 
- bloomGateway.persistence.enableStatefulSetAutoDeletePVC + bloomPlanner.persistence.enableStatefulSetAutoDeletePVC bool Enable StatefulSetAutoDeletePVC feature
@@ -1338,16 +1694,16 @@ false
 
 		
 		
-			bloomGateway.persistence.enabled
+			bloomPlanner.persistence.enabled
 			bool
-			Enable creating PVCs for the bloom gateway
+			Enable creating PVCs for the bloom-planner
 			
 false
 
- bloomGateway.persistence.size + bloomPlanner.persistence.size string Size of persistent disk
@@ -1356,7 +1712,7 @@ false
 
 		
 		
-			bloomGateway.persistence.storageClass
+			bloomPlanner.persistence.storageClass
 			string
 			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).
 			
@@ -1365,34 +1721,34 @@ null
 
 		
 		
-			bloomGateway.podAnnotations
+			bloomPlanner.podAnnotations
 			object
-			Annotations for bloom gateway pods
+			Annotations for bloom-planner pods
 			
 {}
 
- bloomGateway.podLabels + bloomPlanner.podLabels object - Labels for bloom gateway pods + Labels for bloom-planner pods
 {}
 
- bloomGateway.priorityClassName + bloomPlanner.priorityClassName string - The name of the PriorityClass for bloom gateway pods + The name of the PriorityClass for bloom-planner pods
 null
 
- bloomGateway.readinessProbe + bloomPlanner.readinessProbe object readiness probe settings for ingester pods. If empty, use `loki.readinessProbe`
@@ -1401,34 +1757,34 @@ null
 
 		
 		
-			bloomGateway.replicas
+			bloomPlanner.replicas
 			int
-			Number of replicas for the bloom gateway
+			Number of replicas for the bloom-planner
 			
 0
 
- bloomGateway.resources + bloomPlanner.resources object - Resource requests and limits for the bloom gateway + Resource requests and limits for the bloom-planner
 {}
 
- bloomGateway.serviceAccount.annotations + bloomPlanner.serviceAccount.annotations object - Annotations for the bloom gateway service account + Annotations for the bloom-planner service account
 {}
 
- bloomGateway.serviceAccount.automountServiceAccountToken + bloomPlanner.serviceAccount.automountServiceAccountToken bool Set this toggle to false to opt out of automounting API credentials for the service account
@@ -1437,45 +1793,45 @@ true
 
 		
 		
-			bloomGateway.serviceAccount.imagePullSecrets
+			bloomPlanner.serviceAccount.imagePullSecrets
 			list
-			Image pull secrets for the bloom gateway service account
+			Image pull secrets for the bloom-planner service account
 			
 []
 
- bloomGateway.serviceAccount.name + bloomPlanner.serviceAccount.name string - 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. + 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.
 null
 
- bloomGateway.serviceLabels + bloomPlanner.serviceLabels object - Labels for bloom gateway service + Labels for bloom-planner service
 {}
 
- bloomGateway.terminationGracePeriodSeconds + bloomPlanner.terminationGracePeriodSeconds int - Grace period to allow the bloom gateway to shutdown before it is killed + Grace period to allow the bloom-planner to shutdown before it is killed
 30
 
- bloomGateway.tolerations + bloomPlanner.tolerations list - Tolerations for bloom gateway pods + Tolerations for bloom-planner pods
 []
 
diff --git a/production/helm/loki/CHANGELOG.md b/production/helm/loki/CHANGELOG.md index 4efe3289a67e8..1b68e6a5b1ca8 100644 --- a/production/helm/loki/CHANGELOG.md +++ b/production/helm/loki/CHANGELOG.md @@ -13,6 +13,10 @@ Entries should include a reference to the pull request that introduced the chang [//]: # ( : 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.) +## 6.12.0 + +- [ENHANCEMENT] Replace Bloom Compactor component with Bloom Planner and Bloom Builder. These are the new components to build bloom blocks. + ## 6.11.0 - [FEATURE] Add support for configuring persistence for memcached. diff --git a/production/helm/loki/Chart.yaml b/production/helm/loki/Chart.yaml index c6fcd38c5c540..dcef3406eaac2 100644 --- a/production/helm/loki/Chart.yaml +++ b/production/helm/loki/Chart.yaml @@ -3,7 +3,7 @@ name: loki description: Helm chart for Grafana Loki and Grafana Enterprise Logs supporting both simple, scalable and distributed modes. type: application appVersion: 3.1.1 -version: 6.11.0 +version: 6.12.0 home: https://grafana.github.io/helm-charts sources: - https://github.com/grafana/loki diff --git a/production/helm/loki/README.md b/production/helm/loki/README.md index c29dbfe95c4f6..766cb151c4969 100644 --- a/production/helm/loki/README.md +++ b/production/helm/loki/README.md @@ -1,6 +1,6 @@ # loki -![Version: 6.11.0](https://img.shields.io/badge/Version-6.11.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 3.1.1](https://img.shields.io/badge/AppVersion-3.1.1-informational?style=flat-square) +![Version: 6.12.0](https://img.shields.io/badge/Version-6.12.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 3.1.1](https://img.shields.io/badge/AppVersion-3.1.1-informational?style=flat-square) Helm chart for Grafana Loki and Grafana Enterprise Logs supporting both simple, scalable and distributed modes. diff --git a/production/helm/loki/distributed-values.yaml b/production/helm/loki/distributed-values.yaml index 0016b724ce573..78a1f111cd246 100644 --- a/production/helm/loki/distributed-values.yaml +++ b/production/helm/loki/distributed-values.yaml @@ -47,7 +47,10 @@ indexGateway: replicas: 2 maxUnavailable: 1 -bloomCompactor: +# optional experimental components +bloomPlanner: + replicas: 0 +bloomBuilder: replicas: 0 bloomGateway: replicas: 0 @@ -66,5 +69,3 @@ write: singleBinary: replicas: 0 - - diff --git a/production/helm/loki/templates/bloom-builder/_helpers-bloom-builder.tpl b/production/helm/loki/templates/bloom-builder/_helpers-bloom-builder.tpl new file mode 100644 index 0000000000000..46359dffdf004 --- /dev/null +++ b/production/helm/loki/templates/bloom-builder/_helpers-bloom-builder.tpl @@ -0,0 +1,32 @@ +{{/* +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/production/helm/loki/templates/bloom-builder/deployment-bloom-builder.yaml b/production/helm/loki/templates/bloom-builder/deployment-bloom-builder.yaml new file mode 100644 index 0000000000000..5735de5da23d4 --- /dev/null +++ b/production/helm/loki/templates/bloom-builder/deployment-bloom-builder.yaml @@ -0,0 +1,142 @@ +{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} +{{- if $isDistributed -}} +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.bloomBuilderSelectorLabels" . | nindent 8 }} + app.kubernetes.io/part-of: memberlist + {{- with .Values.loki.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .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 .Values.bloomBuilder.extraArgs }} + {{- 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 .Values.bloomBuilder.extraEnv }} + env: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.bloomBuilder.extraEnvFrom }} + 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 .Values.bloomBuilder.extraVolumeMounts }} + {{- 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 }} + {{- with .Values.bloomBuilder.extraVolumes }} + {{- toYaml . | nindent 8 }} + {{- end }} +{{- end -}} diff --git a/production/helm/loki/templates/bloom-builder/hpa.yaml b/production/helm/loki/templates/bloom-builder/hpa.yaml new file mode 100644 index 0000000000000..2b04647d2aa61 --- /dev/null +++ b/production/helm/loki/templates/bloom-builder/hpa.yaml @@ -0,0 +1,55 @@ +{{- $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/production/helm/loki/templates/bloom-builder/poddisruptionbudget-bloom-builder.yaml b/production/helm/loki/templates/bloom-builder/poddisruptionbudget-bloom-builder.yaml new file mode 100644 index 0000000000000..e66d762c0e64d --- /dev/null +++ b/production/helm/loki/templates/bloom-builder/poddisruptionbudget-bloom-builder.yaml @@ -0,0 +1,21 @@ +{{- $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/production/helm/loki/templates/bloom-builder/service-bloom-builder-headless.yaml b/production/helm/loki/templates/bloom-builder/service-bloom-builder-headless.yaml new file mode 100644 index 0000000000000..e089d4d2de40c --- /dev/null +++ b/production/helm/loki/templates/bloom-builder/service-bloom-builder-headless.yaml @@ -0,0 +1,43 @@ +{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} +{{- if $isDistributed -}} +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" + {{- with .Values.loki.serviceAnnotations }} + annotations: + {{- 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/production/helm/loki/templates/bloom-builder/service-bloom-builder.yaml b/production/helm/loki/templates/bloom-builder/service-bloom-builder.yaml new file mode 100644 index 0000000000000..aab082d72293f --- /dev/null +++ b/production/helm/loki/templates/bloom-builder/service-bloom-builder.yaml @@ -0,0 +1,41 @@ +{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} +{{- if $isDistributed -}} +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 }} + {{- with .Values.loki.serviceAnnotations }} + annotations: + {{- 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/production/helm/loki/templates/bloom-compactor/_helpers-bloom-compactor.tpl b/production/helm/loki/templates/bloom-compactor/_helpers-bloom-compactor.tpl deleted file mode 100644 index 193a8f883b128..0000000000000 --- a/production/helm/loki/templates/bloom-compactor/_helpers-bloom-compactor.tpl +++ /dev/null @@ -1,58 +0,0 @@ -{{/* -bloom compactor fullname -*/}} -{{- define "loki.bloomCompactorFullname" -}} -{{ include "loki.fullname" . }}-bloom-compactor -{{- end }} - -{{/* -bloom compactor common labels -*/}} -{{- define "loki.bloomCompactorLabels" -}} -{{ include "loki.labels" . }} -app.kubernetes.io/component: bloom-compactor -{{- end }} - -{{/* -bloom compactor selector labels -*/}} -{{- define "loki.bloomCompactorSelectorLabels" -}} -{{ include "loki.selectorLabels" . }} -app.kubernetes.io/component: bloom-compactor -{{- end }} - -{{/* -bloom compactor readinessProbe -*/}} -{{- define "loki.bloomCompactor.readinessProbe" -}} -{{- with .Values.bloomCompactor.readinessProbe }} -readinessProbe: - {{- toYaml . | nindent 2 }} -{{- else }} -{{- with .Values.loki.readinessProbe }} -readinessProbe: - {{- toYaml . | nindent 2 }} -{{- end }} -{{- end }} -{{- end -}} - -{{/* -bloom compactor priority class name -*/}} -{{- define "loki.bloomCompactorPriorityClassName" }} -{{- $pcn := coalesce .Values.global.priorityClassName .Values.bloomCompactor.priorityClassName -}} -{{- if $pcn }} -priorityClassName: {{ $pcn }} -{{- end }} -{{- end }} - -{{/* -Create the name of the bloom compactor service account -*/}} -{{- define "loki.bloomCompactorServiceAccountName" -}} -{{- if .Values.bloomCompactor.serviceAccount.create -}} - {{ default (print (include "loki.serviceAccountName" .) "-bloom-compactor") .Values.bloomCompactor.serviceAccount.name }} -{{- else -}} - {{ default (include "loki.serviceAccountName" .) .Values.bloomCompactor.serviceAccount.name }} -{{- end -}} -{{- end -}} diff --git a/production/helm/loki/templates/bloom-planner/_helpers-bloom-planner.tpl b/production/helm/loki/templates/bloom-planner/_helpers-bloom-planner.tpl new file mode 100644 index 0000000000000..a4a8c6e4f9d20 --- /dev/null +++ b/production/helm/loki/templates/bloom-planner/_helpers-bloom-planner.tpl @@ -0,0 +1,58 @@ +{{/* +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/production/helm/loki/templates/bloom-planner/service-bloom-planner-headless.yaml b/production/helm/loki/templates/bloom-planner/service-bloom-planner-headless.yaml new file mode 100644 index 0000000000000..fd02c64acd502 --- /dev/null +++ b/production/helm/loki/templates/bloom-planner/service-bloom-planner-headless.yaml @@ -0,0 +1,36 @@ +{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} +{{- if $isDistributed -}} +{{- if (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 }} + {{- with .Values.loki.serviceAnnotations }} + annotations: + {{- 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 -}} +{{- end -}} diff --git a/production/helm/loki/templates/bloom-compactor/statefulset-bloom-compactor.yaml b/production/helm/loki/templates/bloom-planner/statefulset-bloom-planner.yaml similarity index 67% rename from production/helm/loki/templates/bloom-compactor/statefulset-bloom-compactor.yaml rename to production/helm/loki/templates/bloom-planner/statefulset-bloom-planner.yaml index 424fa4bb65d76..8d9a9f23998a5 100644 --- a/production/helm/loki/templates/bloom-compactor/statefulset-bloom-compactor.yaml +++ b/production/helm/loki/templates/bloom-planner/statefulset-bloom-planner.yaml @@ -1,33 +1,33 @@ {{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} {{- if $isDistributed }} -{{- if (gt (int .Values.bloomCompactor.replicas) 0) -}} +{{- if (gt (int .Values.bloomPlanner.replicas) 0) -}} apiVersion: apps/v1 kind: StatefulSet metadata: - name: {{ include "loki.bloomCompactorFullname" . }} + name: {{ include "loki.bloomPlannerFullname" . }} namespace: {{ .Release.Namespace }} labels: - {{- include "loki.bloomCompactorLabels" . | nindent 4 }} + {{- include "loki.bloomPlannerLabels" . | nindent 4 }} {{- with .Values.loki.annotations }} annotations: {{- toYaml . | nindent 4 }} {{- end }} spec: - replicas: {{ .Values.bloomCompactor.replicas }} + replicas: {{ .Values.bloomPlanner.replicas }} podManagementPolicy: Parallel updateStrategy: rollingUpdate: partition: 0 - serviceName: {{ include "loki.bloomCompactorFullname" . }}-headless + serviceName: {{ include "loki.bloomPlannerFullname" . }}-headless revisionHistoryLimit: {{ .Values.loki.revisionHistoryLimit }} - {{- if and (semverCompare ">= 1.23-0" .Capabilities.KubeVersion.Version) (.Values.bloomCompactor.persistence.enableStatefulSetAutoDeletePVC) }} + {{- if and (semverCompare ">= 1.23-0" .Capabilities.KubeVersion.Version) (.Values.bloomPlanner.persistence.enableStatefulSetAutoDeletePVC) }} persistentVolumeClaimRetentionPolicy: - whenDeleted: {{ .Values.bloomCompactor.persistence.whenDeleted }} - whenScaled: {{ .Values.bloomCompactor.persistence.whenScaled }} + whenDeleted: {{ .Values.bloomPlanner.persistence.whenDeleted }} + whenScaled: {{ .Values.bloomPlanner.persistence.whenScaled }} {{- end }} selector: matchLabels: - {{- include "loki.bloomCompactorSelectorLabels" . | nindent 6 }} + {{- include "loki.bloomPlannerSelectorLabels" . | nindent 6 }} template: metadata: annotations: @@ -35,16 +35,16 @@ spec: {{- with .Values.loki.podAnnotations }} {{- toYaml . | nindent 8 }} {{- end }} - {{- with .Values.bloomCompactor.podAnnotations }} + {{- with .Values.bloomPlanner.podAnnotations }} {{- toYaml . | nindent 8 }} {{- end }} labels: - {{- include "loki.bloomCompactorSelectorLabels" . | nindent 8 }} + {{- include "loki.bloomPlannerSelectorLabels" . | nindent 8 }} app.kubernetes.io/part-of: memberlist {{- with .Values.loki.podLabels }} {{- toYaml . | nindent 8 }} {{- end }} - {{- with .Values.bloomCompactor.podLabels }} + {{- with .Values.bloomPlanner.podLabels }} {{- toYaml . | nindent 8 }} {{- end }} spec: @@ -53,30 +53,30 @@ spec: imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} - {{- with .Values.bloomCompactor.hostAliases }} + {{- with .Values.bloomPlanner.hostAliases }} hostAliases: {{- toYaml . | nindent 8 }} {{- end }} - {{- include "loki.bloomCompactorPriorityClassName" . | nindent 6 }} + {{- include "loki.bloomPlannerPriorityClassName" . | nindent 6 }} securityContext: {{- toYaml .Values.loki.podSecurityContext | nindent 8 }} - terminationGracePeriodSeconds: {{ .Values.bloomCompactor.terminationGracePeriodSeconds }} - {{- with .Values.bloomCompactor.initContainers }} + terminationGracePeriodSeconds: {{ .Values.bloomPlanner.terminationGracePeriodSeconds }} + {{- with .Values.bloomPlanner.initContainers }} initContainers: {{- toYaml . | nindent 8 }} {{- end }} containers: - - name: bloom-compactor + - name: bloom-planner image: {{ include "loki.image" . }} imagePullPolicy: {{ .Values.loki.image.pullPolicy }} - {{- if or .Values.loki.command .Values.bloomCompactor.command }} + {{- if or .Values.loki.command .Values.bloomPlanner.command }} command: - - {{ coalesce .Values.bloomCompactor.command .Values.loki.command | quote }} + - {{ coalesce .Values.bloomPlanner.command .Values.loki.command | quote }} {{- end }} args: - -config.file=/etc/loki/config/config.yaml - - -target=bloom-compactor - {{- with .Values.bloomCompactor.extraArgs }} + - -target=bloom-planner + {{- with .Values.bloomPlanner.extraArgs }} {{- toYaml . | nindent 12 }} {{- end }} ports: @@ -89,17 +89,17 @@ spec: - name: http-memberlist containerPort: 7946 protocol: TCP - {{- with .Values.bloomCompactor.extraEnv }} + {{- with .Values.bloomPlanner.extraEnv }} env: {{- toYaml . | nindent 12 }} {{- end }} - {{- with .Values.bloomCompactor.extraEnvFrom }} + {{- with .Values.bloomPlanner.extraEnvFrom }} envFrom: {{- toYaml . | nindent 12 }} {{- end }} securityContext: {{- toYaml .Values.loki.containerSecurityContext | nindent 12 }} - {{- include "loki.bloomCompactor.readinessProbe" . | nindent 10 }} + {{- include "loki.bloomPlanner.readinessProbe" . | nindent 10 }} volumeMounts: - name: temp mountPath: /tmp @@ -113,25 +113,25 @@ spec: - name: license mountPath: /etc/loki/license {{- end }} - {{- with .Values.bloomCompactor.extraVolumeMounts }} + {{- with .Values.bloomPlanner.extraVolumeMounts }} {{- toYaml . | nindent 12 }} {{- end }} - {{- with .Values.bloomCompactor.resources }} + {{- with .Values.bloomPlanner.resources }} resources: {{- toYaml . | nindent 12 }} {{- end }} - {{- if .Values.bloomCompactor.extraContainers }} - {{- toYaml .Values.bloomCompactor.extraContainers | nindent 8}} + {{- if .Values.bloomPlanner.extraContainers }} + {{- toYaml .Values.bloomPlanner.extraContainers | nindent 8}} {{- end }} - {{- with .Values.bloomCompactor.affinity }} + {{- with .Values.bloomPlanner.affinity }} affinity: {{- toYaml . | nindent 8 }} {{- end }} - {{- with .Values.bloomCompactor.nodeSelector }} + {{- with .Values.bloomPlanner.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} - {{- with .Values.bloomCompactor.tolerations }} + {{- with .Values.bloomPlanner.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }} @@ -152,16 +152,16 @@ spec: secretName: enterprise-logs-license {{- end }} {{- end }} - {{- if not .Values.bloomCompactor.persistence.enabled }} + {{- if not .Values.bloomPlanner.persistence.enabled }} - name: data emptyDir: {} {{- end }} - {{- with .Values.bloomCompactor.extraVolumes }} + {{- with .Values.bloomPlanner.extraVolumes }} {{- toYaml . | nindent 8 }} {{- end }} - {{- if .Values.bloomCompactor.persistence.enabled }} + {{- if .Values.bloomPlanner.persistence.enabled }} volumeClaimTemplates: - {{- range .Values.bloomCompactor.persistence.claims }} + {{- range .Values.bloomPlanner.persistence.claims }} - metadata: name: {{ .name }} {{- with .annotations }} @@ -180,4 +180,4 @@ spec: {{- end }} {{- end }} {{- end -}} -{{- end -}} \ No newline at end of file +{{- end -}} diff --git a/production/helm/loki/values.yaml b/production/helm/loki/values.yaml index dd6df92348ca0..ed65339cb33ad 100644 --- a/production/helm/loki/values.yaml +++ b/production/helm/loki/values.yaml @@ -440,6 +440,10 @@ loki: # -- Enable tracing tracing: enabled: false + bloom_build: + enabled: false + bloom_gateway: + enabled: false ###################################################################################################################### # # Enterprise Loki Configs @@ -2376,9 +2380,9 @@ compactor: annotations: {} # -- Set this toggle to false to opt out of automounting API credentials for the service account automountServiceAccountToken: true -# -- Configuration for the bloom gateway +# -- Configuration for the bloom-gateway bloomGateway: - # -- Number of replicas for the bloom gateway + # -- Number of replicas for the bloom-gateway replicas: 0 # -- hostAliases to add hostAliases: [] @@ -2386,21 +2390,21 @@ bloomGateway: # hostnames: # - domain.tld image: - # -- The Docker registry for the bloom gateway image. Overrides `loki.image.registry` + # -- 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` + # -- 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` + # -- 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 + # -- The name of the PriorityClass for bloom-gateway pods priorityClassName: null - # -- Labels for bloom gateway pods + # -- Labels for bloom-gateway pods podLabels: {} - # -- Annotations for bloom gateway pods + # -- Annotations for bloom-gateway pods podAnnotations: {} - # -- Affinity for bloom gateway pods. + # -- Affinity for bloom-gateway pods. # @default -- Hard node anti-affinity affinity: podAntiAffinity: @@ -2409,39 +2413,39 @@ bloomGateway: matchLabels: app.kubernetes.io/component: bloom-gateway topologyKey: kubernetes.io/hostname - # -- Labels for bloom gateway service + # -- Labels for bloom-gateway service serviceLabels: {} - # -- Additional CLI args for the bloom gateway + # -- Additional CLI args for the bloom-gateway extraArgs: [] - # -- Environment variables to add to the bloom gateway pods + # -- Environment variables to add to the bloom-gateway pods extraEnv: [] - # -- Environment variables from secrets or configmaps to add to the bloom gateway pods + # -- Environment variables from secrets or configmaps to add to the bloom-gateway pods extraEnvFrom: [] - # -- Volume mounts to add to the bloom gateway pods + # -- Volume mounts to add to the bloom-gateway pods extraVolumeMounts: [] - # -- Volumes to add to the bloom gateway pods + # -- 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 + # -- Resource requests and limits for the bloom-gateway resources: {} - # -- Containers to add to the bloom gateway pods + # -- Containers to add to the bloom-gateway pods extraContainers: [] - # -- Init containers to add to the bloom gateway pods + # -- Init containers to add to the bloom-gateway pods initContainers: [] - # -- Grace period to allow the bloom gateway to shutdown before it is killed + # -- Grace period to allow the bloom-gateway to shutdown before it is killed terminationGracePeriodSeconds: 30 - # -- Node selector for bloom gateway pods + # -- Node selector for bloom-gateway pods nodeSelector: {} - # -- Tolerations for bloom gateway pods + # -- 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 + # -- Enable creating PVCs for the bloom-gateway enabled: false # -- Size of persistent disk size: 10Gi @@ -2451,9 +2455,9 @@ bloomGateway: # 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 bloom gateway PVCs + # -- Annotations for bloom-gateway PVCs annotations: {} - # -- List of the bloom gateway PVCs + # -- List of the bloom-gateway PVCs # @notationType -- list claims: - name: data @@ -2472,19 +2476,19 @@ bloomGateway: whenScaled: Retain serviceAccount: create: false - # -- The name of the ServiceAccount to use for the bloom gateway. + # -- 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 + # -- Image pull secrets for the bloom-gateway service account imagePullSecrets: [] - # -- Annotations for the bloom gateway service account + # -- 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 compactor -bloomCompactor: - # -- Number of replicas for the bloom compactor +# -- Configuration for the bloom-planner +bloomPlanner: + # -- Number of replicas for the bloom-planner replicas: 0 # -- hostAliases to add hostAliases: [] @@ -2492,62 +2496,62 @@ bloomCompactor: # hostnames: # - domain.tld image: - # -- The Docker registry for the bloom compactor image. Overrides `loki.image.registry` + # -- The Docker registry for the bloom-planner image. Overrides `loki.image.registry` registry: null - # -- Docker image repository for the bloom compactor image. Overrides `loki.image.repository` + # -- Docker image repository for the bloom-planner image. Overrides `loki.image.repository` repository: null - # -- Docker image tag for the bloom compactor image. Overrides `loki.image.tag` + # -- 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 compactor pods + # -- The name of the PriorityClass for bloom-planner pods priorityClassName: null - # -- Labels for bloom compactor pods + # -- Labels for bloom-planner pods podLabels: {} - # -- Annotations for bloom compactor pods + # -- Annotations for bloom-planner pods podAnnotations: {} - # -- Affinity for bloom compactor pods. + # -- Affinity for bloom-planner pods. # @default -- Hard node anti-affinity affinity: podAntiAffinity: requiredDuringSchedulingIgnoredDuringExecution: - labelSelector: matchLabels: - app.kubernetes.io/component: bloom-compactor + app.kubernetes.io/component: bloom-planner topologyKey: kubernetes.io/hostname - # -- Labels for bloom compactor service + # -- Labels for bloom-planner service serviceLabels: {} - # -- Additional CLI args for the bloom compactor + # -- Additional CLI args for the bloom-planner extraArgs: [] - # -- Environment variables to add to the bloom compactor pods + # -- Environment variables to add to the bloom-planner pods extraEnv: [] - # -- Environment variables from secrets or configmaps to add to the bloom compactor pods + # -- Environment variables from secrets or configmaps to add to the bloom-planner pods extraEnvFrom: [] - # -- Volume mounts to add to the bloom compactor pods + # -- Volume mounts to add to the bloom-planner pods extraVolumeMounts: [] - # -- Volumes to add to the bloom compactor pods + # -- 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 compactor + # -- Resource requests and limits for the bloom-planner resources: {} - # -- Containers to add to the bloom compactor pods + # -- Containers to add to the bloom-planner pods extraContainers: [] - # -- Init containers to add to the bloom compactor pods + # -- Init containers to add to the bloom-planner pods initContainers: [] - # -- Grace period to allow the bloom compactor to shutdown before it is killed + # -- Grace period to allow the bloom-planner to shutdown before it is killed terminationGracePeriodSeconds: 30 - # -- Node selector for bloom compactor pods + # -- Node selector for bloom-planner pods nodeSelector: {} - # -- Tolerations for bloom compactor pods + # -- 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 compactor + # -- Enable creating PVCs for the bloom-planner enabled: false # -- Size of persistent disk size: 10Gi @@ -2557,37 +2561,115 @@ bloomCompactor: # 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 bloom compactor PVCs + # -- Annotations for bloom-planner PVCs annotations: {} - # -- List of the bloom compactor PVCs + # -- List of the bloom-planner 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 + claims: [] # -- Enable StatefulSetAutoDeletePVC feature enableStatefulSetAutoDeletePVC: false whenDeleted: Retain whenScaled: Retain serviceAccount: create: false - # -- The name of the ServiceAccount to use for the bloom compactor. + # -- 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-compactor" to the common ServiceAccount. + # "-bloom-planner" to the common ServiceAccount. name: null - # -- Image pull secrets for the bloom compactor service account + # -- Image pull secrets for the bloom-planner service account imagePullSecrets: [] - # -- Annotations for the bloom compactor service account + # -- 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: {} + # -- 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