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

Add support for time based partitioning for compactor and store-gateway #835

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

ashishvaishno
Copy link

@ashishvaishno ashishvaishno commented Nov 24, 2023

@stevehipwell
Copy link
Owner

Thanks for the PR @ashishvaishno. Do you have a link to the relevant documentation for this functionality?

@ashishvaishno
Copy link
Author

@stevehipwell I mentioned those here

@stevehipwell
Copy link
Owner

@ashishvaishno I was after if there were detailed docs or guidance on time partitioning?

Could you look at implementing this as a wrapper around the existing StatefulSet template? It should be possible to do something like the following (untested) code and then update the StatefulSet template to look for .Shard for the name, labels and args.

{{- if and .Values.compact.enabled .Values.compact.sharded.enabled -}}
{{- $shards := int 0 }}
{{- $shards = len .Values.compact.sharded.timePartitioning }}
{{- range $index, $_ := until $shards }}
{{- $shard := dict "index" $index "timePartition" (dict "min" (index $.Values.compact.sharded.timePartitions $index).min "max" (index $.Values.compact.sharded.timePartitions $index).max)
{{- with merge (dict "Shard" ($shard)) $ }}
{{ include (print $.Template.BasePath "/compact/statefulset.yaml") . }}
{{- end}}
{{- end }}
{{- end }}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants