Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Make Targets

make help prints this same list, grouped and described from the Makefile’s own ##@ and ## comments.

General

TargetDescription
helpDisplay this help.

Development

TargetDescription
generateGenerate deepcopy code (controller-gen object).
manifestsGenerate CRD, RBAC and webhook manifests into config/.
fmtFormat Go code (gofmt -s, goimports -local).
vetRun go vet in every module.
lintRun golangci-lint (.golangci.yml) in every module, then kube-api-linter on api/.
lint-modulesRun tfcapi-lint module –strict over the noop modules and variants and the libvirt modules.
verify-noop-modulesStage every no-op module and variant; init, validate (terraform, tofu) and lint each.
lint-apiRun kube-api-linter (.golangci-kal.yml) on the api/ module.
lint-fixRun golangci-lint and kube-api-linter with auto-fixers.

Test

TargetDescription
testRun unit tests in every module (-race -count=1).

Build

TargetDescription
buildBuild every cmd/* binary into bin/.
managerBuild the static manager into bin/manager.
runRun the manager out of cluster against the current kubeconfig (dev).
runnerBuild the static Job runner into bin/runner and check it is static.
docker-buildBuild the manager/runner image $(IMG) for the host platform.
docker-buildxBuild a multi-arch manifest list $(IMG) for $(PLATFORMS) (podman).
docker-pushPush $(IMG); a manifest list from docker-buildx is pushed with all its images.
noop-imagesBuild the no-op source images captf-test/noop-<name>:{terraform,opentofu} (NOOP=, ROLE=, VARIANT=).
libvirt-imagesBuild captf-test/libvirt-<role>:opentofu for each module under modules/libvirt.
test-libvirt-modulesRun each libvirt module’s tests (tofu test, mocked provider).
libvirt-images-pushPush the libvirt module images as $(NOOP_REGISTRY)/libvirt-<role>:$(VERSION)-opentofu.
noop-images-pushPush the no-op images as $(NOOP_REGISTRY)/noop-<name>:$(VERSION)-<base>.
lint-imagesBuild the negative image fixtures and tfcapi-lint them and the noop images (needs podman and jq).
release-lint-snapshotBuild tfcapi-lint release assets and checksums into dist/ (goreleaser snapshot).
release-lint-binariesAlias of release-lint-snapshot.
release-lintBuild tfcapi-lint release assets from the current git tag.
manifests-releaseBuild out/infrastructure-components.yaml (RELEASE_IMG); copy metadata.yaml and templates/*.yaml.
release-preflightCheck the tree is clean, HEAD carries tag $(VERSION), and metadata.yaml is append-only.
releaseBuild and push the images, push the noop images, and build every asset into out/release (VERSION=vX.Y.Z).
release-image-digestPrint the registry digest of $(RELEASE_REPO):$(VERSION).
release-assetsBuild every release asset for VERSION into out/release (needs the git tag).
release-notesWrite out/release/notes.md from the commits since the previous tag.
release-githubCreate the GitHub release for VERSION from out/release (publishes: operator only).

Documentation

TargetDescription
require-docs-dirFail unless DOCS_DIR names a captf-io/docs checkout (a prerequisite of the DOCS_DIR targets).
docs-genRegenerate the book’s generated pages (reference/, contract schemas, noop module copy) in DOCS_DIR.
docs-apiRegenerate the book’s reference/api.md in DOCS_DIR from api/v1alpha1 (hack/crd-ref-docs).
verify-docs-apiCheck that the book’s reference/api.md in DOCS_DIR matches what docs-api would generate.
verify-docsCheck the book in DOCS_DIR against this tree: generated pages, schemas, noop module copy, spec tables, quick start, example Containerfiles, captf.io/docs URLs.
lint-docs-mdLint Markdown docs with markdownlint-cli2 (part of verify).
lint-docs-proseLint doc prose with vale against the house style (part of verify).

Verify

TargetDescription
verifyRun all verifications.
verify-godocCheck that every declaration, parameter, return value and package is documented (hack/godoccheck).
verify-local-repositoryGenerate the provider and both flavors from a clusterctl local repository of the release assets (offline, no cluster).
verify-tilt-providerCheck tilt-provider.yaml against the tree and config/default.
docs-checkCheck relative links in README.md/templates/README.md and doc URLs repo-wide (DOCS_DIR checks them against a captf-io/docs checkout).
verify-templatesRender templates/ with the pinned clusterctl (hack/verify-templates.sh).
verify-containerfilesCheck the noop and example Containerfiles (structure, hadolint; VERIFY_CONTAINERFILES_BUILD=1 also builds).
check-licensesCheck that no MPL-2.0 dependency of tfcapi-lint applies Exhibit B (hack/check-licenses.sh).
verify-componentsCheck the clusterctl components built from config/default.
verify-metadataValidate metadata.yaml and check releaseSeries is append-only against the previous tag.
verify-modulesCheck go.work/go.mod pins and the no-replace rule.
verify-schemasValidate the contract JSON Schemas and their examples (python3 + jsonschema).
verify-genCheck generated files are up to date (needs git).
promtool-checkCheck the alert rules with promtool and build the Prometheus component on config/default.
promtool-testUnit-test the alert rules (config/prometheus/tests/rules_test.yaml).

Tools

TargetDescription
toolsInstall every pinned tool into hack/tools/bin.
kubebuilderInstall kubebuilder (scaffolding only) into hack/tools/bin.

Cleanup

TargetDescription
cleanRemove build output (bin/, dist/).