feat: add an option to restrict comm between units of the charm#109
feat: add an option to restrict comm between units of the charm#109adhityaravi wants to merge 4 commits intomainfrom
Conversation
|
A few questions -
Opinions on both? |
This comment was marked as outdated.
This comment was marked as outdated.
That's fine. Should default to allowing to not break the current behavior. I'd invert it to signal that it's an opt-out.
|
a065c6c to
62770a3
Compare
|
Doc update here |
| cross_model_mesh_provides_name: str = "provide-cmr-mesh", | ||
| policies: Optional[List[Union[Policy, AppPolicy, UnitPolicy]]] = None, | ||
| auto_join: bool = True, | ||
| restrict_cross_unit_communication: bool = False, |
There was a problem hiding this comment.
Let's make this name a bit shorter. peer_communication is my suggestion.
There was a problem hiding this comment.
Also I think it should be an allow option and default to false. In other words, apps should not be able to talk to themselves unless they set this to True.
There was a problem hiding this comment.
I like peer_communication the best of all the suggestion. I will go with that.
The reason I think this should be opt in is that it forces the charm author to actually acknowledge the flag and think about it. I don't think we really care about the breaking change at this point since we are the only current consumers. I am not strong on this so happy to go with whatever @simskij says in response to this. |
|
superseded by #112 |
Issue
fixes issue #106
Solution
auto_allow_intra_app_accessbuild_mesh_policiesmethod automatically appends anUnitPolicywith from the target apps service account selecting all the pods with the target app labelTesting Instructions
Can be tested using scaled Service Mesh Tester with more than 1 unit by setting the
auto_allow_intra_app_accessin the ServiceMeshConsumer to true and curling another units pod url from a unit.