Skip to content
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
9 changes: 8 additions & 1 deletion thanos/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,15 @@ keywords:
sources:
- https://github.com/thanos-io/thanos
- https://github.com/banzaicloud/banzai-charts/tree/master/thanos
version: 0.3.31
version: 0.3.32
icon: https://raw.githubusercontent.com/thanos-io/thanos/master/docs/img/Thanos-logo_fullmedium.png
maintainers:
- name: Banzai Cloud
email: [email protected]
annotations:
artifacthub.io/changes: |
- Added ability to provide a cache configuration file
- Added artifact hub annotations
artifacthub.io/images: |
- name: thanos
image: quay.io/thanos/thanos:v0.17.1
6 changes: 2 additions & 4 deletions thanos/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ These values are just samples, for more fine-tuning please check the values.yaml
| store.replicaCount | Pod replica count | 1 |
| store.logLevel | Log level | info |
| store.logFormat | Log format to use. Possible options: logfmt or json. | logfmt |
| store.indexCacheConfig | Index Cache Configuration as described in https://thanos.io/tip/components/store.md/#index-cache | {} |
| store.indexCacheSize | Maximum size of items held in the index cache. | 250MB |
| store.chunkPoolSize | Maximum size of concurrently allocatable bytes for chunks. | 2GB |
| store.grpcSeriesSampleLimit | Maximum amount of samples returned via a single series call. 0 means no limit. NOTE: for efficiency we take 120 as the number of samples in chunk (it cannot be bigger than that), so the actual number of samples might be lower, even though the maximum could be hit. | 0 |
Expand Down Expand Up @@ -341,6 +342,7 @@ timePartioning:
| queryFrontend.downstreamUrl | URL of downstream Prometheus Query compatible API. | |
| queryFrontend.compressResponses | Compress HTTP responses. | `true` |
| queryFrontend.logQueriesLongerThan | Log queries that are slower than the specified duration. | `0` (disabled) |
| queryFrontend.indexCacheConfig | Index Cache Configuration as described in https://thanos.io/tip/components/query-frontend.md/#caching | {} |
| queryFrontend.cacheCompressionType | Use compression in results cache. Supported values are: `snappy` and `` (disable compression). | `` |
| queryFrontend.queryRange.alignRangeWithStep | See https://thanos.io/tip/components/query-frontend.md/#flags | `false` |
| queryFrontend.queryRange.splitInterval | See https://thanos.io/tip/components/query-frontend.md/#flags | `24h` |
Expand All @@ -349,10 +351,6 @@ timePartioning:
| queryFrontend.queryRange.maxQueryParallelism | See https://thanos.io/tip/components/query-frontend.md/#flags | `14` |
| queryFrontend.queryRange.responseCacheMaxFreshness | See https://thanos.io/tip/components/query-frontend.md/#flag | `1m` |
| queryFrontend.queryRange.noPartialResponse | See https://thanos.io/tip/components/query-frontend.md/#flags | `false` |
| queryFrontend.cache.inMemory | Use inMemory cache? | `false` |
| queryFrontend.cache.maxSize | Maximum Size of the cache. Use either this or `maxSizeItems`. | `` |
| queryFrontend.cache.maxSizeItems | Maximum number of items in the cache. Use either this or `maxSize`. | `` |
| queryFrontend.cache.validity | | `` |
| queryFrontend.log.request.decision | Request Logging for logging the start and end of requests | `LogFinishCall` |

## Contributing
Expand Down
16 changes: 16 additions & 0 deletions thanos/templates/query-frontend/query-frontend-configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{{- if .Values.queryFrontend.indexCacheConfig -}}
apiVersion: v1
kind: ConfigMap
metadata:
labels:
app.kubernetes.io/name: {{ include "thanos.name" . }}
helm.sh/chart: {{ include "thanos.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/version: {{ .Chart.AppVersion | replace "+" "_" }}
app.kubernetes.io/component: rule
name: {{ include "thanos.fullname" . }}-query-frontend
data:
config.yml: |
{{ toYaml .Values.queryFrontend.indexCacheConfig | indent 4 }}
{{- end -}}
Original file line number Diff line number Diff line change
Expand Up @@ -87,19 +87,9 @@ spec:
{{- if .Values.queryFrontend.logQueriesLongerThan }}
- "--query-frontend.log_queries_longer_than={{ .Values.queryFrontend.logQueriesLongerThan }}"
{{- end }}
{{- if .Values.queryFrontend.queryRange.cache.inMemory }}
- |-
--query-range.response-cache-config="type": "IN-MEMORY"
"config":
{{- if .Values.queryFrontend.queryRange.cache.maxSize }}
"max_size": "{{ .Values.queryFrontend.queryRange.cache.maxSize }}"
{{- end }}
{{- if .Values.queryFrontend.queryRange.cache.maxSizeItems }}
"max_size_items": {{ .Values.queryFrontend.queryRange.cache.maxSizeItems }}
{{- end }}
{{- if .Values.queryFrontend.queryRange.cache.validity }}
"validity": "{{ .Values.queryFrontend.queryRange.cache.validity }}"
{{- end }}
{{- if .Values.queryFrontend.indexCacheConfig }}
- "--query-range.response-cache-config-file=/config/config.yml"
- "--labels.response-cache-config-file=/config/config.yml"
{{- end }}
{{- if .Values.queryFrontend.qflabels.splitInterval }}
- "--labels.split-interval={{ .Values.queryFrontend.qflabels.splitInterval }}"
Expand All @@ -116,20 +106,6 @@ spec:
{{- if .Values.queryFrontend.qflabels.noPartialResponse }}
- "--no-labels.partial-response"
{{- end }}
{{- if .Values.queryFrontend.qflabels.cache.inMemory }}
- |-
--labels.response-cache-config="type": "IN-MEMORY"
"config":
{{- if .Values.queryFrontend.qflabels.cache.maxSize }}
"max_size": "{{ .Values.queryFrontend.qflabels.cache.maxSize }}"
{{- end }}
{{- if .Values.queryFrontend.qflabels.cache.maxSizeItems }}
"max_size_items": {{ .Values.queryFrontend.qflabels.cache.maxSizeItems }}
{{- end }}
{{- if .Values.queryFrontend.qflabels.cache.validity }}
"validity": "{{ .Values.queryFrontend.qflabels.cache.validity }}"
{{- end }}
{{- end }}
{{- if .Values.queryFrontend.extraArgs }}
{{ toYaml .Values.queryFrontend.extraArgs | nindent 8 }}
{{- end }}
Expand All @@ -150,6 +126,11 @@ spec:
name: {{ .Values.queryFrontend.certSecretName }}
readOnly: true
{{- end }}
{{- if .Values.queryFrontend.indexCacheConfig }}
- name: config
mountPath: "/config"
readOnly: true
{{- end }}
livenessProbe:
httpGet:
path: /-/healthy
Expand All @@ -174,6 +155,14 @@ spec:
{{- with .Values.queryFrontend.securityContext }}
securityContext: {{ toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.queryFrontend.indexCacheConfig }}
- name: config
configMap:
name: {{ include "thanos.fullname" . }}-query-frontend
items:
- key: config.yml
path: config.yml
{{- end }}
{{- with .Values.queryFrontend.nodeSelector }}
nodeSelector: {{ toYaml . | nindent 8 }}
{{- end }}
Expand Down
16 changes: 16 additions & 0 deletions thanos/templates/store/store-configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{{- if .Values.store.indexCacheConfig -}}
apiVersion: v1
kind: ConfigMap
metadata:
labels:
app.kubernetes.io/name: {{ include "thanos.name" . }}
helm.sh/chart: {{ include "thanos.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/version: {{ .Chart.AppVersion | replace "+" "_" }}
app.kubernetes.io/component: rule
name: {{ include "thanos.componentname" (list $ "store") }}
data:
config.yml: |
{{ toYaml .Values.store.indexCacheConfig | indent 4 }}
{{- end -}}
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ spec:
{{- if $root.Values.store.extraArgs }}
{{ toYaml $root.Values.store.extraArgs | nindent 8 }}
{{- end }}
{{- if $root.Values.store.indexCacheConfig }}
- "--index-cache.config-file=/config/config.yml"
{{- end }}
ports:
- name: http
containerPort: {{ $root.Values.store.http.port }}
Expand All @@ -135,6 +138,11 @@ spec:
name: {{ $root.Values.store.certSecretName }}
readOnly: true
{{- end }}
{{- if $root.Values.store.indexCacheConfig }}
- name: config
mountPath: "/config"
readOnly: true
{{- end }}
{{- if $root.Values.store.livenessProbe }}
livenessProbe:
{{ toYaml $root.Values.store.livenessProbe | nindent 10 }}
Expand Down Expand Up @@ -170,6 +178,14 @@ spec:
defaultMode: 420
secretName: {{ $root.Values.store.certSecretName }}
{{- end }}
{{- if $root.Values.store.indexCacheConfig }}
- name: config
configMap:
name: {{ include "thanos.fullname" $root }}-store
items:
- key: config.yml
path: config.yml
{{- end }}
{{- with $root.Values.store.securityContext }}
securityContext: {{ toYaml . | nindent 8 }}
{{- end }}
Expand Down
17 changes: 7 additions & 10 deletions thanos/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,10 @@ store:
# shards:
# InitContainers allows injecting specialized containers that run before app containers. This is meant to pre-configure and tune mounted volume permissions.
initContainers: []

# Configuration for the index cache, see https://thanos.io/tip/components/store.md/#index-cache
indexCacheConfig: {}

query:
enabled: true
# Labels to treat as a replica indicator along which data is deduplicated.
Expand Down Expand Up @@ -505,6 +509,9 @@ queryFrontend:
# values are: 'snappy' and ” (disable compression).
cacheCompressionType: ""

# Configuration for the index cache, see https://thanos.io/tip/components/query-frontend.md/#caching
indexCacheConfig: {}

# query-range parameters, see https://thanos.io/tip/components/query-frontend.md/#flags
queryRange:
alignRangeWithStep: false
Expand All @@ -514,11 +521,6 @@ queryFrontend:
maxQueryParallelism: 14
responseCacheMaxFreshness: 1m
noPartialResponse: false
cache:
inMemory: false
maxSize:
maxSizeItems:
validity:

# labels parameters, see https://thanos.io/tip/components/query-frontend.md/#flags
qflabels:
Expand All @@ -528,11 +530,6 @@ queryFrontend:
responseCacheMaxFreshness: 1m
noPartialResponse: false
defaultTimeRange: 24h
cache:
inMemory: false
maxSize:
maxSizeItems:
validity:

log:
level: info
Expand Down