What is the job of // +kubebuilder:scaffold:imports
?
#3791
-
Would like to know if I can remove |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The line Therefore, if you do not anticipate needing to automatically add new resources or controllers that would require additional imports, you can remove it. However, if you are looking to maintain the automated scaffolding features of Kubebuilder, it's best to leave these markers in place. Hope this helps! |
Beta Was this translation helpful? Give feedback.
Hi @mateusoliveira43,
The line
// +kubebuilder:scaffold:imports
in your imports section is used by Kubebuilder's scaffolding tools to know where to add new imports when regenerating code (example) or adding new features through its CLI. If you remove this line, Kubebuilder won't automatically manage or insert new import statements in that area anymore. This might won't break your existing code, but it may affect the future scaffolding processes if you plan to use Kubebuilder to add more components to your project.Therefore, if you do not anticipate needing to automatically add new resources or controllers that would require additional imports, you can remove it. However, if you are looki…