Skip to content

Protocol Buffer support needs automation to keep it in sync. #4367

@thecrazzymouse

Description

@thecrazzymouse

Describe the bug
The generated protobuf specification is inconsistent with the non protobuf classes.
The resources field is missing from the

V1.PodSpec.newBuilder()
   .addResource(...) //missing

class V1PodSpec{
    @SerializedName("resources")
    @Nullable
    private V1ResourceRequirements resources;
}

original golang specification

// +featureGate=PodLevelResources
	// +optional
	Resources *ResourceRequirements `json:"resources,omitempty" protobuf:"bytes,40,opt,name=resources"`

To Reproduce
Observe the generated protobuf code
https://github.com/kubernetes-client/java/raw/refs/tags/v25.0.0/proto/src/main/java/io/kubernetes/client/proto/V1.java

vs

https://github.com/kubernetes-client/java/blob/v25.0.0/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodSpec.java

Expected behavior
The resource shall be present in the protobuf variant too

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