-
Notifications
You must be signed in to change notification settings - Fork 167
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
feat(helm): Require Charts to be locally available #370
Conversation
I need a bit more explanation on how this is supposed to work. Where is |
Quoting from the design doc:
The Subsequent
Yes! This maintains the current behaviour of all
You can vendor it wherever you like inside the project, but you are required to reference the Chart using a relative path. Consider:
Here, It seems reasonable to me to think of Helm Charts as yet another source format consumed by Jsonnet. Bbeing it Does that answer your questions? |
This modifies the `helmTemplate` native function in a way that it expectes a relative path instead of the `repo/name` identifier for Charts. Before, this feature relied on the system wide Helm cache, which is independent from the Tanka project and not controlled by git at all. This does not play well with out aim for hermeticity and strong reproducibility. To overcome this, `helmTemplate` resolves the chart **relative to the calling file**. This suggests to keep Helm Charts as close to the consuming source code as possible.
This clever, but I wonder if it might be too clever?
I think that might come and bite us when we want to take a more rigorous approach on package management. I wonder if this PR might be running ahead of package management in Tanka in general? I think we need to slow down a bit on this track. |
(mirroring the discussion from the last Tanka weekly in here)
Package management is a big topic, and a decision appears fairly distant, given all what needs to be considered. We certainly need to keep this in mind and adapt as needed when the time comes :)
We thought about this, and came to the conclusion these problems are really orthogonal. We do need to have a general discussion about package management and the path forward, but this will take considerable time, thinking and tradeoffs. Helm Charts in the sense we think about them are resources most of the time exclusively consumed in a library, being that external to the project or not. This suggests Chart availability should be managed at the project level, similar to how a library maintainer that might use YAML or a lot of Because it integrates with the current jsonnet-bundler workflow and guarantees, it gets this issue off our back until we tackle package management in a future release. |
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.
LGTM. Do we need the related changes to the helm-util library to support the setting of conf.calledFrom
?
Yes we do. Will open that PR soon |
As proposed by this design doc, this modifies the
helmTemplate
native function in a way that it expects a relative path instead of therepo/name
identifier for Charts.Before, this feature relied on the system wide Helm cache, which is independent from the Tanka project and not controlled by git. This does not play well with our aim for hermeticity and strong reproducibility at all.
To overcome this,
helmTemplate
resolves the chart relative to the calling file. This suggests to keep Helm Charts as close to the consuming source code as possible.Using the calling file as a fixpoint is also the only way I came up with that is independent from the current working directory Tanka was invoked in, which is important as
tk show
must continue to not only work from the project root, but also inside any nested folder.Depends on #368, will be rebased once merged