Skip to content

Commit

Permalink
Merge pull request #13 from mhenriks/perishable-api-change
Browse files Browse the repository at this point in the history
change signature of perishables callback to include the CR and logger
  • Loading branch information
Jakub Dzon authored Dec 16, 2020
2 parents d6d15f4 + 5f91c31 commit 30accfa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/sdk/reconciler/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,6 @@ func updateControllerConfiguration(_ controllerutil.Object) error {
return nil
}

func syncPerishables() error {
func syncPerishables(cr controllerutil.Object, logger logr.Logger) error {
return nil
}
4 changes: 2 additions & 2 deletions pkg/sdk/reconciler/reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const (
)

// PerishablesSynchronizer is expected to execute perishable resources (i.e. certificates) synchronization if required
type PerishablesSynchronizer func() error
type PerishablesSynchronizer func(cr controllerutil.Object, logger logr.Logger) error

// ControllerConfigUpdater is expected to update controller configuration if required
type ControllerConfigUpdater func(cr controllerutil.Object) error
Expand Down Expand Up @@ -322,7 +322,7 @@ func (r *Reconciler) ReconcileUpdate(logger logr.Logger, cr controllerutil.Objec
}
}

if err = r.syncPerishables(); err != nil {
if err = r.syncPerishables(cr, logger); err != nil {
return reconcile.Result{}, err
}

Expand Down

0 comments on commit 30accfa

Please sign in to comment.