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

Update change in kubernetesClient.customResource in spring-boot-crd Quickstart #1985

Closed
Prathamkrishna opened this issue Dec 29, 2022 · 2 comments · Fixed by #2220
Closed
Assignees
Labels
bug Something isn't working

Comments

@Prathamkrishna
Copy link
Contributor

Describe the bug

Running the spring-boot-crd project throws an error of Kubernetes not found.
mvn version: 3.8.6
minikube version: 1.37.1

Eclipse JKube version

1.10.0

Component

Kubernetes Maven Plugin

Apache Maven version

other (please specify in additional context)

Gradle version

None

Steps to reproduce

run mvn spring-boot:run once you move into the project.

Expected behavior

The project has to run.

Runtime

Kubernetes (vanilla), minikube

Kubernetes API Server version

other (please specify in additional context)

Environment

macOS

Eclipse JKube Logs

ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project spring-boot-crd: Compilation failure
[ERROR] {path-to-project}/jkube/quickstarts/maven/spring-boot-crd/src/main/java/org/eclipse/jkube/quickstart/springboot/crd/FrameworkResource.java:[41,56] cannot find symbol
[ERROR]   symbol:   method customResource(io.fabric8.kubernetes.client.dsl.base.CustomResourceDefinitionContext)
[ERROR]   location: variable kubernetesClient of type io.fabric8.kubernetes.client.KubernetesClient

Sample Reproducer Project

No response

Additional context

No response

@Prathamkrishna Prathamkrishna added the bug Something isn't working label Dec 29, 2022
@rohanKanojia
Copy link
Member

The quickstart seems to get kubernetes-client dependency from kubernetes-maven-plugin. We upgrade to 6.x version which dropped customResource(context) DSL method. We need to use genericKubernetesResources() DSL method instead

@rohanKanojia rohanKanojia changed the title Update change in kubernetesClient in spring-boot-crd Quickstart Update change in kubernetesClient.customResource in spring-boot-crd Quickstart Dec 29, 2022
@rohanKanojia
Copy link
Member

Gradle equivalent quickstart doesn't seem to be affected by this since it's explicitly importing kubernetes-client dependency:

https://github.com/eclipse/jkube/blob/8078bdc3f220ba8a9ccbf448e22f192b23a47a31/quickstarts/gradle/spring-boot-crd/build.gradle#L21

However, we should think about updating in there as well (maybe in a separate issue)

@rohanKanojia rohanKanojia self-assigned this Jun 20, 2023
rohanKanojia added a commit to rohanKanojia/jkube that referenced this issue Jun 20, 2023
…n Spring Boot CRD (eclipse-jkube#1985)

Spring Boot CRD seems to be broken. It seems to be inheriting
kubernetes-client from jkube but it's using outdated `customResource`
raw api calls.

Update it to use genericKubernetesResource() DSL call instead.

Signed-off-by: Rohan Kumar <rohaan@redhat.com>
manusa pushed a commit that referenced this issue Jun 20, 2023
…n Spring Boot CRD (#1985)

Spring Boot CRD seems to be broken. It seems to be inheriting
kubernetes-client from jkube but it's using outdated `customResource`
raw api calls.

Update it to use genericKubernetesResource() DSL call instead.

Signed-off-by: Rohan Kumar <rohaan@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants