A CLI tool for the validator ecosystem.
The validatorctl
binary serves multiple purposes, therefore the system requirements vary based on how you intend to use it. See requirements by use case below.
None! Just install the validatorctl
binary and get started with validatorctl rules check
.
If you execute validator install
without a KUBECONFIG
set you'll be given the option to create and use a local kind cluster. Additional prerequisites are required in that case.
You can download the validatorctl
binary you require directly from the releases page or via curl.
For instance, the v0.0.1 darwin binary can be installed and run like this:
curl -L -O https://github.com/validator-labs/validatorctl/releases/download/v0.0.1/validator-darwin-arm64
chmod +x validator-darwin-arm64
sudo mv validator-darwin-arm64 /usr/local/bin/validator
validator help
To build validatorctl
from source, you'll need to ensure you're running go1.22.4
.
You can then build validatorctl
and run it with the following commands:
make build
./bin/validator help
validatorctl
provides several commands for managing validator plugins. Below are some common commands:
validator install --apply
command.validator describe
command.validator upgrade
command.validator uninstall
command.validator rules check
command.Refer to Command Reference on the documentation site to learn more about each command. You can also issue the validator help
command to learn more about the available commands.
❯ validator help
Welcome to the Validator CLI.
Install validator & configure validator plugins.
Use 'validator help <sub-command>' to explore all of the functionality the Validator CLI has to offer.
Usage:
validator [command]
Available Commands:
completion Generate the autocompletion script for the specified shell
describe Describe all validation results in a Kubernetes cluster
docs Display information about supported validator plugins
help Help about any command
install Install validator & validator plugin(s)
rules Configure & apply, or directly evaluate validator plugin rules.
uninstall Uninstall validator & all validator plugin(s)
upgrade Upgrade validator & re-configure validator plugin(s)
version Prints the Validator CLI version
Flags:
-c, --config string Validator CLI config file location
-h, --help help for validator
-l, --log-level string Log level. One of: [panic fatal error warn info debug trace] (default "info")
-w, --workspace string Workspace location for staging runtime configurations and logs (default "$HOME/.validator")
Use "validator [command] --help" for more information about a command.
Contributions are always welcome; take a look at our contributions guide and code of conduct to get started.
Copyright 2024.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.