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
Adds kadet_params for compile time parameter injection into kadet modules #560
Conversation
…t modules. This should enable a reusable plugin like system within a single target, that shows the contract cleary through injection rather than relying on the 'parameters' concept in inventory.
tests/test_resources/kadet_functions/add_team_label/__init__.py
Outdated
Show resolved
Hide resolved
tests/test_resources/kadet_functions/add_team_label/__init__.py
Outdated
Show resolved
Hide resolved
Hey @sebradloff thanks for the PR :) |
Hey @sebradloff thanks for that. I'm not sure I understand this completely. I'm a bit confused because |
@ramaro yea I elaborated a bit in the docs that @uberspot requested. The idea is that sometimes there is a need for "post processing" or "layering" that can't be controlled in just one compile block. For instance, using the helm input type, I would like template manifests for a helm chart but maybe there's no parameter for something need to change or add to kubernetes resources. Instead of modifying the helm chart and now needing to be responsible for a custom helm chart, we can write a kadet module that takes parameters A common issue I've run into, is that some helm charts do not include the namespace for which you would like to deploy resources during templating and leave that up to deploy time. With that in mind, I would like to iterate over those manifests and add the namespace. I could do this without needing |
We could also use the example in the kadet proposal. Imagine that you wanted to reuse that module to create the same kubernetes objects for multiple classes or components in the same target. The only way to specify that right now, would be to modify the python code of the kadet module. With |
Adds kadet_params as a way to create compile time parameters for kadet modules. This should enable a reusable plugin like system within a single target, that shows the contract cleary through injection rather than relying on the 'parameters' concept in inventory.
The compile process currently works in a blocking sequential manner. Only targets are multi threaded. This enables a the concept of "post processing" or "overlays" as mentioned in #527 and #365.
Proposed Changes