Search code examples
plantuml

Plantuml: how to avoid overlap of self arrows and directional and select side of component


Problem

  • Steps 3 and 4 are overlapping
  • I'd like to move Step 3's arrow on the left side of the component
  • I can't find a way to move it to the other side

enter image description here

@startuml
!includeurl https://raw.githubusercontent.com/michiel/plantuml-kubernetes-sprites/master/resource/k8s-sprites-unlabeled-full.iuml

!define ICONURL https://raw.githubusercontent.com/tupadr3/plantuml-icon-font-sprites/v2.2.0
!includeurl ICONURL/common.puml
!includeurl ICONURL/devicons/docker.puml
!includeurl ICONURL/devicons/git.puml
!includeurl ICONURL/font-awesome-5/gitlab.puml
!includeurl ICONURL/font-awesome-5/sync.puml

!define CLOUDOGUURL https://raw.githubusercontent.com/cloudogu/plantuml-cloudogu-sprites/master
!includeurl CLOUDOGUURL/tools/k8s.puml
!includeurl CLOUDOGUURL/dogus/cloudogu.puml  

!define CLOUDOGU_BLUE #23a3dd
!define COLOR_ABOVE_TRANSPARENT_BACKGROUND BLACK

' Remove this line for transparent background
skinparam backgroundColor #FFFFF0

title <color:blue><$k8s></color> **GitOps (with Application Repo)**<color:blue><$k8s></color>\n

skinparam actorStyle awesome

actor Developer as user

together {
    rectangle "<$git>\nService Repo" as appRepo
    rectangle "<$git>\nService-Deploy Repo" as configRepo
}

rectangle "<$gitlab>\nGitlab CI" as ciServer
rectangle "<$docker>\nGitlab\nContiner\nRegistry" as registry

rectangle "<$k8s>\nK8S Cluster" as k8s {
    rectangle "<$sync>\nArgoCD\noperator" as operator
    rectangle "<$k8s>\nAPI-Server" as apiServer
    rectangle "<$k8s>\nkubelet" as kubelet
}

user -> appRepo : 1. git push
appRepo <-[#blue;dotted] ciServer : 2. git pull
ciServer <- ciServer : 3. docker build
ciServer -> registry : 4. docker push
configRepo <-- ciServer : 5. git push
configRepo <-[#blue;dotted] operator : 6. git pull
operator -> apiServer : 7. kubectl apply
kubelet -> registry : 9. docker pull
apiServer <-[#blue;dotted] kubelet : 8. watch

legend
<color:#23a3dd><$cloudogu></color> [[https://super.cash super.cash]]
end legend

skinparam arrow {
    Color COLOR_ABOVE_TRANSPARENT_BACKGROUND
    FontColor COLOR_ABOVE_TRANSPARENT_BACKGROUND
}

skinparam actor {
    BackgroundColor CLOUDOGU_BLUE
    BorderColor #16688d
    FontColor COLOR_ABOVE_TRANSPARENT_BACKGROUND
}

skinparam rectangle {
    BackgroundColor CLOUDOGU_BLUE
    BorderColor #16688d
    FontColor WHITE
    backgroundColor<<node>> WHITE
    FontColor<<node>> CLOUDOGU_BLUE
}

skinparam interface {
    BackgroundColor WHITE
    BorderColor #16688d
}

skinparam note {
    BackgroundColor WHITE
    BorderColor #16688d
}

skinparam legend {
    BackgroundColor WHITE
    BorderColor #16688d
}
@enduml

Attempt to solve

  • I tried to use the left switch on the arrow indicator, but it changed the overall aspect to something completely unexpected
ciServer -left-> ciServer : 3. docker build

The result is as follows:

  • It affected another component and not the one described

enter image description here


Solution

  • how about this

    ciServer -down-> registry : 4. docker push
    

    enter image description here

    As I try previously, the direction problem happens only when point to itself