Skip to content

Deployments: remove .spec.replicas when HPA present

Jason Plum requested to merge remove-replicas-from-deployments-with-hpa into master

What does this MR do?

As found in production 😅, we do not want to provide the .spec.replicas value at all, when there is an HPA controlling the number of desired Pods. If we do, the Deployment will be updated to the .spec.replicas definition, resulting in a scale down event, and then the HPA will immediately scale up. This causes a) capacity swings b) slower deployments

Related issues

Relates to gitlab-com/gl-infra/delivery#1992 (closed)

Checklist

See Definition of done.

For anything in this list which will not be completed, please provide a reason in the MR discussion.

Required

  • Merge Request Title and Description are up to date, accurate, and descriptive
  • MR targeting the appropriate branch
  • MR has a green pipeline on GitLab.com

Expected (please provide an explanation if not completing)

  • Test plan indicating conditions for success has been posted and passes
  • Documentation created/updated
  • Tests added
  • Integration tests added to GitLab QA
  • Equivalent MR/issue for omnibus-gitlab opened

Merge request reports