Skip to content

Commit 64161fe

Browse files
authored
Merge pull request #4247 from camilamacedo86/add-comment-to-clatify-alpha-command
🐛 clarify usage of alpha generate command as internal-only
2 parents 83a7738 + 9916697 commit 64161fe

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

pkg/cli/alpha/command.go

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,21 @@ import (
1919
"sigs.k8s.io/kubebuilder/v4/pkg/cli/alpha/internal"
2020
)
2121

22-
// NewScaffoldCommand return a new scaffold command
22+
// NewScaffoldCommand returns a new scaffold command, providing the `kubebuilder alpha generate`
23+
// feature to re-scaffold projects and assist users with updates.
24+
//
25+
// IMPORTANT: This command is intended solely for Kubebuilder's use, as it is designed to work
26+
// specifically within Kubebuilder's project configuration, key mappings, and plugin initialization.
27+
// Its implementation includes fixed values and logic tailored to Kubebuilder’s unique setup, which may
28+
// not apply to other projects. Consequently, importing and using this command directly in other projects
29+
// will likely result in unexpected behavior, as external projects may have different supported plugin
30+
// structures, configurations, and requirements.
31+
//
32+
// For other projects using Kubebuilder as a library, replicating similar functionality would require
33+
// a custom implementation to ensure compatibility with the specific configurations and plugins of that project.
34+
//
35+
// Technically, implementing functions that allow re-scaffolding with the exact plugins and project-specific
36+
// code of external projects is not feasible within Kubebuilder’s current design.
2337
func NewScaffoldCommand() *cobra.Command {
2438
opts := internal.Generate{}
2539
scaffoldCmd := &cobra.Command{

0 commit comments

Comments
 (0)