Skip to content
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

Adds --max-workers flag to the exec-entrypoint helm command #2607

Merged
merged 4 commits into from
Mar 6, 2020

Conversation

razvan-wework
Copy link
Contributor

Description of the change:
Adds --max-workers flag to the exec-entrypoint helm command

Motivation for the change:
Currently the helm operator runs with just 1 worker. Reconciling helm releases can sometime take >1 second, using a single worker will not be able to keep up for more than 60 CRs of the same type.

@openshift-ci-robot openshift-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 27, 2020
@razvan-wework razvan-wework marked this pull request as ready for review February 27, 2020 20:16
@openshift-ci-robot openshift-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Feb 27, 2020
c, err := controller.New(controllerName, mgr, controller.Options{Reconciler: r})
c, err := controller.New(controllerName, mgr, controller.Options{
Reconciler: r,
MaxConcurrentReconciles: options.MaxWorkers,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The name is the same used in Ansible. So it shows great 👍

Copy link
Contributor

@camilamacedo86 camilamacedo86 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really thank you for your contribution. 👍

Just a few nits

  • We need to add an entry in the CHANGELOG about it. Something such as:

Add the --max-workers flag to the commands operator-sdk exec-entrypoint and operator-sdk run --local for Helm based-operators with the purpose of X. (#2607)

@openshift-ci-robot openshift-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Feb 27, 2020
Comment on lines +12 to +13
- Add event stats output to the operator logs for Ansible based-operators. ([2580](https://github.com/operator-framework/operator-sdk/pull/2580))
- Improve Ansible logs by allowing output the full Ansible result for Ansible based-operators configurable by environment variable. ([2589](https://github.com/operator-framework/operator-sdk/pull/2589))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think my editor just stripped out some white spaces from these lines.

Copy link
Contributor

@camilamacedo86 camilamacedo86 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 it shows great for me

WDYT folks @estroz @hasbro17 @fabianvf

estroz
estroz previously requested changes Feb 28, 2020
Copy link
Member

@estroz estroz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Max concurrent reconciler configuration applies to controllers in general, so this change should apply to the Ansible entrypoint as well.

@camilamacedo86
Copy link
Contributor

Hi @estroz,

Max concurrent reconciler configuration applies to controllers in general, so this change should apply to the Ansible entrypoint as well.

Are you saying that it should be done for Ansible too? Am I right? So, this implementation already exist for Ansible. See: https://github.com/operator-framework/operator-sdk/blob/master/pkg/ansible/controller/controller.go#L92. And it is in the AnsibleFlags which means that is done for the entrypoint and run --local commands. See: https://github.com/operator-framework/operator-sdk/blob/master/pkg/ansible/flags/flag.go#L29

@razvan-wework
Copy link
Contributor Author

Happy Monday everyone. Thanks for looking at this @estroz . As @camilamacedo86 was mentioning, the feature already exists for Ansible. I made sure to use the same arg name to keep it consistent. Let me know if there is anything else I could improve on this PR.

@razvan-wework razvan-wework requested a review from estroz March 2, 2020 17:37
@jmrodri
Copy link
Member

jmrodri commented Mar 6, 2020

Yep, I added this initially to the Ansible side. @razvan-wework thanks great work.

Copy link
Member

@jmrodri jmrodri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 6, 2020
@jmrodri jmrodri dismissed estroz’s stale review March 6, 2020 21:39

I'm dismissing Eric's review because as his concerns have already been address on the ansible side.

@jmrodri jmrodri merged commit f1622c4 into operator-framework:master Mar 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants