Exit if not a Go project#672
Conversation
|
/hold I want to discuss how someone might transition from ansible operator to hybrid before we consider this a bug and fix it with this PR. I am not opposed to this, if we have a better transition story I just don't want to box us in right away. |
|
@shawn-hurley is a hybrid project currently possible, given how we generate and make assumptions about project scaffolds? |
|
@estroz It's probably not possible right now given that users have no way of scaffolding the We can probably tolerate this until then since these commands won't cause any issues other than spitting out extraneous files if the user does end up running them in an ansible or helm project's context. Let's follow up the discussion for the transition story on #670 until then. |
|
/hold cancel |
commands/operator-sdk/{add,generate}: exit if not a Go project for
'add {api,controller}', 'generate k8s' sub-commands
Description of the change: add
MustGoProjectfunction to exit if the current operator project is not a Go project.Motivation for the change: see #670