@@ -15,13 +15,8 @@ In order to build the docker test images, a Linux node is required. The node wil
15
15
and ` docker (version 18.06.0 or newer) ` . Manifest lists were introduced in 18.03.0, but 18.06.0
16
16
is recommended in order to avoid certain issues.
17
17
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.
25
20
26
21
27
22
## Making changes to images
@@ -34,7 +29,7 @@ itself or its binaries will require the image's version to be bumped. In the cas
34
29
which cannot be immediately resolved, the image version used in E2E tests will be reverted to the
35
30
last known stable version.
36
31
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
38
33
be used when building the image. Additionally, for the ` agnhost ` image, also bump the ` Version ` in
39
34
` test/images/agnhost/agnhost.go ` .
40
35
@@ -47,37 +42,47 @@ Some test images (`mounttest`, `test-webserver`) are used as bases for other ima
47
42
` kitten ` , ` nautilus ` ). If the parent image's ` VERSION ` has been bumped, also bump the version in the
48
43
children's ` BASEIMAGE ` files in order for base image changes to be reflected in the child images as well.
49
44
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
+
50
52
51
53
## Building images
52
54
53
55
The images are built through ` make ` . Since some images (` mounttest ` , ` test-webserver ` )
54
56
are used as a base for other images, it is recommended to build them first, if needed.
55
57
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
+
56
61
An image can be built by simply running the command:
57
62
58
63
``` bash
59
- make all WHAT=test-webserver
64
+ make all WHAT=test-webserver
60
65
```
61
66
62
67
To build AND push an image, the following command can be used:
63
68
64
69
``` bash
65
- make all-push WHAT=test-webserver
70
+ make all-push WHAT=test-webserver
66
71
```
67
72
68
73
By default, the images will be tagged and pushed under the ` gcr.io/kubernetes-e2e-test-images `
69
74
registry. That can changed by running this command instead:
70
75
71
76
``` bash
72
- REGISTRY=foo_registry make all-push WHAT=test-webserver
77
+ REGISTRY=foo_registry make all-push WHAT=test-webserver
73
78
```
74
79
75
80
* NOTE* (for test ` gcr.io ` image publishers): Some tests (e.g.: ` should serve a basic image on each replica with a private image ` )
76
81
require the ` agnhost ` image to be published in an authenticated repo as well:
77
82
78
83
``` 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
81
86
```
82
87
83
88
@@ -88,7 +93,7 @@ by having the environment variable `KUBE_TEST_REPO_LIST` set before running the
88
93
image:
89
94
90
95
``` bash
91
- export KUBE_TEST_REPO_LIST=/path/to/repo_list.yaml
96
+ export KUBE_TEST_REPO_LIST=/path/to/repo_list.yaml
92
97
```
93
98
94
99
` 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
106
111
Finally, make sure to bump the image version used in E2E testing by modifying the file ` test/utils/image/manifest.go`, and recompile afterwards:
107
112
108
113
` ` ` bash
109
- ./build/run.sh make WHAT=test/e2e/e2e.test
114
+ ./build/run.sh make WHAT=test/e2e/e2e.test
110
115
` ` `
111
116
112
117
After all the above has been done, run the desired tests.
113
118
114
119
115
120
# # Known issues and workarounds
116
121
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