Documentation ¶
Index ¶
- Constants
- func GetUserClientRolesDesiredState(state *common.UserState, clientRoles map[string][]string, realmName string) []common.ClusterAction
- func GetUserRealmRolesDesiredState(state *common.UserState, realmRoles []string, realmName string) []common.ClusterAction
- func NewKeycloakReconciler(mgr manager.Manager) reconcile.Reconciler
- func SyncRolesForClient(state *common.UserState, clientID string, clientRoles map[string][]string, ...) []common.ClusterAction
- type ClientReconciler
- type DedicatedKeycloakClientReconciler
- func (i *DedicatedKeycloakClientReconciler) ReconcileClientScopes(state *common.ClientState, cr *kc.KeycloakClient, ...)
- func (i *DedicatedKeycloakClientReconciler) ReconcileDefaultClientRoles(state *common.ClientState, cr *kc.KeycloakClient, ...)
- func (i *DedicatedKeycloakClientReconciler) ReconcileIt(state *common.ClientState, cr *kc.KeycloakClient) common.DesiredClusterState
- func (i *DedicatedKeycloakClientReconciler) ReconcileRoles(state *common.ClientState, cr *kc.KeycloakClient, ...)
- func (i *DedicatedKeycloakClientReconciler) ReconcileScopeMappings(state *common.ClientState, cr *kc.KeycloakClient, ...)
- func (i *DedicatedKeycloakClientReconciler) ReconcileServiceAccountRoles(state *common.ClientState, cr *kc.KeycloakClient, ...)
- type DedicatedKeycloakRealmReconciler
- func (i *DedicatedKeycloakRealmReconciler) Reconcile(state *common.RealmState, cr *kc.KeycloakRealm) common.DesiredClusterState
- func (i *DedicatedKeycloakRealmReconciler) ReconcileRealmCreate(state *common.RealmState, cr *kc.KeycloakRealm) common.DesiredClusterState
- func (i *DedicatedKeycloakRealmReconciler) ReconcileRealmDelete(state *common.RealmState, cr *kc.KeycloakRealm) common.DesiredClusterState
- type KeycloakClientReconciler
- type KeycloakRealmReconciler
- type KeycloakReconciler
- func (i *KeycloakReconciler) GetKeycloakAdminSecretDesiredState(clusterState *common.ClusterState, cr *keycloakv1alpha1.Keycloak) common.ClusterAction
- func (r *KeycloakReconciler) ManageError(instance *keycloakv1alpha1.Keycloak, issue error) (reconcile.Result, error)
- func (r *KeycloakReconciler) ManageSuccess(instance *keycloakv1alpha1.Keycloak, currentState *common.ClusterState) (reconcile.Result, error)
- func (r *KeycloakReconciler) Reconcile(ctx context.Context, request reconcile.Request) (reconcile.Result, error)
- func (i *KeycloakReconciler) ReconcileIt(clusterState *common.ClusterState, cr *keycloakv1alpha1.Keycloak) common.DesiredClusterState
- func (r *KeycloakReconciler) SetupWithManager(mgr ctrl.Manager) error
- type RealmReconciler
- type Reconciler
Constants ¶
const ( KeycloakRequeueDelay = 150 * time.Second KeycloakRequeueDelayError = 60 * time.Second KeycloakControllerName = "keycloak-controller" )
const ( ClientFinalizer = "client.cleanup" ClientRequeueDelayError = 60 * time.Second ClientControllerName = "keycloakclient-controller" )
const ( RealmFinalizer = "realm.cleanup" RealmRequeueDelayError = 60 * time.Second RealmControllerName = "controller_keycloakrealm" )
Variables ¶
This section is empty.
Functions ¶
func NewKeycloakReconciler ¶
func NewKeycloakReconciler(mgr manager.Manager) reconcile.Reconciler
newReconciler returns a new reconcile.Reconciler
func SyncRolesForClient ¶
Types ¶
type ClientReconciler ¶
type ClientReconciler interface {
Reconcile(cr *kc.KeycloakClient) error
}
type DedicatedKeycloakClientReconciler ¶
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 (i *DedicatedKeycloakClientReconciler) ReconcileIt(state *common.ClientState, cr *kc.KeycloakClient) common.DesiredClusterState
func (*DedicatedKeycloakClientReconciler) ReconcileRoles ¶
func (i *DedicatedKeycloakClientReconciler) ReconcileRoles(state *common.ClientState, cr *kc.KeycloakClient, desired *common.DesiredClusterState)
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 ¶
func NewDedicatedKeycloakRealmReconciler ¶
func NewDedicatedKeycloakRealmReconciler(keycloak kc.Keycloak) *DedicatedKeycloakRealmReconciler
func (*DedicatedKeycloakRealmReconciler) Reconcile ¶
func (i *DedicatedKeycloakRealmReconciler) Reconcile(state *common.RealmState, cr *kc.KeycloakRealm) common.DesiredClusterState
func (*DedicatedKeycloakRealmReconciler) ReconcileRealmCreate ¶
func (i *DedicatedKeycloakRealmReconciler) ReconcileRealmCreate(state *common.RealmState, cr *kc.KeycloakRealm) common.DesiredClusterState
func (*DedicatedKeycloakRealmReconciler) ReconcileRealmDelete ¶
func (i *DedicatedKeycloakRealmReconciler) ReconcileRealmDelete(state *common.RealmState, cr *kc.KeycloakRealm) common.DesiredClusterState
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) ReconcileIt ¶
func (i *KeycloakReconciler) ReconcileIt(clusterState *common.ClusterState, cr *keycloakv1alpha1.Keycloak) common.DesiredClusterState
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)
}