Skip to content

Allow provider-wide naming config #71

Open
@imjasonh

Description

@imjasonh

ko provides a few ways to name images it builds. Given the importpath foo.bar/test:

  • the default, producing $KO_DOCKER_REPO/test-<md5>, aiming for compatibility with the most registries (Dockerhub mainly)
  • --preserve-import-paths, producing $KO_DOCKER_REPO/foo.bar/test
  • --base, producing $KO_DOCKER_REPO/test, which leads to trouble if there is a foo.bar/test and a foo.bar/baz/test.
  • --bare, producing $KO_DOCKER_REPO exactly (best for ko build, less good for ko resolve)

In tf-ko, ko_build currently defaults to --preserve-import-paths behavior, and ko_resolve defaults to the default (MD5), which will lead to confusion.

We should make the naming config a provider-wide default, since that's normally what folks want to do anyway. We can take this opportunity to make the default match ko, or use the more correct and ergonomic --preserve-import-paths the default, since it's easier to configure broad defaults in tf-ko.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions