Skip to content

Commit 1b1153c

Browse files
committed
doc: fix comments to fit the current implementation
Signed-off-by: Sandor Szücs <[email protected]>
1 parent d1ed608 commit 1b1153c

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

pkg/core/stack_resources.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -261,10 +261,11 @@ func (sc *StackContainer) GenerateDeployment() *appsv1.Deployment {
261261
return deployment
262262
}
263263

264-
// GenerateHPA generates a hpa as configured in the
265-
// stack. On cluster migrations set by stackset annotation
266-
// "zalando.org/forward-backend", the hpa will be set to
267-
// minReplicas = maxReplicass = 1.
264+
// GenerateHPA generates a hpa as configured in the stack. On cluster
265+
// migrations set by stackset annotation
266+
// "zalando.org/forward-backend", the hpa will be set to nil, because
267+
// we do not use the backend deployment from the new stack to receive
268+
// traffic.
268269
func (sc *StackContainer) GenerateHPA() (
269270
*autoscaling.HorizontalPodAutoscaler,
270271
error,
@@ -317,7 +318,7 @@ func (sc *StackContainer) GenerateHPA() (
317318
result.Annotations = mergeLabels(result.Annotations, annotations)
318319
result.Spec.Behavior = autoscalerSpec.Behavior
319320

320-
// If prescaling is enabled, ensure we have at least `precalingReplicas` pods
321+
// If prescaling is enabled, ensure we have at least `prescalingReplicas` pods
321322
if sc.prescalingActive && (result.Spec.MinReplicas == nil || *result.Spec.MinReplicas < sc.prescalingReplicas) {
322323
pr := sc.prescalingReplicas
323324
result.Spec.MinReplicas = &pr

0 commit comments

Comments
 (0)