-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Do not render .spec.replicas
if Autoscaling is Enabled
#4059
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
Do not render .spec.replicas
if Autoscaling is Enabled
#4059
Conversation
Welcome @sherifabdlnaby! |
Hi @sherifabdlnaby. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Could you explain the benefit of this PR? Currently, it doesn't make sense to horizontally scale this controller as it's leader elected. Only one replica can perform work at any given time. |
@zac-nixon Yes sure, it's explained in Values.yaml
|
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.
e962e76
to
04cee68
Compare
04cee68
to
dc64725
Compare
@zac-nixon Rebased. Please re-review 👍🏻 |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: sherifabdlnaby, zac-nixon 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 |
Issue
The current chart template will render
.spec.replicas
even if Autoscaling is enabled. This causes a conflict in ownership of the.spec.replicas
field between the HPA and whoever is installing/reconciling the manifests.The effect of this depends on the tool used to install the manifests:
.spec.replicas
is reset to the.replicaCount
value everytime Helm Install/Update is invoked..spec.replicas
is reset on each Sync... which can result into a constant back and forth between ArgoCD and the HPA that technically eliminate the benefits of the HPA.Description of changes
Do not render
.spec.replicas
if Autoscaling is Enabled.Checklist
README.md
for modified charts)version
inChart.yaml
for the modified chart(s)Testing
Checking the Helm Diff between main and this branch. Validate that
.spec.replicas
is no rendered when Autoscaling is enabled, and is still rendered when Autoscaling is disabled.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.