Skip to content

Commit

Permalink
Merge pull request #295 from dschaaff/receive-router-selector-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
yeya24 committed May 3, 2024
2 parents 4863995 + e78ee31 commit a28d8ac
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
8 changes: 7 additions & 1 deletion jsonnet/kube-thanos/kube-thanos-receive-router.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ function(params) {
'app.kubernetes.io/component': tr.config.name + '-router',
},

podLabelSelector:: {
[labelName]: tr.routerLabels[labelName]
for labelName in std.objectFields(tr.routerLabels)
if labelName != 'app.kubernetes.io/version'
},

service: {
apiVersion: 'v1',
kind: 'Service',
Expand Down Expand Up @@ -77,7 +83,7 @@ function(params) {
},
spec: {
replicas: tr.config.routerReplicas,
selector: { matchLabels: tr.routerLabels },
selector: { matchLabels: tr.podLabelSelector },
template: {
metadata: {
labels: tr.routerLabels,
Expand Down
1 change: 0 additions & 1 deletion manifests/thanos-receive-router-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ spec:
app.kubernetes.io/component: thanos-receive-router
app.kubernetes.io/instance: thanos-receive
app.kubernetes.io/name: thanos-receive
app.kubernetes.io/version: v0.31.0
template:
metadata:
labels:
Expand Down

0 comments on commit a28d8ac

Please sign in to comment.