Skip to content
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

Extend plugin to support VPA #98

Open
josephburnett opened this issue Jul 22, 2020 · 0 comments
Open

Extend plugin to support VPA #98

josephburnett opened this issue Jul 22, 2020 · 0 comments

Comments

@josephburnett
Copy link
Contributor

(Copied from josephburnett/sk-plugin#1 when sk-plugin was moved to the skenario respository)

Now sk-plugin protocol provides 2 callback functions, 2 input and 1 output.

(input) Event--create, update and delete events for pods etc...
(input) Stat--periodic system stats such as CPU usage or request concurrency.
(output) Scale--a request for a recommended scale, given prior input callbacks.

We need to extend this protocol to support VPA. New protocol will look like:

(input) Event--create, update and delete events for pods etc...
(input) Stat--periodic system stats such as CPU usage or request concurrency.
(output) Scale_horizontally--a request for a recommended scale horizontally, given prior input callbacks.
(output) Scale_vertically--a request for a recommended scale vertically, given prior input callbacks.

Proto

syntax = "proto3";
package proto;

message Empty {}

message Autoscaler {
string type = 1;
string yaml = 2;
}

message Pod {
string name = 1;
string state = 2;
int64 last_transition = 3;
int32 cpu_request = 4;
}

enum EventType {
CREATE = 0;
UPDATE = 1;
DELETE = 2;
}

message EventRequest {
string partition = 1;
int64 time = 2;
EventType type = 3;
oneof object_oneof {
Autoscaler autoscaler = 4;
Pod pod = 5;
}
}

enum MetricType {
CPU_MILLIS = 0;
CONCURRENT_REQUESTS_MILLIS = 1;
}

message Stat {
int64 time = 1;
string pod_name = 2;
MetricType type = 3;
int32 value = 4;
}

message StatRequest {
string partition = 1;
repeated Stat stat = 2;
}

message VerticalSizeRequest{
string partition = 1;
int64 time_nanos = 2;
}

message VerticalSizeResponse{
repeated RecommendedPodResources rec = 1;
}

message RecommendedPodResources{
string pod_name = 1;
int32 lower_bound = 2;
int32 upper_bound = 3;
int32 target = 4;
string resource_name = 5;
int32 recommendation = 2;
}

message HorizontalSizeRequest{
string partition = 1;
int64 time_nanos = 2;
}

message HorizontalSizeResponse{
int32 rec = 1;
}
service Plugin {
rpc Event(EventRequest) returns (Empty);
rpc Stat(StatRequest) returns (Empty);
rpc HorizontalRecommendation(HorizontalSizeRequest) returns (HorizontalSizeResponse);
rpc VerticalRecommendation(VerticalSizeRequest) returns (VerticalSizeResponse);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant