Documentation ¶
Index ¶
- Variables
- func AddClusterRoleBindingSubjects(ctx context.Context, cli client.Client, name string, ref rbacv1.RoleRef, ...) (*rbacv1.ClusterRoleBinding, error)
- func AddRoleBindingSubjects(ctx context.Context, cli client.Client, name, ns string, ref rbacv1.RoleRef, ...) (*rbacv1.RoleBinding, error)
- func AnyMatchSubjectNamespace(ns string, subs ...rbacv1.Subject) bool
- func AnySubjectsMatch(match rbacv1.Subject, subs ...rbacv1.Subject) bool
- func ClusterRoleRef(name string) rbacv1.RoleRef
- func GroupSubject(name string) rbacv1.Subject
- func RoleRef(name string) rbacv1.RoleRef
- func RulesGrantClusterRBAC(rules []rbacv1.PolicyRule) bool
- func RulesGrantRBAC(rules []rbacv1.PolicyRule) bool
- func SubjectNamespaceMatches(s rbacv1.Subject, ns string) bool
- func SubjectsMatch(match, s rbacv1.Subject) bool
- func SubjectsMatchingNamespace(subs []rbacv1.Subject, ns string) []rbacv1.Subject
- func UserSubject(name string) rbacv1.Subject
- type Bindings
- func (b Bindings) ForNamespace(ns string) Bindings
- func (b Bindings) ForSubject(sub rbacv1.Subject) Bindings
- func (b Bindings) ForSubjects(subs ...rbacv1.Subject) Bindings
- func (b Bindings) ForUser(u *v1alpha1.User) Bindings
- func (b Bindings) RoleRefs() []NamespacedRoleRef
- func (b Bindings) Subjects() []*SubjectRoles
- type NamespacedRoleRef
- type SubjectRoles
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultGroups = []string{
"system:authenticated",
}
Functions ¶
func AddRoleBindingSubjects ¶
func ClusterRoleRef ¶
func GroupSubject ¶
func RulesGrantClusterRBAC ¶
func RulesGrantClusterRBAC(rules []rbacv1.PolicyRule) bool
func RulesGrantRBAC ¶
func RulesGrantRBAC(rules []rbacv1.PolicyRule) bool
func SubjectsMatch ¶
func UserSubject ¶
Types ¶
type Bindings ¶
type Bindings struct { Roles []rbacv1.RoleBinding ClusterRoles []rbacv1.ClusterRoleBinding }
func (Bindings) ForNamespace ¶
func (Bindings) RoleRefs ¶
func (b Bindings) RoleRefs() []NamespacedRoleRef
func (Bindings) Subjects ¶
func (b Bindings) Subjects() []*SubjectRoles
type NamespacedRoleRef ¶
type SubjectRoles ¶
type SubjectRoles struct { rbacv1.Subject RoleRefs []NamespacedRoleRef }
Click to show internal directories.
Click to hide internal directories.