mirror of
https://github.com/onepanelio/onepanel.git
synced 2025-10-05 13:46:51 +08:00
Merge pull request #585 from aleksandrmelnikov/feat/core.583-workflows.use.pod.anti.affinity
feat: Updated Workflows, and Cron created Workflows, to ensure they get their own pod by using Pod AntiAffinity. This replaces resource limits and/or requests.
This commit is contained in:
@@ -429,11 +429,18 @@ func (c *Client) updateCronWorkflow(namespace string, uid string, workflowTempla
|
||||
}
|
||||
|
||||
func (c *Client) createCronWorkflow(namespace string, workflowTemplateId *uint64, wf *wfv1.Workflow, cwf *wfv1.CronWorkflow, opts *WorkflowExecutionOptions) (createdCronWorkflow *wfv1.CronWorkflow, err error) {
|
||||
systemConfig, err := c.GetSystemConfig()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
wf, err = ensureWorkflowRunsOnDedicatedNode(wf, systemConfig)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
cwf, err = c.buildCronWorkflowDefinition(namespace, workflowTemplateId, wf, cwf, opts)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
createdCronWorkflow, err = c.ArgoprojV1alpha1().CronWorkflows(namespace).Create(cwf)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
Reference in New Issue
Block a user