Skip to content

Commit f86b720

Browse files
committed
Update the COS E2E image policy
Signed-off-by: Roy Yang <[email protected]>
1 parent 3336d59 commit f86b720

File tree

1 file changed

+73
-6
lines changed

1 file changed

+73
-6
lines changed

cluster/gce/gci/README.md

Lines changed: 73 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,75 @@ Policy](https://cloud.google.com/container-optimized-os/docs/resources/support-p
2121
Container-Optimized OS images are used by kubernetes [End-to-End tests](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-testing/e2e-tests.md) and
2222
[Node End-to-End tests](https://github.com/kubernetes/community/tree/master/contributors/devel/sig-node). To see current
2323
active releases, please refer to COS's [Release
24-
Notes](https://cloud.google.com/container-optimized-os/docs/release-notes). When
25-
choose images for testing, the latest LTS images is suggested for running
26-
presubmit, postsubmit or periodics tests since the image is stable and has
27-
latest bug and security fixes. For testing requiring new features or continuous integration,
28-
the latest dev or beta or stable channel can be used.
29-
are needed, the latest LTS images or stables are preferred.
24+
Notes](https://cloud.google.com/container-optimized-os/docs/release-notes).
25+
26+
### How to choose an image in configuration file
27+
28+
There are three ways to specify an image used by each testing suite: `image`,
29+
`image_regex` or `image_family`.
30+
31+
* `image` is preferred, but manual updates are needed to use a newly released
32+
COS image, so the test suites don't use deprecated images. This will result
33+
to frequent yaml configuration file update everytime COS releases new
34+
image.One future option is to use an autobumper robot to update COS image
35+
automatically. e.g:
36+
```
37+
cos-stable:
38+
image: cos-77-12371-274-0
39+
project: cos-cloud
40+
metadata: "user-data</go/src/github.com/containerd/cri/test/e2e_node/init.yaml,containerd-configure-sh</go/src/github.com/containerd/cri/cluster/gce/configure.sh,containerd-extra-init-sh</go/src/github.com/containerd/cri/test/e2e_node/gci-init.sh,containerd-env</workspace/test-infra/jobs/e2e_node/containerd/cri-master/env,gci-update-strategy=update_disabled"
41+
```
42+
43+
* `image_family` should be used if you always want to use latest image in the
44+
same family. Tests will start to use new images once COS releases
45+
new image. This is not predictable and test can potentially be broken becase of this. The probability of a
46+
breakage due to the OS itself is low for LTS or stable image, but high for dev or beta image.
47+
If things went wrong, it will be hard to rollback
48+
images using `image_regex` and `image_family`. e.g:
49+
```
50+
cos-stable:
51+
image_family: cos-77-lts
52+
project: cos-cloud
53+
metadata: "user-data</workspace/test-infra/jobs/e2e_node/containerd/init.yaml,cni-template</workspace/test-infra/jobs/e2e_node/containerd/cni.template,containerd-config</workspace/test-infra/jobs/e2e_node/containerd/config.toml"
54+
```
55+
56+
* `image_regex` can also
57+
be used if you want image with the same naming pattern. Latest image will be
58+
chosen when multiple images match the regular expression. However, this
59+
option is rarely seen in the test code.
60+
61+
* To update the images, using image in the same channel is preferred. Keep in
62+
mind, 69 is the first LTS image. Before that, COS only has dev, beta and stable
63+
images. That is why stable images are used quite frequently in current testing.
64+
For now, images should slowly migrate from stable to LTS if possible. For
65+
testing using dev or beta, we need to consider the original intention and
66+
keep using image in existing channel unless we understand the underlying reason.
67+
68+
### What image is needed for your test
69+
70+
Consider the importance of tests and the stability of Container-Optimized OS, the
71+
following guidelines are proposed for image choice in E2E testing.
72+
73+
* To run release blocking tests, the latest LTS images are preferred.
74+
'image' should be used to specify the image.
75+
76+
* To run presubmit, postsubmit or periodic tests, the latest LTS images are
77+
preferred. If tests need two images, you can use the latest two LTS images.
78+
LTS images are stable and usually include latest bug and security fix.
79+
'image' should be used to specify the image.
80+
81+
* To integrate continuously with other container
82+
related technologies like runc, containerd, docker and kubernertes, the
83+
latest LTS or stable images are preferred. 'image_family' should be used to
84+
specify the image.
85+
86+
* To try out latest COS features, the latest dev or beta or stable images are preferred.
87+
'image' or 'image_family' should be used to specify the image.
88+
89+
### How to find current COS image in each channel
3090

3191
To find the current COS image, use the following command:
92+
3293
```shell
3394
$ gcloud compute images list --project=cos-cloud |grep cos-cloud
3495
cos-69-10895-385-0 cos-cloud cos-69-lts READY
@@ -40,4 +101,10 @@ cos-dev-84-13078-0-0 cos-cloud cos-dev
40101
cos-stable-81-12871-119-0 cos-cloud cos-stable READY
41102
```
42103

104+
COS image will experience dev, beta, stable and LTS stage. Before LTS stage, image is named with its
105+
family as a prefix, e.g cos-dev, cos-beta, cos-stable. However, the milestone
106+
number in those families may change when channel promotions happen. Only when a milestone becomes LTS, the
107+
image will have a new family, and the milestone number in the image name stays the same. The image
108+
will be always there even after the milestone is deprecated.
109+
43110
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/cluster/gce/gci/README.md?pixel)]()

0 commit comments

Comments
 (0)