karmada/pkg/estimator/pb/generated.proto

111 lines
4.1 KiB
Protocol Buffer
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// This file was autogenerated by go-to-protobuf. Do not edit it manually!
syntax = "proto2";
package github.com.karmada_io.karmada.pkg.estimator.pb;
import "k8s.io/api/core/v1/generated.proto";
import "k8s.io/apimachinery/pkg/api/resource/generated.proto";
// Package-wide variables from generator "generated".
option go_package = "pb";
// MaxAvailableReplicasRequest represents the request that sent by gRPC client to calculate max available replicas.
message MaxAvailableReplicasRequest {
// Cluster represents the cluster name.
// +required
optional string cluster = 1;
// ReplicaRequirements represents the requirements required by each replica.
// +required
optional ReplicaRequirements replicaRequirements = 2;
}
// MaxAvailableReplicasResponse represents the response that sent by gRPC server to calculate max available replicas.
message MaxAvailableReplicasResponse {
// MaxReplicas represents the max replica that the cluster can produce.
// +required
optional int32 maxReplicas = 1;
}
// NodeClaim represents the NodeAffinity, NodeSelector and Tolerations required by each replica.
message NodeClaim {
// A node selector represents the union of the results of one or more label queries over a set of
// nodes; that is, it represents the OR of the selectors represented by the node selector terms.
// Note that only PodSpec.Affinity.NodeAffinity.RequiredDuringSchedulingIgnoredDuringExecution
// is included here because it has a hard limit on pod scheduling.
// +optional
optional k8s.io.api.core.v1.NodeSelector nodeAffinity = 1;
// NodeSelector is a selector which must be true for the pod to fit on a node.
// Selector which must match a node's labels for the pod to be scheduled on that node.
// +optional
map<string, string> nodeSelector = 2;
// If specified, the pod's tolerations.
// +optional
repeated k8s.io.api.core.v1.Toleration tolerations = 3;
}
// ObjectReference contains enough information to locate the referenced object inside current cluster.
message ObjectReference {
// APIVersion represents the API version of the referent.
// +required
optional string apiVersion = 1;
// Kind represents the Kind of the referent.
// +required
optional string kind = 2;
// Namespace represents the namespace for the referent.
// For non-namespace scoped resources(e.g. 'ClusterRole')do not need specify Namespace,
// and for namespace scoped resources, Namespace is required.
// If Namespace is not specified, means the resource is non-namespace scoped.
// +required
optional string namespace = 3;
// Name represents the name of the referent.
// +required
optional string name = 4;
}
// ReplicaRequirements represents the requirements required by each replica.
message ReplicaRequirements {
// NodeClaim represents the NodeAffinity, NodeSelector and Tolerations required by each replica.
// +optional
optional NodeClaim nodeClaim = 1;
// ResourceRequest represents the resources required by each replica.
// +optional
map<string, k8s.io.apimachinery.pkg.api.resource.Quantity> resourceRequest = 2;
}
// UnimplementedEstimatorServer can be embedded to have forward compatible implementations.
message UnimplementedEstimatorServer {
}
// UnschedulableReplicasRequest represents the request that sent by gRPC client to calculate unschedulable replicas.
message UnschedulableReplicasRequest {
// Cluster represents the cluster name.
// +required
optional string cluster = 1;
// Resource represents the Kubernetes resource to be propagated.
// +required
optional ObjectReference resource = 2;
// UnschedulableThreshold represents the period threshold of pod unscheduable condition.
// This value is considered as a classification standard of unscheduable replicas.
// +optional
optional int64 unschedulableThreshold = 3;
}
// UnschedulableReplicasResponse represents the response that sent by gRPC server to calculate unschedulable replicas.
message UnschedulableReplicasResponse {
// UnschedulableReplicas represents the unschedulable replicas that the object contains.
// +required
optional int32 maxUnschedulableReplicas = 1;
}