Skip to content

Commit

Permalink
add common labels to receive router (#282)
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Burt <michaelpburt@gmail.com>
  • Loading branch information
michael-burt committed Jul 19, 2022
1 parent f1928b8 commit 56fed32
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
13 changes: 12 additions & 1 deletion jsonnet/kube-thanos/kube-thanos-receive-router.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,20 @@ function(params) {
metadata: {
name: tr.config.name + '-router',
namespace: tr.config.namespace,
labels: tr.routerLabels,
},
spec: {
ports: [{ name: name, port: tr.config.ports[name] } for name in std.objectFields(tr.config.ports)],
ports: [
{
assert std.isString(name),
assert std.isNumber(tr.config.ports[name]),

name: name,
port: tr.config.ports[name],
targetPort: tr.config.ports[name],
}
for name in std.objectFields(tr.config.ports)
],
selector: tr.routerLabels,
},
},
Expand Down
8 changes: 8 additions & 0 deletions manifests/thanos-receive-router-service.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
apiVersion: v1
kind: Service
metadata:
labels:
app.kubernetes.io/component: thanos-receive-router
app.kubernetes.io/instance: thanos-receive
app.kubernetes.io/name: thanos-receive
app.kubernetes.io/version: v0.24.0
name: thanos-receive-router
namespace: thanos
spec:
ports:
- name: grpc
port: 10901
targetPort: 10901
- name: http
port: 10902
targetPort: 10902
- name: remote-write
port: 19291
targetPort: 19291
selector:
app.kubernetes.io/component: thanos-receive-router
app.kubernetes.io/instance: thanos-receive
Expand Down

0 comments on commit 56fed32

Please sign in to comment.