Development Setup
To set up a local development environment for working on KubeOps itself, you'll need to perform the following steps:
- Check out the repository (or your fork).
- If you want to run an operator locally, you'll need some Kubernetes instance. This can be any
Kubernetes instance you'd like:
- Local Kubernetes in Docker for Mac/Windows
- minikube, kind, or any other local Kubernetes
- A deployed Kubernetes instance (e.g. a cloud-managed cluster)
Repository Layout
| Folder | Content |
|---|---|
src/ | The SDK packages (KubeOps.Abstractions, KubeOps.Operator, KubeOps.Operator.Web, KubeOps.Generator, KubeOps.Transpiler, KubeOps.KubernetesClient, KubeOps.Cli, KubeOps.Templates, …) |
test/ | Unit and integration test projects, one per package |
examples/ | Runnable example operators used for manual testing (see Examples) |
docs/ | This documentation site (Docusaurus) |
Building and Linting
# Build the entire solution
dotnet build
# Build in Release mode — warnings are treated as errors!
dotnet build --configuration Release
# Check linting (must pass before merging)
dotnet format --verify-no-changes
# Auto-fix formatting
dotnet format
Warnings are errors in Release
Any compiler or analyzer warning fails the Release build. Make sure new code compiles
warning-free and run dotnet format before pushing.
Testing Your Changes
Use the implementations in the examples/ folder to test your changes manually against a cluster.
Those examples may also be extended, or new ones added, for testing purposes.
Write automated tests for your changes — see Running the SDK Tests for how the test suites are organized and executed.