/* Copyright The Karmada Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // 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 = "github.com/karmada-io/karmada/pkg/estimator/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 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 resourceRequest = 2; // Namespace represents the namespaces belonged to a ResourceRequest // +optional optional string namespace = 3; // PriorityClassName represents the priority class name for a given ResourceRequest // Resource quotas are introduced for multi tenants sharing a cluster // Besides estimate the replica based on nodes' resources, we need to consider the resource quota of a ResourceRequest // ResourceQuota have an associated set of scopes, one of them is priority class // +optional optional string priorityClassName = 4; } // 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 unschedulable condition. // This value is considered as a classification standard of unschedulable 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 unschedulableReplicas = 1; }