-
Notifications
You must be signed in to change notification settings - Fork 408
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
Add image labels to .ko.yaml config #825
Comments
I'm going to start hacking on a solution for this but am a novice Go coder so be kind in code reviews, plz! :) |
updated description to use go template for Env var expansion since I see we already have that for other configs |
If you'd like to use Skaffold to build your ko images, env var support in image labels is already available: https://skaffold.dev/docs/pipeline-stages/builders/ko/#image-labels |
Are you still interested in working on this @ericsmalling? Maybe I can take care of this one if you don't have enough time to look at it. |
I am, but my schedule this week is slammed. If you have time for it, go right ahead, otherwise I'll pick it up when I can. |
Fix ko-build#825 Signed-off-by: Dhi Aurrahman <[email protected]>
@ericsmalling I think https://github.com/ko-build/ko/compare/main...dio:ko:labels?expand=1 will work. I have a question: Do you think we need to allow to set |
I have a use case for setting image-related information and putting that somehow as a map to a binary (package) build. For example, I have the following structure:
So for example, between
For 1, builds:
id: a
images:
id: a
labels:
- name: ok
- release: v{{ .Env.Tag }} or for 2, builds:
id: a
image:
labels:
- name: ok
- release: v{{ .Env.Tag }} @ericsmalling @imjasonh do you think this makes sense? |
This issue is stale because it has been open for 90 days with no |
any movement/idea on the issue? |
I would like to be able to configure image labels/annotations from the the .ko.yaml file so that oranizations with standardized label requirements can specify them there instead of only via the CLI
--image-label
flag.Additionally, the values for these labels should be able to be interpolated/expanded at run time via environment variables.
Example config:
The text was updated successfully, but these errors were encountered: