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

Introduce flags for fine-tuning maximum concurrent reconciles per resource #141

Merged
merged 1 commit into from
Mar 4, 2024

Conversation

a-hilaly
Copy link
Member

@a-hilaly a-hilaly commented Mar 2, 2024

This commit aims to improve the performance and scalability of the ACK
service controllers by introducing support for configuring the maximum
number of concurrent reconciles for individual resources. The primary
motivation behind this change is to address varying workload demands and
resource requirements in Kubernetes environements.

This patch introduces two new flags (soon exposed to in the helm chart
values):

  • --reconcile-default-max-concurrent-syncs: allow users to specify the
    default maximum concurrency level for all the resources.
  • --reconcile-resource-max-concurrent-syncs: enable users to define
    resource-specific maximum concurrency settings, overriding the default
    value.

A use case example would be the scenario of an admin wanting to manage
EKS resources using the ACK eks-controller. It is normal for each
cluster to have multiple nodegroups/PIAs/AccessEntries/FargateProfiles,
which can indicate the proportion of needed max concurrencies for each
resource.

For instance, you can configure the EKS Controller with a default
maximum of 2 concurrent reconciles for all the resources, and override
the maximum concurrency to 10 for AccessEntries and
PodIdentityAssociations

Signed-off-by: Amine Hilaly hilalyamine@gmail.com

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@ack-prow ack-prow bot requested review from jlbutler and jljaco March 2, 2024 20:17
@ack-prow ack-prow bot added the approved label Mar 2, 2024
Comment on lines +209 to +214
flag.IntVar(
&cfg.ReconcileDefaultMaxConcurrency, flagReconcileDefaultMaxConcurrency,
1,
"The default maximum number of concurrent reconciles for a resource reconciler. This value is used if no "+
"resource-specific override has been specified. Default is 1.",
)
Copy link
Member Author

Choose a reason for hiding this comment

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

We will maintain the default maximum reconciles at 1

@a-hilaly a-hilaly force-pushed the concurrent-reconciles branch 4 times, most recently from a6f6167 to ca3dc92 Compare March 2, 2024 21:03
…ource.

This commit aims to improve the performance and scalability of the ACK
service controllers by introducing support for configuring the maximum
number of concurrent reconciles for individual resources. The primary
motivation behind this change is to address varying workload demands and
resource requirements in Kubernetes environements.

This patch introduces two new flags (soon exposed to in the helm chart
values):
- `--reconcile-default-max-concurrent-syncs`: allow users to specify the
  default maximum concurrency level for all the resources.
- `--reconcile-resource-max-concurrent-syncs`: enable users to define
  resource-specific maximum concurrency settings, overriding the default
  value.

A use case example would be the scenario of an admin wanting to manage
EKS resources using the ACK `eks-controller`. It is normal for each
cluster to have multiple nodegroups/PIAs/AccessEntries/FargateProfiles,
which can indicate the proportion of needed max concurrencies for each
resource.

For instance, you can configure the EKS Controller with a default
maximum of 2 concurrent reconciles for all the resources, and override
the maximum concurrency to 10 for `AccessEntries` and
`PodIdentityAssociations`

Signed-off-by: Amine Hilaly <hilalyamine@gmail.com>
@jlbutler
Copy link

jlbutler commented Mar 4, 2024

/lgtm
/test all

@ack-prow ack-prow bot added the lgtm Indicates that a PR is ready to be merged. label Mar 4, 2024
Copy link

ack-prow bot commented Mar 4, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: a-hilaly, jlbutler

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

@ack-prow ack-prow bot merged commit 20e1c0d into aws-controllers-k8s:main Mar 4, 2024
5 checks passed
ack-prow bot pushed a commit to aws-controllers-k8s/code-generator that referenced this pull request Mar 5, 2024
Propagating two main patches to all the controllers:
- Properly handle CARM errors and requeues by @a-hilaly in aws-controllers-k8s/runtime#140
- Introduce flags for fine-tuning maximum concurrent reconciles per resource by @a-hilaly in aws-controllers-k8s/runtime#141

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
ndbhat pushed a commit to ndbhat/ack-runtime that referenced this pull request Apr 16, 2024
…ource (aws-controllers-k8s#141)

This commit aims to improve the performance and scalability of the ACK
service controllers by introducing support for configuring the maximum
number of concurrent reconciles for individual resources. The primary
motivation behind this change is to address varying workload demands and
resource requirements in Kubernetes environements.

This patch introduces two new flags (soon exposed to in the helm chart
values):
- `--reconcile-default-max-concurrent-syncs`: allow users to specify the
  default maximum concurrency level for all the resources.
- `--reconcile-resource-max-concurrent-syncs`: enable users to define
  resource-specific maximum concurrency settings, overriding the default
  value.

A use case example would be the scenario of an admin wanting to manage
EKS resources using the ACK `eks-controller`. It is normal for each
cluster to have multiple nodegroups/PIAs/AccessEntries/FargateProfiles,
which can indicate the proportion of needed max concurrencies for each
resource.

For instance, you can configure the EKS Controller with a default
maximum of 2 concurrent reconciles for all the resources, and override
the maximum concurrency to 10 for `AccessEntries` and
`PodIdentityAssociations`

Signed-off-by: Amine Hilaly <hilalyamine@gmail.com>

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants