Need help setting up slow_start in kubernetes

Istio version: 1.18

I’m trying to establish slow-start for a kubernetes pod that has just been added. The pod is a member of a deployment which has a Service and VirtualService forwarding requests to the pods.
When a new pod starts, it will be a bit sluggish as it gets its connections pools set up so I’d like to have only minimal traffic sent to it at first ramping up to evenly balanced.

Given the following Serve and VirtualService:

apiVersion: v1
kind: Service
metadata:
  name: warm-start-test
  namespace: adrian-warm-start-test
  labels:
    app: warm-start-test
spec:
  ports:
  - name: http
    port: 8080
    protocol: TCP
    targetPort: 8080
  selector:
    app: warm-start-test
  sessionAffinity: None
  type: ClusterIP
---
apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
  name: warm-start-test
  namespace: adrian-warm-start-test
  labels:
    app: warm-start-test
spec:
  gateways:
  - istio-system/secure-istio-gateway
  hosts:
  - warm-start-test.example.com
  http:
  - name: wiremock
    route:
    - destination:
        host: warm-start-test.adrian-warm-start-test.svc.cluster.local
        port:
          number: 8080

I tried creating the following DestinationRule and EnvoyFilter to configure the warm-start:

apiVersion: networking.istio.io/v1beta1
kind: DestinationRule
metadata:
  name: warm-start-test
  namespace: adrian-warm-start-test
  labels:
    app: warm-start-test
spec:
  exportTo:
  - .
  host: warm-start-test.example.com
  trafficPolicy:
    loadBalancer:
      simple: ROUND_ROBIN
      warmupDurationSecs: 5m

  workloadSelector:
    matchLabels:
      app: warm-start-test
---
apiVersion: networking.istio.io/v1alpha3
kind: EnvoyFilter
metadata:
  name: warm-start
  namespace: adrian-warm-start-test
spec:
  workloadSelector:
    labels:
      app: warm-start-test
  configPatches:
  - applyTo: CLUSTER
    match:
      cluster:
        name: outbound|8080||warm-start-test.adrian-warm-start-test.svc.cluster.local
      context: GATEWAY
    patch:
      operation: MERGE
      value:
        lb_policy: ROUND_ROBIN
        round_robin_lb_config:
          slow_start_config:
            aggression:
              default_value: 0.5
            min_weight_percent:
              value: 0.5
            slow_start_window: 5m
  - applyTo: CLUSTER
    match:
      cluster:
        name: inbound|8080||warm-start-test.adrian-warm-start-test.svc.cluster.local
      context: GATEWAY
    patch:
      operation: MERGE
      value:
        lb_policy: ROUND_ROBIN
        round_robin_lb_config:
          slow_start_config:
            aggression:
              default_value: 0.5
            min_weight_percent:
              value: 0.5
            slow_start_window: 5m

But these have no effect, either together or separately.

Can someone help me get this working?

My colleague managed to get this working by using the following DestinationRule:

apiVersion: networking.istio.io/v1beta1
kind: DestinationRule
metadata:
  name: warm-start-test
  namespace: adrian-warm-start-test
spec:
  host: warm-start-test.example.com
  trafficPolicy:
    loadBalancer:
      warmupDurationSecs: 5m

The settings in the EnvoyFilter did not appear to have any effect so we removed the EnvoyFilter entirely.

The warm-up ramp-up is linear over the specified duration and the traffic that would have gone to the new pod is instead sent to one other “helper” pod. That is, traffic is initially doubled to one other pod and ramps down as the new pod traffic ramps up. Other pods continue receiving a balanced load throughout the warm-up period. It is not clear how the “helper” pod is selected.