Skip to content
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

Allow provider-wide naming config #71

Open
imjasonh opened this issue May 1, 2023 · 0 comments
Open

Allow provider-wide naming config #71

imjasonh opened this issue May 1, 2023 · 0 comments

Comments

@imjasonh
Copy link
Member

imjasonh commented May 1, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant