From 05fc8ffd18454210e28edaf03b486c09e043c921 Mon Sep 17 00:00:00 2001 From: Marcin Owsiany Date: Mon, 9 Oct 2023 08:36:40 +0200 Subject: [PATCH] Re-style flags Signed-off-by: Marcin Owsiany --- docs/cli.md | 123 +++++++++++++++++++++++++++------------------------- 1 file changed, 63 insertions(+), 60 deletions(-) diff --git a/docs/cli.md b/docs/cli.md index a52acfcc..4b679484 100644 --- a/docs/cli.md +++ b/docs/cli.md @@ -31,85 +31,88 @@ kubectl krew install kuttl ## Commands -::: flag kubectl kuttl help [command] [flags] -Provides general help or help on a specific command -::: +* **`kubectl kuttl help [command] [flags]`** -::: flag kubectl kuttl version -Print the current KUTTL version. -::: + Provide general help or help on a specific command + +* **`kubectl kuttl version`** + + Print the current KUTTL version. + +* **`kubectl kuttl test`** + + Run KUTTL test harness. -::: flag kubectl kuttl test -Run KUTTL test harness. -::: ## Flags -::: tip Usage -`kubectl kuttl test [flags]` -::: +> [!NOTE] +> **Usage** +> +> `kubectl kuttl test [flags]` + +Flags are: + +* **`-h, --help`** + + Help for test + +* **`--artifacts-dir (string)`** + + Directory to output kind logs to (if not specified, the current working directory). + +* **`--config (string)`** + + Path to file to load test settings from. This is usually the `kuttl-test.yaml` file. + +* **`--crd-dir (string)`** + + Directory to load CustomResourceDefinitions from prior to running the tests. + +* **`--kind-config (string)`** + + Specify the KIND configuration file path (implies `--start-kind`, cannot be used with `--start-control-plane`). + +* **`--kind-context (string)`** + + Specify the KIND context name to use (default: `kind`). + +* **`--manifest-dir (stringArray)`** + + One or more directories containing manifests to apply before running the tests. -::: flag -h, --help -Help for test -::: +* **`--parallel (int)`** -::: flag --artifacts-dir (string) -Directory to output kind logs to (if not specified, the current working directory). -::: + The maximum number of tests to run at once. (default `8`) -::: flag --config (string) -Path to file to load test settings from. This is usually the kuttl-test.yaml file. -::: +* **`--skip-cluster-delete (bool)`** -::: flag --crd-dir (string) -Directory to load CustomResourceDefinitions from prior to running the tests. -::: + If set, do not delete the mocked control plane or kind cluster. -::: flag --kind-config (string) -Specify the KIND configuration file path (implies --start-kind, cannot be used with --start-control-plane). -::: +* **`--skip-delete (bool)`** -::: flag --kind-context (string) -Specify the KIND context name to use (default: kind). -::: + If set, do not delete resources created during tests (helpful for debugging test failures, implies `--skip-cluster-delete`). -::: flag --manifest-dir (stringArray) -One or more directories containing manifests to apply before running the tests. -::: +* **`--start-control-plane (bool)`** -::: flag --parallel (int) -The maximum number of tests to run at once. (default 8) -::: + Start a local Kubernetes control plane for the tests (requires `etcd` and `kube-apiserver` binaries, cannot be used with `--start-kind`). -::: flag --skip-cluster-delete (bool) -If set, do not delete the mocked control plane or kind cluster. -::: +* **`--start-kind (bool)`** -::: flag --skip-delete (bool) -If set, do not delete resources created during tests (helpful for debugging test failures, implies --skip-cluster-delete). -::: + Start a KIND cluster for the tests (cannot be used with `--start-control-plane`). -::: flag --start-control-plane (bool) -Start a local Kubernetes control plane for the tests (requires etcd and kube-apiserver binaries, cannot be used with --start-kind). -::: +* **`--test (string)`** -::: flag --start-kind (bool) -Start a KIND cluster for the tests (cannot be used with --start-control-plane). -::: + If set, the specific test case to run. -::: flag --test (string) -If set, the specific test case to run. -::: +* **`--test-run-labels (string)`** -::: flag --test-run-labels (string) -Optional label set to associate with this test run. -This label set can then be matched against by the `testRunSelector` in `TestFile` objects to optionally exclude selected files. -The syntax is comma-separated list of key=value assignments. -::: + Optional label set to associate with this test run. + This label set can then be matched against by the `testRunSelector` in `TestFile` objects to optionally exclude selected files. + The syntax is comma-separated list of `key=value` assignments. -::: flag -v or -vv (int) -Logging verbosity level. 0=normal, 1=verbose, 2=detailed, 3 or more =trace. -::: +* **`-v or -vv (int)`** + Logging verbosity level. 0=normal, 1=verbose, 2=detailed, 3 or more =trace. @@ -117,7 +120,7 @@ Logging verbosity level. 0=normal, 1=verbose, 2=detailed, 3 or more =trace. ### KUTTL Test -KUTTL test command is the heart of the test harness. It requires a kuttl-test.yaml which defines the test setup. +KUTTL test command is the heart of the test harness. It requires a `kuttl-test.yaml` which defines the test setup. ```yaml apiVersion: kuttl.dev/v1beta1