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

app-admin/*-wrapper: Only set arguments that weren't set #426

Merged
merged 1 commit into from Jun 17, 2020

Conversation

pothos
Copy link
Member

@pothos pothos commented Jun 16, 2020

When 788f328 introduced pulling from
docker by default, "--insecure-options=image" was added for all
docker registries. However, when the user also needs to set "http" as
in "--insecure-options=image,http" it will not be used because the
other argument is added as last disregarding the option was already
set by the user.
Check if the option was set by the user and only add it if it is not
provided. If the user forgets to add "image" then rkt will simply
fail and tell that this option is needed; thus no complex logic of
appending and detecting only "image" is needed. Do the same for the
"--trust-keys-from-https" option to be consistent in allowing to
overwrite it with "--trust-keys-from-https=false".

How to use/test

sudo KUBELET_IMAGE_TAG=v1.9.6_coreos.2 RKT_RUN_ARGS="--insecure-options=image,http" /usr/lib64/flatcar/kubelet-wrapper
+ exec /usr/bin/rkt run --insecure-options=image,http […]
sudo KUBELET_IMAGE_TAG=v1.9.6_coreos.2 ./kubelet-wrapper
+ exec /usr/bin/rkt run --insecure-options=image […]

Note: Pick for all channels

When 788f328 introduced pulling from
docker by default, "--insecure-options=image" was added for all
docker registries. However, when the user also needs to set "http" as
in "--insecure-options=image,http" it will not be used because the
other argument is added as last disregarding the option was already
set by the user.
Check if the option was set by the user and only add it if it is not
provided. If the user forgets to add "image" then rkt will simply
fail and tell that this option is needed; thus no complex logic of
appending and detecting only "image" is needed. Do the same for the
"--trust-keys-from-https" option to be consistent in allowing to
overwrite it with "--trust-keys-from-https=false".
Copy link
Contributor

@margamanterola margamanterola left a comment

LGTM

@pothos pothos merged commit 6e02a25 into flatcar-master Jun 17, 2020
@pothos pothos deleted the kai/fix-rkt-run-args branch Jun 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants