Skip to content

Commit

Permalink
Merge pull request #816 from mtdtdev/main
Browse files Browse the repository at this point in the history
fix ehpa controller update hpa logic
  • Loading branch information
qmhu authored Jun 9, 2023
2 parents 9568e74 + 93688b2 commit eca3bbd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/controller/ehpa/hpa.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,9 @@ func (c *EffectiveHPAController) UpdateHPAIfNeed(ctx context.Context, ehpa *auto
updated := &autoscalingv2.HorizontalPodAutoscaler{}
errGet := c.Get(context.TODO(), types.NamespacedName{Namespace: hpaCopy.Namespace, Name: hpaCopy.Name}, updated)
if errGet == nil {
updated.Labels = hpaCopy.Labels
updated.Annotations = hpaCopy.Annotations
updated.Spec = hpaCopy.Spec
hpaCopy = updated
}

Expand Down

0 comments on commit eca3bbd

Please sign in to comment.