-
Notifications
You must be signed in to change notification settings - Fork 339
Closed
Labels
area/APIkind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.kind/feature
Description
/area API
/kind bug
/kind feature
There is a bug today with // +genreconciler-based reconcilers that using finalizers and are class-based. Essentially we have no way to keep the wrong class' reconciler from adding finalizers to resources they shouldn't handle or (worse!) removing them from resources they shouldn't handle.
We know in general which resources we define are going to be class-based, so my recommendation here would be to adopt the following solution.
// This is a normal type
// +genreconciler
...
// This is a class-based type
// +genreconciler:class=networking.knative.dev/ingress.class
...
The idea here is that we would tell the codegen infrastructure the name of the class annotation. This would then influence the code-generator to add an additional argument to the appropriate constructors:
// Normal +genreconciler
fooreconciler.NewImpl(ctx, c)
// One with a class.
barreconciler.NewImpl(ctx, c, "my.class.value")
lionelvillard
Metadata
Metadata
Assignees
Labels
area/APIkind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.kind/feature