controllers

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KeycloakRequeueDelay      = 150 * time.Second
	KeycloakRequeueDelayError = 60 * time.Second
	KeycloakControllerName    = "keycloak-controller"
)
View Source
const (
	ClientFinalizer         = "client.cleanup"
	ClientRequeueDelayError = 60 * time.Second
	ClientControllerName    = "keycloakclient-controller"
)
View Source
const (
	RealmFinalizer         = "realm.cleanup"
	RealmRequeueDelayError = 60 * time.Second
	RealmControllerName    = "controller_keycloakrealm"
)

Variables

This section is empty.

Functions

func GetUserClientRolesDesiredState

func GetUserClientRolesDesiredState(state *common.UserState, clientRoles map[string][]string, realmName string) []common.ClusterAction

func GetUserRealmRolesDesiredState

func GetUserRealmRolesDesiredState(state *common.UserState, realmRoles []string, realmName string) []common.ClusterAction

func NewKeycloakReconciler

func NewKeycloakReconciler(mgr manager.Manager) reconcile.Reconciler

newReconciler returns a new reconcile.Reconciler

func SyncRolesForClient

func SyncRolesForClient(state *common.UserState, clientID string, clientRoles map[string][]string, realmName string) []common.ClusterAction

Types

type ClientReconciler

type ClientReconciler interface {
	Reconcile(cr *kc.KeycloakClient) error
}

type DedicatedKeycloakClientReconciler

type DedicatedKeycloakClientReconciler struct {
	Keycloak kc.Keycloak
}

func NewDedicatedKeycloakClientReconciler

func NewDedicatedKeycloakClientReconciler(keycloak kc.Keycloak) *DedicatedKeycloakClientReconciler

func (*DedicatedKeycloakClientReconciler) ReconcileClientScopes

func (i *DedicatedKeycloakClientReconciler) ReconcileClientScopes(state *common.ClientState, cr *kc.KeycloakClient, desired *common.DesiredClusterState)

func (*DedicatedKeycloakClientReconciler) ReconcileDefaultClientRoles

func (i *DedicatedKeycloakClientReconciler) ReconcileDefaultClientRoles(state *common.ClientState, cr *kc.KeycloakClient, desired *common.DesiredClusterState)

ReconcileDefaultClientRoles see KEYCLOAK-19086

func (*DedicatedKeycloakClientReconciler) ReconcileIt

func (*DedicatedKeycloakClientReconciler) ReconcileRoles

func (*DedicatedKeycloakClientReconciler) ReconcileScopeMappings

func (i *DedicatedKeycloakClientReconciler) ReconcileScopeMappings(state *common.ClientState, cr *kc.KeycloakClient, desired *common.DesiredClusterState)

func (*DedicatedKeycloakClientReconciler) ReconcileServiceAccountRoles

func (i *DedicatedKeycloakClientReconciler) ReconcileServiceAccountRoles(state *common.ClientState, cr *kc.KeycloakClient, desired *common.DesiredClusterState)

type DedicatedKeycloakRealmReconciler

type DedicatedKeycloakRealmReconciler struct {
	Keycloak kc.Keycloak
}

func NewDedicatedKeycloakRealmReconciler

func NewDedicatedKeycloakRealmReconciler(keycloak kc.Keycloak) *DedicatedKeycloakRealmReconciler

func (*DedicatedKeycloakRealmReconciler) Reconcile

func (*DedicatedKeycloakRealmReconciler) ReconcileRealmCreate

func (*DedicatedKeycloakRealmReconciler) ReconcileRealmDelete

type KeycloakClientReconciler

type KeycloakClientReconciler struct {
	Client client.Client
	Scheme *runtime.Scheme
	// contains filtered or unexported fields
}

KeycloakClientReconciler reconciles a KeycloakClient object

func (*KeycloakClientReconciler) ManageError

func (r *KeycloakClientReconciler) ManageError(kcc *kc.KeycloakClient, issue error) (reconcile.Result, error)

func (*KeycloakClientReconciler) Reconcile

func (r *KeycloakClientReconciler) Reconcile(ctx context.Context, request ctrl.Request) (ctrl.Result, error)

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the KeycloakClient object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.12.2/pkg/reconcile

func (*KeycloakClientReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type KeycloakRealmReconciler

type KeycloakRealmReconciler struct {
	Client client.Client
	Scheme *runtime.Scheme
	// contains filtered or unexported fields
}

KeycloakRealmReconciler reconciles a KeycloakRealm object

func (*KeycloakRealmReconciler) ManageError

func (r *KeycloakRealmReconciler) ManageError(realm *kc.KeycloakRealm, issue error) (reconcile.Result, error)

func (*KeycloakRealmReconciler) Reconcile

func (r *KeycloakRealmReconciler) Reconcile(ctx context.Context, request ctrl.Request) (ctrl.Result, error)

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the KeycloakRealm object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.12.2/pkg/reconcile

func (*KeycloakRealmReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type KeycloakReconciler

type KeycloakReconciler struct {
	// This client, initialized using mgr.Client() above, is a split client
	// that reads objects from the cache and writes to the apiserver
	Client client.Client
	Scheme *runtime.Scheme
	// contains filtered or unexported fields
}

KeycloakReconciler reconciles a Keycloak object

func (*KeycloakReconciler) GetKeycloakAdminSecretDesiredState

func (i *KeycloakReconciler) GetKeycloakAdminSecretDesiredState(clusterState *common.ClusterState, cr *keycloakv1alpha1.Keycloak) common.ClusterAction

func (*KeycloakReconciler) ManageError

func (r *KeycloakReconciler) ManageError(instance *keycloakv1alpha1.Keycloak, issue error) (reconcile.Result, error)

func (*KeycloakReconciler) ManageSuccess

func (r *KeycloakReconciler) ManageSuccess(instance *keycloakv1alpha1.Keycloak, currentState *common.ClusterState) (reconcile.Result, error)

func (*KeycloakReconciler) Reconcile

func (r *KeycloakReconciler) Reconcile(ctx context.Context, request reconcile.Request) (reconcile.Result, error)

func (*KeycloakReconciler) ReconcileIt

func (*KeycloakReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type RealmReconciler

type RealmReconciler interface {
	Reconcile(cr *kc.KeycloakRealm) error
}

type Reconciler

type Reconciler interface {
	Reconcile(clusterState *common.ClusterState, cr *keycloakv1alpha1.Keycloak) (common.DesiredClusterState, error)
}

Jump to

Keyboard shortcuts

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