Skip to content

Commit 583c27c

Browse files
committed
feat(event-reporters): add RBAC permissions for codefresh-sa service account
- Create workflow-reporter-rbac.yaml with Role and RoleBinding - Grants full namespace permissions (all apiGroups, resources, verbs) - Restores same permissions as original workflow-reporter service account - Ensures backward compatibility for e2e tests requiring elevated permissions
1 parent d6de0c8 commit 583c27c

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{{/*
2+
Workflow reporter RBAC for backward compatibility
3+
*/}}
4+
{{- if (index .Values "event-reporters" "workflow" "serviceAccount" "create") }}
5+
apiVersion: rbac.authorization.k8s.io/v1
6+
kind: Role
7+
metadata:
8+
name: workflow-reporter
9+
labels:
10+
{{- include "event-reporters.workflow-reporter.labels" . | nindent 4 }}
11+
rules:
12+
- apiGroups:
13+
- "*"
14+
resources:
15+
- "*"
16+
verbs:
17+
- "*"
18+
---
19+
apiVersion: rbac.authorization.k8s.io/v1
20+
kind: RoleBinding
21+
metadata:
22+
name: workflow-reporter
23+
labels:
24+
{{- include "event-reporters.workflow-reporter.labels" . | nindent 4 }}
25+
roleRef:
26+
apiGroup: rbac.authorization.k8s.io
27+
kind: Role
28+
name: workflow-reporter
29+
subjects:
30+
- kind: ServiceAccount
31+
name: {{ include "event-reporters.workflow-reporter.serviceAccountName" . }}
32+
{{- end }}

0 commit comments

Comments
 (0)