Skip to content
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

fix mermaid diagram input and output names #36

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions archive-channel/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ title: Archive Channel
---
graph LR
archive_channel["Archive Channel"]
app_slug["app-slug"]
api_token["api-token"]
channel_slug["channel-slug"]
app_slug ---> archive_channel
api_token ---> archive_channel
channel_slug ---> archive_channel
Expand Down
2 changes: 2 additions & 0 deletions archive-customer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ title: Archive Customer
---
graph LR
archive_customer["Archive Customer"]
api_token["api-token"]
customer_id["customer-id"]
api_token ---> archive_customer
customer_id ---> archive_customer
```
Expand Down
13 changes: 13 additions & 0 deletions create-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,19 @@ title: Create Cluster
---
graph LR
create_cluster["Create Cluster"]
api_token["api-token"]
kubernetes_distribution["kubernetes-distribution"]
kubernetes_version["kubernetes-version"]
cluster_name["cluster-name"]
ttl["ttl"]
disk["disk"]
nodes["nodes"]
instance_type["instance-type"]
timeout_minutes["timeout-minutes"]
kubeconfig_path["kubeconfig-path"]
export_kubeconfig["export-kubeconfig"]
cluster_id["cluster-id"]
cluster_kubeconfig["cluster-kubeconfig"]
api_token ---> create_cluster
kubernetes_distribution ---> create_cluster
kubernetes_version ---> create_cluster
Expand Down
12 changes: 12 additions & 0 deletions create-customer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,18 @@ title: Create Customer
---
graph LR
create_customer["Create Customer"]
app_slug["app-slug"]
api_token["api-token"]
customer_name["customer-name"]
customer_email["customer-email"]
license_type["license-type"]
channel_slug["channel-slug"]
expires_in["expires-in"]
entitlements["entitlements"]
is_kots_install_enabled["is-kots-install-enabled"]
customer_id["customer-id"]
license_id["license-id"]
license_file["license-file"]
app_slug ---> create_customer
api_token ---> create_customer
customer_name ---> create_customer
Expand Down
8 changes: 8 additions & 0 deletions create-release/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ title: Replicated create release
---
graph LR
replicated_create_release["Replicated create release"]
app_slug["app-slug"]
api_token["api-token"]
chart["chart"]
yaml_dir["yaml-dir"]
promote_channel["promote-channel"]
version["version"]
channel_slug["channel-slug"]
release_sequence["release-sequence"]
app_slug ---> replicated_create_release
api_token ---> replicated_create_release
chart ---> replicated_create_release
Expand Down
10 changes: 7 additions & 3 deletions docs/generate-readme/action-to-mermaid.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,28 @@ def generate_mermaid(action_yaml_file):
data = yaml.load(f, Loader=yaml.FullLoader)

# Add action node
nodes = []
action = Node(data['name'])
nodes.append(action)
# Add input nodes
inputs = []
if 'inputs' in data:
for input_name in data['inputs']:
input = Node(input_name)
input = Node(input_name, input_name)
nodes.append(input)
inputs.append(Link(input, action))

# Add output nodes
outputs = []
if 'outputs' in data:
for output_name in data['outputs']:
output = Node(output_name)
output = Node(output_name, output_name)
nodes.append(output)
outputs.append(Link(action, output))

chart = MermaidDiagram(
title=data['name'],
nodes=[action],
nodes=nodes,
links=inputs+outputs,
orientation = 'left to right'
)
Expand Down
3 changes: 3 additions & 0 deletions get-customer-instances/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ title: Get Customer Instances
---
graph LR
get_customer_instances["Get Customer Instances"]
app_slug["app-slug"]
api_token["api-token"]
matrix["matrix"]
app_slug ---> get_customer_instances
api_token ---> get_customer_instances
get_customer_instances ---> matrix
Expand Down
10 changes: 10 additions & 0 deletions helm-install/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@ title: Install a Helm chart to a cluster
---
graph LR
install_a_helm_chart_to_a_cluster["Install a Helm chart to a cluster"]
helm_path["helm-path"]
kubeconfig["kubeconfig"]
registry_username["registry-username"]
registry_password["registry-password"]
chart["chart"]
version["version"]
name["name"]
namespace["namespace"]
values["values"]
run_preflights["run-preflights"]
helm_path ---> install_a_helm_chart_to_a_cluster
kubeconfig ---> install_a_helm_chart_to_a_cluster
registry_username ---> install_a_helm_chart_to_a_cluster
Expand Down
9 changes: 9 additions & 0 deletions kots-install/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@ title: KOTS Install
---
graph LR
kots_install["KOTS Install"]
kubeconfig["kubeconfig"]
kots_version["kots-version"]
app_slug["app-slug"]
app_version_label["app-version-label"]
shared_password["shared-password"]
license_file["license-file"]
config_values["config-values"]
namespace["namespace"]
wait_duration["wait-duration"]
kubeconfig ---> kots_install
kots_version ---> kots_install
app_slug ---> kots_install
Expand Down
14 changes: 14 additions & 0 deletions prepare-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,20 @@ title: Prepare Cluster
---
graph LR
prepare_cluster["Prepare Cluster"]
app_slug["app-slug"]
api_token["api-token"]
chart["chart"]
yaml_dir["yaml-dir"]
kubernetes_distribution["kubernetes-distribution"]
kubernetes_version["kubernetes-version"]
ttl["ttl"]
helm_values["helm-values"]
helm_chart_name["helm-chart-name"]
helm_run_preflights["helm-run-preflights"]
kots_config_values["kots-config-values"]
kots_wait_duration["kots-wait-duration"]
cluster_id["cluster-id"]
cluster_kubeconfig["cluster-kubeconfig"]
app_slug ---> prepare_cluster
api_token ---> prepare_cluster
chart ---> prepare_cluster
Expand Down
5 changes: 5 additions & 0 deletions promote-release/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ title: Promote Release
---
graph LR
promote_release["Promote Release"]
app_slug["app-slug"]
api_token["api-token"]
channel_to["channel-to"]
release_sequence["release-sequence"]
release_version["release-version"]
app_slug ---> promote_release
api_token ---> promote_release
channel_to ---> promote_release
Expand Down
2 changes: 2 additions & 0 deletions remove-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ title: Remove cluster
---
graph LR
remove_cluster["Remove cluster"]
api_token["api-token"]
cluster_id["cluster-id"]
api_token ---> remove_cluster
cluster_id ---> remove_cluster
```
Expand Down
7 changes: 7 additions & 0 deletions report-compatibility-result/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ title: Report Compatibility Result
---
graph LR
report_compatibility_result["Report Compatibility Result"]
app_slug["app-slug"]
api_token["api-token"]
release_sequence["release-sequence"]
kubernetes_distribution["kubernetes-distribution"]
kubernetes_version["kubernetes-version"]
success["success"]
notes["notes"]
app_slug ---> report_compatibility_result
api_token ---> report_compatibility_result
release_sequence ---> report_compatibility_result
Expand Down
8 changes: 8 additions & 0 deletions upgrade-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ title: Upgrade Cluster
---
graph LR
upgrade_cluster["Upgrade Cluster"]
api_token["api-token"]
cluster_id["cluster-id"]
kubernetes_version["kubernetes-version"]
timeout_minutes["timeout-minutes"]
kubeconfig_path["kubeconfig-path"]
export_kubeconfig["export-kubeconfig"]
cluster_id["cluster-id"]
cluster_kubeconfig["cluster-kubeconfig"]
api_token ---> upgrade_cluster
cluster_id ---> upgrade_cluster
kubernetes_version ---> upgrade_cluster
Expand Down