-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patharch-local.py
49 lines (42 loc) · 1.25 KB
/
arch-local.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
"""Source for the component diagram for local OpenID Connect authentication."""
import os
from diagrams import Cluster, Diagram, Edge
from diagrams.gcp.compute import KubernetesEngine
from diagrams.gcp.network import LoadBalancing
from diagrams.generic.storage import Storage
from diagrams.onprem.client import User
from diagrams.onprem.compute import Server
from diagrams.onprem.identity import Dex
graph_attr = {
"label": "",
"labelloc": "bbc",
"nodesep": "0.2",
"pad": "0.2",
"ranksep": "0.75",
"splines": "spline",
}
node_attr = {
"fontsize": "12.0",
}
with Diagram(
"Restricted access deployment",
show=False,
filename="arch-local",
outformat="png",
graph_attr=graph_attr,
node_attr=node_attr,
):
user = User("End user")
idp = Server("OpenID Connect\nprovider")
ldap = Storage("LDAP")
with Cluster("Kubernetes"):
ingress = LoadBalancing("Ingress")
gafaelfawr = KubernetesEngine("Authentication")
service_a = KubernetesEngine("Service A")
service_b = KubernetesEngine("Service B")
user >> idp >> gafaelfawr
gafaelfawr << ldap
user >> ingress >> gafaelfawr
ingress >> service_a
ingress >> service_b
service_a >> Edge(label="To service B") >> ingress