Skip to content

Commit

Permalink
Generate only controllers set by flag
Browse files Browse the repository at this point in the history
  • Loading branch information
kadel committed Jul 13, 2016
1 parent e74f9f5 commit b346667
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 5 additions & 0 deletions cli/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,11 @@ func ProjectKuberConvert(p *project.Project, c *cli.Context) {
createRC := c.BoolT("replicationcontroller")
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
if len(outFile) != 0 && toStdout {
logrus.Fatalf("Error: --out and --stdout can't be set at the same time")
Expand Down
3 changes: 1 addition & 2 deletions cli/command/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ func ConvertCommand(factory app.ProjectFactory) cli.Command {
Usage: "Specify file name in order to save objects into",
EnvVar: "OUTPUT_FILE",
},
// TODO: validate the flags and make sure only one type is specified
cli.BoolTFlag{
cli.BoolFlag{
Name: "deployment,d",
Usage: "Generate a deployment resource file (default on)",
},
Expand Down

0 comments on commit b346667

Please sign in to comment.