skenario
skenario copied to clipboard
Enabling/disabling HPA/VPA should be done over Web UI
Now we can manage how many plugins to connect to Skenario via parameters in command line when we run Skenario (see Makefile).
We can run Skenario with only HPA - ./build/sim ./build/plugin-k8s We can run Skenario with only VPA - ./build/sim ./build/plugin-k8s-vpa We can run Skenario with both HPA and VPA - ./build/sim ./build/plugin-k8s ./build/plugin-k8s-vpa
When we run Skenario and feed plugins, Dispatcher starts these plugins as a separate process via Hashicorp https://github.com/pivotal/skenario/blob/master/plugin/pkg/skplug/dispatcher/dispatcher.go#L80. Then Dispatcher registers plugin's capabilities https://github.com/pivotal/skenario/blob/master/plugin/pkg/skplug/dispatcher/dispatcher.go#L105
We want to manage this process - how many autoscalers we want to work with - via web ui. The checkboxes for both "HPA" and "VPA" are already added to the web ui. But we end up with an error:
- We run Skenario with both plugins
- Dispatcher registers their capabilities
- We uncheck one autoscaler
- Press "Execute Simulation"
- Skenario passes to Dispatcher stats
- Dispatcher knows two plugins with capability "stat" and send stats both of them.
- However, we created partition only for one plugin according to web ui.
- Here we get an error inside a plugin that partition doesn't exist. Which makes sense, because we said dispatcher that we are interesting only in one autoscaler and we need to create a partition only for it.
This logic should be fixed. Enabling/disabling HPA/VPA should be done over Web UI.