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
KEP-29: Install dependencies of operators. #1554
Conversation
When installing an operator package using the KUDO CLI, operator dependencies can be provided as 'KudoOperator' tasks. For each of these tasks, the respective package is resolved and its Operator and OperatorVersion installed on the cluster. Because dependent package can also have dependencies on packages, dependencies are resolved recursively. Cyclic dependencies are detected by modeling the dependencies as a directed graph and checking this graph for cycles when new dependencies are added. Signed-off-by: Jan Schlicht <jan@d2iq.com>
Signed-off-by: Jan Schlicht <jan@d2iq.com>
Packages returned by 'gatherDependencies' only includes dependencies. Signed-off-by: Jan Schlicht <jan@d2iq.com>
func Package( | ||
client *kudo.Client, | ||
instanceName string, | ||
namespace string, | ||
resources packages.Resources, | ||
parameters map[string]string, | ||
resolver resolver.Resolver, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if it would work to rename some package so we get resolver dependencies.Resolver
or resolver packages.Resolver
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hey, third time resolver is the charm! :D
Also renames some variables to make code more readable. Signed-off-by: Jan Schlicht <jan@d2iq.com>
Signed-off-by: Jan Schlicht <jan@d2iq.com>
Signed-off-by: Aleksey Dukhovniy <alex.dukhovniy@googlemail.com>
by introducing a `FullyQualifiedName` method for the `OperatorVersion` Signed-off-by: Aleksey Dukhovniy <alex.dukhovniy@googlemail.com>
Signed-off-by: Aleksey Dukhovniy <alex.dukhovniy@googlemail.com>
the cycle error now mentions both parent and child package that cause the cycle Signed-off-by: Aleksey Dukhovniy <alex.dukhovniy@googlemail.com>
Signed-off-by: Aleksey Dukhovniy <alex.dukhovniy@googlemail.com>
Signed-off-by: Aleksey Dukhovniy <alex.dukhovniy@googlemail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! 🚢
What this PR does / why we need it:
When installing an operator package using the KUDO CLI, operator dependencies can be provided as KudoOperator tasks. For each of these tasks, the respective package is resolved and its
Operator
andOperatorVersion
installed on the cluster. Because dependent package can also have dependencies on packages, dependencies are resolved recursively. Cyclic dependencies are detected by modeling the dependencies as a directed graph and checking this graph for cycles when new dependencies are added.Fixes part of #1514
Co-authored-by: Aleksey Dukhovniy adukhovniy@mesosphere.io