ko
ko copied to clipboard
Allow setting `KO_DOCKER_REPO` in `.ko.yaml`
Based on a Twitter conversation, it was raised whether KO_DOCKER_REPO
should also be a configuration option in .ko.yaml
(mainly for consistency purposes).
IMHO since this is not a build but publish option, it might have to go in PublishOptions
parsing (related: #351).
will you work on that @embano1? 🙋🏻♂️
@imjasonh maybe we can do both https://github.com/google/ko/issues/626, WDYT, if you agree, I'm willing to do this one too
Sure!
My only real question is what do we want it to look like in .ko.yaml
? A new top-level repo:
field? Something else? Give me your ideas!
Initially I thought a top-level string:string
field would work, e.g. imageRepository: myrepository.somewhere.out
.
Then I thought, how likely is it that multiple images should be pushed to different registries/locations? I.e. something similar we do with baseImageOverride
and build
for different binaries?
hello @embano1, you can keep up the process from here, please feel free to add your comments to the PR. 🙋🏻♂️
Then I thought, how likely is it that multiple images should be pushed to different registries/locations?
ko
doesn't support this at all today. In the spirit of not scope-creeping this, I'd like to maintain something like the current behavior, and just push to a single repo per ko
invocation.
Hw about tags? Can they also be included in the .ko.yaml file to tag each build individually? Shall I create a tracking issue for this or there's a reason for not doing that?
What's your use case for wanting each image in a ko resolve
to get different tags? 🤔
The typical use case for tags is associating images with a release (:v1.2.3
), which generally means all the images in a set of images should have the same tag.
oops, sorry. I'm interested in different tags for ko publish
only. I was hoping I could generate/push multiple images with distinct tags.
oops, sorry. I'm interested in different tags for
ko publish
only. I was hoping I could generate/push multiple images with distinct tags.
ko build
only builds one image today (at least until https://github.com/google/ko/pull/644 lands), and even when it doesn't I think I'd like to recommend that all invocations produce the same tags, for more or less the same reason as ko resolve
does today.
You can already ko build ./ -t foo -t bar
to produce one image with both :foo
and :bar
, but I don't think I want to support any situation where tags are selectively applied to images without a strong indication of the use case.
kindly ping @imjasonh
This issue is stale because it has been open for 90 days with no activity. It will automatically close after 30 more days of inactivity. Keep fresh with the 'lifecycle/frozen' label.