forked from openshift/origin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
all.go
24 lines (21 loc) · 775 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
23
24
package bootstrappolicy
import (
"k8s.io/kubernetes/pkg/apis/rbac"
)
type PolicyData struct {
ClusterRoles []rbac.ClusterRole
ClusterRoleBindings []rbac.ClusterRoleBinding
Roles map[string][]rbac.Role
RoleBindings map[string][]rbac.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(),
}
}