Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Istio Subset-level traffic splitting removes other DestinationRoutes #3125

Open
2 tasks done
dnguy078 opened this issue Oct 25, 2023 · 0 comments
Open
2 tasks done

Istio Subset-level traffic splitting removes other DestinationRoutes #3125

dnguy078 opened this issue Oct 25, 2023 · 0 comments
Labels
bug Something isn't working istio

Comments

@dnguy078
Copy link
Contributor

dnguy078 commented Oct 25, 2023

Checklist:

  • I've included steps to reproduce the bug.
  • I've included the version of argo rollouts.

Describe the bug

  • Argo Rollouts removes any subset level DestinationRoutes in a VirtualService that it not modifying during a Canary Rollout.
  • I have a VirtualService where I want to route a certain percentage to a newer system while maintaining a canary release for a legacy service.
  • In the following case below, Argo Rollouts will remove the DestinationRoutes with host rollout-alpha-example following a rollout. Ideally, I'd also want the flexibility to define a maxWeight in which Rollouts would setWeight up to the maxWeight for a HTTP DestinationRoute.
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
  name: istio-gateway
  labels:
    app: istio-gateway
spec:
  selector:
    istio: ingressgateway
  servers:
  - port:
      number: 80
      name: http
      protocol: HTTP
    hosts:
    - "*"
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: rollout-vsvc
spec:
  gateways:
  - istio-rollout-gateway
  http:
  - match:
    - uri:
        prefix: "/somepath"
  - name: primary
    route:
    - destination:
        host: rollout-example
        subset: stable
      weight: 100
    - destination:
        host: rollout-example
        subset: canary
      weight: 0
    - destination:
        host: rollout-alpha-example
        subset: stable1
      weight: 20
---
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
  name: rollout-destrule
spec:
  host: rollout-example
  subsets:
  - name: canary
    labels:
      app: rollout-example
  - name: stable
    labels:
      app: rollout-example
---
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
  name: rollout-alpha-destrule
spec:
  host: rollout-alpha-example
  subsets:
  - name: stable1
    labels:
      app: rollout-alpha-example

Rollout.yaml

---
apiVersion: argoproj.io/v1alpha1
kind: Rollout
metadata:
  name: rollout-example
  labels:
    app: rollout-example
spec:
  strategy:
    canary:
      trafficRouting:
        istio:
          virtualService:
            name: rollout-vsvc  
            routes:
            - primary  
          destinationRule:
            name: rollout-destrule  
            canarySubsetName: canary 
            stableSubsetName: stable
      steps:
        - setWeight: 50
        - pause: { duration: 10 }

  replicas: 4
  revisionHistoryLimit: 2
  selector:
    matchLabels:
      app: rollout-example
  template:
    metadata:
      labels:
        app: rollout-example
    spec:
      containers:
      - name: demo
        image: argoproj/rollouts-demo:blue
        imagePullPolicy: Always
        ports:
        - name: web
          containerPort: 8080
        resources:
          requests:
            memory: "64Mi"
            cpu: "100m"
          limits:
            memory: "128Mi"
            cpu: "140m"
---
apiVersion: v1
kind: Service
metadata:
  name: rollout-example
spec:
  ports:
  - port: 80
    targetPort: http
    protocol: TCP
    name: http
  selector:
    app: rollout-example

To Reproduce

  • Create above resources
  • kubectl argo rollouts set image rollout-example "*=argoproj/rollouts-demo:yellow"
  • Observe Argo Rollouts remove virtual service's destinationRoute rollout-alpha-example

Expected behavior

  • Argo Rollouts should not modify any other DestinationRoute not defined by spec.strategy.trafficRouting.istio.destinationRule.name

Screenshots

Version
v1.6.0

Logs

INFO[0022] Reconciling TrafficRouting with type 'Istio'  namespace=default rollout=rollout-example
INFO[0022] VirtualService `rollout-vsvc` set to desiredWeight '100'  event_reason="Updated VirtualService" namespace=default rollout=rollout-example
INFO[0022] Previous weights: &TrafficWeights{Canary:WeightDestination{Weight:50,ServiceName:,PodTemplateHash:77c794f4c8,},Stable:WeightDestination{Weight:50,ServiceName:,PodTemplateHash:5f6685b4fd,},Additional:[]WeightDestination{},Verified:nil,}  namespace=default rollout=rollout-example
INFO[0022] New weights: &TrafficWeights{Canary:WeightDestination{Weight:100,ServiceName:,PodTemplateHash:77c794f4c8,},Stable:WeightDestination{Weight:0,ServiceName:,PodTemplateHash:5f6685b4fd,},Additional:[]WeightDestination{},Verified:nil,}  namespace=default rollout=rollout-example
INFO[0022] Event(v1.ObjectReference{Kind:"Rollout", Namespace:"default", Name:"rollout-example", UID:"423d8966-fd28-4b7e-98ae-4bdfd48a55ec", APIVersion:"argoproj.io/v1alpha1", ResourceVersion:"2774866", FieldPath:""}): type: 'Normal' reason: 'Updated VirtualService' VirtualService `rollout-vsvc` set to desiredWeight '100'
INFO[0022] Traffic weight updated from 50 to 100         event_reason=TrafficWeightUpdated namespace=default rollout=rollout-example
INFO[0022] No Steps remain in the canary steps           namespace=default rollout=rollout-example
INFO[0022] Event(v1.ObjectReference{Kind:"Rollout", Namespace:"default", Name:"rollout-example", UID:"423d8966-fd28-4b7e-98ae-4bdfd48a55ec", APIVersion:"argoproj.io/v1alpha1", ResourceVersion:"2774866", FieldPath:""}): type: 'Normal' reason: 'TrafficWeightUpdated' Traffic weight updated from 50 to 100
INFO[0022] Event(v1.ObjectReference{Kind:"Rollout", Namespace:"default", Name:"rollout-example", UID:"423d8966-fd28-4b7e-98ae-4bdfd48a55ec", APIVersion:"argoproj.io/v1alpha1", ResourceVersion:"2774866", FieldPath:""}): type: 'Normal' reason: 'RolloutCompleted' Rollout completed update to revision 5 (77c794f4c8): Completed all 2 canary steps
INFO[0022] Rollout completed update to revision 5 (77c794f4c8): Completed all 2 canary steps  event_reason=RolloutCompleted namespace=default rollout=rollout-example
INFO[0022] Patched: {"status":{"availableReplicas":8,"canary":{"weights":{"canary":{"weight":100},"stable":{"weight":0}}},"conditions":[{"lastTransitionTime":"2023-10-24T16:44:58Z","lastUpdateTime":"2023-10-24T16:44:58Z","message":"Rollout has minimum availability","reason":"AvailableReason","status":"True","type":"Available"},{"lastTransitionTime":"2023-10-25T17:43:39Z","lastUpdateTime":"2023-10-25T17:43:39Z","message":"Rollout is not healthy","reason":"RolloutHealthy","status":"False","type":"Healthy"},{"lastTransitionTime":"2023-10-25T17:44:28Z","lastUpdateTime":"2023-10-25T17:44:28Z","message":"Rollout is paused","reason":"RolloutPaused","status":"False","type":"Paused"},{"lastTransitionTime":"2023-10-25T17:44:28Z","lastUpdateTime":"2023-10-25T17:44:32Z","message":"ReplicaSet \"rollout-example-77c794f4c8\" is progressing.","reason":"ReplicaSetUpdated","status":"True","type":"Progressing"},{"lastTransitionTime":"2023-10-25T17:44:32Z","lastUpdateTime":"2023-10-25T17:44:32Z","message":"RolloutCompleted","reason":"RolloutCompleted","status":"True","type":"Completed"}],"message":null,"phase":"Healthy","readyReplicas":8,"stableRS":"77c794f4c8"}}  generation=5 namespace=default resourceVersion=2774866 rollout=rollout-example
INFO[0022] persisted to informer                         generation=5 namespace=default resourceVersion=2774876 rollout=rollout-example
INFO[0022] Reconciliation completed                      generation=5 namespace=default resourceVersion=2774866 rollout=rollout-example time_ms=16.033625


Message from the maintainers:

Impacted by this bug? Give it a 👍. We prioritize the issues with the most 👍.

@dnguy078 dnguy078 added the bug Something isn't working label Oct 25, 2023
@dnguy078 dnguy078 changed the title Istio Istio Subset-level traffic splitting remove other DestinationRoutes not managed by Rollouts Oct 25, 2023
@dnguy078 dnguy078 changed the title Istio Subset-level traffic splitting remove other DestinationRoutes not managed by Rollouts Istio Subset-level traffic splitting removes other DestinationRoutes Oct 25, 2023
@dnguy078 dnguy078 closed this as completed Nov 1, 2023
@dnguy078 dnguy078 reopened this Nov 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working istio
Projects
None yet
Development

No branches or pull requests

2 participants