Gradually rolling out latest Revisions

    To mitigate this problem Knative as of 0.20 release Knative provides users with a possibility to gradually shift the traffic to the latest revision. This is governed by a single parameter which denotes .

    The affected Configuration targets will be rolled out to 1% of traffic first and then in equal incremental steps for the rest of the assigned traffic. Note, that the rollout is purely time based and does not interact with the Autoscaling subsystem.

    This feature is available to untagged and tagged traffic targets configured for both Kservices and Kservice-less Routes.

    1. apiVersion: v1
    2. kind: ConfigMap
    3. metadata:
    4. name: config-network
    5. namespace: knative-serving
    6. rolloutDuration: "380s" # Value in seconds.

    During the rollout the system will update the Route and Kservice status. Both traffic and conditions status fields will be affected.

    For example, a possible rollout of the following traffic configuration

    1. - percent: 55
    2. configurationName: config # Pinned to latest ready Revision
    3. - percent: 45
    4. revisionName: config-00005 # Pinned to a specific Revision.

    would be (if inspecting the route status):

    1. traffic:
    2. - percent: 36
    3. revisionName: config-00008
    4. - percent: 19
    5. revisionName: config-00009

    and so on until final state is achieved:

    During the rollout the Route and (Kservice, if present) status conditions will be the following:

    1. ...
    2. status:
    3. conditions:
    4. ...
    5. - lastTransitionTime: "..."
    6. message: A gradual rollout of the latest revision(s) is in progress.
    7. reason: RolloutInProgress
    8. status: Unknown
    9. type: Ready
    10. ...

    If a new revision is created while the rollout is in progress then the system would start shifting the traffic immediately to the newest revision and it will drain the incomplete rollouts from newest to the oldest.