You've already forked Curso-lenguaje-python
Add diagrams test
This commit is contained in:
12
catch-all/07_diagrams_as_code/05_exposed_pod_k8s.py
Normal file
12
catch-all/07_diagrams_as_code/05_exposed_pod_k8s.py
Normal file
@@ -0,0 +1,12 @@
|
||||
#! /usr/bin/env python
|
||||
|
||||
from diagrams import Diagram
|
||||
from diagrams.k8s.clusterconfig import HPA
|
||||
from diagrams.k8s.compute import Deployment, Pod, ReplicaSet
|
||||
from diagrams.k8s.network import Ingress, Service
|
||||
|
||||
with Diagram("Exposed Pod with 3 Replicas", show=False):
|
||||
net = Ingress("domain.com") >> Service("svc")
|
||||
net >> [Pod("pod1"),
|
||||
Pod("pod2"),
|
||||
Pod("pod3")] << ReplicaSet("rs") << Deployment("dp") << HPA("hpa")
|
||||
Reference in New Issue
Block a user