Open lorrx opened 2 months ago
Additional information: The problem seems to be in ArgoCD. When disabling the self-heal option, all replicas are scheduled as exepted.
I suspect that ArgoCD detects a diff in the deployment.yml (replicas: 1 != replicas: 3) and then adjusts this again. So removing the replicas
option when HPA is enabled could really be the solution.
@lorrx thanks for issue and the updates 🙏 , if you have found a solution that works both in Argo CD and via helm directly on a k8s cluster, please feel free to submit a PR to correct the issue.
Describe your Issue
When I activate HPA in the helmet chart, a pod is initially scheduled (which is correct). As soon as I synchronize files, the CPU load of this pod increases to >60%. So HPA tries to schedule new pods. These are then also scheduled, but killed again immediately after container creation. This means that there is never more than one pod running at the same time, although there should be 5.
Logs and Errors
There are no errors in the logs. The termination seems to be caused by Kubernetes itself.
Describe your Environment
Kubernetes distribution: k3s
Helm Version (or App that manages helm): ArgoCD version v2.10.7+b060053
Helm Chart Version: 4.6.6
values.yaml
:Additional context, if any
I found a possible solution for this issue. As mentioned in this StackOverflow article, the
replicas
parameter cannot be used in the deployment resource if a HPA definition is used.I am using NFS as persistant storage with the NFS CSI driver. The PVC has RWX access mode.