jkube: docker basic Auth failure
Describe the bug
I am trying to build and push my image. I have a local docker registry configured and working fine with docker cmdline interactions. For auth I have gone with a simple server section in the ~/.m2/settings.yml
<servers>
<server>
<id>myregistry.127.0.0.1.nip.io</id>
<username>user</username>
<password>pwd123</password>
</server>
</servers>
the base image is called myregistry.127.0.0.1.nip.io/eclipse-temurin:11.0.18_10-jdk-alpine When I run k8s:build for example the build fails pulling the base image “no basic auth”. If I pass the docker creds in on the cmdline it works so its like its not matching the registry in the image to the registry in the server section in the settings.xml
any advice would be appreciated
Eclipse JKube version
1.11.0
Component
Kubernetes Maven Plugin
Apache Maven version
3.8.5
Gradle version
None
Steps to reproduce
as above
Expected behavior
image should be pulled from registry
Runtime
Kubernetes (vanilla)
Kubernetes API Server version
1.25.3
Environment
Linux
Eclipse JKube Logs
No response
Sample Reproducer Project
No response
Additional context
No response
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 16 (9 by maintainers)
hey @rohanKanojia , that worked a treat thanks. I reverted my settings back to
and its working perfectly thanks again everyone, awesome project.
@pmbsa : We finally managed to close the issue 😃 . Could you please try out our
1.14-SNAPSHOTbuild on your project and provide feedback? You might need to add this to yourpom.xml:@pmbsa : Thanks a lot! I can reproduce the issue now with this setup.
The issue seems to be at this line where we consider token as a registry only if it contains a colon: https://github.com/eclipse/jkube/blob/34c6f4d6db099641100886903dc41cff963e9627/jkube-kit/config/image/src/main/java/org/eclipse/jkube/kit/config/image/ImageName.java#L300
Now we’re back at the same problem as #1929 . How can we determine whether a given token should be considered a domain or a user name?
Hi @rohanKanojia. I am running sonatype nexus from the provided helm charts. I dont do any specialisations on that, just a basic install and then create a hosted docker registry listening on http (but via an https ingress configured in the charts). The authentication is nexus’s basic admin user. I dont do anything beyond that. I have configured the registry in docker as ‘insecure’. I can think of anything beyond that. The maven settings.xml are just the basic server config with username and password
@pmbsa : I see. I think it’s the same as #1929 then
I will have a go at a few things and see if i can get more details