-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgitlab-deploy.yml
53 lines (53 loc) · 1.1 KB
/
gitlab-deploy.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
42
43
44
45
46
47
48
49
50
51
52
53
apiVersion: v1
kind: ServiceAccount
metadata:
name: gitlab-deploy
namespace: gitlab
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: gitlab-deploy-role
rules:
- apiGroups: ["*"]
resources: ["*"]
verbs: ["*"]
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: gitlab-deploy-cluster-role
rules:
- apiGroups: [""]
resources: ["namespaces"]
verbs: ["list"]
- apiGroups: ["apiextensions.k8s.io"]
resources: ["customresourcedefinitions"]
verbs: ["list"]
---
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: gitlab-deploy-rb
namespace: gitlab
subjects:
- kind: ServiceAccount
name: gitlab-deploy
namespace: gitlab
roleRef:
kind: ClusterRole
name: gitlab-deploy-role
apiGroup: rbac.authorization.k8s.io
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: gitlab-deploy-crb
subjects:
- kind: ServiceAccount
name: gitlab-deploy
namespace: gitlab
roleRef:
kind: ClusterRole
name: gitlab-deploy-cluster-role
apiGroup: rbac.authorization.k8s.io