From e19284ef25d54cb7c1baa8fa9a5f429183a99337 Mon Sep 17 00:00:00 2001 From: Sheikh-Abubaker Date: Wed, 24 Jan 2024 00:38:15 +0530 Subject: [PATCH 01/19] Fixed indentation of deployment.strategy in value.yaml Signed-off-by: Sheikh-Abubaker --- charts/promtail/Chart.yaml | 2 +- charts/promtail/README.md | 2 +- charts/promtail/values.yaml | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/charts/promtail/Chart.yaml b/charts/promtail/Chart.yaml index 555eb23705..e938d73a70 100644 --- a/charts/promtail/Chart.yaml +++ b/charts/promtail/Chart.yaml @@ -3,7 +3,7 @@ name: promtail description: Promtail is an agent which ships the contents of local logs to a Loki instance type: application appVersion: 2.9.2 -version: 6.15.3 +version: 6.15.4 home: https://grafana.com/loki sources: - https://github.com/grafana/loki diff --git a/charts/promtail/README.md b/charts/promtail/README.md index 03799f9463..a2913c858c 100644 --- a/charts/promtail/README.md +++ b/charts/promtail/README.md @@ -1,6 +1,6 @@ # promtail -![Version: 6.15.3](https://img.shields.io/badge/Version-6.15.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.9.2](https://img.shields.io/badge/AppVersion-2.9.2-informational?style=flat-square) +![Version: 6.15.4](https://img.shields.io/badge/Version-6.15.4-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.9.2](https://img.shields.io/badge/AppVersion-2.9.2-informational?style=flat-square) Promtail is an agent which ships the contents of local logs to a Loki instance diff --git a/charts/promtail/values.yaml b/charts/promtail/values.yaml index b483599002..f40c48ca21 100644 --- a/charts/promtail/values.yaml +++ b/charts/promtail/values.yaml @@ -58,9 +58,9 @@ deployment: targetMemoryUtilizationPercentage: # behavior: {} - # -- Set deployment object update strategy - strategy: - type: RollingUpdate + # -- Set deployment object update strategy + strategy: + type: RollingUpdate secret: # -- Labels for the Secret From 05f79a73ea3782df145d612c35a653786193f3dd Mon Sep 17 00:00:00 2001 From: Sheikh-Abubaker Date: Wed, 24 Jan 2024 00:46:47 +0530 Subject: [PATCH 02/19] Updated README.md Signed-off-by: Sheikh-Abubaker --- charts/promtail/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/promtail/README.md b/charts/promtail/README.md index a2913c858c..381f51745a 100644 --- a/charts/promtail/README.md +++ b/charts/promtail/README.md @@ -96,11 +96,11 @@ The new release which will pick up again from the existing `positions.yaml`. | deployment.autoscaling.enabled | bool | `false` | Creates a HorizontalPodAutoscaler for the deployment | | deployment.autoscaling.maxReplicas | int | `10` | | | deployment.autoscaling.minReplicas | int | `1` | | -| deployment.autoscaling.strategy | object | `{"type":"RollingUpdate"}` | Set deployment object update strategy | | deployment.autoscaling.targetCPUUtilizationPercentage | int | `80` | | | deployment.autoscaling.targetMemoryUtilizationPercentage | string | `nil` | | | deployment.enabled | bool | `false` | Deploys Promtail as a Deployment | | deployment.replicaCount | int | `1` | | +| deployment.strategy | object | `{"type":"RollingUpdate"}` | Set deployment object update strategy | | enableServiceLinks | bool | `true` | Configure enableServiceLinks in pod | | extraArgs | list | `[]` | | | extraContainers | object | `{}` | | From c3be1ac3bd4082759e5340cf8e25e456f786f4e4 Mon Sep 17 00:00:00 2001 From: Sheikh-Abubaker Date: Thu, 25 Jan 2024 01:34:25 +0530 Subject: [PATCH 03/19] Bumped Version Signed-off-by: Sheikh-Abubaker --- charts/promtail/Chart.yaml | 2 +- charts/promtail/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/promtail/Chart.yaml b/charts/promtail/Chart.yaml index 0bab675544..ff14820528 100644 --- a/charts/promtail/Chart.yaml +++ b/charts/promtail/Chart.yaml @@ -3,7 +3,7 @@ name: promtail description: Promtail is an agent which ships the contents of local logs to a Loki instance type: application appVersion: 2.9.3 -version: 6.15.4 +version: 6.15.5 home: https://grafana.com/loki sources: - https://github.com/grafana/loki diff --git a/charts/promtail/README.md b/charts/promtail/README.md index e45557b062..863f0b8168 100644 --- a/charts/promtail/README.md +++ b/charts/promtail/README.md @@ -1,6 +1,6 @@ # promtail -![Version: 6.15.4](https://img.shields.io/badge/Version-6.15.4-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.9.3](https://img.shields.io/badge/AppVersion-2.9.3-informational?style=flat-square) +![Version: 6.15.5](https://img.shields.io/badge/Version-6.15.5-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.9.3](https://img.shields.io/badge/AppVersion-2.9.3-informational?style=flat-square) Promtail is an agent which ships the contents of local logs to a Loki instance From 0a332085c386866fe55223fcfbc8ea88078a9a84 Mon Sep 17 00:00:00 2001 From: Sheikh-Abubaker Date: Sun, 4 Feb 2024 15:26:08 +0530 Subject: [PATCH 04/19] Bumped Version Signed-off-by: Sheikh-Abubaker --- charts/promtail/Chart.yaml | 2 +- charts/promtail/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/promtail/Chart.yaml b/charts/promtail/Chart.yaml index ff14820528..fa9bec5146 100644 --- a/charts/promtail/Chart.yaml +++ b/charts/promtail/Chart.yaml @@ -3,7 +3,7 @@ name: promtail description: Promtail is an agent which ships the contents of local logs to a Loki instance type: application appVersion: 2.9.3 -version: 6.15.5 +version: 6.15.6 home: https://grafana.com/loki sources: - https://github.com/grafana/loki diff --git a/charts/promtail/README.md b/charts/promtail/README.md index 863f0b8168..fa0c3cc4a8 100644 --- a/charts/promtail/README.md +++ b/charts/promtail/README.md @@ -1,6 +1,6 @@ # promtail -![Version: 6.15.5](https://img.shields.io/badge/Version-6.15.5-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.9.3](https://img.shields.io/badge/AppVersion-2.9.3-informational?style=flat-square) +![Version: 6.15.6](https://img.shields.io/badge/Version-6.15.6-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.9.3](https://img.shields.io/badge/AppVersion-2.9.3-informational?style=flat-square) Promtail is an agent which ships the contents of local logs to a Loki instance From 860a71961e4875b4ba0a2d614eb37932861c73bc Mon Sep 17 00:00:00 2001 From: Sheikh-Abubaker Date: Mon, 24 Jun 2024 22:19:17 +0530 Subject: [PATCH 05/19] Bump Version Signed-off-by: Sheikh-Abubaker --- charts/promtail/Chart.yaml | 2 +- charts/promtail/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/promtail/Chart.yaml b/charts/promtail/Chart.yaml index d412ab048a..f967f34e85 100644 --- a/charts/promtail/Chart.yaml +++ b/charts/promtail/Chart.yaml @@ -3,7 +3,7 @@ name: promtail description: Promtail is an agent which ships the contents of local logs to a Loki instance type: application appVersion: 3.0.0 -version: 6.16.1 +version: 6.16.2 home: https://grafana.com/loki sources: - https://github.com/grafana/loki diff --git a/charts/promtail/README.md b/charts/promtail/README.md index e9cbcb4885..92313ce28d 100644 --- a/charts/promtail/README.md +++ b/charts/promtail/README.md @@ -1,6 +1,6 @@ # promtail -![Version: 6.16.1](https://img.shields.io/badge/Version-6.16.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 3.0.0](https://img.shields.io/badge/AppVersion-3.0.0-informational?style=flat-square) +![Version: 6.16.2](https://img.shields.io/badge/Version-6.16.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 3.0.0](https://img.shields.io/badge/AppVersion-3.0.0-informational?style=flat-square) Promtail is an agent which ships the contents of local logs to a Loki instance From b9f76df6078af1050f1f360a2297bafec8b9b52a Mon Sep 17 00:00:00 2001 From: Aviv Guiser Date: Sun, 26 May 2024 01:18:21 +0300 Subject: [PATCH 06/19] [tempo-distributed]: add zone aware replication to ingester Signed-off-by: Aviv Guiser --- .../templates/ingester/_helpers-ingester.tpl | 87 +++++++++++++++++++ .../ingester/statefulset-ingester.yaml | 21 +++-- charts/tempo-distributed/values.yaml | 63 ++++++++++++++ 3 files changed, 164 insertions(+), 7 deletions(-) diff --git a/charts/tempo-distributed/templates/ingester/_helpers-ingester.tpl b/charts/tempo-distributed/templates/ingester/_helpers-ingester.tpl index 78a1692d7e..16624f49fc 100644 --- a/charts/tempo-distributed/templates/ingester/_helpers-ingester.tpl +++ b/charts/tempo-distributed/templates/ingester/_helpers-ingester.tpl @@ -5,3 +5,90 @@ ingester imagePullSecrets {{- $dict := dict "tempo" .Values.tempo.image "component" .Values.ingester.image "global" .Values.global.image -}} {{- include "tempo.imagePullSecrets" $dict -}} {{- end }} +{{- define "ingester.zoneAwareReplicationMap" -}} +{{- $zonesMap := (dict) -}} +{{- $defaultZone := (dict "affinity" .ctx.Values.ingester.affinity "nodeSelector" .ctx.Values.ingester.nodeSelector "replicas" .ctx.Values.ingester.replicas "storageClass" .ctx.Values.ingester.storageClass) -}} + +{{- if .ctx.Values.ingester.zoneAwareReplication.enabled -}} +{{- $numberOfZones := len .ctx.Values.ingester.zoneAwareReplication.zones -}} +{{- if lt $numberOfZones 3 -}} +{{- fail "When zone-awareness is enabled, you must have at least 3 zones defined." -}} +{{- end -}} + +{{- $requestedReplicas := .ctx.Values.ingester.replicas -}} +{{- $replicaPerZone := div (add $requestedReplicas $numberOfZones -1) $numberOfZones -}} + +{{- range $idx, $rolloutZone := .ctx.Values.ingester.zoneAwareReplication.zones -}} +{{- $_ := set $zonesMap $rolloutZone.name (dict + "affinity" (($rolloutZone.extraAffinity | default (dict)) | mergeOverwrite (include "ingester.zoneAntiAffinity" (dict "rolloutZoneName" $rolloutZone.name "topologyKey" $.ctx.Values.ingester.zoneAwareReplication.topologyKey) | fromYaml)) + "nodeSelector" ($rolloutZone.nodeSelector | default (dict) ) + "replicas" $replicaPerZone + "storageClass" $rolloutZone.storageClass + ) -}} +{{- end -}} +{{- if .ctx.Values.ingester.zoneAwareReplication.migration.enabled -}} +{{- if .ctx.Values.ingester.zoneAwareReplication.migration.scaleDownDefaultZone -}} +{{- $_ := set $defaultZone "replicas" 0 -}} +{{- end -}} +{{- $_ := set $zonesMap "" $defaultZone -}} +{{- end -}} + +{{- else -}} +{{- $_ := set $zonesMap "" $defaultZone -}} +{{- end -}} +{{- $zonesMap | toYaml }} + +{{- end -}} + +{{/* +Calculate anti-affinity for a zone +Params: + rolloutZoneName = name of the rollout zone + topologyKey = topology key +*/}} +{{- define "ingester.zoneAntiAffinity" -}} +{{- if .topologyKey -}} + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: rollout-group + operator: In + values: + - ingester + - key: zone + operator: NotIn + values: + - {{ .rolloutZoneName }} + topologyKey: {{ .topologyKey | quote }} +{{- else -}} +{} +{{- end -}} +{{- end -}} + +{{/* +Calculate annotations with zone-awareness +Params: + ctx = . context + component = component name + rolloutZoneName = rollout zone name (optional) +*/}} +{{- define "ingester.componentAnnotations" -}} +{{- $componentSection := include "ingester.componentSectionFromName" . | fromYaml -}} +{{- if and (or $componentSection.zoneAwareReplication.enabled $componentSection.zoneAwareReplication.migration.enabled) .rolloutZoneName }} +{{- $map := dict "rollout-max-unavailable" ($componentSection.zoneAwareReplication.maxUnavailable | toString) -}} +{{- toYaml (deepCopy $map | mergeOverwrite $componentSection.annotations) }} +{{- else -}} +{{ toYaml $componentSection.annotations }} +{{- end -}} +{{- end -}} + +{{/* +Resource name template +*/}} +{{- define "ingester.resourceName" -}} +{{- $resourceName := include "tempo.fullname" .ctx -}} +{{- if .component -}}{{- $resourceName = printf "%s-%s" $resourceName .component -}}{{- end -}} +{{- if .rolloutZoneName -}}{{- $resourceName = printf "%s-%s" $resourceName .rolloutZoneName -}}{{- end -}} +{{- $resourceName -}} +{{- end -}} diff --git a/charts/tempo-distributed/templates/ingester/statefulset-ingester.yaml b/charts/tempo-distributed/templates/ingester/statefulset-ingester.yaml index 56d3ab5327..2c481cc34a 100644 --- a/charts/tempo-distributed/templates/ingester/statefulset-ingester.yaml +++ b/charts/tempo-distributed/templates/ingester/statefulset-ingester.yaml @@ -1,8 +1,12 @@ -{{ $dict := dict "ctx" . "component" "ingester" "memberlist" true }} +{{- $dict := dict "ctx" . "component" "ingester" "memberlist" true -}} +{{- $zonesMap := include "ingester.zoneAwareReplicationMap" $dict | fromYaml -}} +{{- range $zoneName, $rolloutZone := $zonesMap -}} +{{- with $ -}} +{{- $_ := set $dict "rolloutZoneName" $zoneName -}} apiVersion: apps/v1 kind: StatefulSet metadata: - name: {{ template "tempo.resourceName" $dict }} + name: {{ template "ingester.resourceName" $dict }} namespace: {{ .Release.Namespace }} labels: {{- include "tempo.labels" $dict | nindent 4 }} @@ -11,9 +15,9 @@ metadata: {{- toYaml . | nindent 4 }} {{- end }} spec: -{{- if not .Values.ingester.autoscaling.enabled }} - replicas: {{ .Values.ingester.replicas }} -{{- end }} + {{- if not .Values.ingester.autoscaling.enabled }} + replicas: {{ $rolloutZone.replicas }} + {{- end }} selector: matchLabels: {{- include "tempo.selectorLabels" $dict | nindent 6}} @@ -112,11 +116,11 @@ spec: {{- tpl . $ | nindent 8 }} {{- end }} {{- end }} - {{- with .Values.ingester.affinity }} + {{- with $rolloutZone.affinity }} affinity: {{- tpl . $ | nindent 8 }} {{- end }} - {{- with .Values.ingester.nodeSelector }} + {{- with $rolloutZone.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} @@ -169,3 +173,6 @@ spec: requests: storage: {{ .Values.ingester.persistence.size | quote }} {{- end }} +--- +{{ end }} +{{ end }} \ No newline at end of file diff --git a/charts/tempo-distributed/values.yaml b/charts/tempo-distributed/values.yaml index 198e267ae7..b8fdbe57c9 100644 --- a/charts/tempo-distributed/values.yaml +++ b/charts/tempo-distributed/values.yaml @@ -224,6 +224,69 @@ ingester: appProtocol: # -- Set the optional grpc service protocol. Ex: "grpc", "http2" or "https" grpc: null + zoneAwareReplication: + # -- Enable zone-aware replication for ingester + enabled: true + # -- Maximum number of ingesters that can be unavailable per zone during rollout + maxUnavailable: 50 + # -- topologyKey to use in pod anti-affinity. If unset, no anti-affinity rules are generated. If set, the generated anti-affinity rule makes sure that pods from different zones do not mix. + # E.g.: topologyKey: 'kubernetes.io/hostname' + topologyKey: null + # -- Auxiliary values for migration, see https://grafana.com/docs/helm-charts/mimir-distributed/latest/migration-guides/migrate-from-single-zone-with-helm/ + migration: + # -- Indicate if migration is ongoing for multi zone ingester + enabled: false + # -- Exclude default zone on write path + excludeDefaultZone: false + # -- Enable zone-awareness, read path only + readPath: false + # -- Total number of replicas to start in availability zones when migration is enabled + replicas: 0 + # -- Scale default zone ingesters to 0 + scaleDownDefaultZone: false + # -- Enable zone-awareness, write path only + writePath: false + # -- Zone definitions for ingester zones. Note: you have to redefine the whole list to change parts as YAML does not allow to modify parts of a list. + zones: + # -- Name of the zone, used in labels and selectors. Must follow Kubernetes naming restrictions: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ + - name: zone-a + # -- nodeselector to restrict where pods of this zone can be placed. E.g.: + # nodeSelector: + # topology.kubernetes.io/zone: zone-a + nodeSelector: null + # -- extraAffinity adds user defined custom affinity rules (merged with generated rules) + extraAffinity: {} + # -- Ingester data Persistent Volume Storage Class + # If defined, storageClassName: + # If set to "-", then use `storageClassName: ""`, which disables dynamic provisioning + # If undefined or set to null (the default), then fall back to the value of `ingester.persistentVolume.storageClass`. + storageClass: null + # -- Name of the zone, used in labels and selectors. Must follow Kubernetes naming restrictions: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ + - name: zone-b + # -- nodeselector to restrict where pods of this zone can be placed. E.g.: + # nodeSelector: + # topology.kubernetes.io/zone: zone-b + nodeSelector: null + # -- extraAffinity adds user defined custom affinity rules (merged with generated rules) + extraAffinity: {} + # -- Ingester data Persistent Volume Storage Class + # If defined, storageClassName: + # If set to "-", then use `storageClassName: ""`, which disables dynamic provisioning + # If undefined or set to null (the default), then fall back to the value of `ingester.persistentVolume.storageClass`. + storageClass: null + # -- Name of the zone, used in labels and selectors. Must follow Kubernetes naming restrictions: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ + - name: zone-c + # -- nodeselector to restrict where pods of this zone can be placed. E.g.: + # nodeSelector: + # topology.kubernetes.io/zone: zone-c + nodeSelector: null + # -- extraAffinity adds user defined custom affinity rules (merged with generated rules) + extraAffinity: {} + # -- Ingester data Persistent Volume Storage Class + # If defined, storageClassName: + # If set to "-", then use `storageClassName: ""`, which disables dynamic provisioning + # If undefined or set to null (the default), then fall back to the value of `ingester.persistentVolume.storageClass`. + storageClass: null # Configuration for the metrics-generator metricsGenerator: From 8a3410ce3e9d543ff502abffa9d71417ba273748 Mon Sep 17 00:00:00 2001 From: Aviv Guiser Date: Mon, 27 May 2024 23:18:08 +0300 Subject: [PATCH 07/19] added rollout operator dep and adjusted the rest of the chart Signed-off-by: Aviv Guiser --- charts/tempo-distributed/Chart.lock | 7 +- charts/tempo-distributed/Chart.yaml | 5 ++ .../templates/ingester/_helpers-ingester.tpl | 86 +++++++++++++------ .../ingester/statefulset-ingester.yaml | 15 +++- charts/tempo-distributed/values.yaml | 25 ++---- 5 files changed, 90 insertions(+), 48 deletions(-) diff --git a/charts/tempo-distributed/Chart.lock b/charts/tempo-distributed/Chart.lock index 03cf000ca3..4c3ac250e8 100644 --- a/charts/tempo-distributed/Chart.lock +++ b/charts/tempo-distributed/Chart.lock @@ -5,5 +5,8 @@ dependencies: - name: grafana-agent-operator repository: https://grafana.github.io/helm-charts version: 0.2.2 -digest: sha256:761a500ff2fd8b8c5a52b70683abcdec8b6ffcae6b81ad26ea4ddeddbaf609f1 -generated: "2023-09-28T13:42:34.486521-07:00" +- name: rollout-operator + repository: https://grafana.github.io/helm-charts + version: 0.15.0 +digest: sha256:7be5c7a4c0d1a71dc6de69b8e99ac5a61c1771d6241e7f9105393cc7117d4f0a +generated: "2024-05-27T19:15:20.601670632+03:00" diff --git a/charts/tempo-distributed/Chart.yaml b/charts/tempo-distributed/Chart.yaml index 34d8b8b918..1c68a71fd2 100644 --- a/charts/tempo-distributed/Chart.yaml +++ b/charts/tempo-distributed/Chart.yaml @@ -31,3 +31,8 @@ dependencies: version: 0.2.2 repository: https://grafana.github.io/helm-charts condition: metaMonitoring.grafanaAgent.installOperator + - name: rollout-operator + alias: rollout_operator + repository: https://grafana.github.io/helm-charts + version: 0.15.0 + condition: rollout_operator.enabled diff --git a/charts/tempo-distributed/templates/ingester/_helpers-ingester.tpl b/charts/tempo-distributed/templates/ingester/_helpers-ingester.tpl index 16624f49fc..6ca7ee1dc9 100644 --- a/charts/tempo-distributed/templates/ingester/_helpers-ingester.tpl +++ b/charts/tempo-distributed/templates/ingester/_helpers-ingester.tpl @@ -1,6 +1,3 @@ -{{/* -ingester imagePullSecrets -*/}} {{- define "tempo.ingesterImagePullSecrets" -}} {{- $dict := dict "tempo" .Values.tempo.image "component" .Values.ingester.image "global" .Values.global.image -}} {{- include "tempo.imagePullSecrets" $dict -}} @@ -8,16 +5,13 @@ ingester imagePullSecrets {{- define "ingester.zoneAwareReplicationMap" -}} {{- $zonesMap := (dict) -}} {{- $defaultZone := (dict "affinity" .ctx.Values.ingester.affinity "nodeSelector" .ctx.Values.ingester.nodeSelector "replicas" .ctx.Values.ingester.replicas "storageClass" .ctx.Values.ingester.storageClass) -}} - {{- if .ctx.Values.ingester.zoneAwareReplication.enabled -}} {{- $numberOfZones := len .ctx.Values.ingester.zoneAwareReplication.zones -}} {{- if lt $numberOfZones 3 -}} {{- fail "When zone-awareness is enabled, you must have at least 3 zones defined." -}} {{- end -}} - {{- $requestedReplicas := .ctx.Values.ingester.replicas -}} {{- $replicaPerZone := div (add $requestedReplicas $numberOfZones -1) $numberOfZones -}} - {{- range $idx, $rolloutZone := .ctx.Values.ingester.zoneAwareReplication.zones -}} {{- $_ := set $zonesMap $rolloutZone.name (dict "affinity" (($rolloutZone.extraAffinity | default (dict)) | mergeOverwrite (include "ingester.zoneAntiAffinity" (dict "rolloutZoneName" $rolloutZone.name "topologyKey" $.ctx.Values.ingester.zoneAwareReplication.topologyKey) | fromYaml)) @@ -26,20 +20,9 @@ ingester imagePullSecrets "storageClass" $rolloutZone.storageClass ) -}} {{- end -}} -{{- if .ctx.Values.ingester.zoneAwareReplication.migration.enabled -}} -{{- if .ctx.Values.ingester.zoneAwareReplication.migration.scaleDownDefaultZone -}} -{{- $_ := set $defaultZone "replicas" 0 -}} -{{- end -}} -{{- $_ := set $zonesMap "" $defaultZone -}} -{{- end -}} - -{{- else -}} -{{- $_ := set $zonesMap "" $defaultZone -}} -{{- end -}} {{- $zonesMap | toYaml }} - {{- end -}} - +{{- end -}} {{/* Calculate anti-affinity for a zone Params: @@ -48,7 +31,7 @@ Params: */}} {{- define "ingester.zoneAntiAffinity" -}} {{- if .topologyKey -}} - podAntiAffinity: + podAntiAffinity: requiredDuringSchedulingIgnoredDuringExecution: - labelSelector: matchExpressions: @@ -73,16 +56,38 @@ Params: component = component name rolloutZoneName = rollout zone name (optional) */}} -{{- define "ingester.componentAnnotations" -}} -{{- $componentSection := include "ingester.componentSectionFromName" . | fromYaml -}} -{{- if and (or $componentSection.zoneAwareReplication.enabled $componentSection.zoneAwareReplication.migration.enabled) .rolloutZoneName }} -{{- $map := dict "rollout-max-unavailable" ($componentSection.zoneAwareReplication.maxUnavailable | toString) -}} -{{- toYaml (deepCopy $map | mergeOverwrite $componentSection.annotations) }} +{{- define "ingester.Annotations" -}} +{{- if and .ctx.Values.ingester.zoneAwareReplication.maxUnavailable .rolloutZoneName }} +{{- $map := dict "rollout-max-unavailable" (.ctx.Values.ingester.zoneAwareReplication.maxUnavailable | toString) -}} +{{- toYaml (deepCopy $map | mergeOverwrite .ctx.Values.ingester.annotations) }} {{- else -}} -{{ toYaml $componentSection.annotations }} +{{ toYaml .ctx.Values.ingester.annotations }} {{- end -}} {{- end -}} +{{/* +ingester labels +*/}} +{{- define "ingester.labels" -}} +{{- if and .ctx.Values.ingester.zoneAwareReplication.enabled .rolloutZoneName }} +name: {{ printf "%s-%s" .component .rolloutZoneName }} +rollout-group: {{ .component }} +zone: {{ .rolloutZoneName }} +{{- end }} +helm.sh/chart: {{ include "tempo.chart" .ctx }} +app.kubernetes.io/name: {{ include "tempo.name" .ctx }} +app.kubernetes.io/instance: {{ .ctx.Release.Name }} +{{- if .component }} +app.kubernetes.io/component: {{ .component }} +{{- end }} +{{- if .memberlist }} +app.kubernetes.io/part-of: memberlist +{{- end }} +{{- if .ctx.Chart.AppVersion }} +app.kubernetes.io/version: {{ .ctx.Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .ctx.Release.Service }} +{{- end -}} {{/* Resource name template */}} @@ -92,3 +97,34 @@ Resource name template {{- if .rolloutZoneName -}}{{- $resourceName = printf "%s-%s" $resourceName .rolloutZoneName -}}{{- end -}} {{- $resourceName -}} {{- end -}} + + +{{/* +ingester selector labels +Params: + ctx = . context + component = name of the component + rolloutZoneName = rollout zone name (optional) +*/}} +{{- define "ingester.selectorLabels" -}} +{{- if .ctx.Values.enterprise.legacyLabels }} +{{- if .component -}} +app: {{ include "tempo.name" .ctx }}-{{ .component }} +{{- end }} +release: {{ .ctx.Release.Name }} +{{- else -}} +app.kubernetes.io/name: {{ include "tempo.name" .ctx }} +app.kubernetes.io/instance: {{ .ctx.Release.Name }} +{{- if .component }} +app.kubernetes.io/component: {{ .component }} +{{- end }} +{{- end -}} +{{- if .rolloutZoneName }} +{{- if not .component }} +{{- printf "Component name cannot be empty if rolloutZoneName (%s) is set" .rolloutZoneName | fail }} +{{- end }} +rollout-group: {{ .component }} +zone: {{ .rolloutZoneName }} +{{- end }} +{{- end -}} + diff --git a/charts/tempo-distributed/templates/ingester/statefulset-ingester.yaml b/charts/tempo-distributed/templates/ingester/statefulset-ingester.yaml index 2c481cc34a..3c384430e5 100644 --- a/charts/tempo-distributed/templates/ingester/statefulset-ingester.yaml +++ b/charts/tempo-distributed/templates/ingester/statefulset-ingester.yaml @@ -9,23 +9,32 @@ metadata: name: {{ template "ingester.resourceName" $dict }} namespace: {{ .Release.Namespace }} labels: - {{- include "tempo.labels" $dict | nindent 4 }} + {{- include "ingester.labels" $dict | indent 4 }} + {{- if .Values.ingester.zoneAwareReplication.enabled }} + annotations: + {{- include "ingester.Annotations" $dict | nindent 4}} + {{- else }} {{- with .Values.ingester.annotations }} annotations: {{- toYaml . | nindent 4 }} {{- end }} + {{- end }} spec: {{- if not .Values.ingester.autoscaling.enabled }} replicas: {{ $rolloutZone.replicas }} {{- end }} selector: matchLabels: - {{- include "tempo.selectorLabels" $dict | nindent 6}} + {{- include "ingester.selectorLabels" $dict | nindent 6}} serviceName: ingester podManagementPolicy: Parallel updateStrategy: + {{- if .Values.ingester.zoneAwareReplication.enabled }} + type: OnDelete + {{- else }} rollingUpdate: partition: 0 + {{- end }} template: metadata: labels: @@ -118,7 +127,7 @@ spec: {{- end }} {{- with $rolloutZone.affinity }} affinity: - {{- tpl . $ | nindent 8 }} + {{- toYaml . | nindent 8 }} {{- end }} {{- with $rolloutZone.nodeSelector }} nodeSelector: diff --git a/charts/tempo-distributed/values.yaml b/charts/tempo-distributed/values.yaml index b8fdbe57c9..fd2ed6a01b 100644 --- a/charts/tempo-distributed/values.yaml +++ b/charts/tempo-distributed/values.yaml @@ -231,21 +231,7 @@ ingester: maxUnavailable: 50 # -- topologyKey to use in pod anti-affinity. If unset, no anti-affinity rules are generated. If set, the generated anti-affinity rule makes sure that pods from different zones do not mix. # E.g.: topologyKey: 'kubernetes.io/hostname' - topologyKey: null - # -- Auxiliary values for migration, see https://grafana.com/docs/helm-charts/mimir-distributed/latest/migration-guides/migrate-from-single-zone-with-helm/ - migration: - # -- Indicate if migration is ongoing for multi zone ingester - enabled: false - # -- Exclude default zone on write path - excludeDefaultZone: false - # -- Enable zone-awareness, read path only - readPath: false - # -- Total number of replicas to start in availability zones when migration is enabled - replicas: 0 - # -- Scale default zone ingesters to 0 - scaleDownDefaultZone: false - # -- Enable zone-awareness, write path only - writePath: false + topologyKey: 'kubernetes.io/hostname' # -- Zone definitions for ingester zones. Note: you have to redefine the whole list to change parts as YAML does not allow to modify parts of a list. zones: # -- Name of the zone, used in labels and selectors. Must follow Kubernetes naming restrictions: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ @@ -253,7 +239,8 @@ ingester: # -- nodeselector to restrict where pods of this zone can be placed. E.g.: # nodeSelector: # topology.kubernetes.io/zone: zone-a - nodeSelector: null + nodeSelector: + topology.kubernetes.io/zone: zone-a # -- extraAffinity adds user defined custom affinity rules (merged with generated rules) extraAffinity: {} # -- Ingester data Persistent Volume Storage Class @@ -266,7 +253,8 @@ ingester: # -- nodeselector to restrict where pods of this zone can be placed. E.g.: # nodeSelector: # topology.kubernetes.io/zone: zone-b - nodeSelector: null + nodeSelector: + topology.kubernetes.io/zone: zone-b # -- extraAffinity adds user defined custom affinity rules (merged with generated rules) extraAffinity: {} # -- Ingester data Persistent Volume Storage Class @@ -279,7 +267,8 @@ ingester: # -- nodeselector to restrict where pods of this zone can be placed. E.g.: # nodeSelector: # topology.kubernetes.io/zone: zone-c - nodeSelector: null + nodeSelector: + topology.kubernetes.io/zone: zone-c # -- extraAffinity adds user defined custom affinity rules (merged with generated rules) extraAffinity: {} # -- Ingester data Persistent Volume Storage Class From 252c34eb50304342c5c890b8af9068a26db8738f Mon Sep 17 00:00:00 2001 From: Aviv Guiser Date: Mon, 27 May 2024 23:25:20 +0300 Subject: [PATCH 08/19] add zone_awareness_enabled in cofig file Signed-off-by: Aviv Guiser --- charts/tempo-distributed/values.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/charts/tempo-distributed/values.yaml b/charts/tempo-distributed/values.yaml index fd2ed6a01b..e824c3caca 100644 --- a/charts/tempo-distributed/values.yaml +++ b/charts/tempo-distributed/values.yaml @@ -1276,6 +1276,9 @@ config: | lifecycler: ring: replication_factor: {{ .Values.ingester.config.replication_factor }} + {{- if .Values.ingester.zoneAwareReplication.enabled }} + zone_awareness_enabled: true + {{- end }} kvstore: store: memberlist tokens_file_path: /var/tempo/tokens.json From 0cb33d9f1cb67bb6014a180165c6709a681cf33c Mon Sep 17 00:00:00 2001 From: Aviv Guiser Date: Mon, 27 May 2024 23:31:34 +0300 Subject: [PATCH 09/19] bump chart versio and update docs Signed-off-by: Aviv Guiser --- charts/tempo-distributed/README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/charts/tempo-distributed/README.md b/charts/tempo-distributed/README.md index c3877ac6e6..3160125a08 100644 --- a/charts/tempo-distributed/README.md +++ b/charts/tempo-distributed/README.md @@ -14,6 +14,7 @@ Grafana Tempo in MicroService mode |------------|------|---------| | https://charts.min.io/ | minio(minio) | 4.0.12 | | https://grafana.github.io/helm-charts | grafana-agent-operator(grafana-agent-operator) | 0.2.2 | +| https://grafana.github.io/helm-charts | rollout_operator(rollout-operator) | 0.15.0 | ## Chart Repo @@ -519,6 +520,22 @@ The memcached default args are removed and should be provided manually. The sett | ingester.terminationGracePeriodSeconds | int | `300` | 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. | | ingester.tolerations | list | `[]` | Tolerations for ingester pods | | ingester.topologySpreadConstraints | string | Defaults to allow skew no more then 1 node per AZ | topologySpread for ingester pods. Passed through `tpl` and, thus, to be configured as string | +| ingester.zoneAwareReplication.enabled | bool | `true` | Enable zone-aware replication for ingester | +| ingester.zoneAwareReplication.maxUnavailable | int | `50` | Maximum number of ingesters that can be unavailable per zone during rollout | +| ingester.zoneAwareReplication.topologyKey | string | `"kubernetes.io/hostname"` | topologyKey to use in pod anti-affinity. If unset, no anti-affinity rules are generated. If set, the generated anti-affinity rule makes sure that pods from different zones do not mix. E.g.: topologyKey: 'kubernetes.io/hostname' | +| ingester.zoneAwareReplication.zones | list | `[{"extraAffinity":{},"name":"zone-a","nodeSelector":{"topology.kubernetes.io/zone":"zone-a"},"storageClass":null},{"extraAffinity":{},"name":"zone-b","nodeSelector":{"topology.kubernetes.io/zone":"zone-b"},"storageClass":null},{"extraAffinity":{},"name":"zone-c","nodeSelector":{"topology.kubernetes.io/zone":"zone-c"},"storageClass":null}]` | Zone definitions for ingester zones. Note: you have to redefine the whole list to change parts as YAML does not allow to modify parts of a list. | +| ingester.zoneAwareReplication.zones[0] | object | `{"extraAffinity":{},"name":"zone-a","nodeSelector":{"topology.kubernetes.io/zone":"zone-a"},"storageClass":null}` | Name of the zone, used in labels and selectors. Must follow Kubernetes naming restrictions: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ | +| ingester.zoneAwareReplication.zones[0].extraAffinity | object | `{}` | extraAffinity adds user defined custom affinity rules (merged with generated rules) | +| ingester.zoneAwareReplication.zones[0].nodeSelector | object | `{"topology.kubernetes.io/zone":"zone-a"}` | nodeselector to restrict where pods of this zone can be placed. E.g.: nodeSelector: topology.kubernetes.io/zone: zone-a | +| ingester.zoneAwareReplication.zones[0].storageClass | string | `nil` | Ingester data Persistent Volume Storage Class If defined, storageClassName: If set to "-", then use `storageClassName: ""`, which disables dynamic provisioning If undefined or set to null (the default), then fall back to the value of `ingester.persistentVolume.storageClass`. | +| ingester.zoneAwareReplication.zones[1] | object | `{"extraAffinity":{},"name":"zone-b","nodeSelector":{"topology.kubernetes.io/zone":"zone-b"},"storageClass":null}` | Name of the zone, used in labels and selectors. Must follow Kubernetes naming restrictions: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ | +| ingester.zoneAwareReplication.zones[1].extraAffinity | object | `{}` | extraAffinity adds user defined custom affinity rules (merged with generated rules) | +| ingester.zoneAwareReplication.zones[1].nodeSelector | object | `{"topology.kubernetes.io/zone":"zone-b"}` | nodeselector to restrict where pods of this zone can be placed. E.g.: nodeSelector: topology.kubernetes.io/zone: zone-b | +| ingester.zoneAwareReplication.zones[1].storageClass | string | `nil` | Ingester data Persistent Volume Storage Class If defined, storageClassName: If set to "-", then use `storageClassName: ""`, which disables dynamic provisioning If undefined or set to null (the default), then fall back to the value of `ingester.persistentVolume.storageClass`. | +| ingester.zoneAwareReplication.zones[2] | object | `{"extraAffinity":{},"name":"zone-c","nodeSelector":{"topology.kubernetes.io/zone":"zone-c"},"storageClass":null}` | Name of the zone, used in labels and selectors. Must follow Kubernetes naming restrictions: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ | +| ingester.zoneAwareReplication.zones[2].extraAffinity | object | `{}` | extraAffinity adds user defined custom affinity rules (merged with generated rules) | +| ingester.zoneAwareReplication.zones[2].nodeSelector | object | `{"topology.kubernetes.io/zone":"zone-c"}` | nodeselector to restrict where pods of this zone can be placed. E.g.: nodeSelector: topology.kubernetes.io/zone: zone-c | +| ingester.zoneAwareReplication.zones[2].storageClass | string | `nil` | Ingester data Persistent Volume Storage Class If defined, storageClassName: If set to "-", then use `storageClassName: ""`, which disables dynamic provisioning If undefined or set to null (the default), then fall back to the value of `ingester.persistentVolume.storageClass`. | | license.contents | string | `"NOTAVALIDLICENSE"` | | | license.external | bool | `false` | | | license.secretName | string | `"{{ include \"tempo.resourceName\" (dict \"ctx\" . \"component\" \"license\") }}"` | | From 5cc29fe6de361c5405dd59ae25ceadfbc3db25ec Mon Sep 17 00:00:00 2001 From: Aviv Guiser Date: Mon, 27 May 2024 23:53:16 +0300 Subject: [PATCH 10/19] revert default values in values file for zone aware replication Signed-off-by: Aviv Guiser --- charts/tempo-distributed/values.yaml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/charts/tempo-distributed/values.yaml b/charts/tempo-distributed/values.yaml index e824c3caca..f515b6e09b 100644 --- a/charts/tempo-distributed/values.yaml +++ b/charts/tempo-distributed/values.yaml @@ -231,7 +231,7 @@ ingester: maxUnavailable: 50 # -- topologyKey to use in pod anti-affinity. If unset, no anti-affinity rules are generated. If set, the generated anti-affinity rule makes sure that pods from different zones do not mix. # E.g.: topologyKey: 'kubernetes.io/hostname' - topologyKey: 'kubernetes.io/hostname' + topologyKey: null # -- Zone definitions for ingester zones. Note: you have to redefine the whole list to change parts as YAML does not allow to modify parts of a list. zones: # -- Name of the zone, used in labels and selectors. Must follow Kubernetes naming restrictions: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ @@ -239,8 +239,7 @@ ingester: # -- nodeselector to restrict where pods of this zone can be placed. E.g.: # nodeSelector: # topology.kubernetes.io/zone: zone-a - nodeSelector: - topology.kubernetes.io/zone: zone-a + nodeSelector: null # -- extraAffinity adds user defined custom affinity rules (merged with generated rules) extraAffinity: {} # -- Ingester data Persistent Volume Storage Class @@ -253,8 +252,7 @@ ingester: # -- nodeselector to restrict where pods of this zone can be placed. E.g.: # nodeSelector: # topology.kubernetes.io/zone: zone-b - nodeSelector: - topology.kubernetes.io/zone: zone-b + nodeSelector: null # -- extraAffinity adds user defined custom affinity rules (merged with generated rules) extraAffinity: {} # -- Ingester data Persistent Volume Storage Class @@ -267,8 +265,7 @@ ingester: # -- nodeselector to restrict where pods of this zone can be placed. E.g.: # nodeSelector: # topology.kubernetes.io/zone: zone-c - nodeSelector: - topology.kubernetes.io/zone: zone-c + nodeSelector: null # -- extraAffinity adds user defined custom affinity rules (merged with generated rules) extraAffinity: {} # -- Ingester data Persistent Volume Storage Class From 5bb00c6a0b7e49160fe37b489b292cb7d4d90a17 Mon Sep 17 00:00:00 2001 From: Aviv Guiser Date: Tue, 28 May 2024 00:02:16 +0300 Subject: [PATCH 11/19] ran helm docs again and fixed selector Signed-off-by: Aviv Guiser --- charts/tempo-distributed/README.md | 16 +++--- .../templates/ingester/_helpers-ingester.tpl | 50 +++++++++++++++++++ .../ingester/statefulset-ingester.yaml | 2 +- 3 files changed, 59 insertions(+), 9 deletions(-) diff --git a/charts/tempo-distributed/README.md b/charts/tempo-distributed/README.md index 3160125a08..838cdff8de 100644 --- a/charts/tempo-distributed/README.md +++ b/charts/tempo-distributed/README.md @@ -522,19 +522,19 @@ The memcached default args are removed and should be provided manually. The sett | ingester.topologySpreadConstraints | string | Defaults to allow skew no more then 1 node per AZ | topologySpread for ingester pods. Passed through `tpl` and, thus, to be configured as string | | ingester.zoneAwareReplication.enabled | bool | `true` | Enable zone-aware replication for ingester | | ingester.zoneAwareReplication.maxUnavailable | int | `50` | Maximum number of ingesters that can be unavailable per zone during rollout | -| ingester.zoneAwareReplication.topologyKey | string | `"kubernetes.io/hostname"` | topologyKey to use in pod anti-affinity. If unset, no anti-affinity rules are generated. If set, the generated anti-affinity rule makes sure that pods from different zones do not mix. E.g.: topologyKey: 'kubernetes.io/hostname' | -| ingester.zoneAwareReplication.zones | list | `[{"extraAffinity":{},"name":"zone-a","nodeSelector":{"topology.kubernetes.io/zone":"zone-a"},"storageClass":null},{"extraAffinity":{},"name":"zone-b","nodeSelector":{"topology.kubernetes.io/zone":"zone-b"},"storageClass":null},{"extraAffinity":{},"name":"zone-c","nodeSelector":{"topology.kubernetes.io/zone":"zone-c"},"storageClass":null}]` | Zone definitions for ingester zones. Note: you have to redefine the whole list to change parts as YAML does not allow to modify parts of a list. | -| ingester.zoneAwareReplication.zones[0] | object | `{"extraAffinity":{},"name":"zone-a","nodeSelector":{"topology.kubernetes.io/zone":"zone-a"},"storageClass":null}` | Name of the zone, used in labels and selectors. Must follow Kubernetes naming restrictions: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ | +| ingester.zoneAwareReplication.topologyKey | string | `nil` | topologyKey to use in pod anti-affinity. If unset, no anti-affinity rules are generated. If set, the generated anti-affinity rule makes sure that pods from different zones do not mix. E.g.: topologyKey: 'kubernetes.io/hostname' | +| ingester.zoneAwareReplication.zones | list | `[{"extraAffinity":{},"name":"zone-a","nodeSelector":null,"storageClass":null},{"extraAffinity":{},"name":"zone-b","nodeSelector":null,"storageClass":null},{"extraAffinity":{},"name":"zone-c","nodeSelector":null,"storageClass":null}]` | Zone definitions for ingester zones. Note: you have to redefine the whole list to change parts as YAML does not allow to modify parts of a list. | +| ingester.zoneAwareReplication.zones[0] | object | `{"extraAffinity":{},"name":"zone-a","nodeSelector":null,"storageClass":null}` | Name of the zone, used in labels and selectors. Must follow Kubernetes naming restrictions: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ | | ingester.zoneAwareReplication.zones[0].extraAffinity | object | `{}` | extraAffinity adds user defined custom affinity rules (merged with generated rules) | -| ingester.zoneAwareReplication.zones[0].nodeSelector | object | `{"topology.kubernetes.io/zone":"zone-a"}` | nodeselector to restrict where pods of this zone can be placed. E.g.: nodeSelector: topology.kubernetes.io/zone: zone-a | +| ingester.zoneAwareReplication.zones[0].nodeSelector | string | `nil` | nodeselector to restrict where pods of this zone can be placed. E.g.: nodeSelector: topology.kubernetes.io/zone: zone-a | | ingester.zoneAwareReplication.zones[0].storageClass | string | `nil` | Ingester data Persistent Volume Storage Class If defined, storageClassName: If set to "-", then use `storageClassName: ""`, which disables dynamic provisioning If undefined or set to null (the default), then fall back to the value of `ingester.persistentVolume.storageClass`. | -| ingester.zoneAwareReplication.zones[1] | object | `{"extraAffinity":{},"name":"zone-b","nodeSelector":{"topology.kubernetes.io/zone":"zone-b"},"storageClass":null}` | Name of the zone, used in labels and selectors. Must follow Kubernetes naming restrictions: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ | +| ingester.zoneAwareReplication.zones[1] | object | `{"extraAffinity":{},"name":"zone-b","nodeSelector":null,"storageClass":null}` | Name of the zone, used in labels and selectors. Must follow Kubernetes naming restrictions: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ | | ingester.zoneAwareReplication.zones[1].extraAffinity | object | `{}` | extraAffinity adds user defined custom affinity rules (merged with generated rules) | -| ingester.zoneAwareReplication.zones[1].nodeSelector | object | `{"topology.kubernetes.io/zone":"zone-b"}` | nodeselector to restrict where pods of this zone can be placed. E.g.: nodeSelector: topology.kubernetes.io/zone: zone-b | +| ingester.zoneAwareReplication.zones[1].nodeSelector | string | `nil` | nodeselector to restrict where pods of this zone can be placed. E.g.: nodeSelector: topology.kubernetes.io/zone: zone-b | | ingester.zoneAwareReplication.zones[1].storageClass | string | `nil` | Ingester data Persistent Volume Storage Class If defined, storageClassName: If set to "-", then use `storageClassName: ""`, which disables dynamic provisioning If undefined or set to null (the default), then fall back to the value of `ingester.persistentVolume.storageClass`. | -| ingester.zoneAwareReplication.zones[2] | object | `{"extraAffinity":{},"name":"zone-c","nodeSelector":{"topology.kubernetes.io/zone":"zone-c"},"storageClass":null}` | Name of the zone, used in labels and selectors. Must follow Kubernetes naming restrictions: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ | +| ingester.zoneAwareReplication.zones[2] | object | `{"extraAffinity":{},"name":"zone-c","nodeSelector":null,"storageClass":null}` | Name of the zone, used in labels and selectors. Must follow Kubernetes naming restrictions: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ | | ingester.zoneAwareReplication.zones[2].extraAffinity | object | `{}` | extraAffinity adds user defined custom affinity rules (merged with generated rules) | -| ingester.zoneAwareReplication.zones[2].nodeSelector | object | `{"topology.kubernetes.io/zone":"zone-c"}` | nodeselector to restrict where pods of this zone can be placed. E.g.: nodeSelector: topology.kubernetes.io/zone: zone-c | +| ingester.zoneAwareReplication.zones[2].nodeSelector | string | `nil` | nodeselector to restrict where pods of this zone can be placed. E.g.: nodeSelector: topology.kubernetes.io/zone: zone-c | | ingester.zoneAwareReplication.zones[2].storageClass | string | `nil` | Ingester data Persistent Volume Storage Class If defined, storageClassName: If set to "-", then use `storageClassName: ""`, which disables dynamic provisioning If undefined or set to null (the default), then fall back to the value of `ingester.persistentVolume.storageClass`. | | license.contents | string | `"NOTAVALIDLICENSE"` | | | license.external | bool | `false` | | diff --git a/charts/tempo-distributed/templates/ingester/_helpers-ingester.tpl b/charts/tempo-distributed/templates/ingester/_helpers-ingester.tpl index 6ca7ee1dc9..20c6a00f4c 100644 --- a/charts/tempo-distributed/templates/ingester/_helpers-ingester.tpl +++ b/charts/tempo-distributed/templates/ingester/_helpers-ingester.tpl @@ -128,3 +128,53 @@ zone: {{ .rolloutZoneName }} {{- end }} {{- end -}} +{{/* +ingester POD labels +Params: + ctx = . context + component = name of the component + memberlist = true if part of memberlist gossip ring + rolloutZoneName = rollout zone name (optional) +*/}} +{{- define "ingester.podLabels" -}} +{{ with .ctx.Values.global.podLabels -}} +{{ toYaml . }} +{{ end }} +{{- if .ctx.Values.enterprise.legacyLabels }} +{{- if .component -}} +app: {{ include "tempo.name" .ctx }}-{{ .component }} +{{- if not .rolloutZoneName }} +name: {{ .component }} +{{- end }} +{{- end }} +{{- if .memberlist }} +gossip_ring_member: "true" +{{- end -}} +{{- if .component }} +target: {{ .component }} +release: {{ .ctx.Release.Name }} +{{- end }} +{{- else -}} +helm.sh/chart: {{ include "tempo.chart" .ctx }} +app.kubernetes.io/name: {{ include "tempo.name" .ctx }} +app.kubernetes.io/instance: {{ .ctx.Release.Name }} +app.kubernetes.io/version: {{ .ctx.Chart.AppVersion | quote }} +app.kubernetes.io/managed-by: {{ .ctx.Release.Service }} +{{- if .component }} +app.kubernetes.io/component: {{ .component }} +{{- end }} +{{- if .memberlist }} +app.kubernetes.io/part-of: memberlist +{{- end }} +{{- end }} +{{- with .ctx.Values.ingester.podLabels }} +{{ toYaml . }} +{{- end }} +{{- if .rolloutZoneName }} +{{- if not .component }} +{{- printf "Component name cannot be empty if rolloutZoneName (%s) is set" .rolloutZoneName | fail }} +{{- end }} +rollout-group: ingester +zone: {{ .rolloutZoneName }} +{{- end }} +{{- end -}} \ No newline at end of file diff --git a/charts/tempo-distributed/templates/ingester/statefulset-ingester.yaml b/charts/tempo-distributed/templates/ingester/statefulset-ingester.yaml index 3c384430e5..a88117bcbb 100644 --- a/charts/tempo-distributed/templates/ingester/statefulset-ingester.yaml +++ b/charts/tempo-distributed/templates/ingester/statefulset-ingester.yaml @@ -38,7 +38,7 @@ spec: template: metadata: labels: - {{- include "tempo.podLabels" $dict | nindent 8 }} + {{- include "ingester.podLabels" $dict | nindent 8 }} {{- with .Values.tempo.podLabels }} {{- toYaml . | nindent 8 }} {{- end }} From c253a3cca2bbbe93a0955bb0a6081566fb03ee92 Mon Sep 17 00:00:00 2001 From: Aviv Guiser Date: Fri, 7 Jun 2024 21:36:13 +0300 Subject: [PATCH 12/19] changed default value of zone aware replication to false Signed-off-by: Aviv Guiser --- charts/tempo-distributed/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/tempo-distributed/values.yaml b/charts/tempo-distributed/values.yaml index f515b6e09b..fc3a62a9f4 100644 --- a/charts/tempo-distributed/values.yaml +++ b/charts/tempo-distributed/values.yaml @@ -226,7 +226,7 @@ ingester: grpc: null zoneAwareReplication: # -- Enable zone-aware replication for ingester - enabled: true + enabled: false # -- Maximum number of ingesters that can be unavailable per zone during rollout maxUnavailable: 50 # -- topologyKey to use in pod anti-affinity. If unset, no anti-affinity rules are generated. If set, the generated anti-affinity rule makes sure that pods from different zones do not mix. From ed486442c6b3434bdd5a16c5b14dd6008520a03b Mon Sep 17 00:00:00 2001 From: Aviv Guiser Date: Fri, 7 Jun 2024 22:03:45 +0300 Subject: [PATCH 13/19] bump chart version Signed-off-by: Aviv Guiser --- charts/tempo-distributed/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/tempo-distributed/README.md b/charts/tempo-distributed/README.md index 838cdff8de..83d2f3222b 100644 --- a/charts/tempo-distributed/README.md +++ b/charts/tempo-distributed/README.md @@ -520,7 +520,7 @@ The memcached default args are removed and should be provided manually. The sett | ingester.terminationGracePeriodSeconds | int | `300` | 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. | | ingester.tolerations | list | `[]` | Tolerations for ingester pods | | ingester.topologySpreadConstraints | string | Defaults to allow skew no more then 1 node per AZ | topologySpread for ingester pods. Passed through `tpl` and, thus, to be configured as string | -| ingester.zoneAwareReplication.enabled | bool | `true` | Enable zone-aware replication for ingester | +| ingester.zoneAwareReplication.enabled | bool | `false` | Enable zone-aware replication for ingester | | ingester.zoneAwareReplication.maxUnavailable | int | `50` | Maximum number of ingesters that can be unavailable per zone during rollout | | ingester.zoneAwareReplication.topologyKey | string | `nil` | topologyKey to use in pod anti-affinity. If unset, no anti-affinity rules are generated. If set, the generated anti-affinity rule makes sure that pods from different zones do not mix. E.g.: topologyKey: 'kubernetes.io/hostname' | | ingester.zoneAwareReplication.zones | list | `[{"extraAffinity":{},"name":"zone-a","nodeSelector":null,"storageClass":null},{"extraAffinity":{},"name":"zone-b","nodeSelector":null,"storageClass":null},{"extraAffinity":{},"name":"zone-c","nodeSelector":null,"storageClass":null}]` | Zone definitions for ingester zones. Note: you have to redefine the whole list to change parts as YAML does not allow to modify parts of a list. | From f21a110c33602ac159c2070e4b0f24f452fcb97b Mon Sep 17 00:00:00 2001 From: Aviv Guiser Date: Mon, 10 Jun 2024 22:30:39 +0300 Subject: [PATCH 14/19] fix indention and yaml error Signed-off-by: Aviv Guiser --- .../templates/ingester/_helpers-ingester.tpl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/charts/tempo-distributed/templates/ingester/_helpers-ingester.tpl b/charts/tempo-distributed/templates/ingester/_helpers-ingester.tpl index 20c6a00f4c..91242d36da 100644 --- a/charts/tempo-distributed/templates/ingester/_helpers-ingester.tpl +++ b/charts/tempo-distributed/templates/ingester/_helpers-ingester.tpl @@ -35,15 +35,15 @@ Params: requiredDuringSchedulingIgnoredDuringExecution: - labelSelector: matchExpressions: - - key: rollout-group + - key: rollout-group operator: In values: - - ingester - - key: zone + - ingester + - key: zone operator: NotIn values: - - {{ .rolloutZoneName }} - topologyKey: {{ .topologyKey | quote }} + - {{ .rolloutZoneName }} + topologyKey: {{ .topologyKey | quote }} {{- else -}} {} {{- end -}} From 07118e10aa3d02fe827f361cd2ed0290cbce705f Mon Sep 17 00:00:00 2001 From: Aviv Guiser Date: Mon, 24 Jun 2024 23:01:46 +0300 Subject: [PATCH 15/19] add to readme Signed-off-by: Aviv Guiser --- charts/tempo-distributed/README.md | 9 +++++++-- charts/tempo-distributed/README.md.gotmpl | 5 +++++ charts/tempo-distributed/values.yaml | 4 ++-- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/charts/tempo-distributed/README.md b/charts/tempo-distributed/README.md index 83d2f3222b..02be9f47cb 100644 --- a/charts/tempo-distributed/README.md +++ b/charts/tempo-distributed/README.md @@ -46,6 +46,11 @@ The command removes all the Kubernetes components associated with the chart and A major chart version change indicates that there is an incompatible breaking change needing manual actions. +### from Chart versions < 1.11.0 + +Zone Aware Replication has been added to the ingester statefulset. +Attention, the calculation of the pods per AZ is as follows ```(.values.ingester.replicas + numberOfZones -1)/numberOfZones``` + ### From Chart versions < 1.8.0 Switch to new overrides format, see https://grafana.com/docs/tempo/latest/configuration/#overrides. @@ -514,13 +519,13 @@ The memcached default args are removed and should be provided manually. The sett | ingester.podAnnotations | object | `{}` | Annotations for ingester pods | | ingester.podLabels | object | `{}` | Labels for ingester pods | | ingester.priorityClassName | string | `nil` | The name of the PriorityClass for ingester pods | -| ingester.replicas | int | `3` | Number of replicas for the ingester | +| ingester.replicas | int | `12` | Number of replicas for the ingester | | ingester.resources | object | `{}` | Resource requests and limits for the ingester | | ingester.service.annotations | object | `{}` | Annotations for ingester service | | ingester.terminationGracePeriodSeconds | int | `300` | 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. | | ingester.tolerations | list | `[]` | Tolerations for ingester pods | | ingester.topologySpreadConstraints | string | Defaults to allow skew no more then 1 node per AZ | topologySpread for ingester pods. Passed through `tpl` and, thus, to be configured as string | -| ingester.zoneAwareReplication.enabled | bool | `false` | Enable zone-aware replication for ingester | +| ingester.zoneAwareReplication.enabled | bool | `true` | Enable zone-aware replication for ingester | | ingester.zoneAwareReplication.maxUnavailable | int | `50` | Maximum number of ingesters that can be unavailable per zone during rollout | | ingester.zoneAwareReplication.topologyKey | string | `nil` | topologyKey to use in pod anti-affinity. If unset, no anti-affinity rules are generated. If set, the generated anti-affinity rule makes sure that pods from different zones do not mix. E.g.: topologyKey: 'kubernetes.io/hostname' | | ingester.zoneAwareReplication.zones | list | `[{"extraAffinity":{},"name":"zone-a","nodeSelector":null,"storageClass":null},{"extraAffinity":{},"name":"zone-b","nodeSelector":null,"storageClass":null},{"extraAffinity":{},"name":"zone-c","nodeSelector":null,"storageClass":null}]` | Zone definitions for ingester zones. Note: you have to redefine the whole list to change parts as YAML does not allow to modify parts of a list. | diff --git a/charts/tempo-distributed/README.md.gotmpl b/charts/tempo-distributed/README.md.gotmpl index 446c654362..b9faf810a0 100644 --- a/charts/tempo-distributed/README.md.gotmpl +++ b/charts/tempo-distributed/README.md.gotmpl @@ -39,6 +39,11 @@ The command removes all the Kubernetes components associated with the chart and A major chart version change indicates that there is an incompatible breaking change needing manual actions. +### from Chart versions < 1.11.0 + +Zone Aware Replication has been added to the ingester statefulset. +Attention, the calculation of the pods per AZ is as follows ```(.values.ingester.replicas + numberOfZones -1)/numberOfZones``` + ### From Chart versions < 1.8.0 Switch to new overrides format, see https://grafana.com/docs/tempo/latest/configuration/#overrides. diff --git a/charts/tempo-distributed/values.yaml b/charts/tempo-distributed/values.yaml index fc3a62a9f4..9f0acc8ff4 100644 --- a/charts/tempo-distributed/values.yaml +++ b/charts/tempo-distributed/values.yaml @@ -106,7 +106,7 @@ ingester: # -- Annotations for the ingester StatefulSet annotations: {} # -- Number of replicas for the ingester - replicas: 3 + replicas: 12 # -- hostAliases to add hostAliases: [] # - ip: 1.2.3.4 @@ -226,7 +226,7 @@ ingester: grpc: null zoneAwareReplication: # -- Enable zone-aware replication for ingester - enabled: false + enabled: true # -- Maximum number of ingesters that can be unavailable per zone during rollout maxUnavailable: 50 # -- topologyKey to use in pod anti-affinity. If unset, no anti-affinity rules are generated. If set, the generated anti-affinity rule makes sure that pods from different zones do not mix. From d9e70f3f5ec2286c9315bc1865b9d019a1fd45d5 Mon Sep 17 00:00:00 2001 From: Aviv Guiser Date: Mon, 24 Jun 2024 23:30:40 +0300 Subject: [PATCH 16/19] set zone aware replcation to false Signed-off-by: Aviv Guiser --- charts/tempo-distributed/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/tempo-distributed/values.yaml b/charts/tempo-distributed/values.yaml index 9f0acc8ff4..fdd824bd3d 100644 --- a/charts/tempo-distributed/values.yaml +++ b/charts/tempo-distributed/values.yaml @@ -226,7 +226,7 @@ ingester: grpc: null zoneAwareReplication: # -- Enable zone-aware replication for ingester - enabled: true + enabled: false # -- Maximum number of ingesters that can be unavailable per zone during rollout maxUnavailable: 50 # -- topologyKey to use in pod anti-affinity. If unset, no anti-affinity rules are generated. If set, the generated anti-affinity rule makes sure that pods from different zones do not mix. From fe8ee3b8d7a2e79edf0cafb5e8809ad0a99c4d67 Mon Sep 17 00:00:00 2001 From: Aviv Guiser Date: Mon, 24 Jun 2024 23:35:05 +0300 Subject: [PATCH 17/19] bump version Signed-off-by: Aviv Guiser --- charts/tempo-distributed/Chart.yaml | 2 +- charts/tempo-distributed/README.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/charts/tempo-distributed/Chart.yaml b/charts/tempo-distributed/Chart.yaml index 1c68a71fd2..e2e81e30a9 100644 --- a/charts/tempo-distributed/Chart.yaml +++ b/charts/tempo-distributed/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: tempo-distributed description: Grafana Tempo in MicroService mode type: application -version: 1.12.0 +version: 1.13.0 appVersion: 2.5.0 engine: gotpl home: https://grafana.com/docs/tempo/latest/ diff --git a/charts/tempo-distributed/README.md b/charts/tempo-distributed/README.md index 02be9f47cb..afef8e10f7 100644 --- a/charts/tempo-distributed/README.md +++ b/charts/tempo-distributed/README.md @@ -1,6 +1,6 @@ # tempo-distributed -![Version: 1.12.0](https://img.shields.io/badge/Version-1.12.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.5.0](https://img.shields.io/badge/AppVersion-2.5.0-informational?style=flat-square) +![Version: 1.13.0](https://img.shields.io/badge/Version-1.13.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.5.0](https://img.shields.io/badge/AppVersion-2.5.0-informational?style=flat-square) Grafana Tempo in MicroService mode @@ -525,7 +525,7 @@ The memcached default args are removed and should be provided manually. The sett | ingester.terminationGracePeriodSeconds | int | `300` | 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. | | ingester.tolerations | list | `[]` | Tolerations for ingester pods | | ingester.topologySpreadConstraints | string | Defaults to allow skew no more then 1 node per AZ | topologySpread for ingester pods. Passed through `tpl` and, thus, to be configured as string | -| ingester.zoneAwareReplication.enabled | bool | `true` | Enable zone-aware replication for ingester | +| ingester.zoneAwareReplication.enabled | bool | `false` | Enable zone-aware replication for ingester | | ingester.zoneAwareReplication.maxUnavailable | int | `50` | Maximum number of ingesters that can be unavailable per zone during rollout | | ingester.zoneAwareReplication.topologyKey | string | `nil` | topologyKey to use in pod anti-affinity. If unset, no anti-affinity rules are generated. If set, the generated anti-affinity rule makes sure that pods from different zones do not mix. E.g.: topologyKey: 'kubernetes.io/hostname' | | ingester.zoneAwareReplication.zones | list | `[{"extraAffinity":{},"name":"zone-a","nodeSelector":null,"storageClass":null},{"extraAffinity":{},"name":"zone-b","nodeSelector":null,"storageClass":null},{"extraAffinity":{},"name":"zone-c","nodeSelector":null,"storageClass":null}]` | Zone definitions for ingester zones. Note: you have to redefine the whole list to change parts as YAML does not allow to modify parts of a list. | From bf136fa38ee39d5131cdb93363a83c0210d21a2b Mon Sep 17 00:00:00 2001 From: Aviv Guiser Date: Tue, 25 Jun 2024 21:04:14 +0300 Subject: [PATCH 18/19] updated docs Signed-off-by: Aviv Guiser --- charts/tempo-distributed/README.md | 3 ++- charts/tempo-distributed/README.md.gotmpl | 2 +- charts/tempo-distributed/values.yaml | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/charts/tempo-distributed/README.md b/charts/tempo-distributed/README.md index afef8e10f7..40f0609806 100644 --- a/charts/tempo-distributed/README.md +++ b/charts/tempo-distributed/README.md @@ -48,7 +48,7 @@ A major chart version change indicates that there is an incompatible breaking ch ### from Chart versions < 1.11.0 -Zone Aware Replication has been added to the ingester statefulset. +EXPERIMENTAL: Zone Aware Replication has been added to the ingester statefulset. Attention, the calculation of the pods per AZ is as follows ```(.values.ingester.replicas + numberOfZones -1)/numberOfZones``` ### From Chart versions < 1.8.0 @@ -525,6 +525,7 @@ The memcached default args are removed and should be provided manually. The sett | ingester.terminationGracePeriodSeconds | int | `300` | 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. | | ingester.tolerations | list | `[]` | Tolerations for ingester pods | | ingester.topologySpreadConstraints | string | Defaults to allow skew no more then 1 node per AZ | topologySpread for ingester pods. Passed through `tpl` and, thus, to be configured as string | +| ingester.zoneAwareReplication | object | `{"enabled":false,"maxUnavailable":50,"topologyKey":null,"zones":[{"extraAffinity":{},"name":"zone-a","nodeSelector":null,"storageClass":null},{"extraAffinity":{},"name":"zone-b","nodeSelector":null,"storageClass":null},{"extraAffinity":{},"name":"zone-c","nodeSelector":null,"storageClass":null}]}` | EXPERIMENTAL Feature, disabled by default | | ingester.zoneAwareReplication.enabled | bool | `false` | Enable zone-aware replication for ingester | | ingester.zoneAwareReplication.maxUnavailable | int | `50` | Maximum number of ingesters that can be unavailable per zone during rollout | | ingester.zoneAwareReplication.topologyKey | string | `nil` | topologyKey to use in pod anti-affinity. If unset, no anti-affinity rules are generated. If set, the generated anti-affinity rule makes sure that pods from different zones do not mix. E.g.: topologyKey: 'kubernetes.io/hostname' | diff --git a/charts/tempo-distributed/README.md.gotmpl b/charts/tempo-distributed/README.md.gotmpl index b9faf810a0..446d02f9f7 100644 --- a/charts/tempo-distributed/README.md.gotmpl +++ b/charts/tempo-distributed/README.md.gotmpl @@ -41,7 +41,7 @@ A major chart version change indicates that there is an incompatible breaking ch ### from Chart versions < 1.11.0 -Zone Aware Replication has been added to the ingester statefulset. +EXPERIMENTAL: Zone Aware Replication has been added to the ingester statefulset. Attention, the calculation of the pods per AZ is as follows ```(.values.ingester.replicas + numberOfZones -1)/numberOfZones``` ### From Chart versions < 1.8.0 diff --git a/charts/tempo-distributed/values.yaml b/charts/tempo-distributed/values.yaml index fdd824bd3d..3da525c6f0 100644 --- a/charts/tempo-distributed/values.yaml +++ b/charts/tempo-distributed/values.yaml @@ -224,6 +224,7 @@ ingester: appProtocol: # -- Set the optional grpc service protocol. Ex: "grpc", "http2" or "https" grpc: null + # -- EXPERIMENTAL Feature, disabled by default zoneAwareReplication: # -- Enable zone-aware replication for ingester enabled: false From 5c853bf26bf86de814a6db538ec156c2bfa908b2 Mon Sep 17 00:00:00 2001 From: Aviv Guiser Date: Tue, 25 Jun 2024 21:16:28 +0300 Subject: [PATCH 19/19] fix lint Signed-off-by: Aviv Guiser --- charts/tempo-distributed/README.md | 4 ++-- charts/tempo-distributed/values.yaml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/charts/tempo-distributed/README.md b/charts/tempo-distributed/README.md index 40f0609806..edb2108b1f 100644 --- a/charts/tempo-distributed/README.md +++ b/charts/tempo-distributed/README.md @@ -519,13 +519,13 @@ The memcached default args are removed and should be provided manually. The sett | ingester.podAnnotations | object | `{}` | Annotations for ingester pods | | ingester.podLabels | object | `{}` | Labels for ingester pods | | ingester.priorityClassName | string | `nil` | The name of the PriorityClass for ingester pods | -| ingester.replicas | int | `12` | Number of replicas for the ingester | +| ingester.replicas | int | `3` | Number of replicas for the ingester | | ingester.resources | object | `{}` | Resource requests and limits for the ingester | | ingester.service.annotations | object | `{}` | Annotations for ingester service | | ingester.terminationGracePeriodSeconds | int | `300` | 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. | | ingester.tolerations | list | `[]` | Tolerations for ingester pods | | ingester.topologySpreadConstraints | string | Defaults to allow skew no more then 1 node per AZ | topologySpread for ingester pods. Passed through `tpl` and, thus, to be configured as string | -| ingester.zoneAwareReplication | object | `{"enabled":false,"maxUnavailable":50,"topologyKey":null,"zones":[{"extraAffinity":{},"name":"zone-a","nodeSelector":null,"storageClass":null},{"extraAffinity":{},"name":"zone-b","nodeSelector":null,"storageClass":null},{"extraAffinity":{},"name":"zone-c","nodeSelector":null,"storageClass":null}]}` | EXPERIMENTAL Feature, disabled by default | +| ingester.zoneAwareReplication | object | `{"enabled":false,"maxUnavailable":50,"topologyKey":null,"zones":[{"extraAffinity":{},"name":"zone-a","nodeSelector":null,"storageClass":null},{"extraAffinity":{},"name":"zone-b","nodeSelector":null,"storageClass":null},{"extraAffinity":{},"name":"zone-c","nodeSelector":null,"storageClass":null}]}` | EXPERIMENTAL Feature, disabled by default | | ingester.zoneAwareReplication.enabled | bool | `false` | Enable zone-aware replication for ingester | | ingester.zoneAwareReplication.maxUnavailable | int | `50` | Maximum number of ingesters that can be unavailable per zone during rollout | | ingester.zoneAwareReplication.topologyKey | string | `nil` | topologyKey to use in pod anti-affinity. If unset, no anti-affinity rules are generated. If set, the generated anti-affinity rule makes sure that pods from different zones do not mix. E.g.: topologyKey: 'kubernetes.io/hostname' | diff --git a/charts/tempo-distributed/values.yaml b/charts/tempo-distributed/values.yaml index 3da525c6f0..e973f35e64 100644 --- a/charts/tempo-distributed/values.yaml +++ b/charts/tempo-distributed/values.yaml @@ -106,7 +106,7 @@ ingester: # -- Annotations for the ingester StatefulSet annotations: {} # -- Number of replicas for the ingester - replicas: 12 + replicas: 3 # -- hostAliases to add hostAliases: [] # - ip: 1.2.3.4 @@ -224,7 +224,7 @@ ingester: appProtocol: # -- Set the optional grpc service protocol. Ex: "grpc", "http2" or "https" grpc: null - # -- EXPERIMENTAL Feature, disabled by default + # -- EXPERIMENTAL Feature, disabled by default zoneAwareReplication: # -- Enable zone-aware replication for ingester enabled: false