Skip to content

Commit

Permalink
dont reset deployment replicas when hpa is set
Browse files Browse the repository at this point in the history
This is no longer needed after
envoyproxy#2816 was merged

Relates to envoyproxy#4983 (comment)

Signed-off-by: Arko Dasgupta <arko@tetrate.io>
  • Loading branch information
arkodg committed Jan 7, 2025
1 parent 2a5ecaf commit 8464c35
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 @@ -326,13 +326,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 8464c35

Please sign in to comment.