commands/operator-sdk: implement generate k8s#78
commands/operator-sdk: implement generate k8s#78fanminshi merged 2 commits intooperator-framework:masterfrom fanminshi:impl_generates
Conversation
|
this depends on code-gen tmpl fix #77 to work completely,. |
|
Testing is experiencing some errors: should be fixed by #80 |
|
latest test output: |
|
fixed previous error. |
| o, err := bcmd.CombinedOutput() | ||
| if err != nil { | ||
| ExitWithError(ExitError, fmt.Errorf("failed to build: (%v)", string(o))) | ||
| cmdError.ExitWithError(cmdError.ExitError, fmt.Errorf("failed to build: (%v)", err)) |
There was a problem hiding this comment.
Print stderr:
cmdError.ExitWithError(cmdError.ExitError, fmt.Errorf("failed to build: (%v)", string(o)))
And in all other places that use o, err := bcmd.CombinedOutput()
| "os/exec" | ||
|
|
||
| cmdError "github.com/coreos/operator-sdk/commands/error" | ||
| "github.com/spf13/cobra" |
|
all fixed! PLAL cc/ @hasbro17 |
|
Is it necessary to have the error utilities We should move it to |
|
I guess this is about scope of the code. I hope that |
|
take a look of Bad package names under https://blog.golang.org/package-names. |
|
I see, you're right. The errors util is only scoped to command/operator-sdk so it should stay there. |
|
I suspect the error pkg will work with any additional command. e.g |
|
I would go for |
|
sounds good! |
|
all fixed! PTAL cc/ @hasbro17 |
|
LGTM |
this pr implements generate k8s command which do a code-generation for the custom resource.