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:
Rush Tehrani
2020-09-21 16:20:13 -07:00
committed by GitHub
2 changed files with 61 additions and 49 deletions

View File

@@ -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