@@ -119,7 +119,7 @@ func (lrm *LockedResourceManager) IsStarted() bool {
119119}
120120
121121// Start starts the LockedResourceManager
122- func (lrm * LockedResourceManager ) Start (config * rest.Config ) error {
122+ func (lrm * LockedResourceManager ) Start (ctx context. Context , config * rest.Config ) error {
123123 if lrm .stoppableManager != nil && lrm .stoppableManager .IsStarted () {
124124 return nil
125125 }
@@ -165,7 +165,7 @@ func (lrm *LockedResourceManager) Start(config *rest.Config) error {
165165 }
166166 lrm .patchReconcilers = patchReconcilers
167167
168- lrm .stoppableManager .Start ()
168+ lrm .stoppableManager .Start (ctx )
169169 return nil
170170}
171171
@@ -210,7 +210,8 @@ func (lrm *LockedResourceManager) scanNamespaces() []string {
210210
211211// Restart restarts the manager with a different set of resources
212212// if deleteResources is set, resources that were enforced are deleted.
213- func (lrm * LockedResourceManager ) Restart (resources []lockedresource.LockedResource , patches []lockedpatch.LockedPatch , deleteResources bool , config * rest.Config ) error {
213+ func (lrm * LockedResourceManager ) Restart (ctx context.Context , resources []lockedresource.LockedResource ,
214+ patches []lockedpatch.LockedPatch , deleteResources bool , config * rest.Config ) error {
214215 if lrm .IsStarted () {
215216 err := lrm .Stop (deleteResources )
216217 if err != nil {
@@ -228,7 +229,7 @@ func (lrm *LockedResourceManager) Restart(resources []lockedresource.LockedResou
228229 lrm .log .Error (err , "unable to set" , "patches" , patches )
229230 return err
230231 }
231- return lrm .Start (config )
232+ return lrm .Start (ctx , config )
232233}
233234
234235// IsSameResources checks whether the currently enforced resources are the same as the ones passed as parameters
0 commit comments