Skip to content

Commit

Permalink
Merge pull request #185 from craigfurman/case-insensitive-caches
Browse files Browse the repository at this point in the history
Make cache types case insensitive
  • Loading branch information
kakkoyun authored Jan 4, 2021
2 parents e6c97a0 + 11ed801 commit b50112c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ We use *breaking* word for marking changes that are not backward compatible (rel

### Fixed

-
- [#185](https://github.com/thanos-io/kube-thanos/pull/185)A query-frontend, store: make cache types case insensitive

## [v0.17.0](https://github.com/thanos-io/kube-thanos/tree/v0.17.0) (2020-12-08)

Expand Down
8 changes: 4 additions & 4 deletions jsonnet/kube-thanos/kube-thanos-query-frontend.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -67,24 +67,24 @@ function(params) {
queryRangeCache+:
if std.objectHas(params, 'queryRangeCache')
&& std.objectHas(params.queryRangeCache, 'type')
&& params.queryRangeCache.type == 'memcached' then
&& std.asciiUpper(params.queryRangeCache.type) == 'MEMCACHED' then

defaults.memcachedDefaults + params.queryRangeCache
else if std.objectHas(params, 'queryRangeCache')
&& std.objectHas(params.queryRangeCache, 'type')
&& params.queryRangeCache.type == 'in-memory' then
&& std.asciiUpper(params.queryRangeCache.type) == 'IN-MEMORY' then

defaults.fifoCache + params.queryRangeCache
else {},
labelsCache+:
if std.objectHas(params, 'labelsCache')
&& std.objectHas(params.labelsCache, 'type')
&& params.labelsCache.type == 'memcached' then
&& std.asciiUpper(params.labelsCache.type) == 'MEMCACHED' then

defaults.memcachedDefaults + params.labelsCache
else if std.objectHas(params, 'labelsCache')
&& std.objectHas(params.labelsCache, 'type')
&& params.labelsCache.type == 'in-memory' then
&& std.asciiUpper(params.labelsCache.type) == 'IN-MEMORY' then

defaults.fifoCache + params.labelsCache
else {},
Expand Down
4 changes: 2 additions & 2 deletions jsonnet/kube-thanos/kube-thanos-store.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ function(params) {
indexCache+:
if std.objectHas(params, 'indexCache')
&& std.objectHas(params.indexCache, 'type')
&& params.indexCache.type == 'memcached' then
&& std.asciiUpper(params.indexCache.type) == 'MEMCACHED' then
defaults.memcachedDefaults + defaults.indexCacheDefaults + params.indexCache
else {},
bucketCache+:
if std.objectHas(params, 'bucketCache')
&& std.objectHas(params.bucketCache, 'type')
&& params.bucketCache.type == 'memcached' then
&& std.asciiUpper(params.bucketCache.type) == 'MEMCACHED' then
defaults.memcachedDefaults + defaults.bucketCacheMemcachedDefaults + params.bucketCache
else {},
},
Expand Down

0 comments on commit b50112c

Please sign in to comment.