|
| 1 | +# KEP-3720: Freeze `k8s.gcr.io` image registry |
| 2 | + |
| 3 | +The change proposed by this KEP is very unusual as the engineering work will **not** be done in the k/k repository. However, this is a major change to the project hence the KEP. |
| 4 | + |
| 5 | +<!-- toc --> |
| 6 | +- [Release Signoff Checklist](#release-signoff-checklist) |
| 7 | +- [Summary](#summary) |
| 8 | +- [Motivation](#motivation) |
| 9 | + - [Goals](#goals) |
| 10 | + - [Non-Goals](#non-goals) |
| 11 | +- [Proposal](#proposal) |
| 12 | + - [Risks and Mitigations](#risks-and-mitigations) |
| 13 | +- [Design Details](#design-details) |
| 14 | + - [Test Plan](#test-plan) |
| 15 | + - [Graduation Criteria](#graduation-criteria) |
| 16 | + - [Upgrade / Downgrade Strategy](#upgrade--downgrade-strategy) |
| 17 | + - [Version Skew Strategy](#version-skew-strategy) |
| 18 | +- [Communication Plan](#communication-plan) |
| 19 | +- [Production Readiness Review Questionnaire](#production-readiness-review-questionnaire) |
| 20 | +- [Implementation History](#implementation-history) |
| 21 | +- [Drawbacks](#drawbacks) |
| 22 | +- [Alternatives](#alternatives) |
| 23 | +- [Infrastructure Needed (Optional)](#infrastructure-needed-optional) |
| 24 | +<!-- /toc --> |
| 25 | + |
| 26 | +## Release Signoff Checklist |
| 27 | + |
| 28 | +<!-- |
| 29 | +**ACTION REQUIRED:** In order to merge code into a release, there must be an |
| 30 | +issue in [kubernetes/enhancements] referencing this KEP and targeting a release |
| 31 | +milestone **before the [Enhancement Freeze](https://git.k8s.io/sig-release/releases) |
| 32 | +of the targeted release**. |
| 33 | +
|
| 34 | +For enhancements that make changes to code or processes/procedures in core |
| 35 | +Kubernetes—i.e., [kubernetes/kubernetes], we require the following Release |
| 36 | +Signoff checklist to be completed. |
| 37 | +
|
| 38 | +Check these off as they are completed for the Release Team to track. These |
| 39 | +checklist items _must_ be updated for the enhancement to be released. |
| 40 | +--> |
| 41 | + |
| 42 | +Items marked with (R) are required *prior to targeting to a milestone / release*. |
| 43 | + |
| 44 | +This KEP is unusual and doesn't actually make/propose changes to the Kubernetes codebase. It does propose a major change to how images of the Kubernetes are consumed hence the KEP. |
| 45 | + |
| 46 | +- [X] (R) Enhancement issue in release milestone, which links to KEP dir in [kubernetes/enhancements] (not the initial KEP PR) |
| 47 | +- [X] (R) KEP approvers have approved the KEP status as `implementable` |
| 48 | +- [X] (R) Design details are appropriately documented |
| 49 | +- [X] (N/A) Test plan is in place, giving consideration to SIG Architecture and SIG Testing input (including test refactors) |
| 50 | + - [X] (N/A) e2e Tests for all Beta API Operations (endpoints) |
| 51 | + - [X] (N/A) Ensure GA e2e tests meet requirements for [Conformance Tests](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/conformance-tests.md) |
| 52 | + - [X] (N/A) Minimum Two Week Window for GA e2e tests to prove flake free |
| 53 | +- [X] (N/A) Graduation criteria is in place |
| 54 | + - [X] (N/A) [all GA Endpoints](https://github.com/kubernetes/community/pull/1806) must be hit by [Conformance Tests](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/conformance-tests.md) |
| 55 | +- [X] (N/A) Production readiness review completed |
| 56 | +- [X] (N/A) Production readiness review approved |
| 57 | +- [ ] "Implementation History" section is up-to-date for milestone |
| 58 | +- [ ] User-facing documentation has been created in [kubernetes/website], for publication to [kubernetes.io] |
| 59 | +- [ ] Supporting documentation—e.g., additional design documents, links to mailing list discussions/SIG meetings, relevant PRs/issues, release notes |
| 60 | + |
| 61 | +<!-- |
| 62 | +**Note:** This checklist is iterative and should be reviewed and updated every time this enhancement is being considered for a milestone. |
| 63 | +--> |
| 64 | + |
| 65 | +[kubernetes.io]: https://kubernetes.io/ |
| 66 | +[kubernetes/enhancements]: https://git.k8s.io/enhancements |
| 67 | +[kubernetes/kubernetes]: https://git.k8s.io/kubernetes |
| 68 | +[kubernetes/website]: https://git.k8s.io/website |
| 69 | + |
| 70 | +## Summary |
| 71 | + |
| 72 | +The Kubernetes project has created and runs the `registry.k8s.io` image registry which is fully controlled by the community. |
| 73 | +This registry has been [GA for several months](https://kubernetes.io/blog/2022/11/28/registry-k8s-io-faster-cheaper-ga/) now and we need to freeze the old image registry. |
| 74 | + |
| 75 | +## Motivation |
| 76 | + |
| 77 | +Running public image registries is very expensive and eats up a significant chunk of the project's Infrastructure budget. We built `registry.k8s.io` image registry to serve images from various origins around the world depending on the location of the user. For example, an a kops Kubernetes cluster in eu-west-1 can pull images from an AWS S3 bucket in the same region which is very fast and more importantly very cheap for the Kubernetes project. |
| 78 | + |
| 79 | +There was a plan to redirect `k8s.gcr.io` to `registry.k8s.io` but it didn't [work out](https://kubernetes.slack.com/archives/CCK68P2Q2/p1666725317568709) so we backported the image registry defaults to 1.24, 1.23, and 1.22 so all the patch releases from December 2022 will using the new registry by default. |
| 80 | + |
| 81 | +We are currently exceeding our budget as it will take quite a while for end users to upgrade Kubernetes to v1.25 so we want to incentivise our end users to move to the new registry as fast as possible by freezing the registry by 1.27. This would mean that all subsequent image releases will not be available on the old registry. |
| 82 | + |
| 83 | +### Goals |
| 84 | + |
| 85 | +Freeze `k8s.gcr.io` image registry and push all new images and tags exclusively to the `registry.k8s.io` image registry. |
| 86 | + |
| 87 | +### Non-Goals |
| 88 | + |
| 89 | +- `registry.k8s.io` internal implementations details. That is handled separately by sig-k8s-infra. |
| 90 | + |
| 91 | +## Proposal |
| 92 | + |
| 93 | +Freeze the `k8s.gcr.io` image by not pushing any new digests or tags after 1.27 release. The 1.27 release itself won't be available on `k8s.gcr.io`. |
| 94 | + |
| 95 | +I'm proposing that on the 1st of April 2023 (10 days before 1.27 is released): |
| 96 | + |
| 97 | +- `k8s.gcr.io` is frozen and no new images will be published by any subproject. |
| 98 | +- last 1.23 release on `k8s.gcr.io` will be 1.23.18 (goes EoL before the freeze) |
| 99 | +- last 1.24 release on `k8s.gcr.io` will be 1.24.12 |
| 100 | +- last 1.25 release on `k8s.gcr.io` will be 1.25.8 |
| 101 | +- last 1.26 release on `k8s.gcr.io` will be 1.26.3 |
| 102 | +- 1.27.0 will not be available `k8s.gcr.io` |
| 103 | + |
| 104 | +### Risks and Mitigations |
| 105 | + |
| 106 | +There are no risks. The old registry will still be available and you can pull the images before 1.27 on there. This change will also |
| 107 | +affect other users of k8s.gcr.io who should have already updated their helm charts and manifests to use the new registry. |
| 108 | + |
| 109 | +## Design Details |
| 110 | + |
| 111 | +The image promotion process is described [here](https://github.com/kubernetes/k8s.io/tree/main/k8s.gcr.io). Please read it for full details. |
| 112 | + |
| 113 | +This is the planned technical changes(grouped by repos): |
| 114 | + |
| 115 | +- k-sigs/promo-tools |
| 116 | + - merge https://github.com/kubernetes-sigs/promo-tools/pull/669 |
| 117 | +- k/k8s.io |
| 118 | + - Fix https://github.com/kubernetes/k8s.io/issues/4611 |
| 119 | + - clean up the contents of the `registry.k8s.io` folder. Most of the content should be in k/registry.k8s.io repository |
| 120 | + - duplicate the top level folder `k8s.gcr.io` in the repo and call it `registry.k8s.io` |
| 121 | +- k/test-infra |
| 122 | + - blockade the k8s.gcr.io folder in k/k8s.io repository. blockade is a prow plugin that rejects PRs that modify specific folders/files. |
| 123 | + - update the ProwJobs [post-k8sio-image-promo](https://github.com/kubernetes/test-infra/blob/master/config/jobs/kubernetes/sig-k8s-infra/trusted/releng/releng-trusted.yaml) and [pull-k8sio-cip](https://github.com/kubernetes/test-infra/blob/master/config/jobs/kubernetes/sig-k8s-infra/releng/artifact-promotion-presubmits.yaml) `thin-manifest-dir` flags to point to the new folder |
| 124 | + |
| 125 | + |
| 126 | +### Test Plan |
| 127 | + |
| 128 | +This is not applicable. |
| 129 | + |
| 130 | +### Graduation Criteria |
| 131 | + |
| 132 | +This is not applicable. |
| 133 | + |
| 134 | +### Upgrade / Downgrade Strategy |
| 135 | + |
| 136 | +When users upgrade to various kubernetes versions that use the new image registry, they will be able to pull images from the new |
| 137 | +registry. |
| 138 | + |
| 139 | +### Version Skew Strategy |
| 140 | + |
| 141 | +This is not applicable. |
| 142 | + |
| 143 | +## Communication Plan |
| 144 | + |
| 145 | +This is a major change and requires an appropriate communication plan. |
| 146 | + |
| 147 | +We plan on communicating this change via: |
| 148 | +- an email to k-dev |
| 149 | +- an email to k-announce |
| 150 | +- a blog post on kubernetes.io |
| 151 | + |
| 152 | +## Production Readiness Review Questionnaire |
| 153 | + |
| 154 | +This is not applicable. |
| 155 | + |
| 156 | +## Implementation History |
| 157 | + |
| 158 | +## Drawbacks |
| 159 | + |
| 160 | +This is not applicable. |
| 161 | + |
| 162 | +<!-- |
| 163 | +Why should this KEP _not_ be implemented? |
| 164 | +--> |
| 165 | + |
| 166 | +## Alternatives |
| 167 | + |
| 168 | +We keep pushing new images to the old registry. |
| 169 | + |
| 170 | +## Infrastructure Needed (Optional) |
| 171 | + |
| 172 | +None as it has already been deployed. |
0 commit comments