-
Notifications
You must be signed in to change notification settings - Fork 8
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
Support different versions per instance of a component #559
base: master
Are you sure you want to change the base?
Conversation
Recent pylint (or Python+pylint) versions can deal with `Optional[str]` and similar type annotations without requiring the pylint annotation `# pylint: disable=unsubscriptable-object`.
Implemented: * Create separate worktrees for each component alias * Create class symlinks for each component alias * Create each alias target with only the defaults and component class for the alias worktree * Works only for components which use `${_base_directory}` in their config (kapitan.compile and kapitan.dependencies mainly) TODO: * Actually allow users to specify version for each alias separately * Cleanup changes * Add tests * Update docs
cd837a7
to
7322392
Compare
We add support for specifying instance versions in `parameters.components`. Commodore falls back to the version/url/path specified for the component when the keys are not provided for component aliases. Note that the actual dependency handling doesn't yet support overriding URL/path for aliases.
7322392
to
591f081
Compare
dded3cf
to
0e6e4cd
Compare
- Fix compile tests by falling back to old component path if no dependencies object is present - Fix git tree tests by allowing dependency repos with no Author information on components - Fix using the correct path for rendering aliased targets
0e6e4cd
to
a588aea
Compare
for c in sorted(components): | ||
if inv.defaults_file(c).is_file(): | ||
classes.append(f"defaults.{c}") | ||
defaults_file = inv.defaults_file(c) | ||
if c == component and target != component: | ||
# Special case alias defaults symlink | ||
defaults_file = inv.defaults_file(target) |
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.
We've not really thought about this in the design doc, but this snippet makes the implicit decision to only provide the class/defaults.yml
of the unaliased instance of other components to each component instance.
This is probably fine for the same reasons as it's fine to only provide the unaliased component library, since I can't really imagine a sensible usecase where a component would want to read configuration from multiple instances of another component.
ae47615
to
fc7e23a
Compare
8c4ee76
to
d9bc703
Compare
This PR changes Commodore to
parameters.components.<instance-name>
Note that per-instance versions only work correctly only for components which use
${_base_directory}
in their config when specifying Jsonnet files or Helm chart/YAML locations inkapitan.compile
andkapitan.dependencies
. Note, that components should use${_base_directory}
anyway, and new components created from the template use${_base_directory}
out of the box.TODO:
Resolves #563
Checklist
bug
,enhancement
,documentation
,change
,breaking
,dependency
as they show up in the changelog