forked from LaconicNetwork/kompose
Merge pull request #35 from kadel/only-specified-objects
Generate only controllers set by flag
This commit is contained in:
commit
e5af4ed2a8
@ -566,6 +566,11 @@ func ProjectKuberConvert(p *project.Project, c *cli.Context) {
|
|||||||
createRC := c.BoolT("replicationcontroller")
|
createRC := c.BoolT("replicationcontroller")
|
||||||
singleOutput := len(outFile) != 0 || toStdout
|
singleOutput := len(outFile) != 0 || toStdout
|
||||||
|
|
||||||
|
// Create Deployment by default if no controller has be set
|
||||||
|
if !createD && !createDS && !createRS && !createRC {
|
||||||
|
createD = true
|
||||||
|
}
|
||||||
|
|
||||||
// Validate the flags
|
// Validate the flags
|
||||||
if len(outFile) != 0 && toStdout {
|
if len(outFile) != 0 && toStdout {
|
||||||
logrus.Fatalf("Error: --out and --stdout can't be set at the same time")
|
logrus.Fatalf("Error: --out and --stdout can't be set at the same time")
|
||||||
|
|||||||
@ -40,8 +40,7 @@ func ConvertCommand(factory app.ProjectFactory) cli.Command {
|
|||||||
Usage: "Specify file name in order to save objects into",
|
Usage: "Specify file name in order to save objects into",
|
||||||
EnvVar: "OUTPUT_FILE",
|
EnvVar: "OUTPUT_FILE",
|
||||||
},
|
},
|
||||||
// TODO: validate the flags and make sure only one type is specified
|
cli.BoolFlag{
|
||||||
cli.BoolTFlag{
|
|
||||||
Name: "deployment,d",
|
Name: "deployment,d",
|
||||||
Usage: "Generate a deployment resource file (default on)",
|
Usage: "Generate a deployment resource file (default on)",
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user