fix: don't render .spec.replicas if HPA is enabled#6249
fix: don't render .spec.replicas if HPA is enabled#6249y-rabie wants to merge 1 commit intoenvoyproxy:mainfrom
Conversation
d3f9f79 to
9996eea
Compare
Signed-off-by: y-rabie <[email protected]>
9996eea to
d6ad285
Compare
|
thanks for flagging this @y-rabie, instead of disabling replicas, can we add templating to unset it ? and add a doc strin in the hpa section to recommend users to do so ? |
|
@arkodg I'm not exactly sure what you mean by adding templating to unset it 😅 Do you mean leaving things as is and recommending to the users setting the replicas value to null when HPA is enabled? |
|
if we added a doc string in the hpa section to comment out replicas could something like this be used in the template to avoid setting the replica ? |
|
This pull request has been automatically marked as stale because it has not had activity in the last 30 days. Please feel free to give a status update now, ping for review, when it's ready. Thank you for your contributions! |
|
Any updates here? |
|
This pull request has been automatically marked as stale because it has not had activity in the last 30 days. Please feel free to give a status update now, ping for review, when it's ready. Thank you for your contributions! |
If I understand the comment correctly then no, not with the current template. If we set |
|
@sherifabdlnaby will something like this work ? |
|
This pull request has been automatically marked as stale because it has not had activity in the last 30 days. Please feel free to give a status update now, ping for review, when it's ready. Thank you for your contributions! |
|
Did this ever get merged into a release? I am still seeing this issue with Argo. Any update on this? |
What type of PR is this?
fix: don't render .spec.replicas if HPA is enabled
What this PR does / why we need it:
The current chart template will render
.spec.replicaseven if autoscaling is enabled. This causes a conflict in ownership of the.spec.replicasfield between the HPA and whoever is installing/reconciling the manifests.The effect of this depends on the tool used to install the manifests:
Helm CLI -> the
.spec.replicasis reset to the.Values.deployment.replicasvalue everytime Helm Install/Update is invoked.AgroCD (or any GitOps tool) ->
.spec.replicasis 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.