validatorctl

command module
v0.2.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 28, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

README

Contributions Welcome License Test Go Report Card codecov Go Reference

validatorctl

A CLI tool for the validator ecosystem.

Table of Contents

Prerequisites by use case

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.

Direct rule evaluation

None! Just install the validatorctl binary and get started with validatorctl rules check.

Installing validator on an existing kubernetes cluster
  • Helm v3.14.0+
  • Kubectl v1.24.10+
Installing validator into an ephemeral kind cluster

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.

  • Docker v24.0.6+ / Podman v5+
  • Helm v3.14.0+
  • Kind v0.20.0+
  • Kubectl v1.24.10+

Setup

Binary Installation

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
Building from Source

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

Usage

validatorctl provides several commands for managing validator plugins. Below are some common commands:

  • Install validator and plugins in a cluster, and apply validation rules with the validator install --apply command.
  • Describe validation results with the validator describe command.
  • Re-configure validator plugins after they've been installed with the validator upgrade command.
  • Uninstall the validator and all plugins with the validator uninstall command.
  • Directly invoke validation rules with the 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.

Contributing

Contributions are always welcome; take a look at our contributions guide and code of conduct to get started.

License

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.

Documentation

Overview

Package main provides the entry point for validatorctl.

Directories

Path Synopsis
Package cmd provides the CLI commands for valdatorctl.
Package cmd provides the CLI commands for valdatorctl.
pkg
cmd/validator
Package validator provides functions to manage the validator and its plugins
Package validator provides functions to manage the validator and its plugins
components
Package components provides functions for managing the validator components.
Package components provides functions for managing the validator components.
config
Package config provides utility functions for managing the validator config.
Package config provides utility functions for managing the validator config.
config/manager
Package manager provides functions manage the validator config
Package manager provides functions manage the validator config
logging
Package logging provides a global logger for the CLI.
Package logging provides a global logger for the CLI.
services
Package services provides utility functions for interacting with various services.
Package services provides utility functions for interacting with various services.
services/clouds
Package clouds provides utility functions for interacting with clouds.
Package clouds provides utility functions for interacting with clouds.
services/validator
Package validator provides functions for interacting with the validator and its plugins.
Package validator provides functions for interacting with the validator and its plugins.
utils/cmd
Package cmd provides utility functions for cobra commands.
Package cmd provides utility functions for cobra commands.
utils/crypto
Package crypto contains utility functions for encryption and decryption.
Package crypto contains utility functions for encryption and decryption.
utils/embed
Package embed provides utility functions for the embedded file system.
Package embed provides utility functions for the embedded file system.
utils/exec
Package exec provides utility functions for executing shell commands.
Package exec provides utility functions for executing shell commands.
utils/file
Package file provides utility functions for working with a filesystem.
Package file provides utility functions for working with a filesystem.
utils/kind
Package kind provides functions to manage Kind clusters
Package kind provides functions to manage Kind clusters
utils/kube
Package kube provides functions to interact with Kubernetes clusters
Package kube provides functions to interact with Kubernetes clusters
utils/network
Package network provides network utility functions.
Package network provides network utility functions.
utils/string
Package string contains utility functions for string manipulation.
Package string contains utility functions for string manipulation.
tests

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳