controller

package
v0.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 15, 2025 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GroupReconciler

type GroupReconciler struct {
	client.Client
	Scheme    *runtime.Scheme
	AppConfig *config.AppConfig
	Store     *store.Store

	LdapConn ldap.LDAPClient

	// CacheMutex prevents concurrent access to the cache during group reconciliation.
	// This shared mutex ensures that the group controller and user offboarding job don't interfere
	// with each other when reading or modifying user/team data in Redis.
	// This mutex is shared across components and passed from main.go.
	CacheMutex *sync.RWMutex
	// contains filtered or unexported fields
}

GroupReconciler reconciles a Group object

func (*GroupReconciler) Reconcile

func (r *GroupReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

func (*GroupReconciler) SetupWithManager

func (r *GroupReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type LDAPFetchResult added in v0.3.0

type LDAPFetchResult struct {
	CurrentMembers []string // emails of users with valid LDAP data
	ActiveUserList []string // UIDs of active users
}

LDAPFetchResult contains the results of LDAP data fetching

type PeriodicTasksReconciler added in v0.2.0

type PeriodicTasksReconciler struct {
	client.Client
	// contains filtered or unexported fields
}

func NewPeriodicTasksReconciler added in v0.2.0

func NewPeriodicTasksReconciler(
	k8sClient client.Client,
	sharedCacheMutex *sync.RWMutex,
	cacheClient cache.Cache,
	dataStore *store.Store,
	ldapClient ldap.LDAPClient,
	backendClients map[string]clients.Client,
) (*PeriodicTasksReconciler, error)

func (*PeriodicTasksReconciler) AddToManager added in v0.2.0

func (ptr *PeriodicTasksReconciler) AddToManager(mgr manager.Manager) error

AddToManager will add the reconciler for the configured obj to a manager.

func (*PeriodicTasksReconciler) Start added in v0.2.0

func (ptr *PeriodicTasksReconciler) Start(ctx context.Context) error

Start the periodic tasks controller not event triggered like a conventional controller does not watch any kuberntes resources this is the platform through with periodic jobs get passed to controller manager

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
Package periodicjobs provides scheduled background jobs for the usernaut controller.
Package periodicjobs provides scheduled background jobs for the usernaut controller.
mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL