Documentation
¶
Index ¶
- func Compose(rbName string, namespace string, subjects []rbacv1.Subject, ref rbacv1.RoleRef) *rbacv1.RoleBinding
- func Create(nsObject *objectcontext.ObjectContext, roleBinding rbacv1.RoleBinding) error
- func CreateHNSView(nsObject *objectcontext.ObjectContext) error
- func HNSViewName(nsName string) string
- func IsHNSRelated(roleBinding client.Object) bool
- func IsRoleBinding(object client.Object) bool
- func IsServiceAccount(roleBinding client.Object) bool
- func IsSubjectInSubjects(subjects []rbacv1.Subject, subjectToFind rbacv1.Subject) bool
- func NamespaceHNSView(nsObject *objectcontext.ObjectContext) (*objectcontext.ObjectContext, *objectcontext.ObjectContext, error)
- func NamespaceHNSViewCRB(rbObject *objectcontext.ObjectContext) (*objectcontext.ObjectContext, error)
- func RoleRef(roleBinding client.Object) rbacv1.RoleRef
- func Subjects(roleBinding client.Object) []rbacv1.Subject
- func UpdateNamespaceHNSViewCRBSubjects(hnsViewClusterRoleBinding *objectcontext.ObjectContext, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Compose ¶
func Compose(rbName string, namespace string, subjects []rbacv1.Subject, ref rbacv1.RoleRef) *rbacv1.RoleBinding
Compose returns a RoleBinding object based on the given parameters.
func Create ¶
func Create(nsObject *objectcontext.ObjectContext, roleBinding rbacv1.RoleBinding) error
Create takes care of creating a RoleBinding object in a namespace from an existing roleBinding.
func CreateHNSView ¶
func CreateHNSView(nsObject *objectcontext.ObjectContext) error
CreateHNSView creates the cluster role and cluster role binding HNS objects associated with the namespace.
func HNSViewName ¶
HNSViewName returns the name of the HNS view role associated with a namespace.
func IsHNSRelated ¶
IsHNSRelated checks if a RoleBinding object is valid.
func IsRoleBinding ¶
IsRoleBinding returns true if an object is of type RoleBinding.
func IsServiceAccount ¶
IsServiceAccount returns true if a subject in a RoleBinding is a ServiceAccount and false otherwise.
func IsSubjectInSubjects ¶
IsSubjectInSubjects returns whether a subject is in a slice of subjects.
func NamespaceHNSView ¶
func NamespaceHNSView(nsObject *objectcontext.ObjectContext) (*objectcontext.ObjectContext, *objectcontext.ObjectContext, error)
NamespaceHNSView returns the cluster role and cluster role binding HNS objects associated with the namespace.
func NamespaceHNSViewCRB ¶
func NamespaceHNSViewCRB(rbObject *objectcontext.ObjectContext) (*objectcontext.ObjectContext, error)
NamespaceHNSViewCRB returns the HNS View ClusterRoleBinding associated with a namespace.
func UpdateNamespaceHNSViewCRBSubjects ¶
func UpdateNamespaceHNSViewCRBSubjects(hnsViewClusterRoleBinding *objectcontext.ObjectContext, subjects []rbacv1.Subject) error
UpdateNamespaceHNSViewCRBSubjects updates the subjects of a ClusterRoleBinding.
Types ¶
This section is empty.