Documentation ¶
Index ¶
- Constants
- func NewCachedDirectory(logger logr.Logger, directory Directory, ttl time.Duration) *cachedDirectory
- func NewFakeDirectory(groups map[string][]string) *fakeDirectory
- func NewGoogleDirectory(service *directoryv1.MembersService) *googleDirectory
- type Directory
- type DirectoryProvider
- type DirectoryRoleBindingReconciler
Constants ¶
View Source
const ( EventRoleBindingCreated = "Created" EventError = "Error" EventSubjectAdd = "SubjectAdd" EventSubjectRemove = "SubjectRemove" EventSubjectsModified = "SubjectsModified" )
View Source
const ( // GooglePerPage states how many members we retrive in each pagination call when talking // to the Google directory service GooglePerPage = 200 // GoogleMaxPages limits the number of pages we iterate through when talking to the // Google directory service. In combination with the GooglePerPage constant, this // effectively limits the size of the group we can process. GoogleMaxPages = 10 )
Variables ¶
This section is empty.
Functions ¶
func NewCachedDirectory ¶
func NewCachedDirectory(logger logr.Logger, directory Directory, ttl time.Duration) *cachedDirectory
NewCachedDirectory wraps the given directory so that we cache member lists for the given TTL. This is useful when we want to reason about the maximum number of calls to a directory API our controllers might make, which helps us avoid API rate limits.
func NewFakeDirectory ¶
NewFakeDirectory provides the directory service from a map of members
func NewGoogleDirectory ¶
func NewGoogleDirectory(service *directoryv1.MembersService) *googleDirectory
NewGoogleDirectory wraps a Google admin directory service to match our interface
Types ¶
type DirectoryProvider ¶
DirectoryProvider understands what directory service to use for different subject kinds
func (DirectoryProvider) Get ¶
func (p DirectoryProvider) Get(kind string) Directory
func (DirectoryProvider) Register ¶
func (p DirectoryProvider) Register(kind string, directory Directory)
type DirectoryRoleBindingReconciler ¶
type DirectoryRoleBindingReconciler struct { client.Client Ctx context.Context Log logr.Logger Provider DirectoryProvider RefreshInterval time.Duration Scheme *runtime.Scheme }
DirectoryRoleBindingReconciler reconciles a DirectoryRoleBinding object
func (*DirectoryRoleBindingReconciler) ReconcileObject ¶
func (r *DirectoryRoleBindingReconciler) ReconcileObject(logger logr.Logger, req ctrl.Request, drb *rbacv1alpha1.DirectoryRoleBinding) (ctrl.Result, error)
func (*DirectoryRoleBindingReconciler) SetupWithManager ¶
func (r *DirectoryRoleBindingReconciler) SetupWithManager(mgr manager.Manager) error
Click to show internal directories.
Click to hide internal directories.