Skip to content

Commit d6616b6

Browse files
add Schema Reconciler attr in the tutorial, design ddoc and plugins scaffold
1 parent 1705128 commit d6616b6

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

docs/book/src/cronjob-tutorial/testdata/emptycontroller.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ package controllers
2323

2424
import (
2525
"context"
26+
"k8s.io/apimachinery/pkg/runtime"
2627

2728
"github.com/go-logr/logr"
2829
ctrl "sigs.k8s.io/controller-runtime"
@@ -41,6 +42,7 @@ objects, so these are added out of the box.
4142
type CronJobReconciler struct {
4243
client.Client
4344
Log logr.Logger
45+
Scheme *runtime.Scheme
4446
}
4547

4648
/*

plugins/addon/controller.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ import (
4242
"sigs.k8s.io/kubebuilder-declarative-pattern/pkg/patterns/declarative"
4343
4444
"github.com/go-logr/logr"
45+
"k8s.io/apimachinery/pkg/runtime"
4546
ctrl "sigs.k8s.io/controller-runtime"
4647
"sigs.k8s.io/controller-runtime/pkg/client"
4748
@@ -54,6 +55,7 @@ var _ reconcile.Reconciler = &{{ .Resource.Kind }}Reconciler{}
5455
type {{ .Resource.Kind }}Reconciler struct {
5556
client.Client
5657
Log logr.Logger
58+
Scheme *runtime.Scheme
5759
5860
declarative.Reconciler
5961
}

0 commit comments

Comments
 (0)