controllers

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2022 License: BSD-3-Clause Imports: 16 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, groupName string) error
	ListGroups(ctx context.Context) ([]keycloak.Group, 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

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

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.

func (*OrganizationReconciler) Sync

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳