Skip to content

Commit

Permalink
Add comment
Browse files Browse the repository at this point in the history
Signed-off-by: Yuan Tang <[email protected]>
  • Loading branch information
terrytangyuan committed Jul 14, 2021
1 parent 5acb471 commit 95cdcb3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/argo/commands/cron/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ func CreateCronWorkflows(filePaths []string, cliOpts *cliCreateOpts, submitOpts
log.Fatal(err)
}
cronWf.Spec.WorkflowSpec = newWf.Spec
// We have only copied the workflow spec to the cron workflow but not the metadata
// that includes name and generateName. Here we copy the metadata to the cron
// workflow's metadata and remove the unnecessary and mutually exclusive part.
if generateName := newWf.ObjectMeta.GenerateName; generateName != "" {
cronWf.ObjectMeta.GenerateName = generateName
cronWf.ObjectMeta.Name = ""
Expand Down

0 comments on commit 95cdcb3

Please sign in to comment.