Skip to content

Commit 4d367e2

Browse files
committed
Remove image tags from KUTTL documentation
Issue: [sc-13732]
1 parent 4095c83 commit 4d367e2

File tree

1 file changed

+21
-18
lines changed

1 file changed

+21
-18
lines changed

testing/kuttl/README.md

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1-
# Kuttl
1+
# KUTTL
22

33
## Installing
4+
45
Docs for install: https://kuttl.dev/docs/cli.html#setup-the-kuttl-kubectl-plugin
56

67
Options:
78
- Download and install the binary
89
- Install the `kubectl krew` [plugin manager](https://github.com/kubernetes-sigs/krew)
910
and `kubectl krew install kuttl`
11+
1012
## Cheat sheet
1113

1214
### Suppressing Noisy Logs
@@ -20,26 +22,27 @@ KUTTL_TEST='kuttl test --suppress-log=events' make check-kuttl
2022

2123
To suppress the events permanently, you can add the following to the KUTTL config (kuttl-test.yaml)
2224
```
23-
suppress:
25+
suppress:
2426
- events
2527
```
2628

2729
### Run test suite
2830

29-
Make sure that the operator is running in your kubernetes environment and that your `kubeconfig` is
30-
set up. Then run the make target:
31+
Make sure that the operator is running in your Kubernetes environment and that your `kubeconfig` is
32+
set up. Then run the make targets:
3133

3234
```
33-
make check-kuttl
35+
make generate-kuttl check-kuttl
3436
```
3537

3638
### Running a single test
37-
A single test is considered to be one directory under `kuttl/e2e`, for example
38-
`kuttl/e2e/restore` would run the `restore` test.
39+
40+
A single test is considered to be one directory under `kuttl/e2e-generated`, for example
41+
`kuttl/e2e-generated/restore` is the `restore` test.
3942

4043
There are two ways to run a single test in isolation:
4144
- using an env var with the make target: `KUTTL_TEST='kuttl test --test <test-name>' make check-kuttl`
42-
- using `kubectl kuttl --test` flag: `kubectl kuttl test testing/kuttl/e2e --test <test-name>`
45+
- using `kubectl kuttl --test` flag: `kubectl kuttl test testing/kuttl/e2e-generated --test <test-name>`
4346

4447
### Writing additional tests
4548

@@ -50,7 +53,7 @@ step number and the object/step name.
5053
For example, if the `00` test step wants to create a cluster and then assert that the cluster is ready,
5154
the files would be named
5255

53-
```console
56+
```yaml
5457
00--cluster.yaml # note the extra `-` to ensure that it sorts above the following file
5558
00-assert.yaml
5659
```
@@ -62,28 +65,28 @@ change those K8s objects before applying them. That means that, if we wanted to
6265
connection test for PG 13 and PG 14, we would end up writing two nearly identical tests.
6366

6467
Rather than write those multiple tests, we are using `envsubst` to replace some common variables
65-
in `source` template YAML (the `e2e` and `e2e-other` folders) and writing those files to the
66-
`testing/kuttl/e2e-generated` and `testing/kuttl/e2e-generated-other` folders.
68+
and writing those files to the `testing/kuttl/e2e-generated*` directories.
6769

6870
These templated test files can be generated by setting some variables in the command line and
6971
calling the `make generate-kuttl` target:
7072

7173
```console
72-
KUTTL_PG_VERSION=13 KUTTL_POSTGIS_VERSION=3.0 KUTTL_PSQL_IMAGE=registry.developers.crunchydata.com/crunchydata/crunchy-postgres:centos8-13.5-0 make generate-kuttl
74+
KUTTL_PG_VERSION=13 KUTTL_POSTGIS_VERSION=3.0 make generate-kuttl
7375
```
7476

75-
This will loop through the `source` folders and create corresponding `e2e-generated` and
76-
`e2e-generated-other` folders that can be checked for correctness before running the tests.
77-
(The files in the `e2e-generated` and `e2e-generated-other` folders will not be checked into
78-
github; our CI runner will generate and test the files from scratch.)
77+
This will loop through the files under the `e2e` and `e2e-other` directories and create matching
78+
files under the `e2e-generated` and `e2e-generated-other` directories that can be checked for
79+
correctness before running the tests.
7980

8081
Please note, `make check-kuttl` does not run the `e2e-other` tests. To run the `postgis-cluster`
8182
test, you can use:
8283

83-
`kubectl kuttl test testing/kuttl/e2e-generated-other/ --timeout=180 --test postgis-cluster`
84+
```
85+
kubectl kuttl test testing/kuttl/e2e-generated-other/ --timeout=180 --test postgis-cluster`
86+
```
8487

8588
To run the `gssapi` test, please see testing/kuttl/e2e-other/gssapi/README.md.
8689

87-
To prevent errors, we want to set defaults for all the environment variables used in the `source`
90+
To prevent errors, we want to set defaults for all the environment variables used in the source
8891
YAML files; so if you add a new test with a new variable, please update the Makefile with a
8992
reasonable/preferred default.

0 commit comments

Comments
 (0)