Skip to content

Commit

Permalink
Merge pull request #352 from terinjokes/patches/builder-deprecation-n…
Browse files Browse the repository at this point in the history
…otices

📖 improve builder deprecation messages
  • Loading branch information
k8s-ci-robot authored Mar 9, 2019
2 parents 06eceeb + cd52b04 commit 1dafd94
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/builder/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ type Builder struct {
}

// SimpleController returns a new Builder.
//
// Deprecated: Use ControllerManagedBy(Manager) instead.
func SimpleController() *Builder {
return &Builder{}
Expand All @@ -64,6 +65,7 @@ func ControllerManagedBy(m manager.Manager) *Builder {
// update events by *reconciling the object*.
// This is the equivalent of calling
// Watches(&source.Kind{Type: apiType}, &handler.EnqueueRequestForObject{})
//
// Deprecated: Use For
func (blder *Builder) ForType(apiType runtime.Object) *Builder {
return blder.For(apiType)
Expand Down Expand Up @@ -99,13 +101,15 @@ func (blder *Builder) Watches(src source.Source, eventhandler handler.EventHandl
}

// WithConfig sets the Config to use for configuring clients. Defaults to the in-cluster config or to ~/.kube/config.
//
// Deprecated: Use ControllerManagedBy(Manager) and this isn't needed.
func (blder *Builder) WithConfig(config *rest.Config) *Builder {
blder.config = config
return blder
}

// WithManager sets the Manager to use for registering the ControllerManagedBy. Defaults to a new manager.Manager.
//
// Deprecated: Use ControllerManagedBy(Manager) and this isn't needed.
func (blder *Builder) WithManager(m manager.Manager) *Builder {
blder.mgr = m
Expand All @@ -127,6 +131,7 @@ func (blder *Builder) Complete(r reconcile.Reconciler) error {
}

// Build builds the Application ControllerManagedBy and returns the Manager used to start it.
//
// Deprecated: Use Complete
func (blder *Builder) Build(r reconcile.Reconciler) (manager.Manager, error) {
if r == nil {
Expand Down

0 comments on commit 1dafd94

Please sign in to comment.