Skip to content

First-class support for class-based reconcilers. #1098

@mattmoor

Description

@mattmoor

/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")

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions