Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate image registry to registry.k8s.io #4720

Merged
merged 1 commit into from
Mar 22, 2023

Conversation

ArkaSaha30
Copy link
Contributor

@ArkaSaha30 ArkaSaha30 commented Mar 17, 2023

This PR will migrate image registry from k8s.gcr.io to registry.k8s.io.
Fixes: kubernetes/k8s.io#4780, #4704

Signed-off-by: ArkaSaha30 arkasaha30@gmail.com

@XinShuYang
Copy link
Contributor

Hi, please also add #4704 to commit message, then it can be closed after your PR is merged. @ArkaSaha30

@XinShuYang
Copy link
Contributor

/test-windows-all
/test-all

@ArkaSaha30
Copy link
Contributor Author

Done @XinShuYang, please review.

Copy link
Contributor

@antoninbas antoninbas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but the change to pkg/apiserver/openapi/zz_generated.openapi.go needs to be reverted.

@@ -4855,7 +4855,7 @@ func schema_k8sio_api_core_v1_ContainerImage(ref common.ReferenceCallback) commo
Properties: map[string]spec.Schema{
"names": {
SchemaProps: spec.SchemaProps{
Description: "Names by which this image is known. e.g. [\"k8s.gcr.io/hyperkube:v1.0.7\", \"dockerhub.io/google_containers/hyperkube:v1.0.7\"]",
Description: "Names by which this image is known. e.g. [\"registry.k8s.io/hyperkube:v1.0.7\", \"dockerhub.io/google_containers/hyperkube:v1.0.7\"]",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Github workflow that checks that all auto-generated files are up-to-date is failing for this PR. You need to revert the change to this file.

This file is auto-generated so making a manual change to it (I assume you ran a sed command when working on this PR) is typically incorrect. When we update our K8s dependencies in the future, the reference to k8s.gcr.io will go away, but in the mean time, having it around is not an issue.

Signed-off-by: ArkaSaha30 <arkasaha30@gmail.com>
@XinShuYang
Copy link
Contributor

/test-windows-all
/test-all

Copy link
Contributor

@antoninbas antoninbas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for your contribution @ArkaSaha30 !

@@ -395,7 +395,7 @@ function deliver_antrea_windows {
# Some tests need us.gcr.io/k8s-artifacts-prod/e2e-test-images/agnhost:2.13 image but it is not for windows/amd64 10.0.17763
# Use e2eteam/agnhost:2.13 instead
harbor_images=("sigwindowstools-kube-proxy:v1.18.0" "agnhost:2.13" "agnhost:2.13" "agnhost:2.13" "agnhost:2.29" "e2eteam-jessie-dnsutils:1.0" "e2eteam-jessie-dnsutils:1.0" "e2eteam-pause:3.2" "e2eteam-pause:3.2" "e2eteam-busybox:1.29-windows-amd64-1809")
antrea_images=("sigwindowstools/kube-proxy:v1.18.0" "e2eteam/agnhost:2.13" "us.gcr.io/k8s-artifacts-prod/e2e-test-images/agnhost:2.13" "k8sprow.azurecr.io/kubernetes-e2e-test-images/agnhost:2.13" "k8s.gcr.io/e2e-test-images/agnhost:2.29" "e2eteam/jessie-dnsutils:1.0" "gcr.io/kubernetes-e2e-test-images/jessie-dnsutils:1.0" "e2eteam/pause:3.2" "k8s.gcr.io/pause:3.2" "docker.io/library/busybox:1.29")
antrea_images=("sigwindowstools/kube-proxy:v1.18.0" "e2eteam/agnhost:2.13" "us.gcr.io/k8s-artifacts-prod/e2e-test-images/agnhost:2.13" "k8sprow.azurecr.io/kubernetes-e2e-test-images/agnhost:2.13" "registry.k8s.io/e2e-test-images/agnhost:2.29" "e2eteam/jessie-dnsutils:1.0" "gcr.io/kubernetes-e2e-test-images/jessie-dnsutils:1.0" "e2eteam/pause:3.2" "registry.k8s.io/pause:3.2" "docker.io/library/busybox:1.29")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The antrea_images is used to generate a new tag for the Harbor image to avoid pull rate limit problems. As we still have a Windows Docker testbed with an old version of Kubernetes, the images used in the conformance tests on these testbeds are still in the k8s.gcr.io repository. Perhaps, for deliver_antrea_windows, we can add a new registry.k8s.io tag for e2e tests, but still keep the existing k8s.gcr.io tag for old version conformance tests. What's your opinion? @antoninbas

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @XinShuYang, I didn't see your comment before merging this.
I guess we may need to tag the image twice (once with k8s.gcr.io and once with registry.k8s.io) to keep the tests running?

It feels like there should be a better way to handle this. The current solution seems a bit brittle, as both the Harbor registry and this script need to be updated when a new image is required by the conformance tests.

Also, one thing that comes to mind is that rate limiting doesn't apply to the K8s registries, so why don't we pull them directly?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is that why jenkins-windows-conformance failed?

Copy link
Contributor

@XinShuYang XinShuYang Mar 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@antoninbas Yes, our windows docker testbed is running with old version kubernetes, which means its conformance tests still use images from k8s.gcr.io repo. In CI pipeline we pull image from harbor first(which doesn't have pull rate limit problem) and add the k8s.gcr.io tag to these images, then set the image pull policy of conformance/networkpolicy tests to IfNotPresent to avoid pulling images from these unavailable repo during running tests.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One of my points is that there should be no rate limiting for k8s.gcr.io (unless I am mistaken), so why do we pull these from Harbor?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's possible that images with same version differ on harbor and dockerhub. When I ran "docker pull e2eteam-pause:3.2" on windows node, I received the error message "no matching manifest for windows/amd64 10.0.17763 in the manifest list entries". However, pulling image from "projects.registry.vmware.com/antrea/e2eteam-pause:3.2" worked fine.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps, for deliver_antrea_windows, we can add a new registry.k8s.io tag for e2e tests, but still keep the existing k8s.gcr.io tag for old version conformance tests.

@antoninbas @XinShuYang do you recommend to open a new PR for this once we have resolved the best way to tag/pull the image?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will let @XinShuYang decide what is the best course of action here.
Ideally we would not have to list all images like that (or maybe our testbed could be upgraded?).

@antoninbas antoninbas merged commit 219adc4 into antrea-io:main Mar 22, 2023
@antoninbas
Copy link
Contributor

@tnqn could you exclude this commit from the v1.11 release, while we figure out potential issues with Windows testing?

@tnqn
Copy link
Member

tnqn commented Mar 23, 2023

@tnqn could you exclude this commit from the v1.11 release, while we figure out potential issues with Windows testing?

Sure, this will not be included in release-1.11.

XinShuYang added a commit to XinShuYang/antrea that referenced this pull request Apr 3, 2023
Add necessary image tags which was removed by (antrea-io#4720).

For antrea-io#4704

Signed-off-by: Shuyang Xin <gavinx@vmware.com>
XinShuYang added a commit to XinShuYang/antrea that referenced this pull request Apr 5, 2023
Add necessary image tags which was removed by (antrea-io#4720).

For antrea-io#4704

Signed-off-by: Shuyang Xin <gavinx@vmware.com>
XinShuYang added a commit to XinShuYang/antrea that referenced this pull request Apr 5, 2023
Add necessary image tags which was removed by (antrea-io#4720).

For antrea-io#4704

Signed-off-by: Shuyang Xin <gavinx@vmware.com>
tnqn pushed a commit that referenced this pull request Apr 6, 2023
Add necessary image tags which was removed by (#4720).

For #4704

Signed-off-by: Shuyang Xin <gavinx@vmware.com>
jainpulkit22 pushed a commit to urharshitha/antrea that referenced this pull request Apr 28, 2023
Signed-off-by: ArkaSaha30 <arkasaha30@gmail.com>
jainpulkit22 pushed a commit to urharshitha/antrea that referenced this pull request Apr 28, 2023
Add necessary image tags which was removed by (antrea-io#4720).

For antrea-io#4704

Signed-off-by: Shuyang Xin <gavinx@vmware.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Umbrella Issue] Migrate CNCF Ecosystem projects from k8s.gcr.io to registry.k8s.io
4 participants