mirror of
https://github.com/onepanelio/onepanel.git
synced 2025-10-29 07:52:29 +08:00
Added code to pass identifying Workflow labels.
- CronWorkflow will pass these labels into any Workflow Executions that are created. - This means those Workflows will show up under the correct Workflow Template page. Fixed some code related to argo update.
This commit is contained in:
@@ -407,6 +407,7 @@ func (c *Client) createCronWorkflow(namespace string, workflowTemplateUid string
|
|||||||
// return nil, err
|
// return nil, err
|
||||||
//}
|
//}
|
||||||
|
|
||||||
|
cwf.Spec.WorkflowMetadata = &metav1.ObjectMeta{Labels: *opts.Labels}
|
||||||
createdCronWorkflow, err = c.ArgoprojV1alpha1().CronWorkflows(namespace).Create(cwf)
|
createdCronWorkflow, err = c.ArgoprojV1alpha1().CronWorkflows(namespace).Create(cwf)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|||||||
@@ -256,7 +256,7 @@ func (c *Client) ValidateWorkflowExecution(namespace string, manifest []byte) (e
|
|||||||
wftmplGetter := templateresolution.WrapWorkflowTemplateInterface(c.ArgoprojV1alpha1().WorkflowTemplates(namespace))
|
wftmplGetter := templateresolution.WrapWorkflowTemplateInterface(c.ArgoprojV1alpha1().WorkflowTemplates(namespace))
|
||||||
for _, wf := range workflows {
|
for _, wf := range workflows {
|
||||||
c.injectAutomatedFields(namespace, &wf, &WorkflowExecutionOptions{})
|
c.injectAutomatedFields(namespace, &wf, &WorkflowExecutionOptions{})
|
||||||
err = validate.ValidateWorkflow(wftmplGetter, &wf, validate.ValidateOpts{})
|
_, err = validate.ValidateWorkflow(wftmplGetter, &wf, validate.ValidateOpts{})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -726,7 +726,7 @@ func (c *Client) ResubmitWorkflowExecution(namespace, name string) (workflow *Wo
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (c *Client) ResumeWorkflowExecution(namespace, name string) (workflow *WorkflowExecution, err error) {
|
func (c *Client) ResumeWorkflowExecution(namespace, name string) (workflow *WorkflowExecution, err error) {
|
||||||
err = argoutil.ResumeWorkflow(c.ArgoprojV1alpha1().Workflows(namespace), name)
|
err = argoutil.ResumeWorkflow(c.ArgoprojV1alpha1().Workflows(namespace), name, "")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user