Skip to content

Exception found when use inherit in crd #1981

Closed
@xiaoma20082008

Description

@xiaoma20082008

Bug Report

What did you do?

update java-operator-sdk from 4.3.5 to 4.4.1

What did you expect to see?

CustomResourceUtils.java#L21C9-L21C9 throws Exception

What did you see instead? Under which circumstances?

CRD definition like this:

public abstract class Rb<SPEC, STATUS> extends CustomResource<SPEC, STATUS> implements Namespaced {
}

public class Crd extends Rb<CrdSpec,CrdStatus> {

}

class Crd doesn't implements Namespaced but it's parent Rb does. However CustomResourceUtils.java throws Exception

Environment

Kubernetes cluster type:

$ Mention java-operator-sdk version from pom.xml file

4.4.1

$ java -version

openjdk version "17.0.3" 2022-04-19
OpenJDK Runtime Environment Temurin-17.0.3+7 (build 17.0.3+7)
OpenJDK 64-Bit Server VM Temurin-17.0.3+7 (build 17.0.3+7, mixed mode, sharing)

$ kubectl version

Client Version: version.Info{Major:"1", Minor:"27", GitVersion:"v1.27.2", GitCommit:"7f6f68fdabc4df88cfea2dcf9a19b2b830f1e647", GitTreeState:"clean", BuildDate:"2023-05-17T14:20:07Z", GoVersion:"go1.20.4", Compiler:"gc", Platform:"darwin/amd64"}
Kustomize Version: v5.0.1
Server Version: version.Info{Major:"1", Minor:"20+", GitVersion:"v1.20.11-aliyun.1", GitCommit:"a83426a0f9ecf12f97a32b2bd3bc3f9ee2b433e5", GitTreeState:"clean", BuildDate:"2023-04-04T02:31:51Z", GoVersion:"go1.15.15", Compiler:"gc", Platform:"linux/amd64"}
WARNING: version difference between client (1.27) and server (1.20) exceeds the supported minor version skew of +/-1

Possible Solution

CustomResourceUtils.java should check it's parents.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions