The policytools
CLI is a toolset that helps you manage policies in the multicluster Kubernetes
environments managed by Red Hat Advanced Cluster Management. They're made available through the
acm-cli
repository.
Red Hat Advanced Cluster Management Policy Toolset
This toolset helps you manage the policies in multicluster Kubernetes
environments that are managed by Red Hat Advanced Cluster Management.
Usage:
policytools [command]
Policy Tools Commands:
dryrun (Dev Preview feature) Locally execute a ConfigurationPolicy
template-resolver Locally resolve Policy templates
Additional Commands:
completion Generate the autocompletion script for the specified shell
help Help about any command
Flags:
-h, --help help for policytools
-v, --version version for policytools
Use "policytools [command] --help" for more information about a command.
Installing policytools
as an oc
plugin is straightforward--copy the binary to a location in the
PATH
with an oc-
prefix (or kubectl-
to install it as a plugin for both oc
and kubectl
).
See the
kubectl
documentation on plugins
for additional details on plugins.
You can run this Make target command to build the binary from source and install it as an oc
plugin to /usr/local/bin/
:
make build-oc-plugin
Once in the PATH
with an oc-
prefix, then the command is available as:
oc policytools
NOTE: Some policytools
subcommands are made available as standalone binaries if the full
policytools
CLI isn't desired. These are specified in the cmd/
directory.
Replace main
with a release-*
branch to build a particular version:
go install github.com/stolostron/policy-cli/cmd/policytools@main
To build the policytools
binary and output it to build/_output/
:
make build
To build all binaries specified in the cmd/
directory and output them to build/_output/
:
make build-all
See the Development guide for details on developing in this repo.