How to enable/disable feature

Using Operator API via Swagger

Swagger Web UI available at http://%HOST_NAME:PORT%/swagger/index.html (http://localhost:5007/swagger/index.html for local machine). First of all, set up authorization key by clicking Authorize button, then enter "123" into Value field on popup window as shown below:


To check the current status of features or enable/disable some feature go to Features page section and use appropriate request:

Note that feature status changes are reflected in Swagger UI immediately but it takes some time for the changes to propagate through the system due to caching mechanism. By default feature status is cached for 3 minutes but you may change the duration via FeatureManagement:%feature_name%:EnabledFor:MaxCacheAge configuration parameter:

FeatureManagement: {

    Feature1: {

        EnabledFor: [

            {

                Name: "WarRobots.Operator"

                Parameters: {

                    MaxCacheAge: "00:03:00" # change this to whatever suit your needs

                }

            }

        ]

    }

}

Minimal valid duration is 1 minute, any value less than that is ignored.

Using configuration file

A feature can be enabled/disabled permanently by setting FeatureManagement:%feature_name% configuration parameter to True or False respectively:

FeatureManagement: {

    Feature1: True # always enabled

    Feature2: False # always disabled

}

By default FeatureManagement section defined in cluster.conf file but may be overriden in devServer.conf and *local.conf files. Also note that if feature is not defined in configuration files it is considered disabled by the system.