-
Notifications
You must be signed in to change notification settings - Fork 293
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
Ability to add image labels to buildpacks during pack buildpack package
#1867
Comments
@ForestEckhardt This functionality makes sense to me. I'm just trying to figure out the best place it should be implemented. Is this something you'd like to do at build time dynamically, or should is it ok to encode this statically like in |
I think that this should be something that is done dynamically at build time because I think what I would like to do with it is encode build specific information. As for the labels I personally would like to be able to embedded the source url and the commit SHA of the source that was used to build the buildpack. They way there is way for people to inspect the image itself and see where the source is and what SHA was used to create the buildpack with standard container tools. That being said I could see an argument for most of the standard labels provided by the Paketo Image Labels buildpack also being useful for authors to just add standardized metadata to their buildpack images. |
@ForestEckhardt I think those labels make sense. If I understand, you can use a buildpack today to solve what you're trying to do. I still think giving buildpack authors the flexibility makes sense and if we want to standardize things in lifecycle, we can do that after the fact. |
To be clear. This would be for adding labels to a buildpackage and an image built by a buildpack. If there is already a way to do this as part of the buildpack packaging process then I would be more than happy to use that but as far as I could find there is no mechanism to add the labels to the buildpackage itself. |
This could also be useful for cc @matejvasek |
Here are my thoughts on this. We have 3 commands that outputs OCI artifacts
The idea will be to include a new flag For |
I am not particular concerned with getting image labels built into the |
This one seems like a very straight forward feature, and it seems valid to me, I will just put under needs-discussion to double check during working group if it doesn't require an RFC, I don't think so, but just want to validate it with the community. After that, we can label this one as status-ready to be work on |
For working group discussion:
|
Hi Forest. We just released a RC pack version, it will be great if you can give it a try and confirm the issue was solved |
Description
We would like to be able to add metadata to our buildpacks via image labels at build time but there is no way for us to add custom image labels.
Proposed solution
Add a flag
--label <label>=<value>
topack buildpack package
command that will allow buildpack authors to add custom metadata to the buildpack image at build time.Describe alternatives you've considered
This can be achieved with
crane mutate
but that requires you to upload the image without metadata to a registry and then mutate the file. This also means that image labels cannot be added to the.cnb
files at all which feels bad as the OCI image in registry and in.cnb
file format should be identical.The text was updated successfully, but these errors were encountered: