Fix kind image names with --bare#1027
Conversation
Make the functionality match between: KO_DOCKER_REPO=ko.local/my-image ko build --bare And: KO_DOCKER_REPO=kind.local/my-image ko build --bare As it stands, `--bare` is broken with `kind.local/` as it just gets `kind.local` as the image name, and then it fails to tag because the registry is missing.
|
This Pull Request is stale because it has been open for 90 days with |
|
@imjasonh Any chances this PR can be reviewed/merged? |
cpanato
left a comment
There was a problem hiding this comment.
is it possible to add some tests?
|
@cpanato It's been nearly a year since I raised this, but I'll try to remember how it hangs together. |
|
I don't think it's possible to write a useful test for this without either instantiating a new kind cluster (making tests much more heavyweight), or by doing some fairly hefty refactoring to expose some of the kind publisher internals to allow mock kinds to be injected from other packages. |
Would look something like: aidy/ko@fix_kind_image_names...aidy:ko:fix_kind_image_names_test Can add to this PR if you'd like, but obviously it does open up some internals. |
Make the functionality match between:
KO_DOCKER_REPO=ko.local/my-image ko build --bare
And:
KO_DOCKER_REPO=kind.local/my-image ko build --bare
As it stands,
--bareis broken withkind.local/as it just getskind.localas the image name, and then it fails to tag because the registry is missing.