Open carolynvs opened 2 years ago
Resolving a dependency involves the following checks:
Tooling can provide an existing installation to use.
Tooling can override the default bundle reference defined for the dependency.
The default bundle implementation is optional when the dependency defines a bundle interface. In this case the tooling is required to provide either a bundle reference or an existing installation.
When a default bundle implementation is defined, it could be a full bundle reference or it may use a version range. In the case of a version range, the resolver should query for available tags and select the highest semver tag that satisfies the bundle interface.
All dependencies must satisfy the declared bundle interface, whether it was provided by the tooling or resolved.
In the case of existing installations, only the outputs and custom actions on the bundle interface are compared.
Each required parameter and credential that applies to the parent bundle action must have a source, for example the parent bundle's parameter, or the output of another dependency. Essentially the dependency's install command must be runnable when installing the parent bundle, or if upgrading the parent, the upgrade command for each dependency must be runnable.
The output of the graph resolution is an ordered list of bundles to execute, along with the sources for each parameter and credential that applies to the parent bundle action.
- reference: getporter/mysql:v.1.0.0
parameters:
dbName: # use the hard-coded value wordpress for the dbName parameter
value: "wordpress"
- reference: helm-redis:v2.3.4
credentials:
kubeconfig: # Use the k8s installation output admin-kubeconfig for the kubeconfig credential
installation: k8s
output: admin-kubeconfig
- reference: getporter/wordpress:v0.1.1
parameters:
connection-string: # Use the mysql dependency output connStr for the connection-string parameter
dependency: mysql
output: connStr
See #427
Let's define how the runtime should resolve the dependency graph for a bundle. There are a few types of dependencies that impact the graph:
Let's define how tools should resolve a graph of bundle dependencies so that the resolution is consistent and well-defined between tools.