-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unable to draw Linked Clusters #707
Comments
Linking two Clusters together isn't supported (would be awesome). What you're trying to do is link two lists of Nodes together. You can take a single Node and What you can do instead loop through the first list:
Warning: this is messy... Setting from diagrams import Cluster, Diagram, Edge
from diagrams.k8s.compute import Deployment, Pod
graph_attr = {
"splines": "line"
}
with Diagram("Diagram", show=False, graph_attr=graph_attr):
app_1_pods = [
Pod('App 1'),
Pod('App 1'),
Pod('App 1')
]
app_2_pods = [
Pod('App 2'),
Pod('App 2'),
Pod('App 2')
]
for pod in app_1_pods:
pod >> app_2_pods |
See the issue comment below for solutions to "link" clusters. |
@RyanMillerC Thanks for the information. I did find #17 later after my post, but I had hoped there was a better way to natively map the clusters versus the "splines:lines" it would be easier to treat the "cluster" item as if it was a single entity with an external edge connection point so that you could easily map cluster to cluster versus the requirement to map node to node. Thanks for the response. this will drastically improve our technical diagram capabilities once we find a way to natively update the file from our CI/CD Process. Does the diagram code support nested configuration ingest? For example for Application 1
from app1.py import app1 with Diagram("Front-end to App1", show=False, graph_attr=graph_attr): frontend >> app1` |
I wasn't aware of that workaround. Good to know. 😃 @mxw-esi I tried what you're suggesting and got (p.s. if you wrap your code with a ``` on a line by itself at the beginning and end of the code block, GitHub will format it) |
In my diagram I am trying to create a Clustered Web app Diagram. This Diagram is Edge to multiple nested Clusters..
dns(edge) >> fw_group (cluster1) >> f5_group(cluster2) >> webapp(cluster3) ...... final resource.. However when I create the diagram if I try to graph cluster to cluster I get an error. TypeError: unsupported operand type(s) for >>: 'list' and 'list', if I setup a single point in between it works just fine..
Code Snippet:
`from diagrams import Cluster, Diagram
from diagrams.aws.compute import ECS
from diagrams.aws.database import RDS
from diagrams.aws.network import ELB
from diagrams.aws.general import GenericFirewall
from diagrams.aws.network import Route53
with Diagram("Trial Webapp", show=False):
dns >> fw_group >>f5_group >> webapp <-- this does not work..
The text was updated successfully, but these errors were encountered: