Skip to content

Commit

Permalink
Add cluster-role observatorium-logs-edit for dedicated-admins (rhobs#353
Browse files Browse the repository at this point in the history
)
  • Loading branch information
periklis authored and philipgough committed Oct 10, 2022
1 parent 5a90b94 commit 87aa3ad
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
19 changes: 19 additions & 0 deletions crds/observatorium-logs-crds-template.jsonnet
Original file line number Diff line number Diff line change
@@ -1,4 +1,22 @@
{
local clusterRole = {
apiVersion: 'rbac.authorization.k8s.io/v1',
kind: 'ClusterRole',
metadata: {
name: 'observatorium-logs-edit',
annotations: {
'managed.openshift.io/aggregate-to-dedicated-admins': 'cluster',
},
},
rules: [
{
apiGroups: ['loki.grafana.com'],
resources: ['alertingrules', 'recordingrules'],
verbs: ['create', 'update', 'delete', 'patch', 'get', 'list', 'watch'],
},
],
},

apiVersion: 'template.openshift.io/v1',
kind: 'Template',
metadata: {
Expand All @@ -7,5 +25,6 @@
objects: [
(import 'loki.grafana.com_alertingrules.libsonnet'),
(import 'loki.grafana.com_recordingrules.libsonnet'),
clusterRole,
],
}
20 changes: 20 additions & 0 deletions resources/crds/observatorium-logs-crds-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -297,3 +297,23 @@ objects:
plural: ""
conditions: null
storedVersions: null
- apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
annotations:
managed.openshift.io/aggregate-to-dedicated-admins: cluster
name: observatorium-logs-edit
rules:
- apiGroups:
- loki.grafana.com
resources:
- alertingrules
- recordingrules
verbs:
- create
- update
- delete
- patch
- get
- list
- watch

0 comments on commit 87aa3ad

Please sign in to comment.