operator-framework / operator-framework/java-operator-sdk

Simple core and layered reconciler implementation for v6

Ouverte
#3,563 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Langage dominant
Java
Étoiles
944
Forks
242
Merge moyen
1 j 4 h
PR mergées (30 j)
43

Description

TL;DR We could make the core of the framework simpler by introducing a more layered architecture. While keeping the migration for the users trivial.

Problem definition

Currently the core of a framework has baked logic to work with higher level logic like:

  • Adding finalizers by implementing Cleaner interface
  • Managed workflows inside the controller
  • Automatic generation filtering
  • Catching error and error handling, thus updateErrorStatus method.

We recently added a generic mode Trigger reconciliation on all events

While it makes a nice API for the users, an maybe even nice out of the box experience, makes the core of the framework more complex - and even for users I assume hard to follow, if some wants to read the code.

What we could do in next major version is to layer those functionalities:

  1. The core will just work on top of a simplified Reconciler interface. What will handle basically be the all event mode. So we won't support finalizers, UpdateControl.patch methods ,and most of the functionality of ReconciliationDispatcher would be moved to an abstract Reconciler implementation: GenericReconciler.
  2. Retry, Rate limiting would stay as it is now
  3. The managed workflow handling would an additional extension of GenericReconciler: WorkflowReconciler. That will handle the managed workflow discovery, their configuration etc.

Migration

Note that migration for the users could be kept trivial, basically just extending the GenericReconciler / WorkflowReconciler (Where we could support the UpdateControl etc as is now) instead of implementing Reconciler.

Pros

  • The core would be much simpler
  • The logic around these extended reconcilers much easier to be followed by the users (from source code)

Cons

  • This does not provide direct value for users, other than easier to handle

Notes

  • before we make a decision, we should explore this first in a proptotype
  • TODO: proper design description

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Piste de recherche

Lisez les responsabilités actuelles de Reconciler et ReconciliationDispatcher, y compris updateErrorStatus, puis prototypez les couches proposées GenericReconciler et WorkflowReconciler. Le travail est considéré comme terminé lorsqu’un prototype fonctionnel et une description de conception appropriée sont disponibles, expliquant la séparation centrale et rendant la migration triviale pour les utilisateurs existants.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
java, kubernetes
Domaine
backend-api-design
Type d'issue
Refactorisation
Difficulté
5/5
Temps estimé
Plus d'une semaine
Activité
Calme
Clarté
À clarifier
Accessibilité débutants
25/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.