controller-runtime icon indicating copy to clipboard operation
controller-runtime copied to clipboard

controller-runtime/pkg/controller/name.go usedNames is global

Open qJkee opened this issue 1 year ago • 1 comments

Hi. While developing a controllers, i did implement graceful shutdown for controllers and restart them afterwards. But, even the controller manager is being recreated, the usedNames map is not cleaned and there are no mechanism to do so. I'm wondering if this can be improved and maybe tied to controller.Manager

qJkee avatar Oct 21 '24 12:10 qJkee

This PR set the unique naming validation up where this PR added the option to skip the naming validation. It sounds like you can take advantage of this.

troy0820 avatar Oct 21 '24 13:10 troy0820

Yep, thanks for sharing. Not the best option to skip device validation for the whole operator but looks like that's the only option.

qJkee avatar Nov 13 '24 07:11 qJkee