controller add roles

Signed-off-by: kklinch0 <kklinch0@gmail.com>
This commit is contained in:
kklinch0
2025-08-15 14:52:01 +03:00
parent 992162f507
commit d430048ba3
2 changed files with 28 additions and 0 deletions

View File

@@ -15,3 +15,6 @@ rules:
- apiGroups: [""]
resources: ["namespaces"]
verbs: ["get", "list", "watch", "patch", "update"]
- apiGroups: ["apps"]
resources: ["deployments"]
verbs: ["get", "list", "watch"]

View File

@@ -0,0 +1,25 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: cozystack-controller-deployment-patch-update
namespace: cozy-system
rules:
- apiGroups: ["apps"]
resources: ["deployments"]
resourceNames: ["cozystack-api"]
verbs: ["patch", "update"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: cozystack-controller-deployment-patch-update
namespace: cozy-system
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: cozystack-controller-deployment-patch-update
subjects:
- kind: ServiceAccount
name: cozystack-controller
namespace: cozy-system