cub function
cub function
Function commands
Synopsis
The function subcommands are used to discover and execute functions.
Functions are explained at https://docs.confighub.com/background/entities/function/. A guide for how to use functions is at https://docs.confighub.com/guide/functions/.
Invoke a function with the verb matching its kind. Each verb rejects functions of the wrong kind before invoking anything, so a mistake is an error rather than an unintended write, and an agent or role can be granted "function get" alone:
get non-mutating functions (Mutating=false), including validating ones: get-container-image, get-replicas, get-placeholders, get-resources, get-yq set mutating functions (Mutating=true): set-container-image, set-replicas, set-yq, search-replace, ensure-namespaces vet validating functions (Validating=true): vet-schemas, vet-placeholders, vet-cel, vet-approvedby do any kind. The escape hatch for a single command that must mix kinds.
The verb supplies a missing prefix, so "function set replicas 3" invokes set-replicas and "function vet placeholders" invokes vet-placeholders.
Arguments are positional, in signature order. To pass them by name ("--parameter-name=value") put "--" before the function name, so that cub does not read them as its own flags.
Functions are toolchain-specific (Kubernetes/YAML, AppConfig/Properties, etc.) and operate on the units selected by --space, --unit, --where, and --where-data. --where-resource narrows which resources within those units are operated on.
Options
--executor-space string Space ID or slug whose executor to use for builtin functions (org-level only)
-h, --help help for function
--space string space ID to perform command on
Options inherited from parent commands
--context string The context to use for this command
--debug Debug output
SEE ALSO
- cub - ConfigHub CLI
- cub function do - Invoke one function
- cub function exec - Invoke a list of functions
- cub function explain - Explain a function
- cub function get - Run non-mutating functions on units
- cub function list - List functions
- cub function local - Execute a function locally on input data for debugging
- cub function set - Run mutating functions on units
- cub function vet - Run validating functions on units