How to set feature flags for Red Hat Ansible Automation Platform
Overview
Feature flags allow a platform administrator to toggle functionality based on configurable conditions when directed by product management. Flags can be useful for staging feature deployments that Ansible product management intends for preview to gather feedback before providing it as a fully supported item. The toggle can be by date, user, URL value, or a number of other conditions, editable in the admin or in definable settings.
As an example: An Ansible Automation Platform specific use cases includes using feature flags to enable (or disable) EDA_ANALYTICS by default at install time or for implementing policy as code across your deployment.
Configuring feature flags for the Ansible Automation Platform
You can use the following example procedure to configure feature flags for RPM, containerized, and operator installations.
Procedure
- Identify the configuration source:
- An inventory file configures feature flags for RPM and containerized installers.
- The AnsibleAutomationPlatform custom resource definition (CRD) configures feature flags and propagates them to component CRDs in the OCP installer.
- Use the following format for configuration:
feature_flags:
FEATURE_EDA_ANALYTICS_ENABLED: True
FEATURE_POLICY_AS_CODE_ENABLED: True
- Install:
- During installation, the installers read the
feature_flagsdictionary from the configuration source. - The feature_flags configuration is copied into each component's settings file (For example,
/etc/tower/settings.pyin automation controller or/etc/ansible-automation-platform/eda/settings.yamlin EDA). - No validation or processing of flags occurs at the installer level. For example, the YAML from 3.ii above overrides the settings.py file like:
- During installation, the installers read the
FEATURE_EDA_ANALYTICS_ENABLED: True
FEATURE_POLICY_AS_CODE_ENABLED: True