@@ -0,0 +1,45 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: k8s-pilot
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: k8s-pilot
|
||||
namespace: k8s-pilot
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: k8s-pilot
|
||||
rules:
|
||||
- apiGroups: [""]
|
||||
resources: ["namespaces", "nodes"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
- apiGroups: [""]
|
||||
resources: ["pods", "pods/log"]
|
||||
verbs: ["get", "list", "watch", "delete"]
|
||||
- apiGroups: [""]
|
||||
resources: ["events"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
- apiGroups: ["apps"]
|
||||
resources: ["deployments", "replicasets"]
|
||||
verbs: ["get", "list", "watch", "patch", "update"]
|
||||
# Trivy Operator CRDs (optional — only needed if Trivy Operator is installed)
|
||||
- apiGroups: ["aquasecurity.github.io"]
|
||||
resources: ["vulnerabilityreports", "configauditreports", "exposedsecretreports"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: k8s-pilot
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: k8s-pilot
|
||||
namespace: k8s-pilot
|
||||
roleRef:
|
||||
kind: ClusterRole
|
||||
name: k8s-pilot
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
Reference in New Issue
Block a user