This document provides guidance for building, testing, and contributing to the ExploitIQ Operator.
- Go 1.24 or later
- Docker or Podman
- oc or oc CLI
- Access to a Kubernetes 1.29+ or OpenShift 4.16+ cluster
- operator-sdk v1.41.1 (optional, for bundle operations)
Build the operator binary locally:
make buildThe binary is output to bin/manager.
Build the operator container image:
make docker-build IMG=<your-registry>/<image-name>:<tag>Example:
make docker-build IMG=quay.io/myorg/exploit-iq-operator:v1.0.0Push the operator image to a container registry:
make docker-push IMG=<your-registry>/<image-name>:<tag>Example:
make docker-push IMG=quay.io/myorg/exploit-iq-operator:v1.0.0Build and push in a single command:
make docker-build-push IMG=<your-registry>/<image-name>:<tag>Build for multiple platforms:
make docker-buildx IMG=<your-registry>/<image-name>:<tag> PLATFORMS=linux/amd64,linux/arm64Generate CRDs, RBAC, and other manifests:
make manifestsThis command generates:
- CRDs in
config/crd/bases/ - RBAC in
config/rbac/
Generate DeepCopy, DeepCopyInto, and DeepCopyObject methods:
make generateGenerate both manifests and code:
make generate manifestsRun this command after modifying API types in api/v1alpha1/.
Run unit tests with coverage:
make testThis command:
- Sets up envtest (Kubernetes test environment)
- Runs all unit tests
- Generates a coverage report (
cover.out)
Run end-to-end tests:
make test-e2eThis command:
- Creates a Kind cluster (
exploit-iq-operator-test-e2e) - Runs e2e tests in
test/e2e/ - Cleans up the cluster after tests complete
To manually clean up the test cluster:
make cleanup-test-e2eRun golangci-lint:
make lintAuto-fix linting issues:
make lint-fixVerify linter configuration:
make lint-configFormat code with gofmt:
make fmtRun go vet:
make vetInstall the CRDs into your cluster:
make installRemove the CRDs from your cluster:
make uninstallDeploy the operator to your cluster:
make deploy IMG=<your-registry>/<image-name>:<tag>The operator deploys into the exploit-iq-operator-system namespace.
Remove the operator from your cluster:
make undeployRun the operator locally (outside the cluster) against your kubeconfig:
make runThis mode is useful for rapid development and debugging.
Rebuild, push, and redeploy the operator:
make redeploy IMG=<your-registry>/<image-name>:<tag>This command:
- Generates manifests
- Builds and pushes the image
- Deploys to the cluster
- Restarts the controller pod
For deploying the operator on vanilla Kubernetes (without OLM), refer to installing_kubernetes.md.
For all bundle and catalog operations (creating new versions, fixing production bundles, building your own CatalogSource), refer to managing_bundles_catalogs.md.
oc logs -n exploit-iq-operator-system deployment/exploit-iq-operator-controller-manageroc get exploitiqstack <name> -o yamloc get deployments -n <namespace>oc get exploitiqstack <name> -o jsonpath='{.status.conditions}' | jq