syntax = "proto3";

package grpcplugin;
import "k8s.io/api/core/v1/generated.proto";
option go_package = "cluster-autoscaler/expander/grpcplugin/protos";



// Interface for Expander
service Expander {

  rpc BestOptions (BestOptionsRequest)
    returns (BestOptionsResponse) {}
}

message BestOptionsRequest {
  repeated Option options = 1;
  // key is node id from options
  map<string, k8s.io.api.core.v1.Node> nodeMap = 2;
}
message BestOptionsResponse {
  repeated Option options = 1;
}
message Option {
  // only need the ID of node to uniquely identify the nodeGroup, used in the nodeInfo map.
  string nodeGroupId = 1;
  int32 nodeCount = 2;
  string debug = 3;
  repeated k8s.io.api.core.v1.Pod pod = 4;
}
