-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(controller): Enhanced TTL controller scalability #4736
Conversation
Signed-off-by: Alex Collins <[email protected]>
@@ -10,8 +10,7 @@ You cannot horizontally scale the controller. | |||
|
|||
You can scale the controller vertically: | |||
|
|||
- If you have workflows with many steps, increase `--pod-workers`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't recommend changing --pod-workers
anymore. It has no impact in any testing I've done.
@@ -129,9 +130,6 @@ func (c *Controller) enqueueWF(obj interface{}) { | |||
log.Warnf("'%v' is not an unstructured", obj) | |||
return | |||
} | |||
if un.GetDeletionTimestamp() != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
redundant now it is checked by FilterFunc
on line 52
@@ -187,9 +192,14 @@ func (c *Controller) deleteWorkflow(key string) error { | |||
|
|||
err = c.wfclientset.ArgoprojV1alpha1().Workflows(wf.Namespace).Delete(wf.Name, &metav1.DeleteOptions{PropagationPolicy: commonutil.GetDeletePropagation()}) | |||
if err != nil { | |||
return err | |||
if apierr.IsNotFound(err) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've not seen this error apart from initial testing - prevented by line 155 I think, but a good bonus check
Signed-off-by: Alex Collins <[email protected]>
}, | ||
Handler: cache.ResourceEventHandlerFuncs{ | ||
AddFunc: controller.enqueueWF, | ||
UpdateFunc: func(old, new interface{}) { | ||
controller.enqueueWF(new) | ||
}, | ||
DeleteFunc: controller.enqueueWF, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is invoked after the WF is deleted - so it is not needed - removing reduces the number of API requests by 1
Signed-off-by: Alex Collins <[email protected]>
Signed-off-by: Alex Collins <[email protected]>
@@ -100,6 +101,7 @@ func NewRootCommand() *cobra.Command { | |||
command.Flags().StringVar(&logLevel, "loglevel", "info", "Set the logging level. One of: debug|info|warn|error") | |||
command.Flags().IntVar(&glogLevel, "gloglevel", 0, "Set the glog logging level") | |||
command.Flags().IntVar(&workflowWorkers, "workflow-workers", 32, "Number of workflow workers") | |||
command.Flags().IntVar(&workflowTTLWorkers, "workflow-ttl-workers", 4, "Number of workflow TTL workers") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding this. This was my proposal during the prod incident. But We don't want to make too many changes
Signed-off-by: Alex Collins <[email protected]>
Signed-off-by: Alex Collins [email protected]
Checklist: