forked from openshift/origin
-
Notifications
You must be signed in to change notification settings - Fork 1
/
all.go
22 lines (19 loc) · 772 Bytes
/
all.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package bootstrappolicy
import rbacv1 "k8s.io/api/rbac/v1"
type PolicyData struct {
ClusterRoles []rbacv1.ClusterRole
ClusterRoleBindings []rbacv1.ClusterRoleBinding
Roles map[string][]rbacv1.Role
RoleBindings map[string][]rbacv1.RoleBinding
// ClusterRolesToAggregate maps from previous clusterrole name to the new clusterrole name
ClusterRolesToAggregate map[string]string
}
func Policy() *PolicyData {
return &PolicyData{
ClusterRoles: GetBootstrapClusterRoles(),
ClusterRoleBindings: GetBootstrapClusterRoleBindings(),
Roles: GetBootstrapNamespaceRoles(),
RoleBindings: GetBootstrapNamespaceRoleBindings(),
ClusterRolesToAggregate: GetBootstrapClusterRolesToAggregate(),
}
}