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

fix: receive router deployment selector labels #295

Merged
merged 3 commits into from
May 3, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
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.29.0
template:
metadata:
labels:
Expand Down