Skip to content

[tempo-distributed] Fix zone aware replication upgrade and rollout operator #3189

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jul 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/tempo-distributed/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: tempo-distributed
description: Grafana Tempo in MicroService mode
type: application
version: 1.13.1
version: 1.13.2
appVersion: 2.5.0
engine: gotpl
home: https://grafana.com/docs/tempo/latest/
Expand Down
13 changes: 11 additions & 2 deletions charts/tempo-distributed/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# tempo-distributed

![Version: 1.13.1](https://img.shields.io/badge/Version-1.13.1-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.2](https://img.shields.io/badge/Version-1.13.2-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

Expand Down Expand Up @@ -46,7 +46,7 @@ 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
### from Chart versions < 1.13.0

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```
Expand Down Expand Up @@ -766,6 +766,15 @@ The memcached default args are removed and should be provided manually. The sett
| rbac.create | bool | `false` | Specifies whether RBAC manifests should be created |
| rbac.pspEnabled | bool | `false` | Specifies whether a PodSecurityPolicy should be created |
| reportingEnabled | bool | `true` | If true, Tempo will report anonymous usage data about the shape of a deployment to Grafana Labs |
| rollout_operator.enabled | bool | `false` | Enable rollout-operator. It must be enabled when using Zone Aware Replication. |
| rollout_operator.podSecurityContext.fsGroup | int | `10001` | |
| rollout_operator.podSecurityContext.runAsGroup | int | `10001` | |
| rollout_operator.podSecurityContext.runAsNonRoot | bool | `true` | |
| rollout_operator.podSecurityContext.runAsUser | int | `10001` | |
| rollout_operator.podSecurityContext.seccompProfile.type | string | `"RuntimeDefault"` | |
| rollout_operator.securityContext.allowPrivilegeEscalation | bool | `false` | |
| rollout_operator.securityContext.capabilities.drop[0] | string | `"ALL"` | |
| rollout_operator.securityContext.readOnlyRootFilesystem | bool | `true` | |
| server.grpc_server_max_recv_msg_size | int | `4194304` | Max gRPC message size that can be received |
| server.grpc_server_max_send_msg_size | int | `4194304` | Max gRPC message size that can be sent |
| server.httpListenPort | int | `3100` | HTTP server listen host |
Expand Down
6 changes: 3 additions & 3 deletions charts/tempo-distributed/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ 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
### from Chart versions < 1.13.0

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```
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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,16 @@
{{- $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
) -}}
"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 -}}
{{- $zonesMap | toYaml }}
{{- else -}}
{{- $_ := set $zonesMap "" $defaultZone -}}
{{- end -}}
{{- $zonesMap | toYaml }}
{{- end -}}
{{/*
Calculate anti-affinity for a zone
Expand Down Expand Up @@ -177,4 +179,4 @@ app.kubernetes.io/part-of: memberlist
rollout-group: ingester
zone: {{ .rolloutZoneName }}
{{- end }}
{{- end -}}
{{- end -}}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ metadata:
labels:
{{- include "ingester.labels" $dict | indent 4 }}
{{- if .Values.ingester.zoneAwareReplication.enabled }}
annotations:
annotations:
{{- include "ingester.Annotations" $dict | nindent 4}}
{{- else }}
{{- with .Values.ingester.annotations }}
Expand Down Expand Up @@ -125,10 +125,18 @@ spec:
{{- tpl . $ | nindent 8 }}
{{- end }}
{{- end }}
{{- if eq $zoneName ""}}
{{- with $rolloutZone.affinity }}
affinity:
{{- tpl . $ | nindent 8 }}
{{- end }}
{{- end }}
{{- if ne $zoneName "" }}
{{- with $rolloutZone.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- with $rolloutZone.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand Down Expand Up @@ -184,4 +192,4 @@ spec:
{{- end }}
---
{{ end }}
{{ end }}
{{ end }}
19 changes: 19 additions & 0 deletions charts/tempo-distributed/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -992,6 +992,25 @@ enterpriseFederationFrontend:

multitenancyEnabled: false

rollout_operator:
# -- Enable rollout-operator. It must be enabled when using Zone Aware Replication.
enabled: false

podSecurityContext:
fsGroup: 10001
runAsGroup: 10001
runAsNonRoot: true
runAsUser: 10001
seccompProfile:
type: RuntimeDefault

# Set the container security context
securityContext:
readOnlyRootFilesystem: true
capabilities:
drop: [ALL]
allowPrivilegeEscalation: false

traces:
jaeger:
grpc:
Expand Down
Loading