Documentation ¶
Index ¶
- func BindClusterRole(c bindingsGetter, clusterRole, ns string, subjects ...rbacv1beta1.Subject) error
- func BindClusterRoleInNamespace(c bindingsGetter, clusterRole, ns string, subjects ...rbacv1beta1.Subject) error
- func BindRoleInNamespace(c bindingsGetter, role, ns string, subjects ...rbacv1beta1.Subject) error
- func IsRBACEnabled(crGetter v1beta1rbac.ClusterRolesGetter) bool
- func WaitForAuthorizationUpdate(c v1beta1authorization.SubjectAccessReviewsGetter, ...) error
- func WaitForNamedAuthorizationUpdate(c v1beta1authorization.SubjectAccessReviewsGetter, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BindClusterRole ¶
func BindClusterRole(c bindingsGetter, clusterRole, ns string, subjects ...rbacv1beta1.Subject) error
BindClusterRole binds the cluster role at the cluster scope. If RBAC is not enabled, nil is returned with no action.
func BindClusterRoleInNamespace ¶
func BindClusterRoleInNamespace(c bindingsGetter, clusterRole, ns string, subjects ...rbacv1beta1.Subject) error
BindClusterRoleInNamespace binds the cluster role at the namespace scope. If RBAC is not enabled, nil is returned with no action.
func BindRoleInNamespace ¶
func BindRoleInNamespace(c bindingsGetter, role, ns string, subjects ...rbacv1beta1.Subject) error
BindRoleInNamespace binds the role at the namespace scope. If RBAC is not enabled, nil is returned with no action.
func IsRBACEnabled ¶
func IsRBACEnabled(crGetter v1beta1rbac.ClusterRolesGetter) bool
IsRBACEnabled returns true if RBAC is enabled. Otherwise false.
func WaitForAuthorizationUpdate ¶
func WaitForAuthorizationUpdate(c v1beta1authorization.SubjectAccessReviewsGetter, user, namespace, verb string, resource schema.GroupResource, allowed bool) error
WaitForAuthorizationUpdate checks if the given user can perform the named verb and action. If policyCachePollTimeout is reached without the expected condition matching, an error is returned
func WaitForNamedAuthorizationUpdate ¶
func WaitForNamedAuthorizationUpdate(c v1beta1authorization.SubjectAccessReviewsGetter, user, namespace, verb, resourceName string, resource schema.GroupResource, allowed bool) error
WaitForNamedAuthorizationUpdate checks if the given user can perform the named verb and action on the named resource. If policyCachePollTimeout is reached without the expected condition matching, an error is returned
Types ¶
This section is empty.