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

Development Environment

This page is for people who want to modify Tazuna itself, covering setting up your local environment and building / running / verifying code changes. For documentation and release flows, see separate pages (Documentation / Release).

Set Up the Toolchain With mise

The repository includes mise.toml, which pins the required toolchain.

[tools]
go = "1.26.0"
golangci-lint = "latest"
helm = "latest"

If you have mise installed, running mise install at the repository root will set up everything. If you manage Go or golangci-lint separately on your system, align them with mise.toml’s versions yourself.

Note: if the Go version required by go.mod (go 1.26.x) is newer than the version pinned in mise.toml, Go’s toolchain download mechanism will absorb the difference at build time. If you want to deliberately avoid toolchain downloads, align mise.toml with the go line in go.mod.

Tazuna itself does not use the helm binary (Helmfile backend is embedded as a Go library). helm is listed in mise.toml to leave room for a future development flow that treats helm as a dependent tool.

Main make Targets

Only the targets defined in Makefile are listed.

TargetContents
make buildGenerates ./tazuna via go build .
make installAfter make build, runs sudo mv tazuna /usr/local/bin
make formatgo fmt ./...
make lintgolangci-lint run
make testgo test ./... (unit tests)
make test-integrationgo test -tags=integration ./...
make test-e2eAfter make build && make devenv-create, runs go test -tags=e2e -count=1 ./test/e2e/...
make test-allunit + integration + e2e
make coverRuns tests with -race -covermode=atomic -coverprofile=coverage.out, then outputs a summary
make allRuns format → test → build → lint in order
make devenv-createStands up a kind cluster named tazuna (or switches context if one already exists)
make devenv-destroykind delete cluster --name tazuna

The KinD cluster name is fixed as tazuna, and the kubeconfig context name is kind-tazuna. Because e2e assumes a KinD cluster, the first run of make test-e2e internally triggers make devenv-create (see also Testing).

Repository Layout

The responsibilities of the main directories are roughly as follows.

PathRole
main.goEntry point. Just calls cmd.Execute().
cmd/Cobra subcommand definitions (apply / build / check / destroy / state ... / secret-to-genesissecret / tags / version).
cmd/internal/Internal utilities shared between subcommands.
api/v1/Go struct definitions corresponding to the YAML schemas (tazuna.yaml / tazuna.hint.yaml / GenesisSecret / TestPluginSpec / ORAS).
pkg/runner/Orchestration for the whole of tazuna apply.
pkg/manager/Per-manifest-type Manager implementations (kustomize / helmfile / genesis_secret / parallel, and the oras/ subpackage).
pkg/state/State representation and ConfigMap persistence.
pkg/testplugin/WaitUntil / ExistNonExist implementations.
pkg/genesissecret/Provider interface and the 1Password-targeted implementation.
pkg/hint/Loading and validation of tazuna.hint.yaml.
pkg/op/Invocation of op (the 1Password CLI).
pkg/validator/Validation of tazuna.yaml.
pkg/context/Evaluation of context_matches.
pkg/prompt/Abstraction of interactive input (Yes/No during destroy, etc.).
pkg/resource/Helpers for Kubernetes resource operations commonly used at apply time.
test/e2e/E2E test bodies and fixtures (testdata/).
docs/This documentation site.

The responsibility splits often referenced in the reference (Manager / Runner / Validator and so on) are easier to cross-check by reading Overall Architecture.

Try Behavior With a Local Binary

By calling ./tazuna generated by make build directly, you can try behavior using your in-development binary instead of the release version.

make build
./tazuna check -f path/to/tazuna.yaml
./tazuna build -f path/to/tazuna.yaml --tags infra

When you want it on PATH, use make install (it requires sudo). If you want to do live verification with KinD, bring up a cluster with make devenv-create, switch current-context with kubectl config use-context kind-tazuna, and then run.