test images: Updates image building process README

Updates the README with the given suggestions.
This commit is contained in:
Claudiu Belu 2019-08-20 13:14:18 -07:00
parent aade8f8591
commit 210d7622fb

View File

@ -15,13 +15,8 @@ In order to build the docker test images, a Linux node is required. The node wil
and `docker (version 18.06.0 or newer)`. Manifest lists were introduced in 18.03.0, but 18.06.0
is recommended in order to avoid certain issues.
The node must be able to push the images to the desired container registry. Depending on the
container registry, it might require a different authentication method. For dockerhub, this
can be done by running the command:
```bash
docker login -u your-awesome-username -p anAwesomerPassword
```
The node must be able to push the images to the desired container registry, make sure you are
authenticated with the registry you're pushing to.
## Making changes to images
@ -34,7 +29,7 @@ itself or its binaries will require the image's version to be bumped. In the cas
which cannot be immediately resolved, the image version used in E2E tests will be reverted to the
last known stable version.
The version can easily be bumped by modifying the file `test/images/IMAGE_NAME/VERSION`, which will
The version can easily be bumped by modifying the file `test/images/${IMAGE_NAME}/VERSION`, which will
be used when building the image. Additionally, for the `agnhost` image, also bump the `Version` in
`test/images/agnhost/agnhost.go`.
@ -47,12 +42,22 @@ Some test images (`mounttest`, `test-webserver`) are used as bases for other ima
`kitten`, `nautilus`). If the parent image's `VERSION` has been bumped, also bump the version in the
children's `BASEIMAGE` files in order for base image changes to be reflected in the child images as well.
TODO: Once [Centralization part 4](https://github.com/kubernetes/kubernetes/pull/81226) merges, the paragraph
above will have to be updated, as those images will be included into `agnhost`.
After the desired changes have been made, the affected images will have to be built and published,
and then tested. After the pull request with those changes has been approved, the new images will be
built and published to the `gcr.io/kubernetes-e2e-test-images` registry as well.
## Building images
The images are built through `make`. Since some images (`mounttest`, `test-webserver`)
are used as a base for other images, it is recommended to build them first, if needed.
TODO: Once [Centralization part 4](https://github.com/kubernetes/kubernetes/pull/81226) merges, the paragraph
above will have to be updated, as those images will be included into `agnhost`.
An image can be built by simply running the command:
```bash
@ -114,4 +119,8 @@ After all the above has been done, run the desired tests.
## Known issues and workarounds
`docker manifest create` fails due to permission denied on `/etc/docker/certs.d/gcr.io` (https://github.com/docker/for-linux/issues/396)
`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:
```bash
sudo chmod o+x /etc/docker
```