forked from argoproj/argo-workflows
-
Notifications
You must be signed in to change notification settings - Fork 0
/
const.go
61 lines (56 loc) · 1.58 KB
/
const.go
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
54
55
56
57
58
59
60
61
package commands
import rbacv1 "k8s.io/api/rbac/v1"
const (
// Argo controller resource constants
ArgoControllerServiceAccount = "argo"
ArgoControllerClusterRole = "argo-cluster-role"
ArgoControllerClusterRoleBinding = "argo-binding"
// Argo UI resource constants
ArgoUIServiceAccount = "argo-ui"
ArgoUIClusterRole = "argo-ui-cluster-role"
ArgoUIClusterRoleBinding = "argo-ui-binding"
ArgoUIDeploymentName = "argo-ui"
ArgoUIServiceName = "argo-ui"
)
var (
ArgoControllerPolicyRules = []rbacv1.PolicyRule{
{
APIGroups: []string{""},
// TODO(jesse): remove exec privileges when issue #499 is resolved
Resources: []string{"pods", "pods/exec"},
Verbs: []string{"create", "get", "list", "watch", "update", "patch"},
},
{
APIGroups: []string{""},
Resources: []string{"configmaps"},
Verbs: []string{"get", "watch", "list"},
},
{
APIGroups: []string{""},
Resources: []string{"persistentvolumeclaims"},
Verbs: []string{"create", "delete"},
},
{
APIGroups: []string{"argoproj.io"},
Resources: []string{"workflows"},
Verbs: []string{"get", "list", "watch", "update", "patch"},
},
}
ArgoUIPolicyRules = []rbacv1.PolicyRule{
{
APIGroups: []string{""},
Resources: []string{"pods", "pods/exec", "pods/log"},
Verbs: []string{"get", "list", "watch"},
},
{
APIGroups: []string{""},
Resources: []string{"secrets"},
Verbs: []string{"get"},
},
{
APIGroups: []string{"argoproj.io"},
Resources: []string{"workflows"},
Verbs: []string{"get", "list", "watch"},
},
}
)