Added TerminateCronWorkflow endpoint.

- Also updated CronWorkflow message to include the name of the cron workflow.
- Updated related function that parses and sets the struct values, to include the name attribute
This commit is contained in:
Aleksandr Melnikov
2020-03-29 22:16:33 -07:00
parent 2ada65e87a
commit 8b4d93af4b
5 changed files with 312 additions and 61 deletions

View File

@@ -203,6 +203,11 @@ func (c *Client) createCronWorkflow(namespace string, cwf *wfv1.CronWorkflow, op
return
}
func (c *Client) TerminateCronWorkflow(namespace, name string) (err error) {
err = c.ArgoprojV1alpha1().CronWorkflows(namespace).Delete(name, nil)
return
}
func unmarshalCronWorkflows(cwfBytes []byte, strict bool) (cwfs wfv1.CronWorkflow, err error) {
var cwf wfv1.CronWorkflow
var jsonOpts []argojson.JSONOpt