-
Notifications
You must be signed in to change notification settings - Fork 0
/
reconciler.go
31 lines (24 loc) · 1.1 KB
/
reconciler.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package filter
import (
"context"
"knative.dev/pkg/reconciler"
commonv1alpha1 "github.com/zeiss/typhoon/pkg/apis/common/v1alpha1"
"github.com/zeiss/typhoon/pkg/apis/routing/v1alpha1"
reconcilerv1alpha1 "github.com/zeiss/typhoon/pkg/client/generated/injection/reconciler/routing/v1alpha1/filter"
listersv1alpha1 "github.com/zeiss/typhoon/pkg/client/generated/listers/routing/v1alpha1"
common "github.com/zeiss/typhoon/pkg/reconciler"
)
// Reconciler implements addressableservicereconciler.Interface for
// AddressableService resources.
type Reconciler struct {
base common.GenericServiceReconciler[*v1alpha1.Filter, listersv1alpha1.FilterNamespaceLister]
adapterCfg *adapterConfig
}
// Check that our Reconciler implements Interface
var _ reconcilerv1alpha1.Interface = (*Reconciler)(nil)
// ReconcileKind implements Interface.ReconcileKind.
func (r *Reconciler) ReconcileKind(ctx context.Context, o *v1alpha1.Filter) reconciler.Event {
// inject component instance into context for usage in reconciliation logic
ctx = commonv1alpha1.WithReconcilable(ctx, o)
return r.base.ReconcileAdapter(ctx, r)
}