diff --git a/upup/tools/generators/fitask/generator.go b/upup/tools/generators/fitask/generator.go index cf6e57d51a..7eb65296ff 100644 --- a/upup/tools/generators/fitask/generator.go +++ b/upup/tools/generators/fitask/generator.go @@ -30,7 +30,7 @@ type FitaskGenerator struct { var _ codegen.Generator = &FitaskGenerator{} const fileHeaderDef = `/* -Copyright 2016 The Kubernetes Authors. +Copyright 2018 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -86,6 +86,11 @@ func (o *{{.Name}}) GetLifecycle() *fi.Lifecycle { return o.Lifecycle } +// SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle +func (o *{{.Name}}) SetLifecycle(lifecycle fi.Lifecycle) { + o.Lifecycle = &lifecycle +} + var _ fi.HasName = &{{.Name}}{} // GetName returns the Name of the object, implementing fi.HasName