forked from harness-community/gitness-lab
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathservice-account.yml
41 lines (38 loc) · 883 Bytes
/
service-account.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
apiVersion: v1
kind: ServiceAccount
metadata:
name: gitness-sa
namespace: gitness
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: deployment-manager
namespace: gitness
rules:
- apiGroups: ["", "extensions", "apps"]
resources: ["deployments", "pods", "pods/exec", "secrets", "services"]
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: gitness-sa-deployment-binder
namespace: gitness
subjects:
- kind: ServiceAccount
name: gitness-sa
namespace: gitness
roleRef:
kind: Role
name: deployment-manager
apiGroup: rbac.authorization.k8s.io
---
apiVersion: v1
kind: Secret
metadata:
name: gitness-sa-token
namespace: gitness
annotations:
kubernetes.io/service-account.name: gitness-sa
type: kubernetes.io/service-account-token