Skip to content

Commit

Permalink
dont reset replicas when hpa is set (#5021)
Browse files Browse the repository at this point in the history
dont reset deployment replicas when hpa is set

This is no longer needed after
#2816 was merged

Relates to #4983 (comment)

Signed-off-by: Arko Dasgupta <[email protected]>
  • Loading branch information
arkodg authored Jan 9, 2025
1 parent 5427854 commit 6466ceb
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
7 changes: 0 additions & 7 deletions internal/infrastructure/kubernetes/proxy/resource_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -340,13 +340,6 @@ func (r *ResourceRender) Deployment() (*appsv1.Deployment, error) {
deployment.ObjectMeta.Name = r.Name()
}

provider := proxyConfig.GetEnvoyProxyProvider()

// omit the deployment replicas if HPA is being set
if provider.GetEnvoyProxyKubeProvider().EnvoyHpa != nil {
deployment.Spec.Replicas = nil
}

// apply merge patch to deployment
if deployment, err = deploymentConfig.ApplyMergePatch(deployment); err != nil {
return nil, err
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -290,11 +290,6 @@ func (r *ResourceRender) Deployment() (*appsv1.Deployment, error) {
}
}

// omit the deployment replicas if HPA is being set
if r.rateLimitHpa != nil {
deployment.Spec.Replicas = nil
}

// apply merge patch to deployment
var err error
if deployment, err = r.rateLimitDeployment.ApplyMergePatch(deployment); err != nil {
Expand Down

0 comments on commit 6466ceb

Please sign in to comment.