Skip to content
This repository was archived by the owner on Oct 14, 2020. It is now read-only.

Commit 8707a3f

Browse files
committed
Add serviceAccount to DeclarativeCombinedScan Hook
1 parent 82241c8 commit 8707a3f

File tree

4 files changed

+52
-1
lines changed

4 files changed

+52
-1
lines changed

hooks/declarative-subsequent-scans/templates/declerative-subsequent-scans-hook.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,5 @@ spec:
1616
{{- else }}
1717
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
1818
{{- end }}
19-
{{- end }}
19+
{{- end }}
20+
serviceAccountName: declarative-combined-scans
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
apiVersion: rbac.authorization.k8s.io/v1
2+
kind: RoleBinding
3+
metadata:
4+
annotations:
5+
description: DeclarativeCombinedScansHooks needs to have the rights to create new scans and the usual patch rules to update the scan status
6+
name: declarative-combined-scans
7+
namespace: {{ .Release.Namespace }}
8+
roleRef:
9+
apiGroup: rbac.authorization.k8s.io
10+
kind: Role
11+
name: declarative-combined-scans
12+
subjects:
13+
- kind: ServiceAccount
14+
name: declarative-combined-scans
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
apiVersion: rbac.authorization.k8s.io/v1
2+
kind: Role
3+
metadata:
4+
annotations:
5+
description: DeclarativeCombinedScansHooks needs to have the rights to create new scans and the usual patch rules to update the scan status
6+
name: declarative-combined-scans
7+
namespace: {{ .Release.Namespace }}
8+
rules:
9+
- apiGroups:
10+
- execution.experimental.securecodebox.io
11+
resources:
12+
- scans
13+
verbs:
14+
- get
15+
- create
16+
- apiGroups:
17+
- execution.experimental.securecodebox.io
18+
resources:
19+
- scans/status
20+
verbs:
21+
- get
22+
- patch
23+
- apiGroups:
24+
- cascading.experimental.securecodebox.io
25+
resources:
26+
- cascadingrules
27+
verbs:
28+
- get
29+
- list
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
apiVersion: v1
2+
kind: ServiceAccount
3+
metadata:
4+
annotations:
5+
description: DeclarativeCombinedScansHooks needs to have the rights to create new scans and the usual patch rules to update the scan status
6+
name: declarative-combined-scans
7+
namespace: {{ .Release.Namespace }}

0 commit comments

Comments
 (0)