2022-09-02 09:08:19 +00:00
|
|
|
# Runtime View
|
|
|
|
|
|
|
|
```mermaid
|
|
|
|
C4Context
|
|
|
|
title Runtime
|
|
|
|
Enterprise_Boundary(b0, "Infrastructure") {
|
|
|
|
System(dns, "DNS", "Management of DNS-Entries. We use aws/Route53")
|
|
|
|
SystemDb(backup, "Storage for backup", "We use aws/S3")
|
|
|
|
System(grafana, "Grafana Cloud", "Monitoring your apps")
|
|
|
|
System(devops, "DevOps Workstation")
|
|
|
|
|
|
|
|
|
|
|
|
Container_Boundary(srv, "Small Server") {
|
|
|
|
Container_Boundary(k3s, "K3S") {
|
|
|
|
Component(lb, "metallb")
|
|
|
|
Component(api, "K8s API")
|
2022-12-23 14:52:43 +00:00
|
|
|
Component(prometheus, "Prometheus in proxy mode")
|
2022-09-02 09:08:19 +00:00
|
|
|
Container_Boundary(app, "Application") {
|
|
|
|
Component(app, "App-container")
|
|
|
|
Component(app-backup, "backup & restore-container using restic")
|
|
|
|
Container_Boundary(app-storage, "Storage") {
|
|
|
|
ComponentDb(app-file-storage, "file storage")
|
|
|
|
ComponentDb(app-db-storage, "postgres")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
Component(ipv4, "public ipv4")
|
|
|
|
Component(ipv6, "public ipv6")
|
|
|
|
Component(localip, "local-ip")
|
|
|
|
Component(ssh, "ssh tunnel")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Rel(devops, ssh, "ssh")
|
|
|
|
Rel(ssh, localip, "tcp")
|
|
|
|
Rel(localip, api, "tcp")
|
|
|
|
|
|
|
|
Rel(ipv4, lb, "tcp")
|
|
|
|
Rel(ipv6, lb, "tcp")
|
|
|
|
Rel(lb, app, "tcp")
|
|
|
|
Rel(app, app-file-storage, "file")
|
|
|
|
Rel(app, app-db-storage, "*dbc")
|
|
|
|
|
2022-12-23 14:52:43 +00:00
|
|
|
Rel(prometheus, api, "http")
|
|
|
|
Rel(prometheus, grafana, "http")
|
2022-09-02 09:08:19 +00:00
|
|
|
|
|
|
|
Rel(app-backup, backup, "s3")
|
|
|
|
Rel(app-backup, app-file-storage, "file")
|
|
|
|
Rel(app-backup, app-db-storage, "*dbc")
|
|
|
|
|
|
|
|
```
|
2024-02-20 14:23:59 +00:00
|
|
|
|
|
|
|
# Layout of a component on example of namespace
|
|
|
|
|
|
|
|
|
|
|
|
```mermaid
|
|
|
|
classDiagram
|
|
|
|
|
|
|
|
class namespace {
|
|
|
|
config? // the external representation
|
|
|
|
default-config // static defaults
|
|
|
|
generate(config, auth) seq
|
|
|
|
}
|
|
|
|
class namespace-internal {
|
|
|
|
config? // the internal representation
|
|
|
|
generate-namespace(config) map
|
|
|
|
}
|
|
|
|
```
|