-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Add peer fields to replace inlined Kubernetes API fields #8660
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
base: master
Are you sure you want to change the base?
Conversation
9a85b4b
to
56b3d84
Compare
This PR may require API review. If so, when the changes are ready, complete the pre-review checklist and request an API review. Status of requested reviews is tracked in the API Review project. |
// Node for which the request is performed. | ||
Node *ExternalGrpcNode `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` | ||
// Start time for the request period. | ||
// Deprecated: Writers cannot set this field in Kubernetes 1.35 and higher, and should set this field and startTimestamp. Readers should prefer startTimestamp if set. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this meant to suggest that writers on pre-1.35 k8s should set startTimestamp
in addition to this field for best-practice future-proofing?
If so we might be able to word with more clarity (so that that "writers cannot" and "should set" in the same sentence isn't confusing) and I would also assume we plan to backport these changes to e.g., 1.31-1.34 in CA so that writers interacting w/ clusters on those versions have advance deprecation warning?
It look goods to me, apart for some minor things:
So, to recap, as soon as someone update the |
56b3d84
to
d2b3c81
Compare
Updated.
Yes. That means we should cut a patch release with this change now to seed use of the new peer fields and encourage integrations to update and start making use of the new wrapper / proto / peer fields now so they can straddle 1.34/1.35 without disruption. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approve
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: dbonfigli, liggitt The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind bug
/kind cleanup
/kind api-change
What this PR does / why we need it:
Three Kubernetes REST API types were being used as generic proto messages in the externalgrpc grpc API, but are not actually correct to use that way. Use of these types with protoreflect libraries was best-effort and not actually supported. These types remove the misleading
ProtoMessage()
marker method in 1.35, and will not be usable as generic proto message fields in Kubernetes v1.35.0.To give a way for integrators to migrate, this adds peer
podBytes
and standard timestamp fields and sets them along with Pod/StartTime/EndTime. Readers can read from either field, preferring thepodBytes
and timestamp fields over the Kubernetes REST API fields. Before updating to Kubernetes 1.35 libraries, the Pod and metav1.Time fields will have to be removed.See https://github.com/kubernetes/enhancements/tree/master/keps/sig-api-machinery/5589-gogo-dependency#motivation and kubernetes/kubernetes#134256 for more details.
This PR:
Does this PR introduce a user-facing change?