Skip to content

Commit

Permalink
add missing RBAC rule for working with PrometheusRules
Browse files Browse the repository at this point in the history
The operator cannot create PrometheusRules when enabled without this rule.
  • Loading branch information
siliconbrain committed Sep 3, 2021
1 parent 87804af commit 5a08d9c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions charts/logging-operator/templates/clusterrole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ rules:
- apiGroups:
- monitoring.coreos.com
resources:
- prometheusrules
- servicemonitors
verbs:
- create
Expand Down
1 change: 1 addition & 0 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ rules:
- apiGroups:
- monitoring.coreos.com
resources:
- prometheusrules
- servicemonitors
verbs:
- create
Expand Down
2 changes: 1 addition & 1 deletion controllers/logging_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ type LoggingReconciler struct {
// +kubebuilder:rbac:groups="",resources=nodes;namespaces;endpoints,verbs=get;list;watch
// +kubebuilder:rbac:groups="";events.k8s.io,resources=events,verbs=create;get;list;watch
// +kubebuilder:rbac:groups="rbac.authorization.k8s.io",resources=clusterroles;clusterrolebindings;roles;rolebindings,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=monitoring.coreos.com,resources=servicemonitors,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=monitoring.coreos.com,resources=prometheusrules;servicemonitors,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=coordination.k8s.io,resources=leases,verbs=*
// +kubebuilder:rbac:groups=batch,resources=jobs,verbs=get;list;watch;create;update;patch;delete

Expand Down
4 changes: 2 additions & 2 deletions pkg/sdk/static/gen/rbac/generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5a08d9c

Please sign in to comment.