Skip to content
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

[tempo-distributed] Allow prefixing of rollout-group value and ingester name #3443

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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.22.2
version: 1.22.3
appVersion: 2.6.0
engine: gotpl
home: https://grafana.com/docs/tempo/latest/
Expand Down
5 changes: 4 additions & 1 deletion charts/tempo-distributed/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# tempo-distributed

![Version: 1.22.2](https://img.shields.io/badge/Version-1.22.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.6.0](https://img.shields.io/badge/AppVersion-2.6.0-informational?style=flat-square)
![Version: 1.22.3](https://img.shields.io/badge/Version-1.22.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.6.0](https://img.shields.io/badge/AppVersion-2.6.0-informational?style=flat-square)

Grafana Tempo in MicroService mode

Expand Down Expand Up @@ -509,6 +509,7 @@ The memcached default args are removed and should be provided manually. The sett
| global.image.registry | string | `"docker.io"` | Overrides the Docker registry globally for all images, excluding enterprise. |
| global.priorityClassName | string | `nil` | Overrides the priorityClassName for all pods |
| global_overrides.per_tenant_override_config | string | `"/runtime-config/overrides.yaml"` | |
| ingester.addNamePrefix | bool | `false` | Optionally allow adding 'tempo-' prefix to Ingester StatefulSet names, this is helpful when running multiple LTGM components in a single namespace. |
| ingester.affinity | string | Soft node and soft zone anti-affinity | Affinity for ingester pods. Passed through `tpl` and, thus, to be configured as string |
| ingester.annotations | object | `{}` | Annotations for the ingester StatefulSet |
| ingester.appProtocol | object | `{"grpc":null}` | Adds the appProtocol field to the ingester service. This allows ingester to work with istio protocol selection. |
Expand Down Expand Up @@ -548,6 +549,7 @@ The memcached default args are removed and should be provided manually. The sett
| ingester.priorityClassName | string | `nil` | The name of the PriorityClass for ingester pods |
| ingester.replicas | int | `3` | Number of replicas for the ingester |
| ingester.resources | object | `{}` | Resource requests and limits for the ingester |
| ingester.rolloutGroupPrefix | string | `""` | Optionally add supplied prefix to the Ingester StatefulSet rollout-group label. This is helpful when running multiple LTGM components in a single namespace. |
| ingester.service.annotations | object | `{}` | Annotations for ingester service |
| ingester.service.internalTrafficPolicy | string | `"Cluster"` | https://kubernetes.io/docs/concepts/services-networking/service-traffic-policy/ |
| ingester.service.type | string | `"ClusterIP"` | Type of the service: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types |
Expand All @@ -571,6 +573,7 @@ The memcached default args are removed and should be provided manually. The sett
| ingester.zoneAwareReplication.zones[2].extraAffinity | object | `{}` | extraAffinity adds user defined custom affinity rules (merged with generated rules) |
| 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: <storageClass> 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.zoneNamespacedServiceName | bool | `false` | Optionally namespace StatefulSet serviceName with zone. ex: temp-ingester-zone-a |
| license.contents | string | `"NOTAVALIDLICENSE"` | |
| license.external | bool | `false` | |
| license.secretName | string | `"{{ include \"tempo.resourceName\" (dict \"ctx\" . \"component\" \"license\") }}"` | |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Params:
- key: rollout-group
operator: In
values:
- ingester
- "{{ include "ingester.rolloutGroupNamePrefix" .ctx | trim }}{{ .component }}"
- key: zone
operator: NotIn
values:
Expand Down Expand Up @@ -72,8 +72,8 @@ ingester labels
*/}}
{{- define "ingester.labels" -}}
{{- if and .ctx.Values.ingester.zoneAwareReplication.enabled .rolloutZoneName }}
name: {{ printf "%s-%s" .component .rolloutZoneName }}
rollout-group: {{ .component }}
name: "{{ include "ingester.namePrefix" .ctx | trim }}{{ .component | trim }}-{{ .rolloutZoneName }}"
rollout-group: "{{ include "ingester.rolloutGroupNamePrefix" .ctx | trim }}{{ .component }}"
zone: {{ .rolloutZoneName }}
{{- end }}
helm.sh/chart: {{ include "tempo.chart" .ctx }}
Expand Down Expand Up @@ -125,7 +125,7 @@ app.kubernetes.io/component: {{ .component }}
{{- if not .component }}
{{- printf "Component name cannot be empty if rolloutZoneName (%s) is set" .rolloutZoneName | fail }}
{{- end }}
rollout-group: {{ .component }}
rollout-group: "{{ include "ingester.rolloutGroupNamePrefix" .ctx | trim }}{{ .component }}"
zone: {{ .rolloutZoneName }}
{{- end }}
{{- end -}}
Expand Down Expand Up @@ -176,8 +176,20 @@ app.kubernetes.io/part-of: memberlist
{{- if not .component }}
{{- printf "Component name cannot be empty if rolloutZoneName (%s) is set" .rolloutZoneName | fail }}
{{- end }}
name: "{{ .component }}-{{ .rolloutZoneName }}" {{- /* Currently required for rollout-operator. https://github.com/grafana/rollout-operator/issues/15 */}}
rollout-group: ingester
name: "{{ include "ingester.namePrefix" .ctx | trim }}{{ .component }}-{{ .rolloutZoneName }}"{{- /* Currently required for rollout-operator. https://github.com/grafana/rollout-operator/issues/15 */}}
rollout-group: "{{ include "ingester.rolloutGroupNamePrefix" .ctx | trim }}{{ .component }}"
zone: {{ .rolloutZoneName }}
{{- end }}
{{- end -}}

{{- define "ingester.rolloutGroupNamePrefix" -}}
{{- if .Values.ingester.rolloutGroupPrefix }}
{{ .Values.ingester.rolloutGroupPrefix }}-
{{- end }}
{{- end -}}

{{- define "ingester.namePrefix" -}}
{{- if .Values.ingester.addNamePrefix }}
tempo-
{{- end }}
{{- end -}}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ spec:
selector:
matchLabels:
{{- include "ingester.selectorLabels" $dict | nindent 6}}
{{- if not .Values.ingester.zoneNamespacedServiceName }}
serviceName: ingester
{{- else }}
serviceName: tempo-ingester-{{ $zoneName }}
{{- end }}
podManagementPolicy: Parallel
updateStrategy:
{{- if .Values.ingester.zoneAwareReplication.enabled }}
Expand Down
6 changes: 6 additions & 0 deletions charts/tempo-distributed/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,12 @@ ingester:
# 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
# -- Optionally allow adding 'tempo-' prefix to Ingester StatefulSet names, this is helpful when running multiple LTGM components in a single namespace.
addNamePrefix: false
# -- Optionally add supplied prefix to the Ingester StatefulSet rollout-group label. This is helpful when running multiple LTGM components in a single namespace.
rolloutGroupPrefix: ''
# -- Optionally namespace StatefulSet serviceName with zone. ex: temp-ingester-zone-a
zoneNamespacedServiceName: false

# Configuration for the metrics-generator
metricsGenerator:
Expand Down
Loading