Skip to content

Commit

Permalink
feat: add Openshift anyuid SCC role binding (#160)
Browse files Browse the repository at this point in the history
  • Loading branch information
erikgb authored Jan 31, 2023
1 parent 9159cfc commit 03baa7d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions config/default/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ resources:
- ../image-scanner-jobs
- ../operator
- ../trivy-server
- scc_anyuid_role_binding.yaml
replacements:
# This replacement ensures that we run the same trivy image in client and server (obtained from server)
- source:
Expand Down
16 changes: 16 additions & 0 deletions config/default/scc_anyuid_role_binding.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
# This role binding is required on Openshift installs.
# Consider dedicated base - even if this does not harm on other K8s distros.
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: scc-anyuid
namespace: image-scanner-jobs
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: system:openshift:scc:anyuid
subjects:
- kind: ServiceAccount
name: image-scanner
namespace: image-scanner-jobs

0 comments on commit 03baa7d

Please sign in to comment.