Subdirectories contain various tools used by the operator.
Each tool must have its own directory and go module.
Otherwise, there might be conflicting dependencies between tools and versions.
e.g. The dreaded gnostic dependency.
- Create a new directory for the tool, as well as a
go.modfile. The module should begithub.com/stackrox/rox/operator/tools/<tool> - Copy the
noop.gofile to the directory. Check here for an example. - Add a
tool.gofile to the directory. Add aimport _ "<tool-module>"statement to the file. - Add a
go-toolstatement in theMakefile. For example,$(call go-tool, YQ, github.com/mikefarah/yq/v4, tools/yq) - Add a dependabot configuration for the tool.
- Run
make <tool>to install the tool locally. - Profit