Skip to content

Commit b6349b8

Browse files
authored
Merge pull request kubernetes#2128 from zshihang/master
add a FG RootCAConfigMap and update timeline
2 parents cabc0f1 + f0eef59 commit b6349b8

File tree

2 files changed

+115
-33
lines changed

2 files changed

+115
-33
lines changed

keps/sig-auth/1205-bound-service-account-tokens/README.md

Lines changed: 111 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,18 @@
2121
- [ServiceAccount Admission Controller Migration](#serviceaccount-admission-controller-migration)
2222
- [Prerequisites](#prerequisites)
2323
- [Safe rollout of time-bound token](#safe-rollout-of-time-bound-token)
24+
- [Test Plan](#test-plan)
25+
- [TokenRequest/TokenRequestProjection](#tokenrequesttokenrequestprojection)
26+
- [RootCAConfigMap](#rootcaconfigmap)
27+
- [BoundServiceAccountTokenVolume](#boundserviceaccounttokenvolume)
2428
- [Graduation Criteria](#graduation-criteria)
25-
- [Alpha->Beta](#alpha-beta)
26-
- [Beta -> GA Graduation](#beta---ga-graduation)
29+
- [TokenRequest/TokenRequestProjection](#tokenrequesttokenrequestprojection-1)
30+
- [Beta->GA](#beta-ga)
31+
- [RootCAConfigMap](#rootcaconfigmap-1)
32+
- [Beta->GA](#beta-ga-1)
33+
- [BoundServiceAccountTokenVolume](#boundserviceaccounttokenvolume-1)
34+
- [Alpha->Beta](#alpha-beta)
35+
- [Beta -> GA Graduation](#beta---ga-graduation)
2736
- [Production Readiness Review Questionnaire](#production-readiness-review-questionnaire)
2837
- [Feature Enablement and Rollback](#feature-enablement-and-rollback)
2938
- [Scalability](#scalability)
@@ -291,11 +300,15 @@ operators should make sure:
291300

292301
**Note**: If having trouble in finding places using in-cluster config
293302
completely, cluster operators can specify flag
294-
`--service-account-extend-token-expiration` to kube apiserver to allow
303+
`--service-account-extend-token-expiration=true` to kube apiserver to allow
295304
tokens have longer expiration temporarily during the migration. Any usage of
296305
legacy token will be recorded in both metrics and audit logs. After fixing
297-
all the potentially broken workloads, don't forget to remove the flag so
298-
that the original expiration settings are honored.
306+
all the potentially broken workloads, turn off the flag so that the original
307+
expiration settings are honored. Note the
308+
`--service-account-extend-token-expiration` mitigation defaults to true, and
309+
that cluster administrators can set it to
310+
`--service-account-extend-token-expiration=false` to turn off the mitigation
311+
if desired.
299312

300313
- Metrics: `serviceaccount_stale_tokens_total`
301314
- Audit: looking for `authentication.k8s.io/stale-token` annotation
@@ -343,36 +356,101 @@ are properly reloading tokens by:
343356
1. Add annotation to audit events for legacy and stale tokens including
344357
necessary information to locate problematic client.
345358

359+
### Test Plan
360+
361+
#### TokenRequest/TokenRequestProjection
362+
363+
- Unit tests
364+
- E2E tests
365+
- Projected jwt tokens are correctly mounted. (conformance test)
366+
- The owner and mode of projected tokens are correctly set
367+
- In-cluster clients work with Token rotation
368+
369+
#### RootCAConfigMap
370+
371+
- Unit tests
372+
- E2E tests
373+
- Every namespace has configmap `kube-root-ca.crt`
374+
375+
#### BoundServiceAccountTokenVolume
376+
377+
- Unit tests
378+
- An upgrade test
379+
380+
1. Create pod A with feature disabled where pod A is working and a secret
381+
volume is mounted
382+
2. Enable feature where pod A continue working
383+
3. Create pod B and it is working and projected volumes are mounted
384+
346385
### Graduation Criteria
347386

348-
#### Alpha->Beta
387+
#### TokenRequest/TokenRequestProjection
388+
389+
| Alpha | Beta | GA |
390+
| ----- | ---- | ---- |
391+
| 1.10 | 1.12 | 1.20 |
392+
393+
##### Beta->GA
349394

350-
Estimated version: v1.20
395+
- [x] In use by multiple distributions
396+
- [x] Approved by PRR and scalability
397+
- [x] Any known bugs fixed
398+
- [x] Tests passing
399+
- [x] E2E test [ServiceAccounts should mount projected service account
400+
token when requested](https://k8s-testgrid.appspot.com/sig-auth-gce#gce)
401+
- [x] E2E test [ServiceAccounts should set ownership and permission when
402+
RunAsUser or FsGroup is
403+
present](https://k8s-testgrid.appspot.com/sig-auth-gce#gce)
404+
- [x] E2E test
405+
[ServiceAccounts should support InClusterConfig with token rotation](https://k8s-testgrid.appspot.com/sig-auth-gce#gce-slow)
351406

352-
All known migration frictions have been fixed:
407+
#### RootCAConfigMap
353408

354-
- PodSecurityPolicies that allow secrets but not projected volumes will
355-
prevent the use of token volumes.
356-
- Fixed in https://github.com/kubernetes/kubernetes/pull/92006
357-
- In-cluster clients that don’t reload service account tokens will start
358-
failing an hour after deployment.
359-
- Mitigation added in https://github.com/kubernetes/kubernetes/issues/68164
360-
- Pods running as non root may not access the service account token.
361-
- Fixed in https://github.com/kubernetes/kubernetes/pull/89193
409+
| Alpha | Beta | GA |
410+
| ----- | ---- | ---- |
411+
| 1.13 | 1.20 | 1.21 |
362412

363-
An upgrade test is passing periodically:
413+
##### Beta->GA
364414

365-
1. Create pod A with feature disabled where pod A is working and a secret volume
366-
is mounted.
367-
2. Enable feature where pod A continue working
368-
3. Create pod B and it is working and projected volumes are mounted.
415+
- [ ] In use by multiple distributions
416+
- [ ] Approved by PRR and scalability
417+
- [ ] Any known bugs fixed
369418

370-
#### Beta -> GA Graduation
419+
#### BoundServiceAccountTokenVolume
371420

372-
Estimated version: v1.21+
421+
| Alpha | Beta | GA |
422+
| ----- | ---- | ---- |
423+
| 1.13 | 1.21 | 1.22 |
373424

374-
New `ServiceAccount` admission controller WAI in Beta for >= 1 minor without
375-
significant issues.
425+
##### Alpha->Beta
426+
427+
- [x] Any known bugs fixed
428+
429+
- [x] PodSecurityPolicies that allow secrets but not projected volumes
430+
will prevent the use of token volumes.
431+
- Fixed in https://github.com/kubernetes/kubernetes/pull/92006
432+
- [x] In-cluster clients that don’t reload service account tokens will
433+
start failing an hour after deployment.
434+
- Mitigation added in
435+
https://github.com/kubernetes/kubernetes/issues/68164
436+
- [x] Pods running as non root may not access the service account token.
437+
- Fixed in https://github.com/kubernetes/kubernetes/pull/89193
438+
439+
- [x] Tests passing
440+
441+
- [x] Upgrade test
442+
[sig-auth-serviceaccount-admission-controller-migration](https://k8s-testgrid.appspot.com/sig-auth-gce#upgrade-tests)
443+
444+
- [x] TokenRequest/TokenRequestProjection GA
445+
446+
- [ ] RootCAConfigMap GA
447+
448+
##### Beta -> GA Graduation
449+
450+
- [ ] Allow kube-apiserver to recognize multiple issuers to enable non
451+
disruptive issuer change.
452+
- [ ] New `ServiceAccount` admission controller work as intended in Beta
453+
for >= 1 minor release without significant issues.
376454

377455
## Production Readiness Review Questionnaire
378456

@@ -389,19 +467,20 @@ significant issues.
389467
of a node? no.
390468

391469
- **Does enabling the feature change any default behavior?** yes, pods'
392-
service account tokens will not be long-lived and are not stored as Secrets
393-
any more.
470+
service account tokens will expire after 1 year by default and are not
471+
stored as Secrets any more.
394472

395473
- **Can the feature be disabled once it has been enabled (i.e. can we roll
396-
back the enablement)?** yes. pods created while the feature was enabled will
397-
reference a configmap that can grow stale with the feature disabled.
474+
back the enablement)?** yes.
398475

399476
- **What happens if we reenable the feature if it was previously rolled
400477
back?** the same as the first enablement.
401478

402479
- **Are there any tests for feature enablement/disablement?**
480+
403481
- unit test: plugin/pkg/admission/serviceaccount/admission_test.go
404-
- upgrade test: test/e2e/upgrades/serviceaccount_admission_controller_migration.go
482+
- upgrade test:
483+
test/e2e/upgrades/serviceaccount_admission_controller_migration.go
405484

406485
### Scalability
407486

@@ -423,7 +502,8 @@ significant issues.
423502
provider?** no.
424503

425504
- **Will enabling / using this feature result in increasing size or count of
426-
the existing API objects?** no.
505+
the existing API objects?** controller creates one additional configmap per
506+
namespace.
427507

428508
- **Will enabling / using this feature result in increasing time taken by any
429509
operations covered by [existing SLIs/SLOs]?** no.

keps/sig-auth/1205-bound-service-account-tokens/kep.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ stage: beta
1717
latest-milestone: "v1.20"
1818
milestone:
1919
alpha: "v1.13"
20-
beta: "v1.20"
20+
beta: "v1.21"
2121
feature-gates:
2222
- name: TokenRequest
2323
components:
@@ -27,10 +27,12 @@ feature-gates:
2727
components:
2828
- kube-apiserver
2929
- kubelet
30+
- name: RootCAConfigMap
31+
components:
32+
- kube-controller-manager
3033
- name: BoundServiceAccountTokenVolume
3134
components:
3235
- kube-apiserver
33-
- kube-controller-manager
3436
metrics:
3537
- serviceaccount_stale_tokens_total
3638
---

0 commit comments

Comments
 (0)