Skip to content

Commit 210d762

Browse files
committed
test images: Updates image building process README
Updates the README with the given suggestions.
1 parent aade8f8 commit 210d762

File tree

1 file changed

+25
-16
lines changed

1 file changed

+25
-16
lines changed

test/images/README.md

Lines changed: 25 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,8 @@ In order to build the docker test images, a Linux node is required. The node wil
1515
and `docker (version 18.06.0 or newer)`. Manifest lists were introduced in 18.03.0, but 18.06.0
1616
is recommended in order to avoid certain issues.
1717

18-
The node must be able to push the images to the desired container registry. Depending on the
19-
container registry, it might require a different authentication method. For dockerhub, this
20-
can be done by running the command:
21-
22-
```bash
23-
docker login -u your-awesome-username -p anAwesomerPassword
24-
```
18+
The node must be able to push the images to the desired container registry, make sure you are
19+
authenticated with the registry you're pushing to.
2520

2621

2722
## Making changes to images
@@ -34,7 +29,7 @@ itself or its binaries will require the image's version to be bumped. In the cas
3429
which cannot be immediately resolved, the image version used in E2E tests will be reverted to the
3530
last known stable version.
3631

37-
The version can easily be bumped by modifying the file `test/images/IMAGE_NAME/VERSION`, which will
32+
The version can easily be bumped by modifying the file `test/images/${IMAGE_NAME}/VERSION`, which will
3833
be used when building the image. Additionally, for the `agnhost` image, also bump the `Version` in
3934
`test/images/agnhost/agnhost.go`.
4035

@@ -47,37 +42,47 @@ Some test images (`mounttest`, `test-webserver`) are used as bases for other ima
4742
`kitten`, `nautilus`). If the parent image's `VERSION` has been bumped, also bump the version in the
4843
children's `BASEIMAGE` files in order for base image changes to be reflected in the child images as well.
4944

45+
TODO: Once [Centralization part 4](https://github.com/kubernetes/kubernetes/pull/81226) merges, the paragraph
46+
above will have to be updated, as those images will be included into `agnhost`.
47+
48+
After the desired changes have been made, the affected images will have to be built and published,
49+
and then tested. After the pull request with those changes has been approved, the new images will be
50+
built and published to the `gcr.io/kubernetes-e2e-test-images` registry as well.
51+
5052

5153
## Building images
5254

5355
The images are built through `make`. Since some images (`mounttest`, `test-webserver`)
5456
are used as a base for other images, it is recommended to build them first, if needed.
5557

58+
TODO: Once [Centralization part 4](https://github.com/kubernetes/kubernetes/pull/81226) merges, the paragraph
59+
above will have to be updated, as those images will be included into `agnhost`.
60+
5661
An image can be built by simply running the command:
5762

5863
```bash
59-
make all WHAT=test-webserver
64+
make all WHAT=test-webserver
6065
```
6166

6267
To build AND push an image, the following command can be used:
6368

6469
```bash
65-
make all-push WHAT=test-webserver
70+
make all-push WHAT=test-webserver
6671
```
6772

6873
By default, the images will be tagged and pushed under the `gcr.io/kubernetes-e2e-test-images`
6974
registry. That can changed by running this command instead:
7075

7176
```bash
72-
REGISTRY=foo_registry make all-push WHAT=test-webserver
77+
REGISTRY=foo_registry make all-push WHAT=test-webserver
7378
```
7479

7580
*NOTE* (for test `gcr.io` image publishers): Some tests (e.g.: `should serve a basic image on each replica with a private image`)
7681
require the `agnhost` image to be published in an authenticated repo as well:
7782

7883
```bash
79-
REGISTRY=gcr.io/kubernetes-e2e-test-images make all-push WHAT=agnhost
80-
REGISTRY=gcr.io/k8s-authenticated-test make all-push WHAT=agnhost
84+
REGISTRY=gcr.io/kubernetes-e2e-test-images make all-push WHAT=agnhost
85+
REGISTRY=gcr.io/k8s-authenticated-test make all-push WHAT=agnhost
8186
```
8287

8388

@@ -88,7 +93,7 @@ by having the environment variable `KUBE_TEST_REPO_LIST` set before running the
8893
image:
8994

9095
```bash
91-
export KUBE_TEST_REPO_LIST=/path/to/repo_list.yaml
96+
export KUBE_TEST_REPO_LIST=/path/to/repo_list.yaml
9297
```
9398

9499
`repo_list.yaml` is a configuration file used by the E2E tests, in which you can set alternative registries
@@ -106,12 +111,16 @@ Keep in mind that some tests are using multiple images, so it is a good idea to
106111
Finally, make sure to bump the image version used in E2E testing by modifying the file `test/utils/image/manifest.go`, and recompile afterwards:
107112

108113
```bash
109-
./build/run.sh make WHAT=test/e2e/e2e.test
114+
./build/run.sh make WHAT=test/e2e/e2e.test
110115
```
111116

112117
After all the above has been done, run the desired tests.
113118

114119

115120
## Known issues and workarounds
116121

117-
`docker manifest create` fails due to permission denied on `/etc/docker/certs.d/gcr.io` (https://github.com/docker/for-linux/issues/396)
122+
`docker manifest create` fails due to permission denied on `/etc/docker/certs.d/gcr.io` (https://github.com/docker/for-linux/issues/396). This issue can be resolved by running:
123+
124+
```bash
125+
sudo chmod o+x /etc/docker
126+
```

0 commit comments

Comments
 (0)