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

store: Add mixin to enable caching bucket #122

Merged
merged 9 commits into from
May 20, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
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 README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ local commonConfig = {
config+:: {
local cfg = self,
namespace: 'thanos',
version: 'master-2020-05-07-b9ff23c5',
version: 'master-2020-05-18-6cfcb345',
image: 'quay.io/thanos/thanos:' + cfg.version,
objectStorageConfig: {
name: 'thanos-objectstorage',
Expand Down
2 changes: 1 addition & 1 deletion all.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ local commonConfig = {
config+:: {
local cfg = self,
namespace: 'thanos',
version: 'master-2020-05-07-b9ff23c5',
version: 'master-2020-05-18-6cfcb345',
image: 'quay.io/thanos/thanos:' + cfg.version,
objectStorageConfig: {
name: 'thanos-objectstorage',
Expand Down
2 changes: 1 addition & 1 deletion example.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ local commonConfig = {
config+:: {
local cfg = self,
namespace: 'thanos',
version: 'master-2020-05-07-b9ff23c5',
version: 'master-2020-05-18-6cfcb345',
image: 'quay.io/thanos/thanos:' + cfg.version,
objectStorageConfig: {
name: 'thanos-objectstorage',
Expand Down
6 changes: 3 additions & 3 deletions examples/all/manifests/thanos-bucket-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
app.kubernetes.io/component: object-store-bucket-debugging
app.kubernetes.io/instance: thanos-bucket
app.kubernetes.io/name: thanos-bucket
app.kubernetes.io/version: master-2020-05-07-b9ff23c5
app.kubernetes.io/version: master-2020-05-18-6cfcb345
name: thanos-bucket
namespace: thanos
spec:
Expand All @@ -21,7 +21,7 @@ spec:
app.kubernetes.io/component: object-store-bucket-debugging
app.kubernetes.io/instance: thanos-bucket
app.kubernetes.io/name: thanos-bucket
app.kubernetes.io/version: master-2020-05-07-b9ff23c5
app.kubernetes.io/version: master-2020-05-18-6cfcb345
spec:
containers:
- args:
Expand All @@ -34,7 +34,7 @@ spec:
secretKeyRef:
key: thanos.yaml
name: thanos-objectstorage
image: quay.io/thanos/thanos:master-2020-05-07-b9ff23c5
image: quay.io/thanos/thanos:master-2020-05-18-6cfcb345
livenessProbe:
failureThreshold: 4
httpGet:
Expand Down
2 changes: 1 addition & 1 deletion examples/all/manifests/thanos-bucket-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
app.kubernetes.io/component: object-store-bucket-debugging
app.kubernetes.io/instance: thanos-bucket
app.kubernetes.io/name: thanos-bucket
app.kubernetes.io/version: master-2020-05-07-b9ff23c5
app.kubernetes.io/version: master-2020-05-18-6cfcb345
name: thanos-bucket
namespace: thanos
spec:
Expand Down
2 changes: 1 addition & 1 deletion examples/all/manifests/thanos-compact-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
app.kubernetes.io/component: database-compactor
app.kubernetes.io/instance: thanos-compact
app.kubernetes.io/name: thanos-compact
app.kubernetes.io/version: master-2020-05-07-b9ff23c5
app.kubernetes.io/version: master-2020-05-18-6cfcb345
name: thanos-compact
namespace: thanos
spec:
Expand Down
2 changes: 1 addition & 1 deletion examples/all/manifests/thanos-compact-serviceMonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
app.kubernetes.io/component: database-compactor
app.kubernetes.io/instance: thanos-compact
app.kubernetes.io/name: thanos-compact
app.kubernetes.io/version: master-2020-05-07-b9ff23c5
app.kubernetes.io/version: master-2020-05-18-6cfcb345
name: thanos-compact
namespace: thanos
spec:
Expand Down
6 changes: 3 additions & 3 deletions examples/all/manifests/thanos-compact-statefulSet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
app.kubernetes.io/component: database-compactor
app.kubernetes.io/instance: thanos-compact
app.kubernetes.io/name: thanos-compact
app.kubernetes.io/version: master-2020-05-07-b9ff23c5
app.kubernetes.io/version: master-2020-05-18-6cfcb345
name: thanos-compact
namespace: thanos
spec:
Expand All @@ -22,7 +22,7 @@ spec:
app.kubernetes.io/component: database-compactor
app.kubernetes.io/instance: thanos-compact
app.kubernetes.io/name: thanos-compact
app.kubernetes.io/version: master-2020-05-07-b9ff23c5
app.kubernetes.io/version: master-2020-05-18-6cfcb345
spec:
containers:
- args:
Expand All @@ -37,7 +37,7 @@ spec:
secretKeyRef:
key: thanos.yaml
name: thanos-objectstorage
image: quay.io/thanos/thanos:master-2020-05-07-b9ff23c5
image: quay.io/thanos/thanos:master-2020-05-18-6cfcb345
livenessProbe:
failureThreshold: 4
httpGet:
Expand Down
6 changes: 3 additions & 3 deletions examples/all/manifests/thanos-query-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
app.kubernetes.io/component: query-layer
app.kubernetes.io/instance: thanos-query
app.kubernetes.io/name: thanos-query
app.kubernetes.io/version: master-2020-05-07-b9ff23c5
app.kubernetes.io/version: master-2020-05-18-6cfcb345
name: thanos-query
namespace: thanos
spec:
Expand All @@ -21,7 +21,7 @@ spec:
app.kubernetes.io/component: query-layer
app.kubernetes.io/instance: thanos-query
app.kubernetes.io/name: thanos-query
app.kubernetes.io/version: master-2020-05-07-b9ff23c5
app.kubernetes.io/version: master-2020-05-18-6cfcb345
spec:
affinity:
podAntiAffinity:
Expand All @@ -47,7 +47,7 @@ spec:
- --store=dnssrv+_grpc._tcp.thanos-receive.thanos.svc.cluster.local
- --store=dnssrv+_grpc._tcp.thanos-rule.thanos.svc.cluster.local
- --store=dnssrv+_grpc._tcp.thanos-store.thanos.svc.cluster.local
image: quay.io/thanos/thanos:master-2020-05-07-b9ff23c5
image: quay.io/thanos/thanos:master-2020-05-18-6cfcb345
livenessProbe:
failureThreshold: 4
httpGet:
Expand Down
2 changes: 1 addition & 1 deletion examples/all/manifests/thanos-query-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
app.kubernetes.io/component: query-layer
app.kubernetes.io/instance: thanos-query
app.kubernetes.io/name: thanos-query
app.kubernetes.io/version: master-2020-05-07-b9ff23c5
app.kubernetes.io/version: master-2020-05-18-6cfcb345
name: thanos-query
namespace: thanos
spec:
Expand Down
2 changes: 1 addition & 1 deletion examples/all/manifests/thanos-query-serviceMonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
app.kubernetes.io/component: query-layer
app.kubernetes.io/instance: thanos-query
app.kubernetes.io/name: thanos-query
app.kubernetes.io/version: master-2020-05-07-b9ff23c5
app.kubernetes.io/version: master-2020-05-18-6cfcb345
name: thanos-query
namespace: thanos
spec:
Expand Down
2 changes: 1 addition & 1 deletion examples/all/manifests/thanos-receive-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
app.kubernetes.io/component: database-write-hashring
app.kubernetes.io/instance: thanos-receive
app.kubernetes.io/name: thanos-receive
app.kubernetes.io/version: master-2020-05-07-b9ff23c5
app.kubernetes.io/version: master-2020-05-18-6cfcb345
name: thanos-receive
namespace: thanos
spec:
Expand Down
2 changes: 1 addition & 1 deletion examples/all/manifests/thanos-receive-serviceMonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
app.kubernetes.io/component: database-write-hashring
app.kubernetes.io/instance: thanos-receive
app.kubernetes.io/name: thanos-receive
app.kubernetes.io/version: master-2020-05-07-b9ff23c5
app.kubernetes.io/version: master-2020-05-18-6cfcb345
name: thanos-receive
namespace: thanos
spec:
Expand Down
6 changes: 3 additions & 3 deletions examples/all/manifests/thanos-receive-statefulSet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
app.kubernetes.io/component: database-write-hashring
app.kubernetes.io/instance: thanos-receive
app.kubernetes.io/name: thanos-receive
app.kubernetes.io/version: master-2020-05-07-b9ff23c5
app.kubernetes.io/version: master-2020-05-18-6cfcb345
name: thanos-receive
namespace: thanos
spec:
Expand All @@ -22,7 +22,7 @@ spec:
app.kubernetes.io/component: database-write-hashring
app.kubernetes.io/instance: thanos-receive
app.kubernetes.io/name: thanos-receive
app.kubernetes.io/version: master-2020-05-07-b9ff23c5
app.kubernetes.io/version: master-2020-05-18-6cfcb345
spec:
affinity:
podAntiAffinity:
Expand Down Expand Up @@ -75,7 +75,7 @@ spec:
secretKeyRef:
key: thanos.yaml
name: thanos-objectstorage
image: quay.io/thanos/thanos:master-2020-05-07-b9ff23c5
image: quay.io/thanos/thanos:master-2020-05-18-6cfcb345
livenessProbe:
failureThreshold: 8
httpGet:
Expand Down
2 changes: 1 addition & 1 deletion examples/all/manifests/thanos-rule-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
app.kubernetes.io/component: rule-evaluation-engine
app.kubernetes.io/instance: thanos-rule
app.kubernetes.io/name: thanos-rule
app.kubernetes.io/version: master-2020-05-07-b9ff23c5
app.kubernetes.io/version: master-2020-05-18-6cfcb345
name: thanos-rule
namespace: thanos
spec:
Expand Down
2 changes: 1 addition & 1 deletion examples/all/manifests/thanos-rule-serviceMonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
app.kubernetes.io/component: rule-evaluation-engine
app.kubernetes.io/instance: thanos-rule
app.kubernetes.io/name: thanos-rule
app.kubernetes.io/version: master-2020-05-07-b9ff23c5
app.kubernetes.io/version: master-2020-05-18-6cfcb345
name: thanos-rule
namespace: thanos
spec:
Expand Down
6 changes: 3 additions & 3 deletions examples/all/manifests/thanos-rule-statefulSet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
app.kubernetes.io/component: rule-evaluation-engine
app.kubernetes.io/instance: thanos-rule
app.kubernetes.io/name: thanos-rule
app.kubernetes.io/version: master-2020-05-07-b9ff23c5
app.kubernetes.io/version: master-2020-05-18-6cfcb345
name: thanos-rule
namespace: thanos
spec:
Expand All @@ -22,7 +22,7 @@ spec:
app.kubernetes.io/component: rule-evaluation-engine
app.kubernetes.io/instance: thanos-rule
app.kubernetes.io/name: thanos-rule
app.kubernetes.io/version: master-2020-05-07-b9ff23c5
app.kubernetes.io/version: master-2020-05-18-6cfcb345
spec:
containers:
- args:
Expand All @@ -44,7 +44,7 @@ spec:
secretKeyRef:
key: thanos.yaml
name: thanos-objectstorage
image: quay.io/thanos/thanos:master-2020-05-07-b9ff23c5
image: quay.io/thanos/thanos:master-2020-05-18-6cfcb345
livenessProbe:
failureThreshold: 24
httpGet:
Expand Down
2 changes: 1 addition & 1 deletion examples/all/manifests/thanos-store-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
app.kubernetes.io/component: object-store-gateway
app.kubernetes.io/instance: thanos-store
app.kubernetes.io/name: thanos-store
app.kubernetes.io/version: master-2020-05-07-b9ff23c5
app.kubernetes.io/version: master-2020-05-18-6cfcb345
name: thanos-store
namespace: thanos
spec:
Expand Down
2 changes: 1 addition & 1 deletion examples/all/manifests/thanos-store-serviceMonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
app.kubernetes.io/component: object-store-gateway
app.kubernetes.io/instance: thanos-store
app.kubernetes.io/name: thanos-store
app.kubernetes.io/version: master-2020-05-07-b9ff23c5
app.kubernetes.io/version: master-2020-05-18-6cfcb345
name: thanos-store
namespace: thanos
spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
app.kubernetes.io/component: object-store-gateway
app.kubernetes.io/instance: thanos-store
app.kubernetes.io/name: thanos-store
app.kubernetes.io/version: master-2020-05-07-b9ff23c5
app.kubernetes.io/version: master-2020-05-18-6cfcb345
name: thanos-store
namespace: thanos
spec:
Expand All @@ -22,7 +22,7 @@ spec:
app.kubernetes.io/component: object-store-gateway
app.kubernetes.io/instance: thanos-store
app.kubernetes.io/name: thanos-store
app.kubernetes.io/version: master-2020-05-07-b9ff23c5
app.kubernetes.io/version: master-2020-05-18-6cfcb345
spec:
containers:
- args:
Expand Down Expand Up @@ -58,18 +58,22 @@ spec:
"max_idle_connections": 100
"max_item_size": "1MiB"
"timeout": "500ms"
"caching_config":
"chunk_object_size_ttl": "24h"
"chunk_subrange_size": 16000
"chunk_subrange_ttl": "24h"
"max_chunks_get_range_requests": 3
"blocks_iter_ttl": "5m"
"chunk_object_size_ttl": "24h"
"chunk_subrange_size": 16000
"chunk_subrange_ttl": "24h"
"max_chunks_get_range_requests": 3
"metafile_content_ttl": "24h"
"metafile_doesnt_exist_ttl": "15m"
"metafile_exists_ttl": "2h"
"metafile_max_size": "1MiB"
env:
- name: OBJSTORE_CONFIG
valueFrom:
secretKeyRef:
key: thanos.yaml
name: thanos-objectstorage
image: quay.io/thanos/thanos:master-2020-05-07-b9ff23c5
image: quay.io/thanos/thanos:master-2020-05-18-6cfcb345
livenessProbe:
failureThreshold: 8
httpGet:
Expand Down
6 changes: 3 additions & 3 deletions examples/all/manifests/thanos-store-statefulSet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
app.kubernetes.io/component: object-store-gateway
app.kubernetes.io/instance: thanos-store
app.kubernetes.io/name: thanos-store
app.kubernetes.io/version: master-2020-05-07-b9ff23c5
app.kubernetes.io/version: master-2020-05-18-6cfcb345
name: thanos-store
namespace: thanos
spec:
Expand All @@ -22,7 +22,7 @@ spec:
app.kubernetes.io/component: object-store-gateway
app.kubernetes.io/instance: thanos-store
app.kubernetes.io/name: thanos-store
app.kubernetes.io/version: master-2020-05-07-b9ff23c5
app.kubernetes.io/version: master-2020-05-18-6cfcb345
spec:
containers:
- args:
Expand All @@ -37,7 +37,7 @@ spec:
secretKeyRef:
key: thanos.yaml
name: thanos-objectstorage
image: quay.io/thanos/thanos:master-2020-05-07-b9ff23c5
image: quay.io/thanos/thanos:master-2020-05-18-6cfcb345
livenessProbe:
failureThreshold: 8
httpGet:
Expand Down
2 changes: 1 addition & 1 deletion examples/thanos-receive.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ t.receive {
local tr = self,
name:: 'thanos-receive',
namespace:: 'observability',
version:: 'master-2020-05-07-b9ff23c5',
version:: 'master-2020-05-18-6cfcb345',
image:: 'quay.io/thanos/thanos:v' + tr.version,
replicas:: 3,
replicationFactor:: 3,
Expand Down
20 changes: 14 additions & 6 deletions jsonnet/kube-thanos/kube-thanos-store.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,11 @@ local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet';
maxChunksGetRangeRequests: 3,
chunkObjectSizeTTL: '24h',
chunkSubrangeTTL: '24h',
blocksIterTTL: '5m',
metafileExistsTTL: '2h',
metafileDoesntExistTTL: '15m',
metafileContentTTL: '24h',
metafileMaxSize: '1MiB', // Equal to default MaxItemSize in memcached client.
kakkoyun marked this conversation as resolved.
Show resolved Hide resolved
},
},
local m = if std.objectHas(ts.config.memcached, 'bucketCache')
Expand All @@ -210,12 +215,15 @@ local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet';
dns_provider_update_interval: m.dnsProviderUpdateInterval,
},

caching_config: {
chunk_subrange_size: c.chunkSubrangeSize,
max_chunks_get_range_requests: c.maxChunksGetRangeRequests,
chunk_object_size_ttl: c.chunkObjectSizeTTL,
chunk_subrange_ttl: c.chunkSubrangeTTL,
},
chunk_subrange_size: c.chunkSubrangeSize,
max_chunks_get_range_requests: c.maxChunksGetRangeRequests,
chunk_object_size_ttl: c.chunkObjectSizeTTL,
chunk_subrange_ttl: c.chunkSubrangeTTL,
blocks_iter_ttl: c.blocksIterTTL,
metafile_exists_ttl: c.metafileExistsTTL,
metafile_doesnt_exist_ttl: c.metafileDoesntExistTTL,
metafile_content_ttl: c.metafileContentTTL,
metafile_max_size: m.maxItemSize,
},
statefulSet+: {
spec+: {
Expand Down
Loading