Skip to content

What is the job of // +kubebuilder:scaffold:imports? #3791

Closed Answered by camilamacedo86
mateusoliveira43 asked this question in Support
Discussion options

You must be logged in to vote

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…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by mateusoliveira43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Support
Labels
None yet
2 participants