Generic framework for running health validation rules on OpenShift cluster nodes
Project description
In-Cluster Checks
A generic framework for running health validation rules directly on OpenShift cluster nodes using oc debug.
Key Advantages
- Direct node access - Rules run directly on cluster nodes via
oc debug - Fast execution - Parallel rule execution across multiple nodes
- Relevant rules execution - Only relevant rules run based on prerequisite checks
- Easy debugging - Full visibility into commands executed for each rule
Originally developed as part of Red Hat's Pendrive project, this framework has been extracted as open-source to benefit the broader OpenShift community.
Rules are organized by topic into domains (hardware, network, linux, storage).
Installation
Prerequisites:
- Python >= 3.12
- pip (Python package installer)
Connected Environment
Install the framework:
pip install in-cluster-checks
Or if pip is not found, use:
python3 -m pip install in-cluster-checks
Disconnected Environment
For environments without internet access:
-
Download the package on a connected machine:
pip download in-cluster-checks --dest ./packages # Or: python3 -m pip download in-cluster-checks --dest ./packages
-
Transfer the packages to the disconnected environment
Copy the entire
./packagesdirectory to the disconnected machine. You can place it anywhere, but note the location for the next step. -
Install from local packages:
# If packages are in the current directory: pip install --no-index --find-links=./packages in-cluster-checks # Or specify the full path to where you copied them: pip install --no-index --find-links=/path/to/packages in-cluster-checks # Using python3 -m pip: # python3 -m pip install --no-index --find-links=./packages in-cluster-checks
Running in-cluster-checks
Cluster Login
Ensure you're logged into your OpenShift cluster.
You can login by one of the following options:
Login with Username and Password:
Use the cluster API URL and your credentials.
oc login https://api.your-cluster.com:6443
Login Using a Kubeconfig File:
If you already have a kubeconfig file with credentials:
export KUBECONFIG=/path/to/kubeconfig
Usage Examples
You can run in-cluster-checks with the following options:
# Run all checks. Use --output to save run results to ./cluster-checks.json
in-cluster-checks --output ./cluster-checks.json
# Run a specific rule (disables secret filtering)
in-cluster-checks --debug-rule "check_disk_usage"
# Run with debug logging
in-cluster-checks --log-level DEBUG
# Specify namespace for debug pods (default: default)
in-cluster-checks --namespace openshift-debug
To see all available options, run:
in-cluster-checks --help
Notes:
- To control execution performance, use
--max-workersto set the maximum number of parallel workers (default: 50). - When using
--namespace, ensure you have permissions to create debug pods in the specified namespace.
Contributing
Contributions are welcome! Please see our CONTRIBUTING.md for detailed guidelines on how to:
- Set up your development environment
- Add new rules and domains
- Write tests
- Submit pull requests
Related Projects
- Pendrive: Red Hat's on-premise Insights validation tool (internal)
- OpenShift: Container orchestration platform
Acknowledgments
This framework was extracted from Red Hat's Pendrive project. The core validation infrastructure is generic and contains no confidential logic, making it suitable for open-source release to benefit the wider OpenShift community.
License
The 3-Clause BSD License
See LICENSE for full text.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file in_cluster_checks-0.1.10.tar.gz.
File metadata
- Download URL: in_cluster_checks-0.1.10.tar.gz
- Upload date:
- Size: 129.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5a5dc7f03b1b43cf9bdc8689fc31f7296deb36e56be9859f237456afd46f478c
|
|
| MD5 |
aa0ebed97b3fde42f7536583d7821794
|
|
| BLAKE2b-256 |
13777f3e87f76dd5e72f74a80108ec1e7f034fbe375a2f4c8b295e3556d14def
|
Provenance
The following attestation bundles were made for in_cluster_checks-0.1.10.tar.gz:
Publisher:
publish.yml on RedHatInsights/incluster-checks
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
in_cluster_checks-0.1.10.tar.gz -
Subject digest:
5a5dc7f03b1b43cf9bdc8689fc31f7296deb36e56be9859f237456afd46f478c - Sigstore transparency entry: 1432079419
- Sigstore integration time:
-
Permalink:
RedHatInsights/incluster-checks@f47ba29a1639e3ffa84fccd25fde71afd3ce182b -
Branch / Tag:
refs/tags/v0.1.10 - Owner: https://github.com/RedHatInsights
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f47ba29a1639e3ffa84fccd25fde71afd3ce182b -
Trigger Event:
release
-
Statement type:
File details
Details for the file in_cluster_checks-0.1.10-py3-none-any.whl.
File metadata
- Download URL: in_cluster_checks-0.1.10-py3-none-any.whl
- Upload date:
- Size: 157.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8c6b0530a3971392ea0ef0ad8016df6938f625bde515081fb0e823e5db1fe478
|
|
| MD5 |
d8561af6d4132cac543ea36c4fe85005
|
|
| BLAKE2b-256 |
2b00dc9227755fafa359b0bbc34a44b1db83d9859ccc2dd7e23daf821098cd8a
|
Provenance
The following attestation bundles were made for in_cluster_checks-0.1.10-py3-none-any.whl:
Publisher:
publish.yml on RedHatInsights/incluster-checks
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
in_cluster_checks-0.1.10-py3-none-any.whl -
Subject digest:
8c6b0530a3971392ea0ef0ad8016df6938f625bde515081fb0e823e5db1fe478 - Sigstore transparency entry: 1432079490
- Sigstore integration time:
-
Permalink:
RedHatInsights/incluster-checks@f47ba29a1639e3ffa84fccd25fde71afd3ce182b -
Branch / Tag:
refs/tags/v0.1.10 - Owner: https://github.com/RedHatInsights
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f47ba29a1639e3ffa84fccd25fde71afd3ce182b -
Trigger Event:
release
-
Statement type: