camel-k
camel-k copied to clipboard
Option ```--registry-insecure false``` takes no effect when using local dependencies ```-d file:///path/xxx.jar```
Hi Community,
We are running into an issue when using local dependencies option -d file:///path/xxx.jar in --registry-insecure false mode on k8s, but it still logs (insecure=true) during pushing image and throws an error of unexpected status code 503 Service Unavailable. The same task works fine without using local dependencies.
VERSION
Camel K Client 1.9.2
Command to produce the Issue
kamel install command
kamel install \
--registry-insecure false \
--registry xxx.com \
--registry-auth-username xxx \
--registry-auth-password xxx \
--organization xxx \
--maven-settings=configmap:maven-settings/settings.xml \
--build-timeout 1h \
--cluster-type kubernetes \
--build-publish-strategy Spectrum \
--force \
-n xxx
kamel run command
kamel run xxx.java \
-d file:///path/xxx.jar \
-n xxx \
--dev
Error Log
with local dependencies option -d file:///path/xxx.jar

without local dependencies option -d file:///path/xxx.jar

Expected Behavior
We want use local jar dependencies -d file:///path/xxx.jarand the HTTPS protocol in registry config --registry-insecure false
Thanks
FYI @johnpoth
Hi @Hades-888, thanks for the feedback!
The insecure option should be taken from the platform CR (default name camel-k) Do you mind double checking the insecure option is correctly set by running something like:
kubectl get integrationplatform camel-k -o=jsonpath='{.spec.build.registry.insecure}' -n xxx
Thanks !
Hi @Hades-888, thanks for the feedback!
The insecure option should be taken from the platform CR (default name
camel-k) Do you mind double checking the insecure option is correctly set by running something like:
kubectl get integrationplatform camel-k -o=jsonpath='{.spec.build.registry.insecure}' -n xxxThanks !
@johnpoth ,thank you very much for your reply!
I had a query as you said,--registry-insecure false seems to have no effect
Hi @Hades-888 ,
It seems the command line parsing library viper we use will set boolean flags to true if present regardless of the value passed... so --boolean-flag-name false will get set to true... may worth documenting if this works as intended.
In the meantime your can just omit --registry-insecure false when installing camel-k. It should be set to it's default value (false) and you should be all set!
We may want to mark this as a bug though and fix this ... i.e setting --registry-insecure false should set insecure to false -- WDY @squakez ?
Thanks !
I think that's the way we parse the boolean flags. Could you try --registry-insecure=false?
Ah yes it seems that way :+1:
Ah yes it seems that way 👍
I think that's the way we parse the boolean flags. Could you try
--registry-insecure=false?
@squakez tried, it seems return null after set --registry-insecure=false
@Hades-888 yes you should be fine because when undefined it gets treated as the default value which is false, thanks ! It's interesting to see boolean values getting special treatment though :)
This issue has been automatically marked as stale due to 90 days of inactivity. It will be closed if no further activity occurs within 15 days. If you think that’s incorrect or the issue should never stale, please simply write any comment. Thanks for your contributions!