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

Parameterize DSPO max concurrency count #394

Merged
merged 3 commits into from
Oct 18, 2023

Conversation

VaniHaripriya
Copy link
Contributor

The issue resolved by this Pull Request:

Resolves #368

Description of your changes:

Added a new argument "MaxConcurrentReconciles" in the manager.yaml file and read the value from the argument to use it in the controller.

Testing instructions

Pull my branch and once you deploy it, we should be able to see the worker count in the logs as below:
Starting workers {"controller": "datasciencepipelinesapplication", "controllerGroup": "datasciencepipelinesapplications.opendatahub.io", "controllerKind": "DataSciencePipelinesApplication", "worker count": 10}
If you want to update the count, update "MaxConcurrentReconciles" arg in manager.yaml file and redeploy to see the updated count in logs.
If you want to see the usage of "DefaultMaxConcurrentReconciles" which is set to 10, remove the "MaxConcurrentReconciles" arg in manager.yaml file and redeploy to see the worker count automatically updates to 10.

Checklist

  • The commits are squashed in a cohesive manner and have meaningful messages.
  • Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has manually tested the changes and verified that the changes work

@dsp-developers
Copy link
Contributor

A new image has been built to help with testing out this PR: quay.io/opendatahub/data-science-pipelines-operator:pr-394
An OCP cluster where you are logged in as cluster admin is required.

To use this image run the following:

cd $(mktemp -d)
git clone git@github.com:opendatahub-io/data-science-pipelines-operator.git
cd data-science-pipelines-operator/
git fetch origin pull/394/head
git checkout -b pullrequest 7672d8c2f19d680dd96b6fb5b0b11dcad3aee308
make deploy IMG="quay.io/opendatahub/data-science-pipelines-operator:pr-394"

More instructions here on how to deploy and test a Data Science Pipelines Application.

@VaniHaripriya VaniHaripriya mentioned this pull request Oct 13, 2023
1 task
@@ -29,6 +29,7 @@ spec:
args:
- --leader-elect
- --zap-log-level=$(ZAP_LOG_LEVEL)
- --MaxConcurrentReconciles=20
Copy link
Member

Choose a reason for hiding this comment

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

can we extract this out to an env var (like $(ZAP_LOG_LEVEL) above) so that we can more easily configure this without needing to make manifest changes?

If that's outside the scope of this PR, maybe even just for now set the env with

- name: MAX_CONCURRENT_RECONCILES
  value: 20

@@ -29,6 +29,7 @@ spec:
args:
- --leader-elect
- --zap-log-level=$(ZAP_LOG_LEVEL)
- --MaxConcurrentReconciles=20
Copy link
Member

Choose a reason for hiding this comment

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

+1 to what Giulio mentioned, the env var could be defined like $(ZAP_LOG_LEVEL), and the value could be initialized in the params.env. You will also need to add a reference in the base kustomization file.

@dsp-developers
Copy link
Contributor

Change to PR detected. A new PR build was completed.
A new image has been built to help with testing out this PR: quay.io/opendatahub/data-science-pipelines-operator:pr-394

main.go Outdated Show resolved Hide resolved
config/base/params.env Outdated Show resolved Hide resolved
flag.StringVar(&metricsAddr, "metrics-bind-address", ":8080", "The address the metric endpoint binds to.")
flag.StringVar(&probeAddr, "health-probe-bind-address", ":8081", "The address the probe endpoint binds to.")
flag.StringVar(&configPath, "config", "", "Path to JSON file containing config")
flag.BoolVar(&enableLeaderElection, "leader-elect", false,
"Enable leader election for controller manager. "+
"Enabling this will ensure there is only one active controller manager.")
flag.IntVar(&maxConcurrentReconciles, "MaxConcurrentReconciles", config.DefaultMaxConcurrentReconciles, "Maximum concurrent reconciles")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@HumairAK flag package is taking care of assigning the default value when there is no param. We are passing maxConcurrentreconciles (which will either have param value or default value to SetupWithManager function in the controller.

@dsp-developers
Copy link
Contributor

Change to PR detected. A new PR build was completed.
A new image has been built to help with testing out this PR: quay.io/opendatahub/data-science-pipelines-operator:pr-394

1 similar comment
@dsp-developers
Copy link
Contributor

Change to PR detected. A new PR build was completed.
A new image has been built to help with testing out this PR: quay.io/opendatahub/data-science-pipelines-operator:pr-394

@dsp-developers
Copy link
Contributor

Change to PR detected. A new PR build was completed.
A new image has been built to help with testing out this PR: quay.io/opendatahub/data-science-pipelines-operator:pr-394

@HumairAK
Copy link
Contributor

/lgtm
/approve

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 18, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: HumairAK

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot merged commit 6b541c1 into opendatahub-io:main Oct 18, 2023
7 of 9 checks passed
@HumairAK HumairAK added the qe/verify Labels to inform qe on issues to verify. label Oct 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm qe/verify Labels to inform qe on issues to verify.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request]: Parameterize DSPO max concurrency count
5 participants