Skip to main content

Overview

The Optimization supports custom optimization strategies through a Python plugin interface. A custom strategy implements the BaseStrategy class, defines its own goal association, and is registered via Python entry points. Custom strategies enable specialized optimization logic for non-standard cluster topologies, proprietary metric sources, or regulatory compliance placement requirements.
Custom strategies are deployed as Python packages on the controller node running the Decision Engine. A Decision Engine restart is required after installing a new strategy.

Strategy Interface

Custom strategies inherit from watcher.decision_engine.strategy.strategies.base.BaseStrategy and must implement three methods:
Custom strategy skeleton

Register the Strategy

Add the strategy to the Python package entry points:
setup.cfg
Build and install the package:
Install custom strategy package

Deploy to the Decision Engine Container

Copy strategy package into container
Restart Decision Engine
Verify strategy is registered
The custom strategy should appear in the list with its NAME value.

Associate with a Goal

Custom strategies must be associated with an existing goal or a new goal created for the purpose:
List available goals
If a new goal is needed, register it alongside the strategy entry point:
setup.cfg

Test the Custom Strategy

Run an audit with the custom strategy
Monitor audit progress
Review generated actions

Next Steps

Strategy Configuration

Configure tuning parameters for built-in and custom strategies.

Data Sources

Connect the metric sources your custom strategy uses.

Architecture

Review the Decision Engine plugin loading mechanism.

Troubleshooting

Diagnose custom strategy import and registration errors.