fix(app): use CBR and correct sa

This commit is contained in:
Aleksandr Tcitlionok
2024-12-05 06:28:31 +00:00
parent aa17c7a2dc
commit 7c7cf79ca8
5 changed files with 57 additions and 25 deletions

View File

@@ -5,25 +5,23 @@ metadata:
namespace: metalcheck
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
kind: ClusterRole
metadata:
namespace: metalcheck
name: metalcheck-role
name: metalcheck-clusterrole
rules:
- apiGroups: [""]
resources: ["pods", "nodes", "namespaces"]
verbs: ["get", "list", "watch"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
kind: ClusterRoleBinding
metadata:
name: metalcheck-rolebinding
namespace: metalcheck
name: metalcheck-clusterrolebinding
subjects:
- kind: ServiceAccount
name: metalcheck-sa
namespace: metalcheck
roleRef:
kind: Role
name: metalcheck-role
kind: ClusterRole
name: metalcheck-clusterrole
apiGroup: rbac.authorization.k8s.io