-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from hyakuhei/AddResponse
Adding optional response parameter to DataFlow
- Loading branch information
Showing
2 changed files
with
73 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
from fluentm import Actor, Boundary, Process, DataFlow, TLS, HTTP, Internal, GIT, SSH | ||
from fluentm import report | ||
|
||
Process("Policy Repo").inBoundary(Boundary("Version Control")) | ||
|
||
Boundary("New Kubernetes Cluster").inBoundary("New AWS Account") | ||
|
||
scenes={ | ||
"Developer requests a new cluster":[ | ||
DataFlow(Actor("Developer"), Process("Cluster Orchestrator").inBoundary(Boundary("Control Cluster")), TLS(HTTP("Create cluster request"))), | ||
DataFlow(Process("Cluster Orchestrator"), Process("Cluster Orchestrator"), Internal("Validates user")), | ||
DataFlow(Process("Cluster Orchestrator"), Process("IAM").inBoundary("AWS"), TLS(HTTP("Create new account")), response=TLS(HTTP("Account Details"))), | ||
DataFlow(Process("Cluster Orchestrator"), Process("EKS").inBoundary("AWS"), TLS(HTTP("Create new cluster")), response=TLS(HTTP("Cluster Details"))), | ||
DataFlow(Process("Cluster Orchestrator"), Process("k8s API").inBoundary(Boundary("New Kubernetes Cluster")), TLS(HTTP("Add default admission controller"))), | ||
], | ||
"Developer creates a pod":[ | ||
DataFlow(Actor("Developer"), Process("k8s API"), TLS(HTTP("Create POD"))), | ||
DataFlow(Process("k8s API"), Process("Admission Controller").inBoundary("Cluster Orchestrator"), TLS(HTTP("Validate pod creation"))), | ||
DataFlow(Process("Admission Controller"), Process("OPA").inBoundary("Cluster Orchestrator"), HTTP("Validate pod creation..")), | ||
DataFlow(Process("OPA"), Process("Policy Repo"), SSH(GIT("Get latest policy")), response=SSH(GIT("Latest policy REGO"))), | ||
DataFlow(Process("OPA"), Process("k8s API"), TLS(HTTP("Validation Decision"))), | ||
DataFlow(Process("k8s API"), Actor("Developer"), TLS(HTTP("Approve/Denied"))) | ||
] | ||
} | ||
|
||
if __name__ == "__main__": | ||
r = report(scenes, outputDir="examples/OPA_orchestration", dfdLabels=True) | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters