-
Notifications
You must be signed in to change notification settings - Fork 338
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
TrafficPermissions can shadow one another if the match the same destination #2417
Comments
An inbound gets exactly 1 best-match TrafficPermission policy applied to it. So you can't apply both of these policies to same destination service at once (since it's inbound can only have 1 policy). |
Right, just to reword my question and the idea behind this ticket:
I'm not opposed to the single destination restriction, it just seems we might be able to improve the UX |
Will this work? apiVersion: kuma.io/v1alpha1
kind: TrafficPermission
mesh: default
metadata:
name: allow-b-c-to-a
spec:
sources:
- match:
kuma.io/service: b
- match:
kuma.io/service: c
destinations:
- match:
kuma.io/service: a Anyway, I think validation is a good idea. We have to provide more visibility of what policies were applied between Service A and Service B. Ideally it should be |
This does work but the user that hit did point out that: a) Creation of a new permission broke something existing I think @bdecoste was especially worried about users breaking everything by accident. |
Policies just float around in the API until they match something, and they can be pre-empted at anytime. Within that model it's hard for users to predict what will happen, so maybe we can give better tooling. For example
|
#3330 will fix this |
This issue was inactive for 30 days it will be reviewed in the next triage meeting and might be closed. |
This issue was inactive for 30 days it will be reviewed in the next triage meeting and might be closed. |
This issue was inactive for 30 days it will be reviewed in the next triage meeting and might be closed. |
This issue was inactive for 30 days it will be reviewed in the next triage meeting and might be closed. |
This issue was inactive for 30 days it will be reviewed in the next triage meeting and might be closed. |
New policy matching as explained in: https://github.com/kumahq/kuma/blob/master/docs/madr/decisions/005-policy-matching.md solves this problem. |
@cpu601 pointed out that:
The second will take over the first one resulting in service
b
not able to communicate with servicea
anymore.This has 2 issues:
If the answer to 2 is no and we decide that only 1 destination matcher set (.i.e: the map at
spec.destinations.match
) should be possible we should introduce validation at creation/modification time to not process this policy at all and avoid the shadowing explained here.The text was updated successfully, but these errors were encountered: