Light Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Latest commit

History

History
137 lines (100 loc) * 4.61 KB

CONTRIBUTING.md

File metadata and controls

137 lines (100 loc) * 4.61 KB

Contributing to Hive

Thank you for your interest in contributing to OpenShift Hive! We welcome contributions from the community.

Project Overview

OpenShift Hive is an operator which runs as a service on top of Kubernetes/OpenShift. The Hive service can be used to provision and perform initial configuration of OpenShift clusters.

Hive uses the OpenShift installer for cluster provisioning.

For detailed design overview and usage, please refer to the README.md and documentation.

Getting Started

Prerequisites

  • Go (version specified in go.mod)
  • Make

Development Environment

You can build the project binaries using the provided make targets.

# Update generated code
make update

# Compile the project binaries
make build

# Clean up build artifacts
make clean

See the Developing Hive guide for detailed setup instructions.

Testing

Before submitting a Pull Request, ensure that all tests pass and the code is verified.

# Verify generated code and formatting
make verify

# Run unit tests (excludes e2e tests)
make test

Dependency Management

make vendor # Update vendor directory
make modcheck # Check module dependencies
make modfix # Fix module dependencies

Test Types

  • Unit Tests (make test): Runs unit tests for ./pkg/..., ./cmd/..., ./contrib/..., and submodules. This excludes e2e tests.
  • E2E Tests: End-to-end tests require a running cluster and are run separately:
    • make test-e2e: Run full e2e test suite
    • make test-e2e-pool: Run cluster pool e2e tests
    • make test-e2e-postdeploy: Run post-deployment e2e tests
    • make test-e2e-postinstall: Run post-installation e2e tests

Project Structure

Understanding the project structure will help you navigate the codebase:

  • apis/: API definitions (separate Go submodule)
    • hive/v1/: Hive v1 APIs (ClusterDeployment, SyncSet, etc.)
    • hiveinternal/v1alpha1/: Internal APIs
    • hivecontracts/v1alpha1/: Contract APIs
  • cmd/: Binary entry points
    • cmd/manager/: Main entry point for Hive controllers
    • cmd/operator/: Main entry point for Hive operator
    • cmd/hiveadmission/: Admission webhook server
  • pkg/: Package source code
    • pkg/controller/: Operator controllers
    • pkg/install/: Installation logic and OpenShift installer integration
    • pkg/installmanager/: Manages cluster installation process
    • pkg/operator/: Hive operator logic
    • pkg/resource/: Utilities for applying resources to remote clusters
    • pkg/remoteclient/: Client for connecting to remote clusters
    • pkg/{awsclient,azureclient,gcpclient,ibmclient}/: Cloud provider-specific client implementations
  • config/: Kubernetes YAML manifests for deploying the operator
  • docs/: Developer and user documentation
  • hack/: Developer scripts and tools
  • test/e2e/: End-to-end tests

Pull Requests

Commit Messages

All git commits should follow a standard format to ensure clarity and traceability.

Title format: : </code></p> <p dir="auto"><strong>Example</strong>:</p> <divs cloud credentials. Add a script, `hack/refresh-clusterpool-creds.sh` to nondisruptively update the (currently AWS; other platforms TODO) cloud credentials for all existing ClusterDeployments associated with a given ClusterPool. - Accepts two args: the clusterpool namespace and name. - Discovers the current AWS creds Secret from the clusterpool. - Discovers all existing ClusterDeployments associated with the clusterpool. - Discovers the AWS creds Secret for each CD. - Patches that Secret with the `.data` of the clusterpool's Secret."><tt><code>HIVE-2980: How to refresh ClusterPool cloud creds<br>Add doc content describing different ways to rotate a ClusterPool's<br>cloud credentials.<br><br>Add a script, `hack/refresh-clusterpool-creds.sh` to nondisruptively<br>update the (currently AWS; other platforms TODO) cloud credentials for<br>all existing ClusterDeployments associated with a given ClusterPool.<br>- Accepts two args: the clusterpool namespace and name.<br>- Discovers the current AWS creds Secret from the clusterpool.<br>- Discovers all existing ClusterDeployments associated with the<br> clusterpool.<br>- Discovers the AWS creds Secret for each CD.<br>- Patches that Secret with the `.data` of the clusterpool's Secret.<br></code></tt></div> <div dir="auto"><h3 tabindex="-1" dir="auto">AI Attribution</h3></div> <p dir="auto">If AI tools were used to generate or significantly assist with the code or documentation, please include a footer annotation in the commit message:</p> <div><tt><code>Assisted-by: <AI Model Name><br></code></tt></div> <div dir="auto"><h3 tabindex="-1" dir="auto">Submission Checklist</h3></div> <ul> <li><input type="checkbox" id="" disabled="" aria-label="Incomplete task"> Run <code>make update</code> to ensure generated code is up to date.</li> <li><input type="checkbox" id="" disabled="" aria-label="Incomplete task"> Run <code>make test</code> to ensure no regressions.</li> <li><input type="checkbox" id="" disabled="" aria-label="Incomplete task"> Run <code>make verify</code> to ensure code formatting and standards.</li> <li><input type="checkbox" id="" disabled="" aria-label="Incomplete task"> Ensure commit messages follow the project standards.</li> <li><input type="checkbox" id="" disabled="" aria-label="Incomplete task"> Update documentation for user-facing changes.</li> </ul> <div dir="auto"><h2 tabindex="-1" dir="auto">Additional Resources</h2></div> <ul dir="auto"> <li><a href="/github.com/openshift/hive/blob/master/docs/developing.md">Developing Hive Guide</a> - Detailed development setup and workflows</li> <li><a href="/github.com/openshift/hive/blob/master/docs/architecture.md">Architecture Documentation</a> - Understanding Hive's architecture</li> <li><a href="/github.com/openshift/hive/blob/master/AGENTS.md">AGENTS.md</a> - Instructions for AI agents and quick reference</li> <li><a href="/github.com/openshift/hive/blob/master/docs">Hive Documentation</a> - Complete documentation index</li> </ul> </article></div><button hidden=""></button></section></div></div></div> </div> <!-- --> </div></div></div></div></div></div><div id="find-result-marks-container"></div><button hidden=""></button><button hidden=""></button></div> <!-- --> <!-- --> </div> </react-app> </div> </turbo-frame> </main> </div> </div> <footer role="contentinfo" > <h2>Footer</h2> <div> <div> <a href="/github.com"> </a> <span> (c) 2026 GitHub, Inc. </span> </div> <nav aria-label="Footer"> <h3 id="sr-footer-heading">Footer navigation</h3> <ul aria-labelledby="sr-footer-heading"> <li> <a href="/docs.github.com/site-policy/github-terms/github-terms-of-service">Terms</a> </li> <li> <a href="/docs.github.com/site-policy/privacy-policies/github-privacy-statement">Privacy</a> </li> <li> <a href="/github.com/security">Security</a> </li> <li> <a href="/www.githubstatus.com/">Status</a> </li> <li> <a href="/github.community/">Community</a> </li> <li> <a href="/docs.github.com/">Docs</a> </li> <li> <a href="/support.github.com?tags=dotcom-footer">Contact</a> </li> <li > <cookie-consent-link> <button type="button" > Manage cookies </button> </cookie-consent-link> </li> <li> <cookie-consent-link> <button type="button" > Do not share my personal information </button> </cookie-consent-link> </li> </ul> </nav> </div> </footer> <ghcc-consent id="ghcc" ></ghcc-consent> <div id="ajax-error-message" hidden> <button type="button" aria-label="Dismiss error"> </button> You can't perform that action at this time. </div> <template id="site-details-dialog"> <details open> <summary role="button" aria-label="Close dialog"></summary> <details-dialog> <button type="button" aria-label="Close dialog" data-close-dialog> </button> <div></div> </details-dialog> </details> </template> <div> <div> </div> </div> <template id="snippet-clipboard-copy-button"> <div> <clipboard-copy aria-label="Copy"> </clipboard-copy> </div> </template> <template id="snippet-clipboard-copy-button-unpositioned"> <div> <clipboard-copy aria-label="Copy"> </clipboard-copy> </div> </template> </div> <div id="js-global-screen-reader-notice" aria-live="polite" aria-atomic="true" ></div> <div id="js-global-screen-reader-notice-assertive" aria-live="assertive" aria-atomic="true"></div> </body> </html>