Skip to content

Commit

Permalink
add schema for CRD controllers
Browse files Browse the repository at this point in the history
  • Loading branch information
camilamacedo86 committed Oct 9, 2019
1 parent c838130 commit c952c6c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkg/scaffold/v2/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ import (
type {{ .Resource.Kind }}Reconciler struct {
client.Client
Log logr.Logger
Scheme *runtime.Scheme
}
// +kubebuilder:rbac:groups={{.GroupDomain}},resources={{ .Plural }},verbs=get;list;watch;create;update;patch;delete
Expand Down
1 change: 1 addition & 0 deletions pkg/scaffold/v2/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ func (m *Main) Update(opts *MainUpdateOptions) error {
reconcilerSetupCodeFragment := fmt.Sprintf(`if err = (&controllers.%sReconciler{
Client: mgr.GetClient(),
Log: ctrl.Log.WithName("controllers").WithName("%s"),
Scheme: mgr.GetScheme(),
}).SetupWithManager(mgr); err != nil {
setupLog.Error(err, "unable to create controller", "controller", "%s")
os.Exit(1)
Expand Down

0 comments on commit c952c6c

Please sign in to comment.