Skip to content

Commit abb8d60

Browse files
authored
Merge pull request kubernetes#2499 from shekhar-rajak/kep_new_template_sig_cluster_lifecycle_kubeadm
Migrating from old kep to new template: sig-cluster-lifecycle - kubeadm
2 parents bc6081c + 68ab7f8 commit abb8d60

File tree

19 files changed

+221
-247
lines changed

19 files changed

+221
-247
lines changed

keps/sig-cluster-lifecycle/kubeadm/0023-documentation-for-images.md

Lines changed: 20 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
2-
31
# Documentation for images
42

53
Open https://www.websequencediagrams.com/ and paste the spec for the desired image:
@@ -15,43 +13,43 @@ Open https://www.websequencediagrams.com/ and paste the spec for the desired ima
1513
```
1614
title kubeadm init (interactions with the v1beta1 configuration)
1715
18-
participant "user" as u
16+
participant "user" as u
1917
participant "kubeadm" as k
2018
participant "kubelet" as kk
2119
participant "node\n(api object)" as n
2220
participant "kubeadm-config\nConfigMap" as cm
23-
participant "kubeproxy-config\nConfigMap" as kpcm
21+
participant "kubeproxy-config\nConfigMap" as kpcm
2422
participant "kubelet-config\nConfigMap-1.*" as kcm
2523
26-
u->k:provide\nInitConfiguration (with NodeRegistrationOptions, ControlPlaneConfiguration)\nClusterConfiguration\nkube-proxy component configuration\nkubelet component configuration
24+
u->k:provide\nInitConfiguration (with NodeRegistrationOptions, ControlPlaneConfiguration)\nClusterConfiguration\nkube-proxy component configuration\nkubelet component configuration
2725
2826
k->kk:write kubelet component configuration\nto /var/lib/kubelet/config.yaml
2927
k->kk:write NodeRegistrationOptions\nto /var/lib/kubelet/kubeadm-flags.env
3028
kk->n:start node
31-
k->n:save NodeRegistrationOptions.CRISocket\nto kubeadm.alpha.kubernetes.io/cri-socket annotation
29+
k->n:save NodeRegistrationOptions.CRISocket\nto kubeadm.alpha.kubernetes.io/cri-socket annotation
3230
3331
k->k:use InitConfiguration\n(e.g. tokens)
3432
3533
k->cm:save ClusterConfiguration
3634
k->cm:add Current ControlPlaneConfiguration to ClusterConfiguration.Status
3735
38-
k->kpcm:save kube-proxy component configuration
39-
k->kcm:save kubelet component configuration
36+
k->kpcm:save kube-proxy component configuration
37+
k->kcm:save kubelet component configuration
4038
```
4139

4240
## kubeadm join (and join --control-plane)
4341

4442
```
4543
title kubeadm join and join --control-plane (interactions with the v1beta1 configuration)
4644
47-
participant "user" as u
45+
participant "user" as u
4846
participant "kubeadm" as k
4947
participant "kubeadm-config\nConfigMap" as cm
5048
participant "kubelet-config\nConfigMap-1.*" as kcm
5149
participant "kubelet" as kk
5250
participant "node\n(api object)" as n
5351
54-
u->k:provide\nJoinConfiguration\n(with NodeRegistrationOptions)
52+
u->k:provide\nJoinConfiguration\n(with NodeRegistrationOptions)
5553
5654
k->cm:read ClusterConfiguration
5755
cm->k:
@@ -62,29 +60,29 @@ kcm->k:
6260
k->kk:write kubelet component configuration\nto /var/lib/kubelet/config.yaml
6361
k->kk:write NodeRegistrationOptions\nto /var/lib/kubelet/kubeadm-flags.env
6462
kk->n:start node
65-
k->n:save NodeRegistrationOptions.CRISocket\nto kubeadm.alpha.kubernetes.io/cri-socket annotation
63+
k->n:save NodeRegistrationOptions.CRISocket\nto kubeadm.alpha.kubernetes.io/cri-socket annotation
6664
6765
k->cm:add new ControlPlaneConfiguration\nto ClusterConfiguration.Status\n(only for join --control-plane)
6866
```
6967

70-
## kubeadm reset
68+
## kubeadm reset
7169

7270
```
7371
title kubeadm reset (interactions with the v1beta1 configuration)
7472
75-
participant "user" as u
73+
participant "user" as u
7674
participant "kubeadm" as k
7775
participant "kubeadm-config\nConfigMap" as cm
7876
participant "node\n(api object)" as n
7977
8078
81-
u->k:
79+
u->k:
8280
8381
k->cm:read ClusterConfiguration
8482
cm->k:
8583
k->cm:remove ControlPlaneConfiguration\nfrom ClusterConfiguration.Status\n(only if the node hosts a control plane instance)
8684
87-
k->n:read kubeadm.alpha.kubernetes.io/cri-socket annotation
85+
k->n:read kubeadm.alpha.kubernetes.io/cri-socket annotation
8886
n->k:
8987
k->k:use CRIsocket\nto delete containers
9088
```
@@ -94,10 +92,10 @@ k->k:use CRIsocket\nto delete containers
9492
```
9593
title kubeadm upgrade apply (interactions with the v1beta1 configuration)
9694
97-
participant "user" as u
95+
participant "user" as u
9896
participant "kubeadm" as k
9997
participant "kubeadm-config\nConfigMap" as cm
100-
participant "kubeproxy-config\nConfigMap" as kpcm
98+
participant "kubeproxy-config\nConfigMap" as kpcm
10199
participant "kubelet-config\nConfigMap-1.*+1" as kcm
102100
participant "kubelet" as kk
103101
participant "node\n(api object)" as n
@@ -115,17 +113,17 @@ k->kpcm:read kube-proxy component configuration
115113
kpcm->k:
116114
k->k:update kube-proxy\ncomponent configuration\nusing api machinery
117115
k->kpcm:save updated kube-proxy component configuration
118-
note over kpcm, n:the updated kube-proxy component configuration will\nbe used by the updated kube-proxy DaemonSet
116+
note over kpcm, n:the updated kube-proxy component configuration will\nbe used by the updated kube-proxy DaemonSet
119117
120118
k->kcm:read kubelet component configuration
121119
kcm->k:
122120
k->k:update kubelet\ncomponent configuration\nusing api machinery
123-
k->kcm:save updated kubelet component configuration
121+
k->kcm:save updated kubelet component configuration
124122
k->kk:write kubelet component configuration\nto /var/lib/kubelet/config.yaml
125123
k->kk:write NodeRegistrationOptions\nto /var/lib/kubelet/kubeadm-flags.env
126124
kk->n:start node
127125
128-
note over kcm, n:the updated kubelet component configuration\nwill be used by other nodes\nwhen running\nkubeadm upgrade nodes locally
126+
note over kcm, n:the updated kubelet component configuration\nwill be used by other nodes\nwhen running\nkubeadm upgrade nodes locally
129127
130128
```
131129

@@ -134,15 +132,14 @@ note over kcm, n:the updated kubelet component configuration\nwill be used by ot
134132
```
135133
title kubeadm upgrade node (interactions with the v1beta1 configuration)
136134
137-
participant "user" as u
135+
participant "user" as u
138136
participant "kubeadm" as k
139137
participant "kubelet-config\nConfigMap-1.*" as kcm
140138
participant "kubelet" as kk
141139
142-
u->k:
140+
u->k:
143141
144142
k->kcm:read kubelet\ncomponent configuration
145143
kcm->k:
146144
k->kk:write kubelet component configuration\nto /var/lib/kubelet/config.yaml
147145
```
148-

keps/sig-cluster-lifecycle/kubeadm/0008-kubeadm-config-versioning.md renamed to keps/sig-cluster-lifecycle/kubeadm/2498-Kubeadm-Config-versioning/README.md

Lines changed: 13 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,3 @@
1-
---
2-
title: Kubeadm Config versioning
3-
authors:
4-
- "@liztio"
5-
owning-sig: sig-cluster-lifecycle
6-
participating-sigs:
7-
reviewers:
8-
- "@timothysc"
9-
approvers:
10-
- TBD
11-
editor: TBD
12-
creation-date: 2018-04-12
13-
last-updated: 2018-04-12
14-
status: provisional
15-
see-also:
16-
replaces:
17-
superseded-by:
18-
---
19-
201
# Kubeadm Config Versioning
212

223
## Table of Contents
@@ -39,16 +20,16 @@ superseded-by:
3920

4021
## Summary
4122

42-
Kubeadm uses MasterConfiguraton for two distinct but similar operations: Initialising a new cluster and upgrading an existing cluster.
43-
The former is typically created by hand by an administrator.
23+
Kubeadm uses MasterConfiguraton for two distinct but similar operations: Initialising a new cluster and upgrading an existing cluster.
24+
The former is typically created by hand by an administrator.
4425
It is stored on disk and passed to `kubeadm init` via command line flag.
4526
The latter is produced by kubeadm using supplied configuration files, command line options, and internal defaults.
46-
It will be stored in a ConfigMap so upgrade operations can find.
27+
It will be stored in a ConfigMap so upgrade operations can find.
4728

4829
Right now the configuration format is unversioned.
4930
This means configuration file formats can change between kubeadm versions and there's no safe way to update the configuration format.
5031

51-
We propose a stable versioning of this configuration, `v1alpha2` and eventually `v1beta1`.
32+
We propose a stable versioning of this configuration, `v1alpha2` and eventually `v1beta1`.
5233
Version information will be _mandatory_ going forward, both for user-generated configuration files and machine-generated configuration maps.
5334

5435
There as an [existing document][config] describing current Kubernetes best practices around component configuration.
@@ -57,12 +38,12 @@ There as an [existing document][config] describing current Kubernetes best pract
5738

5839
## Motivation
5940

60-
After 1.10.0, we discovered a bug in the upgrade process.
61-
The `MasterConfiguraton` embedded a [struct that had changed][proxyconfig], which caused a backwards-incompatible change to the configuration format.
41+
After 1.10.0, we discovered a bug in the upgrade process.
42+
The `MasterConfiguraton` embedded a [struct that had changed][proxyconfig], which caused a backwards-incompatible change to the configuration format.
6243
This caused `kubeadm upgrade` to fail, because a newer version of kubeadm was attempting to deserialise an older version of the struct.
6344

64-
Because the configuration is often written and read by different versions of kubeadm compiled by different versions of kubernetes,
65-
it's very important for this configuration file to be well-versioned.
45+
Because the configuration is often written and read by different versions of kubeadm compiled by different versions of kubernetes,
46+
it's very important for this configuration file to be well-versioned.
6647

6748
[proxyconfig]: https://github.com/kubernetes/kubernetes/commit/57071d85ee2c27332390f0983f42f43d89821961
6849

@@ -87,27 +68,27 @@ The concrete proposal is as follows.
8768
1. Immediately start writing Kind and Version information into the `MasterConfiguraton` struct.
8869
2. Define the previous (1.9) version of the struct as `v1alpha1`.
8970
3. Duplicate the KubeProxyConfig struct that caused the schema change, adding the old version to the `v1alpha1` struct.
90-
3. Create a new `v1alpha2` directory mirroring the existing [`v1alpha1`][v1alpha1], which matches the 1.10 schema.
71+
3. Create a new `v1alpha2` directory mirroring the existing [`v1alpha1`][v1alpha1], which matches the 1.10 schema.
9172
This version need not duplicate the file as well.
9273
2. Warn users if their configuration files do not have a version and kind
9374
4. Use [apimachinery's conversion][conversion] library to design migrations from the old (v1alpha1) versions to the new (v1alpha2) versions
9475
5. Determine the changes for v1beta1
9576
6. With v1beta1, enforce presence of version numbers in config files and ConfigMaps, erroring if not present.
9677

9778
[conversion]: https://godoc.org/k8s.io/apimachinery/pkg/conversion
98-
[v1alpha1]: https://github.com/kubernetes/kubernetes/tree/d7d4381961f4eb2a4b581160707feb55731e324e/cmd/kubeadm/app/apis/kubeadm
79+
[v1alpha1]: https://github.com/kubernetes/kubernetes/tree/d7d4381961f4eb2a4b581160707feb55731e324e/cmd/kubeadm/app/apis/kubeadm
9980

10081
### User Stories [optional]
10182

10283
#### As a user upgrading with Kubeadm, I want the upgrade process to not fail with unfamiliar configuration.
10384

10485
In the past, the haphazard nature of the versioning system has meant it was hard to provide strong guarantees between versions.
105-
Implementing strong version guarantees mean any given configuration generated in the past by kubeadm will work with a future version of kubeadm.
86+
Implementing strong version guarantees mean any given configuration generated in the past by kubeadm will work with a future version of kubeadm.
10687
Deprecations can happen in the future in well-regulated ways.
10788

10889
#### As a infrastructure system using kubeadm, I want to be able to write configuration files that always work.
10990

110-
Having a configuration file that changes without notice makes it very difficult to write software that integrates with kubeadm.
91+
Having a configuration file that changes without notice makes it very difficult to write software that integrates with kubeadm.
11192
By providing strong version guarantees, we can guarantee that the files these tools produce will work with a given version of kubeadm.
11293

11394
### Implementation Details/Notes/Constraints
@@ -120,7 +101,7 @@ When we do need to interface with the rest of the project, we will do so explici
120101

121102
### Risks and Mitigations
122103

123-
Moving to a strongly versioned configuration from a weakly versioned one must be done carefully so as not break kubeadm for existing users.
104+
Moving to a strongly versioned configuration from a weakly versioned one must be done carefully so as not break kubeadm for existing users.
124105
We can start requiring versions of the existing `v1alpha1` format, issuing warnings to users when Version and Kind aren't present.
125106
These fields can be used today, they're simply ignored.
126107
In the future, we could require them, and transition to using `v1alpha1`.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
title: Kubeadm Config versioning
2+
kep-number: 2498
3+
authors:
4+
- "@liztio"
5+
owning-sig: sig-cluster-lifecycle
6+
participating-sigs:
7+
reviewers:
8+
- "@timothysc"
9+
approvers:
10+
- TBD
11+
editor: TBD
12+
creation-date: 2018-04-12
13+
last-updated: 2018-04-12
14+
status: provisional
15+
see-also:
16+
replaces:
17+
superseded-by:

keps/sig-cluster-lifecycle/kubeadm/0015-kubeadm-join-control-plane.md renamed to keps/sig-cluster-lifecycle/kubeadm/2500-kubeadm-join-control-plane-workflow/README.md

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,5 @@
11
# kubeadm join --control-plane workflow
22

3-
## Metadata
4-
5-
```yaml
6-
---
7-
title: "kubeadm join --control-plane workflow"
8-
authors:
9-
- "@fabriziopandini"
10-
owning-sig: sig-cluster-lifecycle
11-
reviewers:
12-
- "@chuckha"
13-
- "@detiber"
14-
- "@luxas"
15-
approvers:
16-
- "@luxas"
17-
- "@timothysc"
18-
editor: "@fabriziopandini"
19-
creation-date: 2018-01-28
20-
last-updated: 2019-04-18
21-
status: provisional
22-
see-also:
23-
- KEP 0004
24-
---
25-
```
26-
273
## Table of Contents
284

295
<!-- toc -->
@@ -298,7 +274,7 @@ The updated join workflow will be the following:
298274
> This decision introduce also a limitation, because HA with local etcd won't be supported when the
299275
> user sets the `--apiserver-advertise-address` of each kube-apiserver instance, including the
300276
> instance on the bootstrap control plane, _equal to the `controlplaneAddress` endpoint_.
301-
277+
302278
2. Apply master taint and label to the node.
303279

304280
3. Update the `kubeadm-config` configMap with the information about the new control plane instance.
@@ -398,7 +374,7 @@ one control plane instances, but with a new sub-step to be executed on secondary
398374
## Drawbacks
399375

400376
The `kubeadm join --control-plane` workflow requires that some condition are satisfied at `kubeadm init` time,
401-
but the user will be informed about compliance/non compliance of such conditions only when running
377+
but the user will be informed about compliance/non compliance of such conditions only when running
402378
`kubeadm join --control plane`.
403379

404380
## Alternatives
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
title: "kubeadm join --control-plane workflow"
2+
kep-number: 2500
3+
authors:
4+
- "@fabriziopandini"
5+
owning-sig: sig-cluster-lifecycle
6+
reviewers:
7+
- "@chuckha"
8+
- "@detiber"
9+
- "@luxas"
10+
approvers:
11+
- "@luxas"
12+
- "@timothysc"
13+
editor: "@fabriziopandini"
14+
creation-date: 2018-01-28
15+
last-updated: 2019-04-18
16+
status: provisional
17+
see-also:
18+
- KEP 0004

keps/sig-cluster-lifecycle/kubeadm/0029-20180918-kubeadm-phases-beta.md renamed to keps/sig-cluster-lifecycle/kubeadm/2501-kubeadm-phases-to-beta/README.md

Lines changed: 5 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,3 @@
1-
---
2-
title: kubeadm phases to beta
3-
authors:
4-
- "@fabriziopandini"
5-
owning-sig: sig-cluster-lifecycle
6-
reviewers:
7-
- "@chuckha"
8-
- "@detiber"
9-
- "@liztio"
10-
- "@neolit123"
11-
approvers:
12-
- "@luxas"
13-
- "@timothysc"
14-
editor: "@fabriziopandini"
15-
creation-date: 2018-03-16
16-
last-updated: 2019-01-22
17-
status: provisional
18-
see-also:
19-
- KEP 0008
20-
---
21-
221
# kubeadm phases to beta
232

243
## Table of Contents
@@ -72,7 +51,7 @@ duplication of code or in some case inconsistencies between the init and phase i
7251
- This proposal doesn't include any changes of improvements to the actual `kubeadm init`
7352
workflow.
7453
- This proposal doesn't include a plan for implementation of phases in workflows
75-
different than the `kubeadm init` workflow; such plans will be defined by the sig
54+
different than the `kubeadm init` workflow; such plans will be defined by the sig
7655
during release planning for each cycle, and then documented in this KEP.
7756
- v1.14 implementation of phases in the `kubeadm join` workflow
7857
- v1.15 implementation of phases in the `kubeadm upgrade node` workflow
@@ -104,10 +83,10 @@ own, nested, ordered sequence of phases. For instance:
10483
```bash
10584
preflight Run master pre-flight checks
10685
certs Generates all PKI assets necessary to establish the control plane
107-
/ca Generates a self-signed kubernetes CA
86+
/ca Generates a self-signed kubernetes CA
10887
/apiserver Generates an API server serving certificate and key
10988
...
110-
kubeconfig Generates all kubeconfig files necessary to establish the control plane
89+
kubeconfig Generates all kubeconfig files necessary to establish the control plane
11190
/admin Generates a kubeconfig file for the admin to use and for kubeadm itself
11291
/kubelet Generates a kubeconfig file for the kubelet to use.
11392
...
@@ -154,7 +133,7 @@ workflows e.g. reuse of phase `certs` in both `kubeadm init` and `kubeadm join`
154133

155134
## Implementation History
156135

157-
* [#61631](https://github.com/kubernetes/kubernetes/pull/61631) First prototype implementation
136+
* [#61631](https://github.com/kubernetes/kubernetes/pull/61631) First prototype implementation
158137
(now outdated)
159138
* v1.13 implementation of phases in the `kubeadm init` workflow
160139
* v1.14 implementation of phases in the `kubeadm join` workflow
@@ -174,4 +153,4 @@ approach.
174153

175154
It is possible to graduate phases by simply moving corresponding command to first level,
176155
but this approach provide less opportunities for reducing the effort
177-
for maintaining phases up to date with the changes of kubeadm.
156+
for maintaining phases up to date with the changes of kubeadm.

0 commit comments

Comments
 (0)