Skip to content

Commit 971cf03

Browse files
authored
Merge pull request #1162 from camilamacedo86/schema
Add Schema Reconciler attr in the tutorial and plugins scaffold impl
2 parents c60a53a + d6616b6 commit 971cf03

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)