smi-spec
smi-spec copied to clipboard
TrafficTarget Source and Destination Namespacing
The issue
Currently, the namespace field in trafficTargets are not mandatory:
But there is no guidance for how to handle these fields if they are empty.
The question
- Should an empty namespace field be treated as the default namespace?
- Should an empty namespace field be treated as the namespace of the trafficTarget object?
- Should the namespace field be required to prevent this issue in its entirety?
I would like to remove the namespace field from the destination entirely and make it mandatory for the source personally. Would love to know how other folks feel there.
@grampelberg By removing the namespace field from the destination, you would like it to assume the destination is in the same namespace as the TT object itself?
I personally think that the TT should be in either the source or the destination namespace personally. Being that we have the destination as mandatory, I feel that I agree the destination should inherit the namespace from the TT itself.
From a permissions perspective, giving ownership of whether a source can talk to a destination or not seems weird. Like, I get to choose whether I can go into your house or not (and not you). It feels like the destination should be the one making decisions on who can enter the house or not.
Good point @grampelberg on giving the destination ownership over deciding which sources are allowed to talk to it. However without a namespace, how would the service mesh implementation differentiate destinations in different namespaces with the same name?
@shashankram I'm not sure I understand the question? The destination is inside the namespace with the policy. It'll always be that way.