Skip to content

Commit

Permalink
fix: add missing roles to grant the use of scc to workloads
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Wilcsinszky <[email protected]>
  • Loading branch information
pepov committed Dec 18, 2024
1 parent fd389e6 commit 0544c9e
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
9 changes: 9 additions & 0 deletions charts/logging-operator/templates/clusterrole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,15 @@ rules:
- patch
- update
- watch
- apiGroups:
- security.openshift.io
resourceNames:
- anyuid
- privileged
resources:
- securitycontextconstraints
verbs:
- use
- apiGroups:
- telemetry.kube-logging.dev
resources:
Expand Down
9 changes: 9 additions & 0 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,15 @@ rules:
- patch
- update
- watch
- apiGroups:
- security.openshift.io
resourceNames:
- anyuid
- privileged
resources:
- securitycontextconstraints
verbs:
- use
- apiGroups:
- telemetry.kube-logging.dev
resources:
Expand Down
1 change: 1 addition & 0 deletions controllers/logging/logging_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ type LoggingReconciler struct {
// +kubebuilder:rbac:groups=coordination.k8s.io,resources=leases,verbs=*
// +kubebuilder:rbac:groups=batch,resources=jobs,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=policy,resources=poddisruptionbudgets,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=security.openshift.io,resources=securitycontextconstraints,resourceNames=anyuid;privileged,verbs=use

// Reconcile logging resources
func (r *LoggingReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
Expand Down

0 comments on commit 0544c9e

Please sign in to comment.