Skip to content

Commit

Permalink
jsonnet: add role for pods and jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
squat committed May 12, 2020
1 parent 44c6bea commit 9d8dc4b
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
15 changes: 15 additions & 0 deletions examples/manifests/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,21 @@ rules:
- get
- create
- update
- apiGroups:
- ""
resources:
- pods
verbs:
- list
- watch
- apiGroups:
- batch
resources:
- jobs
verbs:
- create
- delete
- get
- apiGroups:
- apps
resources:
Expand Down
12 changes: 12 additions & 0 deletions jsonnet/lib/thanos-receive-controller.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,18 @@ local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet';
]) +
rules.withVerbs(['list', 'watch', 'get', 'create', 'update']),
rules.new() +
rules.withApiGroups(['']) +
rules.withResources([
'pods',
]) +
rules.withVerbs(['list', 'watch']),
rules.new() +
rules.withApiGroups(['batch']) +
rules.withResources([
'jobs',
]) +
rules.withVerbs(['create', 'delete', 'get']),
rules.new() +
rules.withApiGroups(['apps']) +
rules.withResources([
'statefulsets',
Expand Down

0 comments on commit 9d8dc4b

Please sign in to comment.