-
Notifications
You must be signed in to change notification settings - Fork 518
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
Upgrading from 1.8.0 to 1.9.0 and now failing with Message: Not Found #1747
Comments
That's odd (the project check), we'll take a look and provide a fix. |
Thanks for the bug report. I can reproduce this issue. I think this is caused by upgrade of KubernetesClient. I see this line: in v1.8.0, it was throwing OpenShiftNotAvailableException but on v1.9.0 it's just returning a regular DefaultOpenShiftClient object |
Could you provide the stack-trace, that method shouldn't be called to determine if the underlying cluster is OpenShift (I think most of these checks were replaced when upgrading the client version). Also, do you have any idea why our tests haven't showed this behavior? |
I think it's called from ApplyService while applying RoleBinding
We do seem to have a test for this scenario in OpenShiftHelperTest but there we're mocking client's adapt method to throw exception (which is not happening with 6.x version) |
OK; so this is due to the usage of a RoleBinding resource. |
In the original Kubernetes Client bump PR (#1464), we left out a few places where we checked if the cluster was OpenShift. To verify if a cluster is an OpenShift cluster, we need to reuse the method OpenshiftHelper.isOpenShift. So basically we need to find all of the usages of asOpenShiftClient and replace any if-else with the For additional safety, we should also modify the |
…pse-jkube#1747) Refactor remaining client.adapt call in asOpenShiftClient method to use isSupported() method. Just delegating OpenShift discovery to isOpenShift method (which uses isSupported() internally) Signed-off-by: Rohan Kumar <rohaan@redhat.com>
Refactor remaining client.adapt call in asOpenShiftClient method to use isSupported() method. Just delegating OpenShift discovery to isOpenShift method (which uses isSupported() internally) Signed-off-by: Rohan Kumar <rohaan@redhat.com>
Thank you @manusa and @rohanKanojia for the quick turnaround! Is there a timeline for when 1.9.1 might be released? |
It was released this morning, but there might be some problems with the repository synchronization. I've been waiting for more than 8 hours now to complete the release process 😓 |
New version is now available from Maven Central. @edeandrea please confirm if the fix works for you 🙏 🤞 |
Now its there. Looks good! Confirmed it worked. |
Again - many thanks for the extremely quick turnaround! |
Awesome news 🚀
Thank you for trying and reporting. This was a critical one, I'm glad we caught it so quickly. |
Describe the bug
I have a learning tutorial (https://kubebyexample.com/learning-paths/developing-spring-boot-kubernetes/lesson-4-deploying-spring-boot-kubernetes-eclipse) which currently uses JKube 1.8.0. It is a simple Spring Boot application that uses the JKube
kubernetes-maven-plugin
to deploy to minikube.The source code is at https://github.com/RedHat-Middleware-Workshops/spring-jkube-external-config/tree/solution.
As part of the repo there are some GitHub actions which verify that things work correctly. Upon upgrading JKube from 1.8.0 to 1.9.0 the
k8s:deploy
task no longer works. I get this output:It looks as if its trying to create a
project.openshift.io/v1/project
, but I'm not sure why it would be doing that. This is thekubernetes-maven-plugin
, not theopenshift-maven-plugin
.This issue is preventing me from upgrading.
Eclipse JKube version
other (please specify in additional context)
Component
Kubernetes Maven Plugin
Apache Maven version
3.8.4
Gradle version
No response
Steps to reproduce
pom.xml
, update<jkube.version>1.8.0</jkube.version>
to<jkube.version>1.9.0</jkube.version>
./mvnw clean k8s:deploy -Pk8s -DskipTests
In addition to failing on my local machine (Mac M1), it is failing in GitHub actions too (https://github.com/RedHat-Middleware-Workshops/spring-jkube-external-config/actions/runs/3034325286)
Expected behavior
I would expect the deployment to minikube to be successful, just as it is with version 1.8.0
Runtime
minikube
Kubernetes API Server version
other (please specify in additional context)
Environment
Linux, macOS
Eclipse JKube Logs
Sample Reproducer Project
https://github.com/RedHat-Middleware-Workshops/spring-jkube-external-config/tree/solution
Additional context
JKube version is
1.9.0
(no option for1.9.0
is available in theEclipse JKube version
dropdown.Minikube/Kubernetes version:
The text was updated successfully, but these errors were encountered: