controllers

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: BSD-3-Clause Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KeycloakClient

type KeycloakClient interface {
	PutGroup(ctx context.Context, group keycloak.Group) (keycloak.Group, error)
	DeleteGroup(ctx context.Context, path ...string) error
	ListGroups(ctx context.Context) ([]keycloak.Group, error)

	PutUser(ctx context.Context, user keycloak.User) (keycloak.User, error)
}

KeycloakClient is an abstraction to interact with the Keycloak API

type OrganizationReconciler

type OrganizationReconciler struct {
	client.Client
	Recorder record.EventRecorder
	Scheme   *runtime.Scheme

	Keycloak KeycloakClient
}

OrganizationReconciler reconciles a Organization object

func (*OrganizationReconciler) Reconcile

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

Reconcile reacts on changes of Organizations and OrganizationMembers and mirrors these changes to groups in Keycloak

func (*OrganizationReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type PeriodicSyncer added in v0.2.0

type PeriodicSyncer struct {
	client.Client
	Recorder record.EventRecorder

	Keycloak KeycloakClient

	// SyncClusterRoles to give to group members when importing
	SyncClusterRoles           []string
	SyncClusterRolesUserPrefix string
}

PeriodicSyncer reconciles a Organization object

func (*PeriodicSyncer) Sync added in v0.2.0

func (r *PeriodicSyncer) Sync(ctx context.Context) error

Sync lists all Keycloak groups in the realm and creates corresponding Organizations if they do not exist

type TeamReconciler added in v0.2.0

type TeamReconciler struct {
	client.Client
	Recorder record.EventRecorder
	Scheme   *runtime.Scheme

	Keycloak KeycloakClient
}

TeamReconciler reconciles a Team object

func (*TeamReconciler) Reconcile added in v0.2.0

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

Reconcile reacts on changes of teams and mirrors these changes to groups in Keycloak

func (*TeamReconciler) SetupWithManager added in v0.2.0

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

SetupWithManager sets up the controller with the Manager.

type UserReconciler added in v0.5.0

type UserReconciler struct {
	client.Client
	Recorder record.EventRecorder
	Scheme   *runtime.Scheme

	Keycloak KeycloakClient
}

UserReconciler reconciles a User object

func (*UserReconciler) Reconcile added in v0.5.0

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

Reconcile reacts on changes of users and mirrors these changes to Keycloak

func (*UserReconciler) SetupWithManager added in v0.5.0

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

SetupWithManager sets up the controller with the Manager.

Jump to

Keyboard shortcuts

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