Skip to content

Old revision does not scale down when TargetBurstCapacity set to 0 #13487

@yuzisun

Description

@yuzisun

What version of Knative?

1.7.x

Expected Behavior

After updating the knative service, the previous revision should be scaled down once the new revision is in ready state no matter targetBurstCapacity is set or not.

Actual Behavior

Both old and new revisions are running when targetBurstCapacity is set to 0 to remove the activator from the path. It works as expected when we do not set targetBurstCapacity explicitly on the annotations.

Note: This wasn't an issue in 1.0 version

Steps to Reproduce the Problem

  1. Create a Knative Service with annotation autoscaling.knative.dev/targetBurstCapacity: "0"
apiVersion: serving.knative.dev/v1
kind: Service
metadata:
  name: helloworld-go
spec:
  template:
    metadata:
      annotations:
        autoscaling.knative.dev/targetBurstCapacity: "0"
    spec:
      containers:
        - image: docker.io/yuzisun/helloworld-python
          env:
            - name: TARGET
              value: "Go Sample v1"
kubectl get revisions

NAME                                   CONFIG NAME                      K8S SERVICE NAME   GENERATION   READY   REASON             ACTUAL REPLICAS   DESIRED REPLICAS
helloworld-go-00002                    helloworld-go                                       2            True                       1                 1
  1. Update the Knative service by changing the env value, the old revision is not scaled down.
kubectl get revisions

NAME                                   CONFIG NAME                      K8S SERVICE NAME   GENERATION   READY   REASON   ACTUAL REPLICAS   DESIRED REPLICAS
helloworld-go-00002                    helloworld-go                                       2            True                       1                 1
helloworld-go-00003                    helloworld-go                                       3            True                       1                 1
kubectl get pods
NAME                                                              READY   STATUS    RESTARTS   AGE
helloworld-go-00002-deployment-7f995798dd-54jq2                   2/2     Running   0          4m27s
helloworld-go-00003-deployment-9f6997666-sfcpt                    2/2     Running   0          3m

Metadata

Metadata

Assignees

Labels

kind/bugCategorizes issue or PR as related to a bug.triage/acceptedIssues which should be fixed (post-triage)

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions