Skip to content

dynamicStableScale for non-server workloads #4538

@sding3

Description

@sding3

For a workload without a ingress and service (let's call this a non-server workload), argo-rollouts behaves as if dynamicStableScale has been configured to true.

dynamicStableScale is explicitly documented as "Only available when traffic routing is used". The fact that argo-rollouts begin to scale down the stable pods when rolling out an update to a non-server workload (which does not use traffic routing) contradicts with that documentation.

I don't see why the dynamicStableScale configuration requires traffic routing to work. All that it controls is whether to scale down the stable pods or not when canary pods are added, that doesn't seem like it should require traffic routing. Non-server workloads can benefit from argo rollout canary release strategy as well as being able to configure dynamicStableScale to true or false.

To Reproduce

Apply the following argo rollout resource:

apiVersion: argoproj.io/v1alpha1
kind: Rollout
metadata:
  name: podinfo
  namespace: test
  labels:
    app: podinfo
spec:
  progressDeadlineSeconds: 60
  progressDeadlineAbort: true
  replicas: 5
  minReadySeconds: 5
  revisionHistoryLimit: 5
  strategy:
    canary:
      maxSurge: "20%"
      abortScaleDownDelaySeconds: 600
      stableMetadata:
        labels:
          role: canary-stable
      canaryMetadata:
        labels:
          role: canary-next
      steps:
      - setWeight: 50
      - pause: {}
  selector:
    matchLabels:
      app: podinfo
  template:
    metadata:
      labels:
        app: podinfo
    spec:
      containers:
      - name: podinfo
        image: ghcr.io/stefanprodan/podinfo:6.0.0
        imagePullPolicy: IfNotPresent
        ports:
        - name: http
          containerPort: 9898
          protocol: TCP
        - name: http-metrics
          containerPort: 9797
          protocol: TCP
        - name: grpc
          containerPort: 9999
          protocol: TCP
        command:
        - ./podinfo
        - --port=9898
        - --port-metrics=9797
        - --grpc-port=9999
        - --grpc-service-name=podinfo
        - --level=debug
        - --random-delay=false
        - --random-error=false

Then update the image to ghcr.io/stefanprodan/podinfo:6.0.1 to trigger rollout, and observe argo create the new pods and reduce the number of the old pods.

Expected behavior

argo should add new pods without deleting old pods.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions