Skip to content

Commit

Permalink
Filter out keys instead of hiding them
Browse files Browse the repository at this point in the history
Signed-off-by: Maxime Brunet <maxime.brunet@paytm.com>
  • Loading branch information
maxbrunet committed Sep 13, 2021
1 parent fb056aa commit 8c6611f
Show file tree
Hide file tree
Showing 5 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 @@ -19,7 +19,7 @@ We use *breaking* word for marking changes that are not backward compatible (rel

### Changed

- [#234](https://github.com/thanos-io/kube-thanos/pull/234) (compact|store)-shards/receive-hashrings: Hide non-resource fields (`hashrings`/`shards`)
-

### Added

Expand Down
6 changes: 3 additions & 3 deletions all.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,6 @@ local finalQ = t.query(q.config {
for name in std.objectFields(strs.shards[shard])
if strs.shards[shard][name] != null
} +
{ ['thanos-compact-shards-' + name]: cs[name] for name in std.objectFields(cs) if cs[name] != null } +
{ ['thanos-receive-hashrings-' + name]: rcvs[name] for name in std.objectFields(rcvs) if rcvs[name] != null } +
{ ['thanos-store-shards-' + name]: strs[name] for name in std.objectFields(strs) if strs[name] != null }
{ ['thanos-compact-shards-' + name]: cs[name] for name in std.objectFields(cs) if name != 'shards' && cs[name] != null } +
{ ['thanos-receive-hashrings-' + name]: rcvs[name] for name in std.objectFields(rcvs) if name != 'hashrings' && rcvs[name] != null } +
{ ['thanos-store-shards-' + name]: strs[name] for name in std.objectFields(strs) if name != 'shards' && strs[name] != null }
2 changes: 1 addition & 1 deletion jsonnet/kube-thanos/kube-thanos-compact-shards.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function(params)
},
},

shards:: {
shards: {
['shard' + i]: compact(config {
name+: '-%d' % i,
commonLabels+:: { 'compact.thanos.io/shard': 'shard-' + i },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function(params)
labels: config.commonLabels,
},
},
hashrings:: {
hashrings: {
[h.hashring]: receive(config {
name+: '-' + h.hashring,
commonLabels+:: {
Expand Down
2 changes: 1 addition & 1 deletion jsonnet/kube-thanos/kube-thanos-store-shards.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function(params)
},
},

shards:: {
shards: {
['shard' + i]: store(config {
name+: '-%d' % i,
commonLabels+:: { 'store.thanos.io/shard': 'shard-' + i },
Expand Down

0 comments on commit 8c6611f

Please sign in to comment.