kumahq / kuma

🐻 The multi-zone service mesh for containers, Kubernetes and VMs. Built with Envoy. CNCF Sandbox Project.
https://kuma.io/install
Apache License 2.0
3.61k stars 332 forks source link

Merging of policies results in not applying policy on some outbound #6426

Closed jakubdyszkiewicz closed 1 year ago

jakubdyszkiewicz commented 1 year ago

What happened?

Reported by Brent Yarger. Apparently when applied this policy

apiVersion: kuma.io/v1alpha1
kind: MeshRetry
metadata:
  name: retry-all
  namespace: kong-mesh-system
  labels:
    kuma.io/mesh: default 
spec:
  targetRef:
    kind: Mesh
  to:
    - targetRef:
        kind: Mesh
      default:
        http:
          numRetries: 1
          backOff:
            baseInterval: 5s
            maxInterval: 1m
          retryOn:
            - "5xx"

and

apiVersion: kuma.io/v1alpha1
kind: MeshRetry
metadata:
  name: retry-echo-to-mockserver
  namespace: kong-mesh-system
  labels:
    kuma.io/mesh: default # optional, defaults to `default` if unset
spec:
  targetRef:
    kind: MeshService
    name: echo-service_default_svc_8080
  to:
    - targetRef:
        kind: MeshService
        name: mockserver_mockserver_svc_1080
      default:
        http:
          numRetries: 5
          backOff:
            baseInterval: 10s
          retryOn:
            - "5xx"

results in the other upstreams in the echo service sidecar get retry config removed.

jakubdyszkiewicz commented 1 year ago

I confirm the issue