Skip to content

Commit

Permalink
Set kubeApiserver maxReplicas: 3 (gardener#9605)
Browse files Browse the repository at this point in the history
  • Loading branch information
voelzmo authored Apr 17, 2024
1 parent 70fe495 commit f98e6ce
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion pkg/gardenlet/operation/botanist/kubeapiserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func (b *Botanist) computeKubeAPIServerAutoscalingConfig() apiserver.Autoscaling
scaleDownDisabledForHvpa = false
defaultReplicas *int32
minReplicas int32 = 1
maxReplicas int32 = 4
maxReplicas int32 = 3
apiServerResources corev1.ResourceRequirements
)

Expand All @@ -115,6 +115,7 @@ func (b *Botanist) computeKubeAPIServerAutoscalingConfig() apiserver.Autoscaling

if metav1.HasAnnotation(b.Shoot.GetInfo().ObjectMeta, v1beta1constants.ShootAlphaControlPlaneScaleDownDisabled) {
minReplicas = 4
maxReplicas = 4
scaleDownDisabledForHvpa = true
}

Expand Down
10 changes: 5 additions & 5 deletions pkg/gardenlet/operation/botanist/kubeapiserver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ var _ = Describe("KubeAPIServer", func() {
APIServerResources: resourcesRequirementsForKubeAPIServer(4),
HVPAEnabled: false,
MinReplicas: 1,
MaxReplicas: 4,
MaxReplicas: 3,
UseMemoryMetricForHvpaHPA: false,
ScaleDownDisabledForHvpa: false,
},
Expand All @@ -218,7 +218,7 @@ var _ = Describe("KubeAPIServer", func() {
},
HVPAEnabled: true,
MinReplicas: 1,
MaxReplicas: 4,
MaxReplicas: 3,
UseMemoryMetricForHvpaHPA: false,
ScaleDownDisabledForHvpa: false,
},
Expand All @@ -232,7 +232,7 @@ var _ = Describe("KubeAPIServer", func() {
APIServerResources: resourcesRequirementsForKubeAPIServer(4),
HVPAEnabled: false,
MinReplicas: 2,
MaxReplicas: 4,
MaxReplicas: 3,
UseMemoryMetricForHvpaHPA: false,
ScaleDownDisabledForHvpa: false,
},
Expand Down Expand Up @@ -260,7 +260,7 @@ var _ = Describe("KubeAPIServer", func() {
APIServerResources: resourcesRequirementsForKubeAPIServer(4),
HVPAEnabled: false,
MinReplicas: 1,
MaxReplicas: 4,
MaxReplicas: 3,
UseMemoryMetricForHvpaHPA: true,
ScaleDownDisabledForHvpa: false,
},
Expand Down Expand Up @@ -362,7 +362,7 @@ var _ = Describe("KubeAPIServer", func() {
APIServerResources: resourcesRequirementsForKubeAPIServer(4),
HVPAEnabled: false,
MinReplicas: 3,
MaxReplicas: 4,
MaxReplicas: 3,
UseMemoryMetricForHvpaHPA: false,
ScaleDownDisabledForHvpa: false,
},
Expand Down

0 comments on commit f98e6ce

Please sign in to comment.