Command-Line Help for kwctl
This document contains the help content for the kwctl command-line program.
Command Overview:
kwctlβ΄kwctl annotateβ΄kwctl benchβ΄kwctl completionsβ΄kwctl digestβ΄kwctl docsβ΄kwctl infoβ΄kwctl inspectβ΄kwctl loadβ΄kwctl policiesβ΄kwctl pullβ΄kwctl pushβ΄kwctl rmβ΄kwctl runβ΄kwctl saveβ΄kwctl scaffoldβ΄kwctl scaffold admission-requestβ΄kwctl scaffold artifacthubβ΄kwctl scaffold manifestβ΄kwctl scaffold vapβ΄kwctl scaffold verification-configβ΄kwctl verifyβ΄
kwctlβ
Tool to manage Kubewarden policies
Usage: kwctl [OPTIONS] <COMMAND>
Subcommands:β
annotateβ Add Kubewarden metadata to a WebAssembly modulebenchβ Benchmarks a Kubewarden policycompletionsβ Generate shell completionsdigestβ Fetch digest from the OCI manifest of a policydocsβ Generates the markdown documentation for kwctl commandsinfoβ Display system informationinspectβ Inspect Kubewarden policyloadβ load policies from a tar.gz filepoliciesβ Lists all downloaded policiespullβ Pulls a Kubewarden policy from a given URIpushβ Pushes a Kubewarden policy to an OCI registryrmβ Removes a Kubewarden policy from the storerunβ Runs a Kubewarden policy from a given URIsaveβ save policies to a tar.gz filescaffoldβ Scaffold a Kubernetes resource or configuration fileverifyβ Verify a Kubewarden policy from a given URI using Sigstore
Options:β
-v,--verbose <VERBOSE>β Increase verbosity--no-color <NO-COLOR>β Disable colorful output
kwctl annotateβ
Add Kubewarden metadata to a WebAssembly module
Usage: kwctl annotate [OPTIONS] --metadata-path <PATH> --output-path <PATH> <wasm-path>
Arguments:β
<WASM-PATH>β Path to WebAssembly module to be annotated
Options:β
-m,--metadata-path <PATH>β File containing the metadata-o,--output-path <PATH>β Output file-u,--usage-path <PATH>β File containing the usage information of the policy
kwctl benchβ
Benchmarks a Kubewarden policy
Usage: kwctl bench [OPTIONS] --request-path <PATH> <uri_or_sha_prefix>
Arguments:β
<URI_OR_SHA_PREFIX>β Policy URI or SHA prefix. Supported schemes: registry://, https://, file://. If schema is omitted, file:// is assumed, rooted on the current directory.
Options:β
-
--allow-context-aware <ALLOW-CONTEXT-AWARE>β Grant access to the Kubernetes resources defined inside of the policy'scontextAwareResourcessection. Warning: review the list of resources carefully to avoid abuses. Disabled by default -
--cert-email <VALUE>β Expected email in Fulcio certificate -
--cert-oidc-issuer <VALUE>β Expected OIDC issuer in Fulcio certificates -
--disable-wasmtime-cache <DISABLE-WASMTIME-CACHE>β Turn off usage of wasmtime cache -
--docker-config-json-path <PATH>β Path to a directory containing the Docker 'config.json' file. Can be used to indicate registry authentication details -
--dump-results-to-disk <DUMP_RESULTS_TO_DISK>β Puts results in target/tiny-bench/label/.. if target can be found. used for comparing previous runs -
-e,--execution-mode <MODE>β The runtime to use to execute this policyPossible values:
opa,gatekeeper,kubewarden,wasi -
--fulcio-cert-path <PATH>β Path to the Fulcio certificate. Can be repeated multiple times -
--github-owner <VALUE>β GitHub owner expected in the certificates generated in CD pipelines -
--github-repo <VALUE>β GitHub repository expected in the certificates generated in CD pipelines -
--measurement-time <SECONDS>β How long the bench βshouldβ run, num_samples is prioritized so benching will take longer to be able to collect num_samples if the code to be benched is slower than this time limit allowed -
--num-resamples <NUM>β How many resamples should be done -
--num-samples <NUM>β How many resamples should be done. Recommended at least 50, above 100 doesnβt seem to yield a significantly different result -
--raw <RAW>β Validate a raw requestDefault value:
false -
--record-host-capabilities-interactions <FILE>β Record all the policy and host capabilities communications to the given file. Useful to be combined later with '--replay-host-capabilities-interactions' flag -
--rekor-public-key-path <PATH>β Path to the Rekor public key -
--replay-host-capabilities-interactions <FILE>β During policy and host capabilities exchanges the host replays back the answers found inside of the provided file. This is useful to test policies in a reproducible way, given no external interactions with OCI registries, DNS, Kubernetes are performed. -
-r,--request-path <PATH>β File containing the Kubernetes admission request object in JSON format -
--settings-json <VALUE>β JSON string containing the settings for this policy -
-s,--settings-path <PATH>β File containing the settings for this policy -
--sources-path <PATH>β YAML file holding source information (https, registry insecure hosts, custom CA's...) -
-a,--verification-annotation <KEY=VALUE>β Annotation in key=value format. Can be repeated multiple times -
--verification-config-path <PATH>β YAML file holding verification config information (signatures, public keys...) -
-k,--verification-key <PATH>β Path to key used to verify the policy. Can be repeated multiple times -
--warm-up-time <SECONDS>β How long the bench should warm up
kwctl completionsβ
Generate shell completions
Usage: kwctl completions --shell <VALUE>
Options:β
-
-s,--shell <VALUE>β Shell typePossible values:
bash,elvish,fish,powershell,zsh
kwctl digestβ
Fetch digest from the OCI manifest of a policy
Usage: kwctl digest [OPTIONS] <uri>
Arguments:β
<URI>β Policy URI
Options:β
--docker-config-json-path <PATH>β Path to a directory containing the Docker 'config.json' file. Can be used to indicate registry authentication details--sources-path <PATH>β YAML file holding source information (https, registry insecure hosts, custom CA's...)
kwctl docsβ
Generates the markdown documentation for kwctl commands
Usage: kwctl docs --output <FILE>
Options:β
-o,--output <FILE>β path where the documentation file will be stored
kwctl infoβ
Display system information
Usage: kwctl info
kwctl inspectβ
Inspect Kubewarden policy
Usage: kwctl inspect [OPTIONS] <uri_or_sha_prefix>
Arguments:β
<URI_OR_SHA_PREFIX>β Policy URI or SHA prefix. Supported schemes: registry://, https://, file://. If schema is omitted, file:// is assumed, rooted on the current directory.
Options:β
-
--docker-config-json-path <PATH>β Path to a directory containing the Docker 'config.json' file. Can be used to indicate registry authentication details -
-o,--output <FORMAT>β Output formatPossible values:
yaml -
--show-signatures <SHOW-SIGNATURES>β Show sigstore signatures -
--sources-path <PATH>β YAML file holding source information (https, registry insecure hosts, custom CA's...)
kwctl loadβ
load policies from a tar.gz file
Usage: kwctl load --input <input>
Options:β
--input <INPUT>β load policies from tarball
kwctl policiesβ
Lists all downloaded policies
Usage: kwctl policies
kwctl pullβ
Pulls a Kubewarden policy from a given URI
Usage: kwctl pull [OPTIONS] <uri>
Arguments:β
<URI>β Policy URI. Supported schemes: registry://, https://, file://
Options:β
--cert-email <VALUE>β Expected email in Fulcio certificate--cert-oidc-issuer <VALUE>β Expected OIDC issuer in Fulcio certificates--docker-config-json-path <DOCKER_CONFIG>β Path to a directory containing the Docker 'config.json' file. Can be used to indicate registry authentication details--fulcio-cert-path <PATH>β Path to the Fulcio certificate. Can be repeated multiple times--github-owner <VALUE>β GitHub owner expected in the certificates generated in CD pipelines--github-repo <VALUE>β GitHub repository expected in the certificates generated in CD pipelines-o,--output-path <PATH>β Output file. If not provided will be downloaded to the Kubewarden store--rekor-public-key-path <PATH>β Path to the Rekor public key. Can be repeated multiple times--sources-path <PATH>β YAML file holding source information (https, registry insecure hosts, custom CA's...)-a,--verification-annotation <KEY=VALUE>β Annotation in key=value format. Can be repeated multiple times--verification-config-path <PATH>β YAML file holding verification config information (signatures, public keys...)-k,--verification-key <PATH>β Path to key used to verify the policy. Can be repeated multiple times
kwctl pushβ
Pushes a Kubewarden policy to an OCI registry
Usage: kwctl push [OPTIONS] <policy> <uri>
The annotations found inside of policy's metadata are going to be part of the OCI manifest. The multi-line annotations are skipped because they are not compatible with the OCI specification. The 'io.kubewarden.policy.source' annotation is propagated as 'org.opencontainers.image.source' to allow tools like renovatebot to detect policy updates.
Arguments:β
<POLICY>β Policy to push. Can be the path to a local file, a policy URI or the SHA prefix of a policy in the store.<URI>β Policy URI. Supported schemes: registry://
Options:β
-
--docker-config-json-path <PATH>β Path to a directory containing the Docker 'config.json' file. Can be used to indicate registry authentication details -
-f,--force <FORCE>β Push also a policy that is not annotated -
-o,--output <PATH>β Output formatDefault value:
textPossible values:
text,json -
--sources-path <PATH>β YAML file holding source information (https, registry insecure hosts, custom CA's...)
kwctl rmβ
Removes a Kubewarden policy from the store
Usage: kwctl rm <uri_or_sha_prefix>
Arguments:β
<URI_OR_SHA_PREFIX>β Policy URI or SHA prefix
kwctl runβ
Runs a Kubewarden policy from a given URI
Usage: kwctl run [OPTIONS] --request-path <PATH> <uri_or_sha_prefix>
Arguments:β
<URI_OR_SHA_PREFIX>β Policy URI or SHA prefix. Supported schemes: registry://, https://, file://. If schema is omitted, file:// is assumed, rooted on the current directory.
Options:β
-
--allow-context-aware <ALLOW-CONTEXT-AWARE>β Grant access to the Kubernetes resources defined inside of the policy'scontextAwareResourcessection. Warning: review the list of resources carefully to avoid abuses. Disabled by default -
--cert-email <VALUE>β Expected email in Fulcio certificate -
--cert-oidc-issuer <VALUE>β Expected OIDC issuer in Fulcio certificates -
--disable-wasmtime-cache <DISABLE-WASMTIME-CACHE>β Turn off usage of wasmtime cache -
--docker-config-json-path <PATH>β Path to a directory containing the Docker 'config.json' file. Can be used to indicate registry authentication details -
-e,--execution-mode <MODE>β The runtime to use to execute this policyPossible values:
opa,gatekeeper,kubewarden,wasi -
--fulcio-cert-path <PATH>β Path to the Fulcio certificate. Can be repeated multiple times -
--github-owner <VALUE>β GitHub owner expected in the certificates generated in CD pipelines -
--github-repo <VALUE>β GitHub repository expected in the certificates generated in CD pipelines -
--raw <RAW>β Validate a raw requestDefault value:
false -
--record-host-capabilities-interactions <FILE>β Record all the policy and host capabilities communications to the given file. Useful to be combined later with '--replay-host-capabilities-interactions' flag -
--rekor-public-key-path <PATH>β Path to the Rekor public key -
--replay-host-capabilities-interactions <FILE>β During policy and host capabilities exchanges the host replays back the answers found inside of the provided file. This is useful to test policies in a reproducible way, given no external interactions with OCI registries, DNS, Kubernetes are performed. -
-r,--request-path <PATH>β File containing the Kubernetes admission request object in JSON format -
--settings-json <VALUE>β JSON string containing the settings for this policy -
-s,--settings-path <PATH>β File containing the settings for this policy -
--sources-path <PATH>β YAML file holding source information (https, registry insecure hosts, custom CA's...) -
-a,--verification-annotation <KEY=VALUE>β Annotation in key=value format. Can be repeated multiple times -
--verification-config-path <PATH>β YAML file holding verification config information (signatures, public keys...) -
-k,--verification-key <PATH>β Path to key used to verify the policy. Can be repeated multiple times
kwctl saveβ
save policies to a tar.gz file
Usage: kwctl save --output <FILE> <policies>...
Arguments:β
<POLICIES>β list of policies to save
Options:β
-o,--output <FILE>β path where the file will be stored
kwctl scaffoldβ
Scaffold a Kubernetes resource or configuration file
Usage: kwctl scaffold <COMMAND>
Subcommands:β
admission-requestβ Scaffold an AdmissionRequest objectartifacthubβ Output an artifacthub-pkg.yml file from a metadata.yml filemanifestβ Output a Kubernetes resource manifestvapβ Convert a KubernetesValidatingAdmissionPolicyinto a KubewardenClusterAdmissionPolicyverification-configβ Output a default Sigstore verification configuration file
kwctl scaffold admission-requestβ
Scaffold an AdmissionRequest object
Usage: kwctl scaffold admission-request [OPTIONS] --operation <TYPE>
Options:β
-
--object <PATH>β The file containing the new object being admitted -
--old-object <PATH>β The file containing the existing object -
-o,--operation <TYPE>β Kubewarden Custom Resource typePossible values:
CREATE
kwctl scaffold artifacthubβ
Output an artifacthub-pkg.yml file from a metadata.yml file
Usage: kwctl scaffold artifacthub [OPTIONS] --metadata-path <PATH> --version <VALUE>
Options:β
-m,--metadata-path <PATH>β File containing the metadata of the policy-o,--output <FILE>β Path where the artifact-pkg.yml file will be stored-q,--questions-path <PATH>β File containing the questions-ui content of the policy-v,--version <VALUE>β Semver version of the policy
kwctl scaffold manifestβ
Output a Kubernetes resource manifest
Usage: kwctl scaffold manifest [OPTIONS] --type <VALUE> <uri_or_sha_prefix>
Arguments:β
<URI_OR_SHA_PREFIX>β Policy URI or SHA prefix. Supported schemes: registry://, https://, file://. If schema is omitted, file:// is assumed, rooted on the current directory.
Options:β
-
--allow-context-aware <ALLOW-CONTEXT-AWARE>β Uses the policy metadata to define which Kubernetes resources can be accessed by the policy. Warning: review the list of resources carefully to avoid abuses. Disabled by default -
--cert-email <VALUE>β Expected email in Fulcio certificate -
--cert-oidc-issuer <VALUE>β Expected OIDC issuer in Fulcio certificates -
--docker-config-json-path <DOCKER_CONFIG>β Path to a directory containing the Docker 'config.json' file. Can be used to indicate registry authentication details -
--fulcio-cert-path <PATH>β Path to the Fulcio certificate. Can be repeated multiple times -
--github-owner <VALUE>β GitHub owner expected in the certificates generated in CD pipelines -
--github-repo <VALUE>β GitHub repository expected in the certificates generated in CD pipelines -
--rekor-public-key-path <PATH>β Path to the Rekor public key. Can be repeated multiple times -
--settings-json <VALUE>β JSON string containing the settings for this policy -
-s,--settings-path <PATH>β File containing the settings for this policy -
--sources-path <PATH>β YAML file holding source information (https, registry insecure hosts, custom CA's...) -
--title <VALUE>β Policy title -
-t,--type <VALUE>β Kubewarden Custom Resource typePossible values:
ClusterAdmissionPolicy,AdmissionPolicy -
-a,--verification-annotation <KEY=VALUE>β Annotation in key=value format. Can be repeated multiple times -
--verification-config-path <PATH>β YAML file holding verification config information (signatures, public keys...) -
-k,--verification-key <PATH>β Path to key used to verify the policy. Can be repeated multiple times
kwctl scaffold vapβ
Convert a Kubernetes ValidatingAdmissionPolicy into a Kubewarden ClusterAdmissionPolicy
Usage: kwctl scaffold vap [OPTIONS] --binding <VALIDATING-ADMISSION-POLICY-BINDING.yaml> --policy <VALIDATING-ADMISSION-POLICY.yaml>
Options:β
-
-b,--binding <VALIDATING-ADMISSION-POLICY-BINDING.yaml>β The file containing the ValidatingAdmissionPolicyBinding definition -
--cel-policy <URI>β The CEL policy module to useDefault value:
ghcr.io/kubewarden/policies/cel-policy:latest -
-p,--policy <VALIDATING-ADMISSION-POLICY.yaml>β The file containing the ValidatingAdmissionPolicy definition
kwctl scaffold verification-configβ
Output a default Sigstore verification configuration file
Usage: kwctl scaffold verification-config
kwctl verifyβ
Verify a Kubewarden policy from a given URI using Sigstore
Usage: kwctl verify [OPTIONS] <uri>
Arguments:β
<URI>β Policy URI. Supported schemes: registry://
Options:β
--cert-email <VALUE>β Expected email in Fulcio certificate--cert-oidc-issuer <VALUE>β Expected OIDC issuer in Fulcio certificates--docker-config-json-path <PATH>β Path to a directory containing the Docker 'config.json' file. Can be used to indicate registry authentication details--fulcio-cert-path <PATH>β Path to the Fulcio certificate. Can be repeated multiple times--github-owner <VALUE>β GitHub owner expected in the certificates generated in CD pipelines--github-repo <VALUE>β GitHub repository expected in the certificates generated in CD pipelines--rekor-public-key-path <PATH>β Path to the Rekor public key--sources-path <PATH>β YAML file holding source information (https, registry insecure hosts, custom CA's...)-a,--verification-annotation <KEY=VALUE>β Annotation in key=value format. Can be repeated multiple times--verification-config-path <PATH>β YAML file holding verification config information (signatures, public keys...)-k,--verification-key <PATH>β Path to key used to verify the policy. Can be repeated multiple times
This document was generated automatically by
clap-markdown.