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

Add Clusterrole to allow Korrel8r to view all signal data #517

Merged
merged 1 commit into from
Jun 28, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,25 @@ spec:
- use
serviceAccountName: obo-prometheus-operator-admission-webhook
- rules:
- apiGroups:
- ""
resources:
- configmaps
- endpoints
- events
- namespaces
- nodes
- persistentvolumeclaims
- persistentvolumes
- pods
- replicationcontrollers
- secrets
- serviceaccounts
- services
verbs:
- get
- list
- watch
- apiGroups:
- ""
resources:
Expand Down Expand Up @@ -304,6 +323,17 @@ spec:
- patch
- update
- watch
- apiGroups:
- apps
resources:
- daemonsets
- deployments
- replicasets
- statefulsets
verbs:
- get
- list
- watch
- apiGroups:
- apps
resources:
Expand All @@ -315,6 +345,23 @@ spec:
- patch
- update
- watch
- apiGroups:
- autoscaling
resources:
- horizontalpodautoscalers
verbs:
- get
- list
- watch
- apiGroups:
- batch
resources:
- cronjobs
- jobs
verbs:
- get
- list
- watch
- apiGroups:
- config.openshift.io
resources:
Expand Down Expand Up @@ -364,6 +411,34 @@ spec:
- infrastructure
verbs:
- get
- apiGroups:
- loki.grafana.com
resources:
- application
- audit
- infrastructure
- network
verbs:
- get
- apiGroups:
- monitoring.coreos.com
resourceNames:
- main
resources:
- alertmanagers/api
verbs:
- get
- list
- apiGroups:
- monitoring.coreos.com
resourceNames:
- k8s
resources:
- prometheuses/api
verbs:
- create
- get
- update
- apiGroups:
- monitoring.rhobs
resources:
Expand Down Expand Up @@ -438,6 +513,15 @@ spec:
- get
- patch
- update
- apiGroups:
- networking.k8s.io
resources:
- ingresses
- networkpolicies
verbs:
- get
- list
- watch
- apiGroups:
- observability.openshift.io
resources:
Expand Down Expand Up @@ -481,6 +565,7 @@ spec:
verbs:
- create
- delete
- get
- list
- patch
- update
Expand All @@ -495,6 +580,7 @@ spec:
verbs:
- create
- delete
- get
- list
- patch
- update
Expand All @@ -520,6 +606,15 @@ spec:
- securitycontextconstraints
verbs:
- use
- apiGroups:
- storage.k8s.io
resources:
- storageclasses
- volumeattachments
verbs:
- get
- list
- watch
- apiGroups:
- tempo.grafana.com
resources:
Expand Down
2 changes: 1 addition & 1 deletion cmd/operator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ var defaultImages = map[string]string{
"ui-troubleshooting-panel": "quay.io/openshift-observability-ui/troubleshooting-panel-console-plugin:v0.1.0",
"ui-distributed-tracing": "quay.io/openshift-observability-ui/distributed-tracing-console-plugin:v0.1.0",
"ui-logging": "quay.io/openshift-logging/logging-view-plugin:6.0.0",
"korrel8r": "quay.io/korrel8r/korrel8r:0.6.5",
"korrel8r": "quay.io/korrel8r/korrel8r:0.6.6",
}

func imagesUsed() []string {
Expand Down
95 changes: 95 additions & 0 deletions deploy/operator/observability-operator-cluster-role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,25 @@ kind: ClusterRole
metadata:
name: observability-operator
rules:
- apiGroups:
- ""
resources:
- configmaps
- endpoints
- events
- namespaces
- nodes
- persistentvolumeclaims
- persistentvolumes
- pods
- replicationcontrollers
- secrets
- serviceaccounts
- services
verbs:
- get
- list
- watch
- apiGroups:
- ""
resources:
Expand Down Expand Up @@ -41,6 +60,17 @@ rules:
- patch
- update
- watch
- apiGroups:
- apps
resources:
- daemonsets
- deployments
- replicasets
- statefulsets
verbs:
- get
- list
- watch
- apiGroups:
- apps
resources:
Expand All @@ -52,6 +82,23 @@ rules:
- patch
- update
- watch
- apiGroups:
- autoscaling
resources:
- horizontalpodautoscalers
verbs:
- get
- list
- watch
- apiGroups:
- batch
resources:
- cronjobs
- jobs
verbs:
- get
- list
- watch
- apiGroups:
- config.openshift.io
resources:
Expand Down Expand Up @@ -101,6 +148,34 @@ rules:
- infrastructure
verbs:
- get
- apiGroups:
- loki.grafana.com
resources:
- application
- audit
- infrastructure
- network
verbs:
- get
- apiGroups:
- monitoring.coreos.com
resourceNames:
- main
resources:
- alertmanagers/api
verbs:
- get
- list
- apiGroups:
- monitoring.coreos.com
resourceNames:
- k8s
resources:
- prometheuses/api
verbs:
- create
- get
- update
- apiGroups:
- monitoring.rhobs
resources:
Expand Down Expand Up @@ -175,6 +250,15 @@ rules:
- get
- patch
- update
- apiGroups:
- networking.k8s.io
resources:
- ingresses
- networkpolicies
verbs:
- get
- list
- watch
- apiGroups:
- observability.openshift.io
resources:
Expand Down Expand Up @@ -218,6 +302,7 @@ rules:
verbs:
- create
- delete
- get
- list
- patch
- update
Expand All @@ -232,6 +317,7 @@ rules:
verbs:
- create
- delete
- get
- list
- patch
- update
Expand All @@ -257,6 +343,15 @@ rules:
- securitycontextconstraints
verbs:
- use
- apiGroups:
- storage.k8s.io
resources:
- storageclasses
- volumeattachments
verbs:
- get
- list
- watch
- apiGroups:
- tempo.grafana.com
resources:
Expand Down
14 changes: 14 additions & 0 deletions pkg/controllers/uiplugin/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,20 @@ const (
// RBAC for logging view plugin
// +kubebuilder:rbac:groups=loki.grafana.com,resources=application;infrastructure;audit,verbs=get

// RBAC for korrel8r
//+kubebuilder:rbac:groups=apps,resources=daemonsets;deployments;replicasets;statefulsets,verbs=get;list;watch
//+kubebuilder:rbac:groups=rbac.authorization.k8s.io,resources=roles;rolebindings;clusterroles;clusterrolebindings,verbs=get;list;watch
//+kubebuilder:rbac:groups="",resources=configmaps;endpoints;events;namespaces;nodes;persistentvolumeclaims;persistentvolumes;pods;replicationcontrollers;secrets;serviceaccounts;services,verbs=get;list;watch
//+kubebuilder:rbac:groups=batch,resources=cronjobs;jobs,verbs=get;list;watch
//+kubebuilder:rbac:groups=autoscaling,resources=horizontalpodautoscalers,verbs=get;list;watch
//+kubebuilder:rbac:groups=policy,resources=poddisruptionbudgets,verbs=get;list;watch
//+kubebuilder:rbac:groups=storage.k8s.io,resources=storageclasses;volumeattachments,verbs=get;list;watch
//+kubebuilder:rbac:groups=networking.k8s.io,resources=networkpolicies;ingresses,verbs=get;list;watch
//+kubebuilder:rbac:groups=loki.grafana.com,resources=application;infrastructure;audit;network,verbs=get
//+kubebuilder:rbac:groups=monitoring.coreos.com,resources=prometheuses/api,resourceNames=k8s,verbs=get;create;update
//+kubebuilder:rbac:groups=monitoring.coreos.com,resources=alertmanagers/api,resourceNames=main,verbs=get;list

// RegisterWithManager registers the controller with Manager
func RegisterWithManager(mgr ctrl.Manager, opts Options) error {
logger := ctrl.Log.WithName("observability-ui")

Expand Down
Loading
Loading