Skip to content

Commit 300cc1d

Browse files
committed
Update kep according to hackmd content
1 parent bfdee87 commit 300cc1d

File tree

2 files changed

+63
-14
lines changed

2 files changed

+63
-14
lines changed

keps/sig-release/3000-artifact-distribution/README.md

Lines changed: 62 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
# KEP 3000: Artifact Distribution Policy
1+
# KEP/MST-3000: Image Promotion and Distribution Policy
22

33
<!-- toc -->
4+
45
- [Summary](#summary)
56
- [Motivation](#motivation)
67
- [Goals](#goals)
@@ -12,7 +13,7 @@
1213
- [Notes/Constraints/Caveats](#notesconstraintscaveats)
1314
- [Risks and Mitigations](#risks-and-mitigations)
1415
- [Design Details](#design-details)
15-
- [Artifact Promotion](#artifact-promotion)
16+
- [Release Promotion](#release-promotion)
1617
- [Policy](#policy)
1718
- [Process](#process)
1819
- [Artifact Distribution](#artifact-distribution)
@@ -21,7 +22,6 @@
2122
- [Alternatives / Background](#alternatives--background)
2223
- [How much is this going to save us?](#how-much-is-this-going-to-save-us)
2324
- [Infrastructure Needed](#infrastructure-needed)
24-
- [Hack on this doc](#hack-on-this-doc)
2525
<!-- /toc -->
2626

2727
## Summary
@@ -32,14 +32,30 @@ The global community should be routed to the appropriate mirror for their countr
3232

3333
This KEP should cover the policy and distribution mechanisms we will put in place to allow creating a globally distributed, multi-cloud and country solution.
3434

35+
## Background (from wiki)
36+
3537
## Motivation
3638

37-
Currently we push to a single provider, and distributing to the rest of community comes at great cost nearing $150k/month (mostly egress) in donations.
39+
For a few years now, we have been using k8s.gcr.io in all our repositories as default repository for downloading images from.
3840

39-
Additionally, some of our community members are unable to access the official release artifacts due to country level firewalls that do not them connect to Google services.
41+
The cost of distributing Kubernetes comes at great cost nearing $150kUSD/month (mostly egress) in donations.
42+
43+
Additionally some of our community members are unable to access the official release artifacts due to country level firewalls that do not them connect to Google services.
4044

4145
Ideally we can dramatically reduce cost and allow everyone in the world to download the artifacts released by our community.
4246

47+
We are now used to using the [image promoter process](https://github.com/kubernetes/enhancements/tree/master/keps/sig-release/1734-k8s-image-promoter) to promote images to the official kubernetes container registry using the infrastructure (GCR staging repos etc) provided by [sig-k8s-infra](https://github.com/kubernetes/k8s.io/tree/main/k8s.gcr.io)
48+
49+
## Why a new domain?
50+
51+
So far we (all kubernetes project) are using GCP as our default infrastructure provider for all things like GCS, GCR, GKE based prow clusters etc. Google has graciously sponsored a lot of our infrastructure costs as well. However for about a year or so we are finding that our costs are sky-rocketing because the community usage of this infrastructure has been from other cloud providers like AWS, Azure etc. So in conjunction with CNCF staff we are trying to put together a plan to host copies of images and binaries nearer to where they are used rather than incur cross-cloud costs.
52+
53+
One part of this plan is to setup a proxy OCI service, that can identify where the traffic is coming from and redirect to the nearest image layer/repository. This is why we are setting up a new service using what we call an [oci-proxy](https://github.com/kubernetes-sigs/oci-proxy) for everyone to use. This proxy will identify traffic coming from, for example, a certain AWS region, then will setup a HTTP redirect to a source in that AWS region. If we get traffic from GKE/GCP or we don't know where the traffic is coming from, it will still redirect to the current infrastructure (k8s.gcr.io).
54+
55+
## How can we help?
56+
57+
When Kubernetes master opens up for v1.25 development, we need to update all default urls in our code and test harness to the new registry url. As a team sig-k8s-infra is signing up to ensure that this oci-proxy based registry.k8s.io will be as robust and available as the current setup. As a backup, we will continue to run the current k8s.gcr.io as well. So do not worry about that going away. Turning on traffic to the new url will help us monitor and fix things if/when they break and we will be able to tune traffic and lower our costs of operation.
58+
4359
### Goals
4460

4561
A policy and procedure for use by SIG Release to promote container images and release binaries to multiple registries and mirrors.
@@ -48,7 +64,17 @@ A solution to allow redirection to appropriate mirrors to lower cost and allow a
4864

4965
### Non-Goals
5066

51-
Anything related to creation of artifacts, bom, digital signatures.
67+
Anything related to creation of artifacts, bom, digital signatures, staging buckets.
68+
69+
### What is not in scope
70+
71+
- Currently we focus on AWS only. We are getting a lot of help from AWS in terms of technical details as well as targeted infrastructure costs for standing up and running this infrastructure
72+
73+
### What are good goals to shoot for
74+
75+
- In terms of cost reduction, monitor GCP infrastructure and get to the point where we fully avoid serving large binary image layers from GCR/GCS
76+
- We can add other AWS regions and clouds as needed in well known documented way
77+
- Seamless transition for the community from the old k8s.gcr.io to registry.k8s.io with same rock solid stability as we now have with k8s.gcr.io
5278

5379
## Proposal
5480

@@ -58,6 +84,19 @@ First, the policy and procedures to promote/upload our artifacts to multiple pro
5884

5985
Additionally we require a registry and artifact url-redirection solution to the local cloud provider or country.
6086

87+
## What exactly are you doing?
88+
89+
- We are setting up an AWS account with an IAM role and s3 buckets in AWS regions where we see a large percentage of source image pull traffic
90+
- We will iterate on a sandbox url (registry.sandbox.k8s.io) for our experiments and ONLY promote things to (registry.k8s.io) when we have complete confidence
91+
- both registry and registry.sandbox are serving traffic using oci-proxy on google cloud run
92+
- oci-proxy will be updated to identify incoming traffic from AWS regions based on IP ranges so we can route traffic to s3 buckets in that region. If a specific AWS region do not currently host s3 buckets, we will redirect to the nearest region which does have s3 buckets (tradeoff between storage and network costs)
93+
- We will bulk sync existing image layers to these s3 layers as a starting point (from GCS/GCR)
94+
- We will update image-promoter to push to these s3 buckets as well in addition to the current setup
95+
- We will set up monitoring/reporting to check on new costs we incur on the AWS infrastructure and update what we do in GCP infrastructure as well to include the new components
96+
- We will have a plan in place on how we could add additional AWS regions in the future
97+
- We will have CI jobs that will run against registry.sandbox as well to monitor stability before we promote code to registry
98+
- We will automate the deployment/monitoring and testing of code landing in the oci-proxy repository
99+
61100
### User Stories
62101

63102
#### SIG Release - Image Promotion
@@ -94,7 +133,7 @@ This is the primary pipeline for delivering Kubernetes worldwide. Ensuring the a
94133

95134
## Design Details
96135

97-
### Artifact Promotion
136+
### Release Promotion
98137

99138
#### Policy
100139

@@ -112,24 +151,33 @@ Currently the promotion process is primarily driven by the CIP/[promo-tool#kprom
112151

113152
## Alternatives / Background
114153

154+
- Original KEP
155+
- https://github.com/kubernetes/enhancements/tree/master/keps/sig-release/1734-k8s-image-promoter
156+
- Oras
157+
- https://github.com/oras-project/oras
158+
- KubeCon Talk
159+
- https://www.youtube.com/watch?v=F2IFjz7sr9Q
115160
- Apache has a widespread mirror network
116-
- @dims has experience here
161+
- @dims has experince here
117162
- http://ws.apache.org/mirrors.cgi
118163
- https://infra.apache.org/mirrors.html
119164
- [Umbrella issue: k8s.gcr.io => registry.k8s.io solution k/k8s.io#1834
120-
](https://github.com/kubernetes/k8s.io/issues/1834)
165+
](https://github.com/kubernetes/k8s.io/issues/1834)
121166
- [ii/registry.k8s.io Implementation proposals](https://github.com/ii/registry.k8s.io#registryk8sio)
122167
- [ii.nz/blog :: Building a data pipline for displaying Kubernetes public artifact traffic
123-
](https://ii.nz/post/building-a-data-pipline-for-displaying-kubernetes-public-artifact-traffic/)
168+
](https://ii.nz/post/building-a-data-pipline-for-displaying-kubernetes-public-artifact-traffic/)
124169

125170
### How much is this going to save us?
126171

127-
![Cost of K8s Artifact hosting - Data Studio Graphs](https://i.imgur.com/LAn4UIE.png)
172+
Cost of K8s Artifact hosting - Data Studio Graphs
173+
174+
![](https://i.imgur.com/LAn4UIE.png)
128175

129176
## Infrastructure Needed
130177

131-
It would be good to request some donations for some larger providers, including one in China, via [Cloud Native Credits program](https://www.cncf.io/credits/).
178+
It would be good to request some donations for some larger providers, including one in China, via cncf.io/credits
132179

133-
## Hack on this doc
180+
## Hack this doc
134181

135-
[![hackmd-github-sync-badge](https://hackmd.io/KjHufZssQR654ShkZFUzyA/badge)](https://hackmd.io/KjHufZssQR654ShkZFUzyA)
182+
- [![hackmd-github-sync-badge](https://hackmd.io/KjHufZssQR654ShkZFUzyA/badge)](https://hackmd.io/KjHufZssQR654ShkZFUzyA)
183+
- [kubernetes/enhancements!3079](https://github.com/kubernetes/enhancements/pull/3079)

keps/sig-release/3000-artifact-distribution/kep.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ title: Artifact Distribution Policy
22
kep-number: 3000
33
authors:
44
- "@hh"
5+
- "@BobyMCbobs"
56
owning-sig: sig-release
67
participating-sigs:
78
- sig-k8s-infra

0 commit comments

Comments
 (0)