Skip to content

Commit ade28d6

Browse files
authored
Merge pull request #8194 from saschagrunert/platforms-guide
Add platforms guide
2 parents b9a05f6 + 280f2b9 commit ade28d6

File tree

1 file changed

+146
-0
lines changed

1 file changed

+146
-0
lines changed

Diff for: contributors/guide/platforms.md

+146
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
---
2+
title: "Platforms Guide"
3+
weight: 5
4+
description: |
5+
Outlines the necessary steps to either add or remove supported platform builds
6+
in Kubernetes.
7+
---
8+
9+
## Adding supported platforms
10+
11+
The default Kubernetes platform is `linux/amd64`. This platform has always been
12+
fully tested, and the build and release systems initially supported only this
13+
platform. SIG Release started an [effort to support multiple architectures][0].
14+
As part of this effort, they added support in our build and release pipelines
15+
for the architectures `arm`, `arm64`, `ppc64le` and `s390x` on different
16+
operating systems like Linux, Windows and macOS.
17+
18+
[0]: https://github.com/kubernetes/kubernetes/issues/38067
19+
20+
The main focus was to have binaries and container images to be available for
21+
these architectures/operating systems. Contributors should be able to to take
22+
these artifacts and set up CI jobs to adequately test these platforms.
23+
Specifically to call out the ability to run conformance tests on these
24+
platforms.
25+
26+
Target of this document is to provide a starting point for adding new platforms
27+
to Kubernetes from a SIG Architecture and SIG Release perspective. This does not
28+
include release mechanics or supportability in terms of functionality.
29+
30+
### Step 0: Engage with the community
31+
32+
The first step is to express the interest in adding a new platform or promoting
33+
one into a different Tier. This can be done by opening a GitHub issue in the
34+
[SIG Release repository](https://github.com/kubernetes/sig-release/issues),
35+
attending the weekly SIG Release meetings or writing a message to the [SIG
36+
Release mailing list](https://groups.google.com/g/kubernetes-sig-release).
37+
38+
The ultimate decision to approve or reject a platform will be done in the
39+
community as part of the standard lazy consensus. Even if all mentioned
40+
requirements for a platform are being met, it's possible that external
41+
dependencies, infrastructure costs or anything else have influence on the
42+
maintainability of the platform.
43+
44+
### Step 1: Building
45+
46+
The container image based build infrastructure should support this architecture.
47+
This implicitly requires the following:
48+
49+
- golang should support the platform
50+
- All dependencies, whether vendored or run separately, should support this
51+
platform
52+
53+
In other words, anyone in the community should be able to use the SIG Release
54+
provided build tooling to generate all artifacts required to build Kubernetes.
55+
56+
More information about how to build Kubernetes can be found in [the build
57+
documentation][1].
58+
59+
[1]: https://github.com/kubernetes/kubernetes/tree/3f7c09e/build#building-kubernetes
60+
61+
### Step 2: Testing
62+
63+
It is not enough for builds to work as it gets bit-rotted quickly when vendoring
64+
in in new changes, update versions of things to be used etc. This means the
65+
project need a good set of tests that exercise a wide battery of jobs in this
66+
new architecture.
67+
68+
A good starting point from a testing perspective are:
69+
70+
- unit tests
71+
- e2e tests
72+
- node e2e tests
73+
74+
This will ensure that community members can rely on these architectures on a
75+
consistent basis, which will give folks who are making changes a signal when
76+
they break things in a specific architecture.
77+
78+
This implies a set of folks who stand up and maintain both post-submit and
79+
periodic tests, watch them closely and raise the flag when things break. They
80+
will also have to help debug and fix any platform specific issues as well.
81+
82+
Creating custom [testgrid][4] dashboards can help to monitor platform specific
83+
tests.
84+
85+
[4]: https://testgrid.k8s.io
86+
87+
### Step 3: Releasing
88+
89+
The first 2 steps provide a reasonable expectation that there are people taking
90+
care of a supported platform and it works in a reproducible environment.
91+
92+
Getting to the next level is another big jump, because it needs to be ensured
93+
that real users can rely on the shipped artifacts.
94+
95+
This means specifically to add a set of CI jobs to the release-informing and
96+
release-blocking tabs of testgrid. The Kubernetes release team has a "CI signal"
97+
group that relies on the status(es) of these jobs to either ship or hold a
98+
release. Essentially, if things are mostly red with occasional green, it would
99+
be prudent to not even bother making this architecture as part of the release.
100+
CI jobs get added to release-informing first and when these get to a point where
101+
they work really well, then they get promoted to release-blocking.
102+
103+
The main problem here is once the project starts to ship something, users will
104+
start to rely on it. While it's straight forward to setup a CI job as a one time
105+
thing, it's a totally one to consistently maintain them over time. What SIG
106+
Release is looking for is a strong green CI signal for release managers to cut a
107+
release and for folks to be able to report problems and them getting addressed.
108+
This also includes [conformance testing][2] to ensure that the supported
109+
platform behaves as intended. This can be done by working with SIG Architecture
110+
as part of the [conformance sub project][3] in addition to testing and release.
111+
112+
[2]: https://github.com/cncf/k8s-conformance
113+
[3]: https://github.com/kubernetes/community/tree/master/sig-architecture#conformance-definition
114+
115+
### Step 4: Finishing
116+
117+
If you got this far, you really have made it! You have a clear engagement with
118+
the community, you are working seamlessly with all the relevant SIGs, you have
119+
your content in the Kubernetes release and get end users to adopt your
120+
architecture. Having achieved conformance, you will gain conditional use of the
121+
Kubernetes trademark relative to your offerings.
122+
123+
## Deprecating and removing supported platforms
124+
125+
Supported platforms may be considered as deprecated for various reasons, for
126+
example if they are being replaced by new ones, are not actively used or
127+
maintained any more. Deprecating an already supported platform has to follow a
128+
couple of steps:
129+
130+
1. The platform deprecation has been announced on the [Kubernetes Announce
131+
mailing list](https://groups.google.com/g/kubernetes-announce)
132+
and links to an Kubernetes GitHub issue for further discussions and consensus.
133+
134+
1. The deprecation will be active immediately after consensus has been reached
135+
at a set deadline. This incorporates approval from SIG Release and
136+
Architecture.
137+
138+
1. Removing the supported platform will be done in the beginning of the next
139+
minor (v1.N+1.0) release cycle, which means to:
140+
- Update the Kubernetes build scripts to exclude the platform from all targets
141+
- Update the [kubernetes/sig-release](https://github.com/kubernetes/sig-release)
142+
repository to reflect the current set of supported platforms.
143+
144+
Please note that actively supported release branches are not affected by the
145+
removal. This ensures compatibility with existing artifact consumers on a best
146+
effort basis.

0 commit comments

Comments
 (0)