Skip to content

Commit

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

Relates to #4983 (comment)

Signed-off-by: Arko Dasgupta <[email protected]>
  • Loading branch information
arkodg committed Jan 7, 2025
1 parent 2a5ecaf commit 8200af5
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
5 changes: 0 additions & 5 deletions internal/infrastructure/kubernetes/proxy/resource_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -328,11 +328,6 @@ func (r *ResourceRender) Deployment() (*appsv1.Deployment, error) {

provider := proxyConfig.GetEnvoyProxyProvider()

Check failure on line 329 in internal/infrastructure/kubernetes/proxy/resource_provider.go

View workflow job for this annotation

GitHub Actions / coverage-test

declared and not used: provider

Check failure on line 329 in internal/infrastructure/kubernetes/proxy/resource_provider.go

View workflow job for this annotation

GitHub Actions / gen-check

declared and not used: provider

Check failure on line 329 in internal/infrastructure/kubernetes/proxy/resource_provider.go

View workflow job for this annotation

GitHub Actions / lint

declared and not used: provider) (typecheck)

Check failure on line 329 in internal/infrastructure/kubernetes/proxy/resource_provider.go

View workflow job for this annotation

GitHub Actions / lint

declared and not used: provider) (typecheck)

Check failure on line 329 in internal/infrastructure/kubernetes/proxy/resource_provider.go

View workflow job for this annotation

GitHub Actions / lint

declared and not used: provider) (typecheck)

Check failure on line 329 in internal/infrastructure/kubernetes/proxy/resource_provider.go

View workflow job for this annotation

GitHub Actions / lint

declared and not used: provider (typecheck)

Check failure on line 329 in internal/infrastructure/kubernetes/proxy/resource_provider.go

View workflow job for this annotation

GitHub Actions / lint

declared and not used: provider) (typecheck)

// 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 8200af5

Please sign in to comment.