Skip to content

Latest commit

 

History

History
51 lines (28 loc) · 1.42 KB

HACKING.md

File metadata and controls

51 lines (28 loc) · 1.42 KB

⚠⚠⚠ THIS IS A LIVING DOCUMENT AND LIKELY TO CHANGE QUICKLY ⚠⚠⚠

Hacking on the Node Tuning Operator

These instructions have been tested on Fedora 39.

Prerequisites

Most changes you'll want to test live against a real cluster. Instructions are TODO.

Go v1.21 is used for development of the NTO.

Static Analysis

Static analysis (e.g. gofmt) can be executed with:

make verify

Unit Tests

Unit tests (that don't interact with a running cluster) can be executed with:

make test-unit

Local e2e tests

Local end-to-end tests (that don't interact with a running cluster) can be executed with:

make test-e2e-local

Note: This will install ginkgo if it is not already installed. You must ensure that the go bin directory (usually $HOME/go/bin) is in your $PATH.

Running in a cluster

During NTO development there are certain test scenarios that require a cluster to properly test your code.

In those situations, you will need to:

  1. Build the NTO image you're interested in testing
  2. Push the image to an OpenShift cluster

To build the repo's code as an image and push it to the cluster we have a script that can automate this for you:

ORG=quay-user hack/deploy-custom-nto.sh

It is also possible to opt for a specific revision of TuneD by specifying: TUNED_COMMIT=commit-hash

We recommend running some e2e tests to verify the custom image works as expected.