-
Notifications
You must be signed in to change notification settings - Fork 445
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
JKube is not picking docker credentials from ~/.docker/config.json
file
#2290
Comments
I'm observing this behavior is only on Kubernetes gradle plugin, not Kubernetes maven plugin. It seems to be happening because we're having a default value of However, in maven plugin we don't provide any default value: In AuthConfigFactory, we're relying on the registry to be Setting default value of - return getOrDefaultString("jkube.docker.registry", this::getRegistry, "docker.io");
+ return getOrDefaultString("jkube.docker.registry", this::getRegistry, null); |
@anurag-rajawat : Would this be something you would like to pick up? You might also need to update KubernetesExtensionPropertyTest with updated default values. |
Sure please assign this to me. |
…g.json` file (eclipse-jkube#2290) Signed-off-by: Anurag Rajawat <anuragsinghrajawat22@gmail.com>
…g.json` file (eclipse-jkube#2290) Signed-off-by: Anurag Rajawat <anuragsinghrajawat22@gmail.com>
…g.json` file (#2290) Signed-off-by: Anurag Rajawat <anuragsinghrajawat22@gmail.com>
Describe the bug
I have successfully configured my Docker credentials in the
~/.docker/config.json file
. However, when I try to push an image to the Docker registry using thek8sPush
task, the task fails with the errorrequested access to the resource is denied
.I have also tried hard-coding my Docker credentials in the
build.gradle
file. In this case, the build process works as expected.Eclipse JKube version
1.13.1
Component
Kubernetes Gradle Plugin
Apache Maven version
None
Gradle version
other (please specify in additional context)
Steps to reproduce
docker login
./gradlew bootJar k8sBuild k8sPush
Expected behavior
When JKube is used to push an image to a Docker registry, it should first look for Docker credentials in the
~/.docker/config.json
file. If the credentials are found, JKube should use them to authenticate with the Docker registry and push the image successfully.Runtime
minikube
Kubernetes API Server version
1.25.3
Environment
macOS
Eclipse JKube Logs
Sample Reproducer Project
https://github.com/anurag-rajawat/catalog-service
Additional context
Gradle version:
8.1.1
The text was updated successfully, but these errors were encountered: