Skip to content

RedHatInsights/insights-operator-gathering-conditions

 
 

Repository files navigation

Insights Operator Remote Configuration Data

Insights Operator is an OpenShift cluster operator which enables Insights Advisor and other remote health monitoring services for OpenShift. This repository manages data for Insights Operator features that consume dynamic (remote) configuration: Conditional Gathering and Rapid Recommendations.

The Insights Operator downloads the remote configuration from Insights Operator Gathering Conditions Service, a service running on the Red Hat Hybrid Cloud Console. The service provides two API versions:

  • v1 is used by Insights Operators in OCP 4.9-4.16. This API version provides only remote configuration for the Conditional Gathering feature.
  • v2 is used by Insights Operators in OCP 4.17 and newer. This API version provides remote configuration for both Conditional Gathering and Rapid Recommendations features.

The Insights Operator Gathering Conditions Service uses data that is generated from data in this repository.

Repository Structure

Remote configuration data is stored in a modular way that is convenient for managing the data (see the contributing documentation for details).

Build

The build.py script expands templates in templates_v1 and templates_v2 into files needed by the Insights Operator Gathering Conditions Service.

Python and Go are required. We expect this project to work on most versions of both. To check the specific version we test and use, see the CI workflow configuration.

# clone repo
git clone -o upstream https://github.com/RedHatInsights/insights-operator-gathering-conditions
cd insights-operator-gathering-conditions
git fetch -p upstream   # the build.py script needs version tags

# prepare runtime environment
python3 -m venv .env
source .env/bin/activate
pip3 install -r requirements.txt

# run the build script
python build.py

The tool supports a few command line arguments, mostly for testing purposes. Run python build.py --help for details.

Generated Files

The build.py script generates the following files:

  • build/v1/rules.json [schema]
    • The remote configuration returned by the v1 API.
  • build/v2/*.json [schema]
    • Remote configurations returned by the v2 API.
  • build/cluster_mapping.json [schema]
    • A file mapping cluster version ranges to specific v2 remote configurations.
  • build/v2/remote_configurations/*.json [TODO: schema link]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 98.6%
  • Other 1.4%