-
Notifications
You must be signed in to change notification settings - Fork 7.1k
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 HELM_OCI_DATE_EPOCH wich can be use to reproducibly push a Helm chart to an OCI registry #13272
base: main
Are you sure you want to change the base?
Conversation
…chart to an OCI registry Signed-off-by: Tim Ramlot <[email protected]>
Wouldn't it be easier to just change the create time of the file? |
Is there a straightforward way to do this on linux? As far as I can see, creation time is not part of POSIX. |
I thought Ctim was ctime, so I may be off |
If I had to speculate, the intent here was to use Chart's archive file's "created" time. But, to spell out the above, this is not seemingly what is happening here:
This mismatch in the functions name and its actual behavior, I think is causing confusion here. Semantically I think a "created" time corresponds to the files modified time. Helm cares when the files content was last written.
Overall, I think this is a simpler proposal. And perhaps the correct solution. Setting a file's time can be done easily, like e.g. Overall, I think it would be preferable to fix the existing behavior if possible. Rather than introduce a new thing to work around. So it would be great if we could classify the existing behavior as a "bug" and fix that IMHO. Then folk who want deterministic (reproducible) OCI digests have a path forward. edit: reworded for clarity |
@sabre1041 -- thoughts on the above? |
#12903 was introduced to achieve a constant creation time based on the time the package was created. I agree that the best approach forward is to correct the existing behavior instead of introducing a workaround/new functionality |
I created: #13376 (which changes the behavior to utilize the files modified time) |
Currently, when using
helm push
, the creation time of the Helm tar file is used. This makes it impossible to push the same chart twice reproducibly. This PR introduces HELM_OCI_DATE_EPOCH to overwrite the timestamp used.What this PR does / why we need it:
This environment variable allows us to reproducibly create and push a Helm chart: