updated docs on yaml generation
This commit is contained in:
parent
73fd329551
commit
4074b7d88c
@ -1,6 +1,5 @@
|
|||||||
This document aims at centralizing all the informations about the yaml file that will be submitted to argo
|
This document aims at centralizing all the informations about the yaml file that will be submitted to argo
|
||||||
|
|
||||||
- names can only contain alphanumeric characters or '-'
|
- names can only contain alphanumeric characters or '-'
|
||||||
|
- Lists can either be flow `[value1, value2,...]` or
|
||||||
|
|
||||||
|
|
||||||
|
@ -2,4 +2,6 @@
|
|||||||
- currently arguments are stored in the computing object as a list of string
|
- currently arguments are stored in the computing object as a list of string
|
||||||
- argo_builder.getComputingCommands() takes the command as a parameter to treat `sh -c`'s argument differently, but this is not generic enough
|
- argo_builder.getComputingCommands() takes the command as a parameter to treat `sh -c`'s argument differently, but this is not generic enough
|
||||||
- refactor on oc-catalog : we could store it as a string and parse it differently depending on the command
|
- refactor on oc-catalog : we could store it as a string and parse it differently depending on the command
|
||||||
|
|
||||||
|
[ ] Are dependencies handled well :
|
||||||
|
- Branch/dependencies seem to be generated inconsistently, producing different branches with the same graph
|
@ -25,34 +25,59 @@ note top : a node is a component in a link object,\n represented by its ID
|
|||||||
|
|
||||||
argo -> argo
|
argo -> argo
|
||||||
note bottom : We want to prepare the list of branches by removing\n nodes that appears several times\ne.g : two branches :\n1 - 2 2 - 3 3 - 4\n1 - 2 2 - 3 3 - 5\nWe will iterate over each branch to create the component's YAML\n and don't want to create components 1 2 et 3 twice or more
|
note bottom : We want to prepare the list of branches by removing\n nodes that appears several times\ne.g : two branches :\n1 - 2 2 - 3 3 - 4\n1 - 2 2 - 3 3 - 5\nWe will iterate over each branch to create the component's YAML\n and don't want to create components 1 2 et 3 twice or more
|
||||||
loop branch in branches
|
|
||||||
group if Source first link is not in list node written
|
loop computing in graph.computings
|
||||||
loop while link Source is shared
|
argo -> argo : create new container object
|
||||||
argo -> argo : create an object representing the component
|
argo -> argoGraph : retrieve image name
|
||||||
argo -> argo : add component to list of created nodes
|
argo -> argoGraph : add command from the computing component
|
||||||
|
argo -> argoGraph : add arguments from the computing component
|
||||||
|
|
||||||
|
argo -> argoGraph : retrieve environment variables' name from the computing component
|
||||||
|
argo -> argo : create a new list of Parameter
|
||||||
|
loop env variable in retrieved env variables
|
||||||
|
argo -> argo : add a Parameter object to the list with only the name attribute
|
||||||
|
end
|
||||||
|
|
||||||
|
argo -> argo : create a Template object from the name of the component and the Container object
|
||||||
|
argo -> argo : add attached volume (currently we share the same mounted volume)
|
||||||
|
argo -> argo : append the new Template
|
||||||
|
end
|
||||||
|
|
||||||
|
argo -> argo : create new Dag object
|
||||||
|
|
||||||
|
loop computing in graph.computings
|
||||||
|
argo -> argo : create a new Task
|
||||||
|
argo -> argoGraph : add a unique name from the component name and ID in the graph
|
||||||
|
argo -> argoGraph : add the name of the associated Template
|
||||||
|
argo -> argoGraph : add the list of environment variables from the component
|
||||||
|
|
||||||
|
loop branch in branches
|
||||||
|
group if component is in the branch
|
||||||
|
|
||||||
|
argo -> argo : add the previous component name to the list of dependencies
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
argo -> argo : add the task/step to the list of Tasks
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
loop branch in branches
|
argo -> argo : add new Template named DAG to the Templates
|
||||||
|
|
||||||
loop link in branch
|
|
||||||
group if link.Destination not in list of nodes already written
|
|
||||||
argo -> argoGraph : get component
|
|
||||||
argoGraph --> argo : component
|
|
||||||
|
|
||||||
argo -> argo : generate YAML depending on type (attributes)
|
|
||||||
argo -> argo : add ID to list of node already written
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
|
loop storage in graph.storages
|
||||||
|
argo -> argo : create a new VolumeClaimTemplate object
|
||||||
|
argo -> argoGraph : add name from the storage component
|
||||||
|
argo -> argoGraph : add access mode from the storage component
|
||||||
|
argo -> argoGraph : add storage capacity from the storage component
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
loop for each struct created
|
loop data in graph.data
|
||||||
argo -> argo : Marshal into yaml
|
argo -> argo :
|
||||||
argo -> argo : write the marshalled string to a file
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
argo -> argo : marshal the Workflow to yaml
|
||||||
|
argo -> argo : write the marshaled object to a .yml file
|
||||||
|
|
||||||
@enduml
|
@enduml
|
Loading…
Reference in New Issue
Block a user