deploy: Adds support for other container engines (ie. podman)#56
deploy: Adds support for other container engines (ie. podman)#56tiny-dancer merged 1 commit intoOptum:mainfrom
Conversation
tiny-dancer
left a comment
There was a problem hiding this comment.
Let's add 'container engine' support to the config file as well.
|
I was wanting that too. I need to dig more into how Viper and Cobra are working together. I should be able to figure it out quickly and update this PR. |
|
@ngharo check out In (On mobile app sorry for formatting and lack of deep link) |
94f0e54 to
136fde4
Compare
|
Thanks for the pointer. Way easier than I thought. |
tiny-dancer
left a comment
There was a problem hiding this comment.
Looks good, one minor requested change and then an optional change to consolidate the multiple function calls to one top level function variable.
|
What do you think of this approach? The exported variable I like this because when I first started looking at this code I was wondering: Why aren't Cobra default value arguments being set in flags and instead defaults asserted via a function call. I get it now that it's for setting command line precedence but it was still little confusing to me. |
|
@ngharo looks great, tidy up the tests failing and we’ll be good to go. |
|
Yeah, about that 🤣 Since it's using Cobra to know if the command option is set, I tried mocking the command line. I can't get viper.Set() in tests to be seen in viper.GetString() in deploy.go. edit: actually was Pushed up WIP commit. Will revisit this soon. |
Can be set at the command line via `--container-engine` or in runiac.yml as `container_engine`. Normalize on an approach for option precendence
|
It was non-trivial to reset |
|
Thanks for the bump, LGTM |
Proposed changes
Adds
--container-enginecommand line option.Can also be set via
container_engineconfig option. Used underscore for possible future env-var friendliness.The main driver for this change is to add support for
podman.This also changes container image references to fully qualified, pointed at docker.io registry where runiac images are published.
Issues for these changes
Users may have unexpected results if they're using any container engine other than default docker.
Types of changes
Further comments
Tested using podman version 3.0.1