Skip to content

Annotate images with version control information by default #366

@imjasonh

Description

@imjasonh

Similar to (and possibly to be built upon) golang/go#37475

Images built by ko can automatically be annotated with information about the commit of the source the image was built from. This would help tie the image to the source that created it. This information would include the commit digest, and whether there are any additional uncommitted changes on top of that commit (a "dirty bit").

golang/go#37475 proposes adding this metadata to Go binaries themselves, whereupon ko could inspect and extract this information. I don't think ko should duplicate this logic itself, especially if Go wants to do it for us.

We should consider some way to disable the annotation, if users don't want to include it for some reason, or possibly just document that we will set it, and that users should scrub this information if they want to.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions