3

Please tell me how to make [VirtualService] as VS in this code so that it is both in the "Ingress" group and in the "Application" group. it turns out that the intersection and the component [VirtualService] can be either in the "Ingress" group, or in the "Application", and you need both there and there. Help please

@startuml
' Remove shadows
skinparam shadowing false
skinparam BackgroundColor transparent
skinparam componentStyle rectangle
skinparam roundCorner 15
 
left to right direction
skinparam linetype polyline
skinparam linetype ortho

И3#transparent;line:transparent;text:transparent
rectangle "Кластер OpenShift" #MOTIVATION  {
    component "Точка входа" as TV #white{
[Rout] as ROUT #grey;text:white
И3->ROUT #blue
И3<..ROUT #blue
}
rectangle "OS Namespase" as OS #white {
component Application as PR #LightPink {

[VirtualService] as VS #grey;text:white


[App Service] as AS #grey;text:white
[App\nPod] as AP

}
    
 component Ingress as IG #LightSkyBlue {

 [Ingress\nService] as IS #grey;text:white

[Geteway)] as G #grey;text:white
[Ingress\nPod] as IP
 [VirtualService] as VS #grey;text:white
 }

component Приложение as PR #LightPink {

[VirtualService] as VS #grey;text:white


[App Service] as AS #grey;text:white
[App\nPod] as AP

}
}
}

ROUT ->IS #blue 
ROUT  <.. IS #blue
IS ->G #blue 
IS <..G #blue

G->IP #blue 
G<..IP #blue

IP->VS #blue 
IP<..VS #blue

VS->AS #blue 
VS<..AS #blue

AS->AP #blue 
AS<..AP #blue



@enduml


enter image description here

albert
  • 8,285
  • 3
  • 19
  • 32
Svetlana
  • 31
  • 1
  • What is the difference between this question and the question https://stackoverflow.com/questions/66381662/intersection-of-objects-in-a-uml-diagram-when-one-element-belongs-to-two-groups ? – albert Feb 26 '21 at 10:58

1 Answers1

2

Since GraphViz is the underlying engine, it's not possible (see this answer).

However, you could be creative and create a shared group that has both colors.

@startuml
' Remove shadows
skinparam shadowing false
skinparam BackgroundColor transparent
skinparam componentStyle rectangle
skinparam roundCorner 0
 
left to right direction
skinparam linetype ortho

И3#transparent;line:transparent;text:transparent
rectangle "Кластер OpenShift" #MOTIVATION  {
  component "Точка входа" as TV #white{
    [Rout] as ROUT #grey;text:white
    И3->ROUT #blue
    И3<..ROUT #blue
  }
  rectangle "OS Namespace" as OS #white {
    rectangle Application as PR #LightPink;line:transparent {
      [App Service] as AS #grey;text:white
      [App\nPod] as AP
    }
    
    rectangle Ingress as IG #LightSkyBlue;line:transparent {
      [Ingress\nService] as IS #grey;text:white
      [Gateway] as G #grey;text:white
      [Ingress\nPod] as IP
    }

    rectangle "//(shared)//\n" as hidden #LightSkyBlue|LightPink;line:transparent{
      [VirtualService] as VS #grey;text:white
    }
  }
}


ROUT ->IS #blue 
ROUT  <.. IS #blue
IS ->G #blue 
IS <..G #blue

G-> IP #blue 
G<..IP #blue

IP->VS #blue 
IP<..VS #blue

VS->AS #blue 
VS<..AS #blue

AS->AP #blue 
AS<..AP #blue

@enduml

enter image description here

Fuhrmanator
  • 11,459
  • 6
  • 62
  • 111