Skip to content

Commit

Permalink
Import diagrams from cloudogu/gitops-talks@b9d8f10d
Browse files Browse the repository at this point in the history
Easier to maintain them in this repo
  • Loading branch information
schnatterer committed Oct 24, 2023
1 parent c9d19a6 commit ca0f913
Show file tree
Hide file tree
Showing 17 changed files with 1,193 additions and 13 deletions.
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.idea/
*.iml
*.iws
*.eml
out/
.DS_Store
.svn
log/*.log
tmp/**
*.swo
*.swp
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,13 @@ Let's group GitOps patterns into separate categories to make them easier to gras

* **Hub and Spoke** [^1][^2] 1 Operator : n Clusters <span id="hub-and-spoke"/>
Synonyms: Management Cluster [^18] - sounds familiar, e.g. from Cluster API, but it requires a cluster. In SaaS/PaaS constellations, the central instance may not even be operated in a cluster. Therefore, the term "Hub and Spoke" seems more fitting to us, especially since it is also well known from computer networks or logistics.
![Hube and spoke](https://raw.githubusercontent.com/cloudogu/gitops-talks/97053fc/images/deployment-hub-and-spoke.svg)
![Hube and spoke](https://raw.githubusercontent.com/cloudogu/gitops-patterns/main/src/svg/deployment-hub-and-spoke.svg)
* **Instance Per Cluster** [^18] : 1 Operator : 1 Cluster <span id="standalone"/> <span id="instance-per-cluster"/>
Synonyms: Standalone [^1] - could apply to both "Instance per Cluster" and "Instance per Namespace"; does not define the relationship to clusters and namespaces precisely enough, as not every operator supports both deployment patterns.
![Instance Per Cluster](https://raw.githubusercontent.com/cloudogu/gitops-talks/97053fc/images/deployment-instance-per-cluster.svg)
![Instance Per Cluster](https://raw.githubusercontent.com/cloudogu/gitops-patterns/main/src/svg/deployment-instance-per-cluster.svg)
* **Instance per Namespace**: n Operators : 1 Cluster <span id="namespaced"/> <span id="instance-per-namespace"/>
Synonyms: Namespaced [^3]
![Instance per Namespace](https://raw.githubusercontent.com/cloudogu/gitops-talks/97053fc/images/deployment-instance-per-namespace.svg)
![Instance per Namespace](https://raw.githubusercontent.com/cloudogu/gitops-patterns/main/src/svg/deployment-instance-per-namespace.svg)

More Patterns:
* Split-Instance[^1]: 1 Operator : n Clusters; components split between management and target clusters
Expand All @@ -120,11 +120,11 @@ More Patterns:
* **Repo per Application** [^2][^4] <span id="repo-per-app"/>
Implementations:
* Config-Code-Separation [^19] <span id="config-code-separation"/>
<img width=50% src="https://www.plantuml.com/plantuml/proxy?src=https://raw.githubusercontent.com/cloudogu/gitops-talks/b167701/docs/image-sources/gitops-with-app-repo-manual.puml&fmt=svg">
<img width=50% src="https://www.plantuml.com/plantuml/proxy?src=https://raw.githubusercontent.com/cloudogu/gitops-patterns/main/src/puml/gitops-with-app-repo-separation.puml&fmt=svg">
* Config replication [^3] <span id="config-replication"/>
<img width=50% src="https://www.plantuml.com/plantuml/proxy?src=https://raw.githubusercontent.com/cloudogu/gitops-talks/main/docs/image-sources/gitops-with-app-repo-ci-git.puml&fmt=svg">
<img width=50% src="https://www.plantuml.com/plantuml/proxy?src=https://raw.githubusercontent.com/cloudogu/gitops-patterns/main/src/puml/gitops-with-app-repo-ci-git.puml&fmt=svg">
* Repo pointer [^6][^3] <span id="repo-pointer"/>
<img width=50% src="https://www.plantuml.com/plantuml/proxy?src=https://raw.githubusercontent.com/cloudogu/gitops-talks/main/docs/image-sources/gitops-with-app-repo-pointer.puml&fmt=svg">
<img width=50% src="https://www.plantuml.com/plantuml/proxy?src=https://raw.githubusercontent.com/cloudogu/gitops-patterns/main/src/puml/gitops-with-app-repo-pointer.puml&fmt=svg">
* **Repo per environment** [^4] <span id="repo-per-env"/>
Synonym: Environment per repository[^5], Repo per Stage

Expand Down Expand Up @@ -161,17 +161,17 @@ For promotion, we see different sets of patterns:
* via Umbrella Chart[^12] <span id="umbrella-chart"/>
* via `helm template` on CI server
* **Global Environments** vs **Environment per App**[^3] <span id="global-vs-env-per-app"/>
![Global Envs](https://raw.githubusercontent.com/cloudogu/gitops-talks/97053fc/images/global-environments.svg)
![Env per app](https://raw.githubusercontent.com/cloudogu/gitops-talks/97053fc/images/environment-per-app.svg)
![Global Envs](https://raw.githubusercontent.com/cloudogu/gitops-patterns/main/src/svg/global-environments.svg)
![Env per app](https://raw.githubusercontent.com/cloudogu/gitops-patterns/main/src/svg/environment-per-app.svg)
* **Config update** <span id="config-update"/>
Who updates image (version) in GitOps repo, creates branch and PR?
* Manual: Human pushes branch and create PR 🥵
* CI Server: Build job pushes branch, creates PR
<img width=50% src="https://www.plantuml.com/plantuml/proxy?src=https://raw.githubusercontent.com/cloudogu/gitops-talks/main/docs/image-sources/gitops-with-app-repo-ci-git.puml&fmt=svg">
<img width=50% src="https://www.plantuml.com/plantuml/proxy?src=https://raw.githubusercontent.com/cloudogu/gitops-patterns/main/src/puml/gitops-with-app-repo-separation.puml&fmt=svg">
* Image Updater: Operator pushes branch, create PR manually
<img width=50% src="https://www.plantuml.com/plantuml/proxy?src=https://raw.githubusercontent.com/cloudogu/gitops-talks/main/docs/image-sources/gitops-with-image-updater.puml&fmt=svg">
<img width=50% src="https://www.plantuml.com/plantuml/proxy?src=https://raw.githubusercontent.com/cloudogu/gitops-patterns/main/src/puml/gitops-with-image-updater.puml&fmt=svg">
* Dependency Bot: Bot pushes branch, creates PR
<img width=50% src="https://www.plantuml.com/plantuml/proxy?src=https://raw.githubusercontent.com/cloudogu/gitops-talks/main/docs/image-sources/gitops-with-renovate.puml&fmt=svg">
<img width=50% src="https://www.plantuml.com/plantuml/proxy?src=https://raw.githubusercontent.com/cloudogu/gitops-patterns/main/src/puml/gitops-with-renovate.puml&fmt=svg">

### Wiring

Expand Down Expand Up @@ -295,9 +295,9 @@ Here are some other examples that we haven't had a chance to look at in more det
* GitOps process design ≈ GitOps repository structures,
* GitOps Operator ≈ GitOps controller ≈ GitOps agent
* Config Repo = GitOps repo, Infra repo, Payload repo
![Config repo example](https://raw.githubusercontent.com/cloudogu/gitops-talks/97053fc/images/gitops-repo-example.svg)
![Config repo example](https://raw.githubusercontent.com/cloudogu/gitops-patterns/main/src/svg/config-repo-example.svg)
* App repo = Source code repo, Source repo
![App repo example](https://raw.githubusercontent.com/cloudogu/gitops-talks/97053fc/images/app-repo-example.svg)
![App repo example](https://raw.githubusercontent.com/cloudogu/gitops-patterns/main/src/svg/app-repo-example.svg)
* Environment = Stage
* Folder = Directory
* Templating ≈ Patching, Overlay, Rendering, Bundling, Packaging?
Expand Down
58 changes: 58 additions & 0 deletions src/puml/gitops-with-app-repo-ci-git.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
@startuml

!includeurl https://raw.githubusercontent.com/michiel/plantuml-kubernetes-sprites/master/resource/k8s-sprites-unlabeled-25pct.iuml

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

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

!define CLOUDOGU_BLUE #23a3dd
!define COLOR_ABOVE_TRANSPARENT_BACKGROUND #777

skinparam backgroundcolor TRANSPARENT
skinparam DefaultFontColor COLOR_ABOVE_TRANSPARENT_BACKGROUND
skinparam sequenceArrowColor COLOR_ABOVE_TRANSPARENT_BACKGROUND

skinparam actorStyle awesome

together {
actor Developer as user
rectangle "<$git>\nApp Repo" as appRepo
rectangle "<$git>\nConfig Repo" as configRepo
rectangle "<$jenkins>\nCI Server" as ciServer
}

rectangle "<$k8s>\nK8s Cluster" as k8s {
rectangle "<$sync>\nGitOps\noperator" as operator
}
rectangle "<$docker>\nOCI Registry" as registry

user -> appRepo : push
appRepo -[hidden]> configRepo
appRepo <-- ciServer : pull
configRepo <-- ciServer : push\nconfig
ciServer -> registry : push image
k8s --> registry : pull image
configRepo <- k8s : pull\nconfig
k8s -> k8s : deploy

skinparam actor {
BackgroundColor CLOUDOGU_BLUE
BorderColor #16688d
}

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

@enduml
54 changes: 54 additions & 0 deletions src/puml/gitops-with-app-repo-ci-oci.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
@startuml

!includeurl https://raw.githubusercontent.com/michiel/plantuml-kubernetes-sprites/master/resource/k8s-sprites-unlabeled-25pct.iuml

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

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

!define CLOUDOGU_BLUE #23a3dd
!define COLOR_ABOVE_TRANSPARENT_BACKGROUND #777

skinparam backgroundcolor TRANSPARENT
skinparam DefaultFontColor COLOR_ABOVE_TRANSPARENT_BACKGROUND
skinparam sequenceArrowColor COLOR_ABOVE_TRANSPARENT_BACKGROUND

skinparam actorStyle awesome

together {
actor Developer as user
rectangle "<$git>\nGit" as appRepo
rectangle "<$jenkins>\nCI Server" as ciServer
}

rectangle "<$k8s>\nK8s Cluster" as k8s {
rectangle "<$sync>\nGitOps\noperator" as operator
}
rectangle "<$docker>\nOCI Registry" as registry

user -> appRepo : push
appRepo <-- ciServer : pull
ciServer -> registry : push\nimage\n+config
k8s --> registry : pull image+config
k8s -> k8s : deploy

skinparam actor {
BackgroundColor CLOUDOGU_BLUE
BorderColor #16688d
}

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

@enduml
59 changes: 59 additions & 0 deletions src/puml/gitops-with-app-repo-ci.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
@startuml

!includeurl https://raw.githubusercontent.com/michiel/plantuml-kubernetes-sprites/master/resource/k8s-sprites-unlabeled-25pct.iuml

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

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

!define CLOUDOGU_BLUE #23a3dd
!define COLOR_ABOVE_TRANSPARENT_BACKGROUND #777

skinparam backgroundcolor TRANSPARENT
skinparam DefaultFontColor COLOR_ABOVE_TRANSPARENT_BACKGROUND
skinparam sequenceArrowColor COLOR_ABOVE_TRANSPARENT_BACKGROUND

skinparam actorStyle awesome

together {
actor Developer as user
rectangle "<$git>\nApp Repo" as appRepo
rectangle "<$git>\nConfig Repo" as configRepo
rectangle "<$jenkins>\nCI Server" as ciServer
}

rectangle "<$k8s>\nK8s Cluster" as k8s {
rectangle "<$sync>\nGitOps\noperator" as operator
}
rectangle "<$docker>\nOCI Registry" as registry

user -> appRepo : push\ncode\n+config
appRepo -[hidden]> configRepo
appRepo <-- ciServer : pull
configRepo <-- ciServer : push\nconfig\n+create PR
ciServer -> registry : push
k8s --> registry : pull
configRepo <- k8s : pull
k8s -> k8s : deploy

skinparam actor {
BackgroundColor CLOUDOGU_BLUE
BorderColor #16688d
}

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


@enduml
59 changes: 59 additions & 0 deletions src/puml/gitops-with-app-repo-pointer.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
@startuml
!includeurl https://raw.githubusercontent.com/michiel/plantuml-kubernetes-sprites/master/resource/k8s-sprites-unlabeled-25pct.iuml

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

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

!define CLOUDOGU_BLUE #23a3dd
!define COLOR_ABOVE_TRANSPARENT_BACKGROUND #777

skinparam backgroundcolor TRANSPARENT
skinparam DefaultFontColor COLOR_ABOVE_TRANSPARENT_BACKGROUND
skinparam sequenceArrowColor COLOR_ABOVE_TRANSPARENT_BACKGROUND

skinparam actorStyle awesome

together {
actor Developer as user
rectangle "<$git>\nApp Repo" as appRepo
rectangle "<$git>\nConfig Repo" as configRepo
rectangle "<$jenkins>\nCI Server" as ciServer
}

rectangle "<$k8s>\nK8s Cluster" as k8s {
rectangle "<$sync>\nGitOps\noperator" as operator
}
rectangle "<$docker>\nOCI Registry" as registry

user -> appRepo : push\ncode\n+config
appRepo -[hidden]> configRepo
appRepo <- configRepo : point to
appRepo <-- ciServer : pull
ciServer -> registry : push
k8s --> registry : pull
configRepo <- k8s : pull
appRepo <- k8s : pull
k8s -> k8s : deploy


skinparam actor {
BackgroundColor CLOUDOGU_BLUE
BorderColor #16688d
}

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

@enduml
57 changes: 57 additions & 0 deletions src/puml/gitops-with-app-repo-replication.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
@startuml

!includeurl https://raw.githubusercontent.com/michiel/plantuml-kubernetes-sprites/master/resource/k8s-sprites-unlabeled-25pct.iuml

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

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

!define CLOUDOGU_BLUE #23a3dd
!define COLOR_ABOVE_TRANSPARENT_BACKGROUND #777

skinparam backgroundcolor TRANSPARENT
skinparam DefaultFontColor COLOR_ABOVE_TRANSPARENT_BACKGROUND
skinparam sequenceArrowColor COLOR_ABOVE_TRANSPARENT_BACKGROUND

skinparam actorStyle awesome
together {
actor Developer as user
rectangle "<$git>\nApp Repo" as appRepo
rectangle "<$git>\nConfig Repo" as configRepo
rectangle "<$jenkins>\nCI Server" as ciServer
}

rectangle "<$k8s>\nK8s Cluster" as k8s {
rectangle "<$sync>\nGitOps\noperator" as operator
}
rectangle "<$docker>\nOCI Registry" as registry

user -> appRepo : push\ncode\n+config
appRepo -[hidden]> configRepo
appRepo <-- ciServer : pull
configRepo <-- ciServer : push\nconfig
ciServer -> registry : push
k8s --> registry : pull
configRepo <- k8s : pull
k8s -> k8s : deploy

skinparam actor {
BackgroundColor CLOUDOGU_BLUE
BorderColor #16688d
}

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

@enduml
Loading

0 comments on commit ca0f913

Please sign in to comment.