32 lines
		
	
	
		
			760 B
		
	
	
	
		
			Protocol Buffer
		
	
	
	
			
		
		
	
	
			32 lines
		
	
	
		
			760 B
		
	
	
	
		
			Protocol Buffer
		
	
	
	
| syntax = "proto3";
 | |
| 
 | |
| package grpcplugin;
 | |
| import "k8s.io/api/core/v1/generated.proto";
 | |
| //import "google/protobuf/struct.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> nodeInfoMap = 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;
 | |
| }
 |