smi-spec icon indicating copy to clipboard operation
smi-spec copied to clipboard

TrafficTarget Source and Destination Namespacing

Open dtomcej opened this issue 4 years ago • 5 comments

The issue

Currently, the namespace field in trafficTargets are not mandatory:

source destination

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?

dtomcej avatar May 07 '20 18:05 dtomcej

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 avatar May 07 '20 18:05 grampelberg

@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.

dtomcej avatar May 07 '20 18:05 dtomcej

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.

grampelberg avatar May 07 '20 18:05 grampelberg

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 avatar May 11 '20 21:05 shashankram

@shashankram I'm not sure I understand the question? The destination is inside the namespace with the policy. It'll always be that way.

grampelberg avatar May 11 '20 21:05 grampelberg