-
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
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
|
I just realized expander/grpcplugin/protos/expander.proto also uses Kubernetes REST API types in grpc proto APIs ... do you want me to open a separate PR for that or add a commit here following the same approach? |
|
/label tide/merge-method-squash
/lgtm |
|
@jackfrancis: once the present PR merges, I will cherry-pick it on top of In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
let me do it in a single PR, since I'll relocate the update-proto script to the root hack folder and use it for both packages |
d2b3c81 to
4cd17f8
Compare
4cd17f8 to
30f869e
Compare
30f869e to
1c597de
Compare
| --go-grpc_out=. \ | ||
| ./cluster-autoscaler/cloudprovider/externalgrpc/protos/externalgrpc.proto | ||
| ``` | ||
| To regenerate the gRPC code, run the `cluster-autoscaler/hack/update-proto.sh` script |
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.
This script didn't work for me in naive linux/macOS environments, but let's set that aside, I'll fix as a follow-up
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.
I was lazy and just relied on the local author to unpack a protoc release ... updated with actual OS/arch detection, download, and unpack
It now works from a clean checkout for me on linux and macos ... see if it works for you
|
/test pull-cluster-autoscaler-e2e-azure-master |
78903a8 to
64b96f8
Compare
…proto-message Kubernetes objects
…essage Kubernetes objects
64b96f8 to
f4cedfc
Compare
|
/test pull-cluster-autoscaler-e2e-azure-master |
| arm64*Linux) | ||
| protoc_url="https://github.com/protocolbuffers/protobuf/releases/download/v${protoc_version}/protoc-${protoc_version}-linux-aarch_64.zip" | ||
| ;; | ||
| *Darwin) |
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.
This change unblocked my Apple Silicon Mac:
$ git diff
diff --git a/cluster-autoscaler/hack/update-proto.sh b/cluster-autoscaler/hack/update-proto.sh
index c6c0094a8..ba05f350d 100755
--- a/cluster-autoscaler/hack/update-proto.sh
+++ b/cluster-autoscaler/hack/update-proto.sh
@@ -40,7 +40,7 @@ if [[ ! -f "${protoc_bin_dir}/protoc" || ! -d "${protoc_include_dir}" ]]; then
arm64*Linux)
protoc_url="https://github.com/protocolbuffers/protobuf/releases/download/v${protoc_version}/protoc-${protoc_version}-linux-aarch_64.zip"
;;
- *Darwin)
+ *Darwin*)
protoc_url="https://github.com/protocolbuffers/protobuf/releases/download/v${protoc_version}/protoc-${protoc_version}-osx-universal_binary.zip"
;;
*)
Worked as-is on 24.04 👍
Ref:
$ uname -om
Darwin arm64
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.
$ uname -om
arm64 Darwin
madness 🤦
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.
|
After we land this I'll cherrypick this changeset to 1.34 release branch, and then apply the below changes to master to prep for upcoming 1.35 release: $ git diff cluster-autoscaler/cloudprovider/externalgrpc/protos/externalgrpc.proto
diff --git a/cluster-autoscaler/cloudprovider/externalgrpc/protos/externalgrpc.proto b/cluster-autoscaler/cloudprovider/externalgrpc/protos/externalgrpc.proto
index b90f011d2..f29ce5566 100644
--- a/cluster-autoscaler/cloudprovider/externalgrpc/protos/externalgrpc.proto
+++ b/cluster-autoscaler/cloudprovider/externalgrpc/protos/externalgrpc.proto
@@ -150,14 +150,6 @@ message PricingNodePriceRequest {
// Node for which the request is performed.
ExternalGrpcNode node = 1;
- // 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.
- k8s.io.apimachinery.pkg.apis.meta.v1.Time startTime = 2 [deprecated = true];
-
- // End time for the request period.
- // Deprecated: Writers cannot set this field in Kubernetes 1.35 and higher, and should set this field and endTimestamp. Readers should prefer endTimestamp if set.
- k8s.io.apimachinery.pkg.apis.meta.v1.Time endTime = 3 [deprecated = true];
-
// Start time for the request period.
google.protobuf.Timestamp startTimestamp = 4;
@@ -171,18 +163,6 @@ message PricingNodePriceResponse {
}
message PricingPodPriceRequest {
- // Pod for which the request is performed.
- // Deprecated: Writers cannot set this field in Kubernetes 1.35 and higher, and should set this field and podBytes. Readers should prefer to podBytes if set.
- k8s.io.api.core.v1.Pod pod = 1 [deprecated = true];
-
- // 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.
- k8s.io.apimachinery.pkg.apis.meta.v1.Time startTime = 2 [deprecated = true];
-
- // End time for the request period.
- // Deprecated: Writers cannot set this field in Kubernetes 1.35 and higher, and should set this field and endTimestamp. Readers should prefer endTimestamp if set.
- k8s.io.apimachinery.pkg.apis.meta.v1.Time endTime = 3 [deprecated = true];
-
// Proto-marshaled bytes for the pod for which the request is performed.
// Generated by calling v1.Pod#Marshal().
// Convertable to a pod by calling v1.Pod#Unmarshal().
$ git diff cluster-autoscaler/cloudprovider/externalgrpc/protos/externalgrpc.pb.go
diff --git a/cluster-autoscaler/cloudprovider/externalgrpc/protos/externalgrpc.pb.go b/cluster-autoscaler/cloudprovider/externalgrpc/protos/externalgrpc.pb.go
index ab69bb2ac..fa6b2cd14 100644
--- a/cluster-autoscaler/cloudprovider/externalgrpc/protos/externalgrpc.pb.go
+++ b/cluster-autoscaler/cloudprovider/externalgrpc/protos/externalgrpc.pb.go
@@ -27,8 +27,8 @@ import (
_ "google.golang.org/protobuf/types/descriptorpb"
anypb "google.golang.org/protobuf/types/known/anypb"
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
- v11 "k8s.io/api/core/v1"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ v1 "k8s.io/api/core/v1"
+ v11 "k8s.io/apimachinery/pkg/apis/meta/v1"
reflect "reflect"
sync "sync"
unsafe "unsafe"
@@ -417,16 +417,6 @@ type PricingNodePriceRequest struct {
// 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.
- //
- // Deprecated: Marked as deprecated in cloudprovider/externalgrpc/protos/externalgrpc.proto.
- StartTime *v1.Time `protobuf:"bytes,2,opt,name=startTime,proto3" json:"startTime,omitempty"`
- // End time for the request period.
- // Deprecated: Writers cannot set this field in Kubernetes 1.35 and higher, and should set this field and endTimestamp. Readers should prefer endTimestamp if set.
- //
- // Deprecated: Marked as deprecated in cloudprovider/externalgrpc/protos/externalgrpc.proto.
- EndTime *v1.Time `protobuf:"bytes,3,opt,name=endTime,proto3" json:"endTime,omitempty"`
- // Start time for the request period.
StartTimestamp *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=startTimestamp,proto3" json:"startTimestamp,omitempty"`
// End time for the request period.
EndTimestamp *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=endTimestamp,proto3" json:"endTimestamp,omitempty"`
@@ -471,22 +461,6 @@ func (x *PricingNodePriceRequest) GetNode() *ExternalGrpcNode {
return nil
}
-// Deprecated: Marked as deprecated in cloudprovider/externalgrpc/protos/externalgrpc.proto.
-func (x *PricingNodePriceRequest) GetStartTime() *v1.Time {
- if x != nil {
- return x.StartTime
- }
- return nil
-}
-
-// Deprecated: Marked as deprecated in cloudprovider/externalgrpc/protos/externalgrpc.proto.
-func (x *PricingNodePriceRequest) GetEndTime() *v1.Time {
- if x != nil {
- return x.EndTime
- }
- return nil
-}
-
func (x *PricingNodePriceRequest) GetStartTimestamp() *timestamppb.Timestamp {
if x != nil {
return x.StartTimestamp
@@ -548,21 +522,6 @@ func (x *PricingNodePriceResponse) GetPrice() float64 {
type PricingPodPriceRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
- // Pod for which the request is performed.
- // Deprecated: Writers cannot set this field in Kubernetes 1.35 and higher, and should set this field and podBytes. Readers should prefer to podBytes if set.
- //
- // Deprecated: Marked as deprecated in cloudprovider/externalgrpc/protos/externalgrpc.proto.
- Pod *v11.Pod `protobuf:"bytes,1,opt,name=pod,proto3" json:"pod,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.
- //
- // Deprecated: Marked as deprecated in cloudprovider/externalgrpc/protos/externalgrpc.proto.
- StartTime *v1.Time `protobuf:"bytes,2,opt,name=startTime,proto3" json:"startTime,omitempty"`
- // End time for the request period.
- // Deprecated: Writers cannot set this field in Kubernetes 1.35 and higher, and should set this field and endTimestamp. Readers should prefer endTimestamp if set.
- //
- // Deprecated: Marked as deprecated in cloudprovider/externalgrpc/protos/externalgrpc.proto.
- EndTime *v1.Time `protobuf:"bytes,3,opt,name=endTime,proto3" json:"endTime,omitempty"`
// Proto-marshaled bytes for the pod for which the request is performed.
// Generated by calling v1.Pod#Marshal().
// Convertable to a pod by calling v1.Pod#Unmarshal().
@@ -605,30 +564,6 @@ func (*PricingPodPriceRequest) Descriptor() ([]byte, []int) {
return file_cloudprovider_externalgrpc_protos_externalgrpc_proto_rawDescGZIP(), []int{8}
}
-// Deprecated: Marked as deprecated in cloudprovider/externalgrpc/protos/externalgrpc.proto.
-func (x *PricingPodPriceRequest) GetPod() *v11.Pod {
- if x != nil {
- return x.Pod
- }
- return nil
-}
-
-// Deprecated: Marked as deprecated in cloudprovider/externalgrpc/protos/externalgrpc.proto.
-func (x *PricingPodPriceRequest) GetStartTime() *v1.Time {
- if x != nil {
- return x.StartTime
- }
- return nil
-}
-
-// Deprecated: Marked as deprecated in cloudprovider/externalgrpc/protos/externalgrpc.proto.
-func (x *PricingPodPriceRequest) GetEndTime() *v1.Time {
- if x != nil {
- return x.EndTime
- }
- return nil
-}
-
func (x *PricingPodPriceRequest) GetPodBytes() []byte {
if x != nil {
return x.PodBytes
@@ -1674,7 +1609,7 @@ func (x *NodeGroupTemplateNodeInfoRequest) GetId() string {
type NodeGroupTemplateNodeInfoResponse struct {
state protoimpl.MessageState `protogen:"open.v1"`
// nodeInfo is the extracted data from the cloud provider, as a primitive Kubernetes Node type.
- NodeInfo *v11.Node `protobuf:"bytes,1,opt,name=nodeInfo,proto3" json:"nodeInfo,omitempty"`
+ NodeInfo *v1.Node `protobuf:"bytes,1,opt,name=nodeInfo,proto3" json:"nodeInfo,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@@ -1709,7 +1644,7 @@ func (*NodeGroupTemplateNodeInfoResponse) Descriptor() ([]byte, []int) {
return file_cloudprovider_externalgrpc_protos_externalgrpc_proto_rawDescGZIP(), []int{32}
}
-func (x *NodeGroupTemplateNodeInfoResponse) GetNodeInfo() *v11.Node {
+func (x *NodeGroupTemplateNodeInfoResponse) GetNodeInfo() *v1.Node {
if x != nil {
return x.NodeInfo
}
@@ -1726,12 +1661,12 @@ type NodeGroupAutoscalingOptions struct {
ScaleDownGpuUtilizationThreshold float64 `protobuf:"fixed64,2,opt,name=scaleDownGpuUtilizationThreshold,proto3" json:"scaleDownGpuUtilizationThreshold,omitempty"`
// ScaleDownUnneededTime sets the duration CA expects a node to be
// unneeded/eligible for removal before scaling down the node.
- ScaleDownUnneededTime *v1.Duration `protobuf:"bytes,3,opt,name=scaleDownUnneededTime,proto3" json:"scaleDownUnneededTime,omitempty"`
+ ScaleDownUnneededTime *v11.Duration `protobuf:"bytes,3,opt,name=scaleDownUnneededTime,proto3" json:"scaleDownUnneededTime,omitempty"`
// ScaleDownUnreadyTime represents how long an unready node should be
// unneeded before it is eligible for scale down.
- ScaleDownUnreadyTime *v1.Duration `protobuf:"bytes,4,opt,name=scaleDownUnreadyTime,proto3" json:"scaleDownUnreadyTime,omitempty"`
+ ScaleDownUnreadyTime *v11.Duration `protobuf:"bytes,4,opt,name=scaleDownUnreadyTime,proto3" json:"scaleDownUnreadyTime,omitempty"`
// MaxNodeProvisionTime time CA waits for node to be provisioned
- MaxNodeProvisionTime *v1.Duration `protobuf:"bytes,5,opt,name=MaxNodeProvisionTime,proto3" json:"MaxNodeProvisionTime,omitempty"`
+ MaxNodeProvisionTime *v11.Duration `protobuf:"bytes,5,opt,name=MaxNodeProvisionTime,proto3" json:"MaxNodeProvisionTime,omitempty"`
// ZeroOrMaxNodeScaling means that a node group should be scaled up to maximum size or down to zero nodes all at once instead of one-by-one.
ZeroOrMaxNodeScaling bool `protobuf:"varint,6,opt,name=zeroOrMaxNodeScaling,proto3" json:"zeroOrMaxNodeScaling,omitempty"`
// IgnoreDaemonSetsUtilization sets if daemonsets utilization should be considered during node scale-down
@@ -1784,21 +1719,21 @@ func (x *NodeGroupAutoscalingOptions) GetScaleDownGpuUtilizationThreshold() floa
return 0
}
-func (x *NodeGroupAutoscalingOptions) GetScaleDownUnneededTime() *v1.Duration {
+func (x *NodeGroupAutoscalingOptions) GetScaleDownUnneededTime() *v11.Duration {
if x != nil {
return x.ScaleDownUnneededTime
}
return nil
}
-func (x *NodeGroupAutoscalingOptions) GetScaleDownUnreadyTime() *v1.Duration {
+func (x *NodeGroupAutoscalingOptions) GetScaleDownUnreadyTime() *v11.Duration {
if x != nil {
return x.ScaleDownUnreadyTime
}
return nil
}
-func (x *NodeGroupAutoscalingOptions) GetMaxNodeProvisionTime() *v1.Duration {
+func (x *NodeGroupAutoscalingOptions) GetMaxNodeProvisionTime() *v11.Duration {
if x != nil {
return x.MaxNodeProvisionTime
}
@@ -1949,19 +1884,14 @@ const file_cloudprovider_externalgrpc_protos_externalgrpc_proto_rawDesc = "" +
"\x17NodeGroupForNodeRequest\x12U\n" +
"\x04node\x18\x01 \x01(\v2A.clusterautoscaler.cloudprovider.v1.externalgrpc.ExternalGrpcNodeR\x04node\"t\n" +
"\x18NodeGroupForNodeResponse\x12X\n" +
- "\tnodeGroup\x18\x01 \x01(\v2:.clusterautoscaler.cloudprovider.v1.externalgrpc.NodeGroupR\tnodeGroup\"\x8c\x03\n" +
+ "\tnodeGroup\x18\x01 \x01(\v2:.clusterautoscaler.cloudprovider.v1.externalgrpc.NodeGroupR\tnodeGroup\"\xf4\x01\n" +
"\x17PricingNodePriceRequest\x12U\n" +
- "\x04node\x18\x01 \x01(\v2A.clusterautoscaler.cloudprovider.v1.externalgrpc.ExternalGrpcNodeR\x04node\x12L\n" +
- "\tstartTime\x18\x02 \x01(\v2*.k8s.io.apimachinery.pkg.apis.meta.v1.TimeB\x02\x18\x01R\tstartTime\x12H\n" +
- "\aendTime\x18\x03 \x01(\v2*.k8s.io.apimachinery.pkg.apis.meta.v1.TimeB\x02\x18\x01R\aendTime\x12B\n" +
+ "\x04node\x18\x01 \x01(\v2A.clusterautoscaler.cloudprovider.v1.externalgrpc.ExternalGrpcNodeR\x04node\x12B\n" +
"\x0estartTimestamp\x18\x04 \x01(\v2\x1a.google.protobuf.TimestampR\x0estartTimestamp\x12>\n" +
"\fendTimestamp\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampR\fendTimestamp\"0\n" +
"\x18PricingNodePriceResponse\x12\x14\n" +
- "\x05price\x18\x01 \x01(\x01R\x05price\"\x80\x03\n" +
- "\x16PricingPodPriceRequest\x12-\n" +
- "\x03pod\x18\x01 \x01(\v2\x17.k8s.io.api.core.v1.PodB\x02\x18\x01R\x03pod\x12L\n" +
- "\tstartTime\x18\x02 \x01(\v2*.k8s.io.apimachinery.pkg.apis.meta.v1.TimeB\x02\x18\x01R\tstartTime\x12H\n" +
- "\aendTime\x18\x03 \x01(\v2*.k8s.io.apimachinery.pkg.apis.meta.v1.TimeB\x02\x18\x01R\aendTime\x12\x1b\n" +
+ "\x05price\x18\x01 \x01(\x01R\x05price\"\xb9\x01\n" +
+ "\x16PricingPodPriceRequest\x12\x1b\n" +
"\tpod_bytes\x18\x04 \x01(\fR\bpodBytes\x12B\n" +
"\x0estartTimestamp\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampR\x0estartTimestamp\x12>\n" +
"\fendTimestamp\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampR\fendTimestamp\"/\n" +
@@ -2107,12 +2037,10 @@ var file_cloudprovider_externalgrpc_protos_externalgrpc_proto_goTypes = []any{
nil, // 37: clusterautoscaler.cloudprovider.v1.externalgrpc.ExternalGrpcNode.LabelsEntry
nil, // 38: clusterautoscaler.cloudprovider.v1.externalgrpc.ExternalGrpcNode.AnnotationsEntry
nil, // 39: clusterautoscaler.cloudprovider.v1.externalgrpc.GetAvailableGPUTypesResponse.GpuTypesEntry
- (*v1.Time)(nil), // 40: k8s.io.apimachinery.pkg.apis.meta.v1.Time
- (*timestamppb.Timestamp)(nil), // 41: google.protobuf.Timestamp
- (*v11.Pod)(nil), // 42: k8s.io.api.core.v1.Pod
- (*v11.Node)(nil), // 43: k8s.io.api.core.v1.Node
- (*v1.Duration)(nil), // 44: k8s.io.apimachinery.pkg.apis.meta.v1.Duration
- (*anypb.Any)(nil), // 45: google.protobuf.Any
+ (*timestamppb.Timestamp)(nil), // 40: google.protobuf.Timestamp
+ (*v1.Node)(nil), // 41: k8s.io.api.core.v1.Node
+ (*v11.Duration)(nil), // 42: k8s.io.apimachinery.pkg.apis.meta.v1.Duration
+ (*anypb.Any)(nil), // 43: google.protobuf.Any
}
var file_cloudprovider_externalgrpc_protos_externalgrpc_proto_depIdxs = []int32{
37, // 0: clusterautoscaler.cloudprovider.v1.externalgrpc.ExternalGrpcNode.labels:type_name -> clusterautoscaler.cloudprovider.v1.externalgrpc.ExternalGrpcNode.LabelsEntry
@@ -2121,63 +2049,58 @@ var file_cloudprovider_externalgrpc_protos_externalgrpc_proto_depIdxs = []int32{
2, // 3: clusterautoscaler.cloudprovider.v1.externalgrpc.NodeGroupForNodeRequest.node:type_name -> clusterautoscaler.cloudprovider.v1.externalgrpc.ExternalGrpcNode
1, // 4: clusterautoscaler.cloudprovider.v1.externalgrpc.NodeGroupForNodeResponse.nodeGroup:type_name -> clusterautoscaler.cloudprovider.v1.externalgrpc.NodeGroup
2, // 5: clusterautoscaler.cloudprovider.v1.externalgrpc.PricingNodePriceRequest.node:type_name -> clusterautoscaler.cloudprovider.v1.externalgrpc.ExternalGrpcNode
- 40, // 6: clusterautoscaler.cloudprovider.v1.externalgrpc.PricingNodePriceRequest.startTime:type_name -> k8s.io.apimachinery.pkg.apis.meta.v1.Time
- 40, // 7: clusterautoscaler.cloudprovider.v1.externalgrpc.PricingNodePriceRequest.endTime:type_name -> k8s.io.apimachinery.pkg.apis.meta.v1.Time
- 41, // 8: clusterautoscaler.cloudprovider.v1.externalgrpc.PricingNodePriceRequest.startTimestamp:type_name -> google.protobuf.Timestamp
- 41, // 9: clusterautoscaler.cloudprovider.v1.externalgrpc.PricingNodePriceRequest.endTimestamp:type_name -> google.protobuf.Timestamp
- 42, // 10: clusterautoscaler.cloudprovider.v1.externalgrpc.PricingPodPriceRequest.pod:type_name -> k8s.io.api.core.v1.Pod
- 40, // 11: clusterautoscaler.cloudprovider.v1.externalgrpc.PricingPodPriceRequest.startTime:type_name -> k8s.io.apimachinery.pkg.apis.meta.v1.Time
- 40, // 12: clusterautoscaler.cloudprovider.v1.externalgrpc.PricingPodPriceRequest.endTime:type_name -> k8s.io.apimachinery.pkg.apis.meta.v1.Time
- 41, // 13: clusterautoscaler.cloudprovider.v1.externalgrpc.PricingPodPriceRequest.startTimestamp:type_name -> google.protobuf.Timestamp
- 41, // 14: clusterautoscaler.cloudprovider.v1.externalgrpc.PricingPodPriceRequest.endTimestamp:type_name -> google.protobuf.Timestamp
- 39, // 15: clusterautoscaler.cloudprovider.v1.externalgrpc.GetAvailableGPUTypesResponse.gpuTypes:type_name -> clusterautoscaler.cloudprovider.v1.externalgrpc.GetAvailableGPUTypesResponse.GpuTypesEntry
- 2, // 16: clusterautoscaler.cloudprovider.v1.externalgrpc.NodeGroupDeleteNodesRequest.nodes:type_name -> clusterautoscaler.cloudprovider.v1.externalgrpc.ExternalGrpcNode
- 29, // 17: clusterautoscaler.cloudprovider.v1.externalgrpc.NodeGroupNodesResponse.instances:type_name -> clusterautoscaler.cloudprovider.v1.externalgrpc.Instance
- 30, // 18: clusterautoscaler.cloudprovider.v1.externalgrpc.Instance.status:type_name -> clusterautoscaler.cloudprovider.v1.externalgrpc.InstanceStatus
- 0, // 19: clusterautoscaler.cloudprovider.v1.externalgrpc.InstanceStatus.instanceState:type_name -> clusterautoscaler.cloudprovider.v1.externalgrpc.InstanceStatus.InstanceState
- 31, // 20: clusterautoscaler.cloudprovider.v1.externalgrpc.InstanceStatus.errorInfo:type_name -> clusterautoscaler.cloudprovider.v1.externalgrpc.InstanceErrorInfo
- 43, // 21: clusterautoscaler.cloudprovider.v1.externalgrpc.NodeGroupTemplateNodeInfoResponse.nodeInfo:type_name -> k8s.io.api.core.v1.Node
- 44, // 22: clusterautoscaler.cloudprovider.v1.externalgrpc.NodeGroupAutoscalingOptions.scaleDownUnneededTime:type_name -> k8s.io.apimachinery.pkg.apis.meta.v1.Duration
- 44, // 23: clusterautoscaler.cloudprovider.v1.externalgrpc.NodeGroupAutoscalingOptions.scaleDownUnreadyTime:type_name -> k8s.io.apimachinery.pkg.apis.meta.v1.Duration
- 44, // 24: clusterautoscaler.cloudprovider.v1.externalgrpc.NodeGroupAutoscalingOptions.MaxNodeProvisionTime:type_name -> k8s.io.apimachinery.pkg.apis.meta.v1.Duration
- 34, // 25: clusterautoscaler.cloudprovider.v1.externalgrpc.NodeGroupAutoscalingOptionsRequest.defaults:type_name -> clusterautoscaler.cloudprovider.v1.externalgrpc.NodeGroupAutoscalingOptions
- 34, // 26: clusterautoscaler.cloudprovider.v1.externalgrpc.NodeGroupAutoscalingOptionsResponse.nodeGroupAutoscalingOptions:type_name -> clusterautoscaler.cloudprovider.v1.externalgrpc.NodeGroupAutoscalingOptions
- 45, // 27: clusterautoscaler.cloudprovider.v1.externalgrpc.GetAvailableGPUTypesResponse.GpuTypesEntry.value:type_name -> google.protobuf.Any
- 3, // 28: clusterautoscaler.cloudprovider.v1.externalgrpc.CloudProvider.NodeGroups:input_type -> clusterautoscaler.cloudprovider.v1.externalgrpc.NodeGroupsRequest
- 5, // 29: clusterautoscaler.cloudprovider.v1.externalgrpc.CloudProvider.NodeGroupForNode:input_type -> clusterautoscaler.cloudprovider.v1.externalgrpc.NodeGroupForNodeRequest
- 7, // 30: clusterautoscaler.cloudprovider.v1.externalgrpc.CloudProvider.PricingNodePrice:input_type -> clusterautoscaler.cloudprovider.v1.externalgrpc.PricingNodePriceRequest
- 9, // 31: clusterautoscaler.cloudprovider.v1.externalgrpc.CloudProvider.PricingPodPrice:input_type -> clusterautoscaler.cloudprovider.v1.externalgrpc.PricingPodPriceRequest
- 11, // 32: clusterautoscaler.cloudprovider.v1.externalgrpc.CloudProvider.GPULabel:input_type -> clusterautoscaler.cloudprovider.v1.externalgrpc.GPULabelRequest
- 13, // 33: clusterautoscaler.cloudprovider.v1.externalgrpc.CloudProvider.GetAvailableGPUTypes:input_type -> clusterautoscaler.cloudprovider.v1.externalgrpc.GetAvailableGPUTypesRequest
- 15, // 34: clusterautoscaler.cloudprovider.v1.externalgrpc.CloudProvider.Cleanup:input_type -> clusterautoscaler.cloudprovider.v1.externalgrpc.CleanupRequest
- 17, // 35: clusterautoscaler.cloudprovider.v1.externalgrpc.CloudProvider.Refresh:input_type -> clusterautoscaler.cloudprovider.v1.externalgrpc.RefreshRequest
- 19, // 36: clusterautoscaler.cloudprovider.v1.externalgrpc.CloudProvider.NodeGroupTargetSize:input_type -> clusterautoscaler.cloudprovider.v1.externalgrpc.NodeGroupTargetSizeRequest
- 21, // 37: clusterautoscaler.cloudprovider.v1.externalgrpc.CloudProvider.NodeGroupIncreaseSize:input_type -> clusterautoscaler.cloudprovider.v1.externalgrpc.NodeGroupIncreaseSizeRequest
- 23, // 38: clusterautoscaler.cloudprovider.v1.externalgrpc.CloudProvider.NodeGroupDeleteNodes:input_type -> clusterautoscaler.cloudprovider.v1.externalgrpc.NodeGroupDeleteNodesRequest
- 25, // 39: clusterautoscaler.cloudprovider.v1.externalgrpc.CloudProvider.NodeGroupDecreaseTargetSize:input_type -> clusterautoscaler.cloudprovider.v1.externalgrpc.NodeGroupDecreaseTargetSizeRequest
- 27, // 40: clusterautoscaler.cloudprovider.v1.externalgrpc.CloudProvider.NodeGroupNodes:input_type -> clusterautoscaler.cloudprovider.v1.externalgrpc.NodeGroupNodesRequest
- 32, // 41: clusterautoscaler.cloudprovider.v1.externalgrpc.CloudProvider.NodeGroupTemplateNodeInfo:input_type -> clusterautoscaler.cloudprovider.v1.externalgrpc.NodeGroupTemplateNodeInfoRequest
- 35, // 42: clusterautoscaler.cloudprovider.v1.externalgrpc.CloudProvider.NodeGroupGetOptions:input_type -> clusterautoscaler.cloudprovider.v1.externalgrpc.NodeGroupAutoscalingOptionsRequest
- 4, // 43: clusterautoscaler.cloudprovider.v1.externalgrpc.CloudProvider.NodeGroups:output_type -> clusterautoscaler.cloudprovider.v1.externalgrpc.NodeGroupsResponse
- 6, // 44: clusterautoscaler.cloudprovider.v1.externalgrpc.CloudProvider.NodeGroupForNode:output_type -> clusterautoscaler.cloudprovider.v1.externalgrpc.NodeGroupForNodeResponse
- 8, // 45: clusterautoscaler.cloudprovider.v1.externalgrpc.CloudProvider.PricingNodePrice:output_type -> clusterautoscaler.cloudprovider.v1.externalgrpc.PricingNodePriceResponse
- 10, // 46: clusterautoscaler.cloudprovider.v1.externalgrpc.CloudProvider.PricingPodPrice:output_type -> clusterautoscaler.cloudprovider.v1.externalgrpc.PricingPodPriceResponse
- 12, // 47: clusterautoscaler.cloudprovider.v1.externalgrpc.CloudProvider.GPULabel:output_type -> clusterautoscaler.cloudprovider.v1.externalgrpc.GPULabelResponse
- 14, // 48: clusterautoscaler.cloudprovider.v1.externalgrpc.CloudProvider.GetAvailableGPUTypes:output_type -> clusterautoscaler.cloudprovider.v1.externalgrpc.GetAvailableGPUTypesResponse
- 16, // 49: clusterautoscaler.cloudprovider.v1.externalgrpc.CloudProvider.Cleanup:output_type -> clusterautoscaler.cloudprovider.v1.externalgrpc.CleanupResponse
- 18, // 50: clusterautoscaler.cloudprovider.v1.externalgrpc.CloudProvider.Refresh:output_type -> clusterautoscaler.cloudprovider.v1.externalgrpc.RefreshResponse
- 20, // 51: clusterautoscaler.cloudprovider.v1.externalgrpc.CloudProvider.NodeGroupTargetSize:output_type -> clusterautoscaler.cloudprovider.v1.externalgrpc.NodeGroupTargetSizeResponse
- 22, // 52: clusterautoscaler.cloudprovider.v1.externalgrpc.CloudProvider.NodeGroupIncreaseSize:output_type -> clusterautoscaler.cloudprovider.v1.externalgrpc.NodeGroupIncreaseSizeResponse
- 24, // 53: clusterautoscaler.cloudprovider.v1.externalgrpc.CloudProvider.NodeGroupDeleteNodes:output_type -> clusterautoscaler.cloudprovider.v1.externalgrpc.NodeGroupDeleteNodesResponse
- 26, // 54: clusterautoscaler.cloudprovider.v1.externalgrpc.CloudProvider.NodeGroupDecreaseTargetSize:output_type -> clusterautoscaler.cloudprovider.v1.externalgrpc.NodeGroupDecreaseTargetSizeResponse
- 28, // 55: clusterautoscaler.cloudprovider.v1.externalgrpc.CloudProvider.NodeGroupNodes:output_type -> clusterautoscaler.cloudprovider.v1.externalgrpc.NodeGroupNodesResponse
- 33, // 56: clusterautoscaler.cloudprovider.v1.externalgrpc.CloudProvider.NodeGroupTemplateNodeInfo:output_type -> clusterautoscaler.cloudprovider.v1.externalgrpc.NodeGroupTemplateNodeInfoResponse
- 36, // 57: clusterautoscaler.cloudprovider.v1.externalgrpc.CloudProvider.NodeGroupGetOptions:output_type -> clusterautoscaler.cloudprovider.v1.externalgrpc.NodeGroupAutoscalingOptionsResponse
- 43, // [43:58] is the sub-list for method output_type
- 28, // [28:43] is the sub-list for method input_type
- 28, // [28:28] is the sub-list for extension type_name
- 28, // [28:28] is the sub-list for extension extendee
- 0, // [0:28] is the sub-list for field type_name
+ 40, // 6: clusterautoscaler.cloudprovider.v1.externalgrpc.PricingNodePriceRequest.startTimestamp:type_name -> google.protobuf.Timestamp
+ 40, // 7: clusterautoscaler.cloudprovider.v1.externalgrpc.PricingNodePriceRequest.endTimestamp:type_name -> google.protobuf.Timestamp
+ 40, // 8: clusterautoscaler.cloudprovider.v1.externalgrpc.PricingPodPriceRequest.startTimestamp:type_name -> google.protobuf.Timestamp
+ 40, // 9: clusterautoscaler.cloudprovider.v1.externalgrpc.PricingPodPriceRequest.endTimestamp:type_name -> google.protobuf.Timestamp
+ 39, // 10: clusterautoscaler.cloudprovider.v1.externalgrpc.GetAvailableGPUTypesResponse.gpuTypes:type_name -> clusterautoscaler.cloudprovider.v1.externalgrpc.GetAvailableGPUTypesResponse.GpuTypesEntry
+ 2, // 11: clusterautoscaler.cloudprovider.v1.externalgrpc.NodeGroupDeleteNodesRequest.nodes:type_name -> clusterautoscaler.cloudprovider.v1.externalgrpc.ExternalGrpcNode
+ 29, // 12: clusterautoscaler.cloudprovider.v1.externalgrpc.NodeGroupNodesResponse.instances:type_name -> clusterautoscaler.cloudprovider.v1.externalgrpc.Instance
+ 30, // 13: clusterautoscaler.cloudprovider.v1.externalgrpc.Instance.status:type_name -> clusterautoscaler.cloudprovider.v1.externalgrpc.InstanceStatus
+ 0, // 14: clusterautoscaler.cloudprovider.v1.externalgrpc.InstanceStatus.instanceState:type_name -> clusterautoscaler.cloudprovider.v1.externalgrpc.InstanceStatus.InstanceState
+ 31, // 15: clusterautoscaler.cloudprovider.v1.externalgrpc.InstanceStatus.errorInfo:type_name -> clusterautoscaler.cloudprovider.v1.externalgrpc.InstanceErrorInfo
+ 41, // 16: clusterautoscaler.cloudprovider.v1.externalgrpc.NodeGroupTemplateNodeInfoResponse.nodeInfo:type_name -> k8s.io.api.core.v1.Node
+ 42, // 17: clusterautoscaler.cloudprovider.v1.externalgrpc.NodeGroupAutoscalingOptions.scaleDownUnneededTime:type_name -> k8s.io.apimachinery.pkg.apis.meta.v1.Duration
+ 42, // 18: clusterautoscaler.cloudprovider.v1.externalgrpc.NodeGroupAutoscalingOptions.scaleDownUnreadyTime:type_name -> k8s.io.apimachinery.pkg.apis.meta.v1.Duration
+ 42, // 19: clusterautoscaler.cloudprovider.v1.externalgrpc.NodeGroupAutoscalingOptions.MaxNodeProvisionTime:type_name -> k8s.io.apimachinery.pkg.apis.meta.v1.Duration
+ 34, // 20: clusterautoscaler.cloudprovider.v1.externalgrpc.NodeGroupAutoscalingOptionsRequest.defaults:type_name -> clusterautoscaler.cloudprovider.v1.externalgrpc.NodeGroupAutoscalingOptions
+ 34, // 21: clusterautoscaler.cloudprovider.v1.externalgrpc.NodeGroupAutoscalingOptionsResponse.nodeGroupAutoscalingOptions:type_name -> clusterautoscaler.cloudprovider.v1.externalgrpc.NodeGroupAutoscalingOptions
+ 43, // 22: clusterautoscaler.cloudprovider.v1.externalgrpc.GetAvailableGPUTypesResponse.GpuTypesEntry.value:type_name -> google.protobuf.Any
+ 3, // 23: clusterautoscaler.cloudprovider.v1.externalgrpc.CloudProvider.NodeGroups:input_type -> clusterautoscaler.cloudprovider.v1.externalgrpc.NodeGroupsRequest
+ 5, // 24: clusterautoscaler.cloudprovider.v1.externalgrpc.CloudProvider.NodeGroupForNode:input_type -> clusterautoscaler.cloudprovider.v1.externalgrpc.NodeGroupForNodeRequest
+ 7, // 25: clusterautoscaler.cloudprovider.v1.externalgrpc.CloudProvider.PricingNodePrice:input_type -> clusterautoscaler.cloudprovider.v1.externalgrpc.PricingNodePriceRequest
+ 9, // 26: clusterautoscaler.cloudprovider.v1.externalgrpc.CloudProvider.PricingPodPrice:input_type -> clusterautoscaler.cloudprovider.v1.externalgrpc.PricingPodPriceRequest
+ 11, // 27: clusterautoscaler.cloudprovider.v1.externalgrpc.CloudProvider.GPULabel:input_type -> clusterautoscaler.cloudprovider.v1.externalgrpc.GPULabelRequest
+ 13, // 28: clusterautoscaler.cloudprovider.v1.externalgrpc.CloudProvider.GetAvailableGPUTypes:input_type -> clusterautoscaler.cloudprovider.v1.externalgrpc.GetAvailableGPUTypesRequest
+ 15, // 29: clusterautoscaler.cloudprovider.v1.externalgrpc.CloudProvider.Cleanup:input_type -> clusterautoscaler.cloudprovider.v1.externalgrpc.CleanupRequest
+ 17, // 30: clusterautoscaler.cloudprovider.v1.externalgrpc.CloudProvider.Refresh:input_type -> clusterautoscaler.cloudprovider.v1.externalgrpc.RefreshRequest
+ 19, // 31: clusterautoscaler.cloudprovider.v1.externalgrpc.CloudProvider.NodeGroupTargetSize:input_type -> clusterautoscaler.cloudprovider.v1.externalgrpc.NodeGroupTargetSizeRequest
+ 21, // 32: clusterautoscaler.cloudprovider.v1.externalgrpc.CloudProvider.NodeGroupIncreaseSize:input_type -> clusterautoscaler.cloudprovider.v1.externalgrpc.NodeGroupIncreaseSizeRequest
+ 23, // 33: clusterautoscaler.cloudprovider.v1.externalgrpc.CloudProvider.NodeGroupDeleteNodes:input_type -> clusterautoscaler.cloudprovider.v1.externalgrpc.NodeGroupDeleteNodesRequest
+ 25, // 34: clusterautoscaler.cloudprovider.v1.externalgrpc.CloudProvider.NodeGroupDecreaseTargetSize:input_type -> clusterautoscaler.cloudprovider.v1.externalgrpc.NodeGroupDecreaseTargetSizeRequest
+ 27, // 35: clusterautoscaler.cloudprovider.v1.externalgrpc.CloudProvider.NodeGroupNodes:input_type -> clusterautoscaler.cloudprovider.v1.externalgrpc.NodeGroupNodesRequest
+ 32, // 36: clusterautoscaler.cloudprovider.v1.externalgrpc.CloudProvider.NodeGroupTemplateNodeInfo:input_type -> clusterautoscaler.cloudprovider.v1.externalgrpc.NodeGroupTemplateNodeInfoRequest
+ 35, // 37: clusterautoscaler.cloudprovider.v1.externalgrpc.CloudProvider.NodeGroupGetOptions:input_type -> clusterautoscaler.cloudprovider.v1.externalgrpc.NodeGroupAutoscalingOptionsRequest
+ 4, // 38: clusterautoscaler.cloudprovider.v1.externalgrpc.CloudProvider.NodeGroups:output_type -> clusterautoscaler.cloudprovider.v1.externalgrpc.NodeGroupsResponse
+ 6, // 39: clusterautoscaler.cloudprovider.v1.externalgrpc.CloudProvider.NodeGroupForNode:output_type -> clusterautoscaler.cloudprovider.v1.externalgrpc.NodeGroupForNodeResponse
+ 8, // 40: clusterautoscaler.cloudprovider.v1.externalgrpc.CloudProvider.PricingNodePrice:output_type -> clusterautoscaler.cloudprovider.v1.externalgrpc.PricingNodePriceResponse
+ 10, // 41: clusterautoscaler.cloudprovider.v1.externalgrpc.CloudProvider.PricingPodPrice:output_type -> clusterautoscaler.cloudprovider.v1.externalgrpc.PricingPodPriceResponse
+ 12, // 42: clusterautoscaler.cloudprovider.v1.externalgrpc.CloudProvider.GPULabel:output_type -> clusterautoscaler.cloudprovider.v1.externalgrpc.GPULabelResponse
+ 14, // 43: clusterautoscaler.cloudprovider.v1.externalgrpc.CloudProvider.GetAvailableGPUTypes:output_type -> clusterautoscaler.cloudprovider.v1.externalgrpc.GetAvailableGPUTypesResponse
+ 16, // 44: clusterautoscaler.cloudprovider.v1.externalgrpc.CloudProvider.Cleanup:output_type -> clusterautoscaler.cloudprovider.v1.externalgrpc.CleanupResponse
+ 18, // 45: clusterautoscaler.cloudprovider.v1.externalgrpc.CloudProvider.Refresh:output_type -> clusterautoscaler.cloudprovider.v1.externalgrpc.RefreshResponse
+ 20, // 46: clusterautoscaler.cloudprovider.v1.externalgrpc.CloudProvider.NodeGroupTargetSize:output_type -> clusterautoscaler.cloudprovider.v1.externalgrpc.NodeGroupTargetSizeResponse
+ 22, // 47: clusterautoscaler.cloudprovider.v1.externalgrpc.CloudProvider.NodeGroupIncreaseSize:output_type -> clusterautoscaler.cloudprovider.v1.externalgrpc.NodeGroupIncreaseSizeResponse
+ 24, // 48: clusterautoscaler.cloudprovider.v1.externalgrpc.CloudProvider.NodeGroupDeleteNodes:output_type -> clusterautoscaler.cloudprovider.v1.externalgrpc.NodeGroupDeleteNodesResponse
+ 26, // 49: clusterautoscaler.cloudprovider.v1.externalgrpc.CloudProvider.NodeGroupDecreaseTargetSize:output_type -> clusterautoscaler.cloudprovider.v1.externalgrpc.NodeGroupDecreaseTargetSizeResponse
+ 28, // 50: clusterautoscaler.cloudprovider.v1.externalgrpc.CloudProvider.NodeGroupNodes:output_type -> clusterautoscaler.cloudprovider.v1.externalgrpc.NodeGroupNodesResponse
+ 33, // 51: clusterautoscaler.cloudprovider.v1.externalgrpc.CloudProvider.NodeGroupTemplateNodeInfo:output_type -> clusterautoscaler.cloudprovider.v1.externalgrpc.NodeGroupTemplateNodeInfoResponse
+ 36, // 52: clusterautoscaler.cloudprovider.v1.externalgrpc.CloudProvider.NodeGroupGetOptions:output_type -> clusterautoscaler.cloudprovider.v1.externalgrpc.NodeGroupAutoscalingOptionsResponse
+ 38, // [38:53] is the sub-list for method output_type
+ 23, // [23:38] is the sub-list for method input_type
+ 23, // [23:23] is the sub-list for extension type_name
+ 23, // [23:23] is the sub-list for extension extendee
+ 0, // [0:23] is the sub-list for field type_name
}
func init() { file_cloudprovider_externalgrpc_protos_externalgrpc_proto_init() }cc @towca |
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 APPROVED This pull-request has been approved by: dbonfigli, jackfrancis, liggitt The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/hold cancel |
|
@jackfrancis: #8660 failed to apply on top of branch "cluster-autoscaler-release-1.34": In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |

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 cloudprovider/externalgrpc and expander/grpcplugin APIs, 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,nodeBytes, and standard timestamp fields and sets them along with Pod/Node/StartTime/EndTime. Readers can read from either field, preferring thepodBytesand 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?