goharbor / harbor-helm

The helm chart to deploy Harbor
Apache License 2.0
1.14k stars 745 forks source link

Add support for HPA #1765

Open xoanmi opened 1 month ago

xoanmi commented 1 month ago

We are adding support for autoscale deployments with [Horizontal Pod Autoscaling (HPA)] on all Harbor services.

This change is backwards compatible since it adds new functionality. With the default values, the new settings have no effect.

Close #1068

zyyw commented 2 weeks ago

this is currently not on the roadmap on harbor-helm.

cvegagimenez commented 2 weeks ago

Hi @zyyw ,

does that mean that you are not approving anything that is not in the roadmap even if it adds new functionalities and does not affect the current setup?

As you can see here there are an issue that request this kind of feature.

Anyway, in the CONTRIBUTING page it says nothing about the roadmap to contribute. Can you share with us what is the process to include new features in this project?

xoanmi commented 2 weeks ago

I'm providing a feature that many in the community have requested. The Horizontal Pod Autoscaler (HPA) is a well-established Kubernetes feature. Even if it's not on the roadmap, why not include it? I've ensured it is fully backwards compatible and doesn't affect anything else.

This is disappointing 😢

wy65701436 commented 2 weeks ago

Thanks @xoanmi for your idea and contribution.

We don't want to provide an all-in-one solution to the customer, as it is not considered a good engineering practice. Instead, we aim to deliver a stable, useful, and minimal version of harbor-helm. The primary goal of harbor-helm is to offer our users a straightforward way to deploy Harbor into their Kubernetes clusters, with the main task being to align with the latest Harbor version.

Adding more functionalities is not our top priority. From a maintenance perspective, keeping things simple and small is often more beneficial.

@cvegagimenez, regarding support for HPA, we believe this should be an additional feature of harbor-helm. And user can actually complete it at their end manually. Currently, harbor-helm is already quite complex to maintain, and we understand that the community wants to see comprehensive features. Let's keep this discussion open to gather more insights from the community.

xoanmi commented 2 weeks ago

Thanks for the insights @wy65701436.

We can proceed as you suggest, but we need a method to disable the replicas for each service we manage with the HPA. Since we are using a GitOps approach, it's crucial to avoid reconciliation issues, where the HPA modifies the replicas and then ArgoCD changes them back in an infinite loop.